Mercurial > wow > wowdb-profiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
61:0d3c915e99bf | 62:fbf535466ae6 |
---|---|
372 end | 372 end |
373 end | 373 end |
374 end -- do-block | 374 end -- do-block |
375 | 375 |
376 | 376 |
377 local function GenericLootUpdate(data_type, top_field, inline_drops) | 377 local function GenericLootUpdate(data_type, top_field) |
378 local entry = DBEntry(data_type, action_data.identifier) | 378 local entry = DBEntry(data_type, action_data.identifier) |
379 | 379 |
380 if not entry then | 380 if not entry then |
381 return | 381 return |
382 end | 382 end |
803 if not npc then | 803 if not npc then |
804 return | 804 return |
805 end | 805 end |
806 local encounter_data = npc.encounter_data[InstanceDifficultyToken()] | 806 local encounter_data = npc.encounter_data[InstanceDifficultyToken()] |
807 local loot_type = action_data.label or "drops" | 807 local loot_type = action_data.label or "drops" |
808 npc.loot_counts = npc.loot_counts or {} | 808 encounter_data.loot_counts = encounter_data.loot_counts or {} |
809 npc.loot_counts[loot_type] = (npc.loot_counts[loot_type] or 0) + 1 | 809 encounter_data.loot_counts[loot_type] = (encounter_data.loot_counts[loot_type] or 0) + 1 |
810 encounter_data[loot_type] = encounter_data[loot_type] or {} | 810 encounter_data[loot_type] = encounter_data[loot_type] or {} |
811 | 811 |
812 for index = 1, #action_data.loot_list do | 812 for index = 1, #action_data.loot_list do |
813 table.insert(encounter_data[loot_type], action_data.loot_list[index]) | 813 table.insert(encounter_data[loot_type], action_data.loot_list[index]) |
814 end | 814 end |