# HG changeset patch # User James D. Callahan III # Date 1339779474 18000 # Node ID 5d5a490724ecc00c01e08a9d912d103b29b21def # Parent 2a9bb817556228c72beca89134329e382cde59ca Make everything have a loot count. diff -r 2a9bb8175562 -r 5d5a490724ec Main.lua --- a/Main.lua Thu Jun 14 16:41:01 2012 -0500 +++ b/Main.lua Fri Jun 15 11:57:54 2012 -0500 @@ -736,13 +736,16 @@ return end local loot_type = action_data.label or "drops" + local loot_count = ("%s_count"):format(loot_type) local loot_data if top_field then + entry[top_field][loot_count] = (entry[top_field][loot_count] or 0) + 1 entry[top_field] = entry[top_field] or {} entry[top_field][loot_type] = entry[top_field][loot_type] or {} loot_data = entry[top_field][loot_type] else + entry[loot_count] = (entry[loot_count] or 0) + 1 entry[loot_type] = entry[loot_type] or {} loot_data = entry[loot_type] end @@ -755,9 +758,6 @@ local LOOT_UPDATE_FUNCS = { [AF.ITEM] = function() - local item = DBEntry("items", action_data.identifier) - local loot_count = ("%s_count"):format(action_data.label or "drops") - item[loot_count] = (item[loot_count] or 0) + 1 GenericLootUpdate("items") end, [AF.NPC] = function()