Mercurial > wow > wowdb-profiler
comparison Main.lua @ 80:fffa5af4c6ce
Blacklist GUIDs only after the LOOT_OPENED handler has been run.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Wed, 22 Aug 2012 13:33:47 -0500 |
parents | 376d3e03d632 |
children | 3db9f681d2e5 |
comparison
equal
deleted
inserted
replaced
79:376d3e03d632 | 80:fffa5af4c6ce |
---|---|
942 end | 942 end |
943 | 943 |
944 if _G.type(verify_func) == "function" and not verify_func() then | 944 if _G.type(verify_func) == "function" and not verify_func() then |
945 return | 945 return |
946 end | 946 end |
947 local guids_used = {} | |
947 action_data.loot_list = {} | 948 action_data.loot_list = {} |
948 action_data.loot_sources = {} | 949 action_data.loot_sources = {} |
949 action_data.looting = true | 950 action_data.looting = true |
950 | 951 |
951 for loot_slot = 1, _G.GetNumLootItems() do | 952 for loot_slot = 1, _G.GetNumLootItems() do |
973 -- print(("GUID: %s - Type:ID: %s - Amount: %d"):format(loot_info[loot_index], source_key, loot_quantity)) | 974 -- print(("GUID: %s - Type:ID: %s - Amount: %d"):format(loot_info[loot_index], source_key, loot_quantity)) |
974 | 975 |
975 local item_id = ItemLinkToID(_G.GetLootSlotLink(loot_slot)) | 976 local item_id = ItemLinkToID(_G.GetLootSlotLink(loot_slot)) |
976 action_data.loot_sources[source_guid] = action_data.loot_sources[source_guid] or {} | 977 action_data.loot_sources[source_guid] = action_data.loot_sources[source_guid] or {} |
977 action_data.loot_sources[source_guid][item_id] = action_data.loot_sources[source_guid][item_id] or 0 + loot_quantity | 978 action_data.loot_sources[source_guid][item_id] = action_data.loot_sources[source_guid][item_id] or 0 + loot_quantity |
978 loot_guid_registry[source_guid] = true | 979 guids_used[source_guid] = true |
979 end | 980 end |
980 end | 981 end |
981 elseif slot_type == _G.LOOT_SLOT_MONEY then | 982 elseif slot_type == _G.LOOT_SLOT_MONEY then |
982 table.insert(action_data.loot_list, ("money:%d"):format(_toCopper(item_text))) | 983 table.insert(action_data.loot_list, ("money:%d"):format(_toCopper(item_text))) |
983 elseif slot_type == _G.LOOT_SLOT_CURRENCY then | 984 elseif slot_type == _G.LOOT_SLOT_CURRENCY then |
984 table.insert(action_data.loot_list, ("currency:%d:%s"):format(quantity, icon_texture:match("[^\\]+$"):lower())) | 985 table.insert(action_data.loot_list, ("currency:%d:%s"):format(quantity, icon_texture:match("[^\\]+$"):lower())) |
985 end | 986 end |
987 end | |
988 | |
989 for guid in guids_used do | |
990 loot_guid_registry[guid] = true | |
986 end | 991 end |
987 update_func() | 992 update_func() |
988 end | 993 end |
989 end -- do-block | 994 end -- do-block |
990 | 995 |