# HG changeset patch # User James D. Callahan III # Date 1338829348 18000 # Node ID 6422f3b61962cf5a8278f20d24f80ff12dcdf230 # Parent 81d7d84df629439e6b5bcacb70aadbad806ac1c2 Count the number of times an NPC has been looted on a per-droptype basis. diff -r 81d7d84df629 -r 6422f3b61962 Main.lua --- a/Main.lua Wed May 30 14:56:19 2012 -0500 +++ b/Main.lua Mon Jun 04 12:02:28 2012 -0500 @@ -555,6 +555,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_type] = encounter_data[loot_type] or {} for index = 1, #action_data.loot_list do