diff 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
line wrap: on
line diff
--- a/Main.lua	Wed Aug 22 13:20:21 2012 -0500
+++ b/Main.lua	Wed Aug 22 13:33:47 2012 -0500
@@ -944,6 +944,7 @@
         if _G.type(verify_func) == "function" and not verify_func() then
             return
         end
+        local guids_used = {}
         action_data.loot_list = {}
         action_data.loot_sources = {}
         action_data.looting = true
@@ -975,7 +976,7 @@
                         local item_id = ItemLinkToID(_G.GetLootSlotLink(loot_slot))
                         action_data.loot_sources[source_guid] = action_data.loot_sources[source_guid] or {}
                         action_data.loot_sources[source_guid][item_id] = action_data.loot_sources[source_guid][item_id] or 0 + loot_quantity
-                        loot_guid_registry[source_guid] = true
+                        guids_used[source_guid] = true
                     end
                 end
             elseif slot_type == _G.LOOT_SLOT_MONEY then
@@ -984,6 +985,10 @@
                 table.insert(action_data.loot_list, ("currency:%d:%s"):format(quantity, icon_texture:match("[^\\]+$"):lower()))
             end
         end
+
+        for guid in guids_used do
+            loot_guid_registry[guid] = true
+        end
         update_func()
     end
 end -- do-block