comparison Main.lua @ 201:df1cdcd46fe1 1.0.31

Only record an item's suffix_id and unique_id of the link's suffix_id is non-zero.
author James D. Callahan III <jcallahan@curse.com>
date Wed, 05 Dec 2012 08:44:57 -0600
parents 7fdf97c18c86
children 83fdf52f0310
comparison
equal deleted inserted replaced
200:2d2791de8a7c 201:df1cdcd46fe1
813 local item = DBEntry("items", item_id) 813 local item = DBEntry("items", item_id)
814 local item_string = select(3, item_link:find("^|%x+|H(.+)|h%[.+%]")) 814 local item_string = select(3, item_link:find("^|%x+|H(.+)|h%[.+%]"))
815 815
816 if item_string then 816 if item_string then
817 local _, _, _, _, _, _, _, suffix_id, unique_id, _, _, upgrade_id = (":"):split(item_string) 817 local _, _, _, _, _, _, _, suffix_id, unique_id, _, _, upgrade_id = (":"):split(item_string)
818 818 suffix_id = tonumber(suffix_id)
819 item.suffix_id = suffix_id 819
820 item.unique_id = bit.band(unique_id, 0xFFFF) 820 if suffix_id and suffix_id ~= 0 then
821 item.suffix_id = suffix_id
822 item.unique_id = bit.band(unique_id, 0xFFFF)
823 end
821 824
822 if upgrade_id then 825 if upgrade_id then
823 item.upgrade_id = upgrade_id 826 item.upgrade_id = upgrade_id
824 end 827 end
825 end 828 end