diff Main.lua @ 62:fbf535466ae6

Changed storage of NPC loot counts to coincide with the drops themselves.
author James D. Callahan III <jcallahan@curse.com>
date Thu, 19 Jul 2012 12:36:37 -0500
parents 0d3c915e99bf
children d98daa5373aa
line wrap: on
line diff
--- a/Main.lua	Wed Jul 18 12:27:54 2012 -0500
+++ b/Main.lua	Thu Jul 19 12:36:37 2012 -0500
@@ -374,7 +374,7 @@
 end -- do-block
 
 
-local function GenericLootUpdate(data_type, top_field, inline_drops)
+local function GenericLootUpdate(data_type, top_field)
     local entry = DBEntry(data_type, action_data.identifier)
 
     if not entry then
@@ -805,8 +805,8 @@
             end
             local encounter_data = npc.encounter_data[InstanceDifficultyToken()]
             local loot_type = action_data.label or "drops"
-            npc.loot_counts = npc.loot_counts or {}
-            npc.loot_counts[loot_type] = (npc.loot_counts[loot_type] or 0) + 1
+            encounter_data.loot_counts = encounter_data.loot_counts or {}
+            encounter_data.loot_counts[loot_type] = (encounter_data.loot_counts[loot_type] or 0) + 1
             encounter_data[loot_type] = encounter_data[loot_type] or {}
 
             for index = 1, #action_data.loot_list do