Mercurial > wow > wowdb-profiler
comparison Main.lua @ 212:3c1623ab71db 1.0.35
Record item upgrade information and suffix even if item has no durability.
| author | James D. Callahan III <jcallahan@curse.com> |
|---|---|
| date | Wed, 19 Dec 2012 14:57:13 -0600 |
| parents | 83ff61c8ba46 |
| children | 9b0333c7513e |
comparison
equal
deleted
inserted
replaced
| 211:0c43cebaef84 | 212:3c1623ab71db |
|---|---|
| 811 UpdateBlacklistMaps() | 811 UpdateBlacklistMaps() |
| 812 end | 812 end |
| 813 | 813 |
| 814 | 814 |
| 815 local function RecordItemData(item_id, item_link, durability) | 815 local function RecordItemData(item_id, item_link, durability) |
| 816 if not durability or durability <= 0 then | |
| 817 return | |
| 818 end | |
| 819 local item = DBEntry("items", item_id) | 816 local item = DBEntry("items", item_id) |
| 820 local item_string = select(3, item_link:find("^|%x+|H(.+)|h%[.+%]")) | 817 local item_string = select(3, item_link:find("^|%x+|H(.+)|h%[.+%]")) |
| 821 | 818 |
| 822 if item_string then | 819 if item_string then |
| 823 local _, _, _, _, _, _, _, suffix_id, unique_id, _, _, upgrade_id = (":"):split(item_string) | 820 local _, _, _, _, _, _, _, suffix_id, unique_id, _, _, upgrade_id = (":"):split(item_string) |
| 830 | 827 |
| 831 if upgrade_id then | 828 if upgrade_id then |
| 832 item.upgrade_id = upgrade_id | 829 item.upgrade_id = upgrade_id |
| 833 end | 830 end |
| 834 end | 831 end |
| 835 item.durability = durability | 832 |
| 833 if durability and durability > 0 then | |
| 834 item.durability = durability | |
| 835 end | |
| 836 end | 836 end |
| 837 | 837 |
| 838 | 838 |
| 839 function WDP:ProcessItems() | 839 function WDP:ProcessItems() |
| 840 for slot_index = _G.INVSLOT_FIRST_EQUIPPED, _G.INVSLOT_LAST_EQUIPPED do | 840 for slot_index = _G.INVSLOT_FIRST_EQUIPPED, _G.INVSLOT_LAST_EQUIPPED do |
