comparison Main.lua @ 305:4986ef8a338a

Initialize current_loot whenever there is a container_id in SHOW_LOOT_TOAST - not just when the type is "item".
author James D. Callahan III <jcallahan@curse.com>
date Mon, 08 Jul 2013 16:35:15 -0500
parents 1e55a8ebedbd
children 7feb687b1b22
comparison
equal deleted inserted replaced
304:1e55a8ebedbd 305:4986ef8a338a
1132 table.insert(encounter_data[loot_type], ("%d:%d"):format(item_id, quantity)) 1132 table.insert(encounter_data[loot_type], ("%d:%d"):format(item_id, quantity))
1133 Debug("%s: %sX%d (%d)", event_name, item_link, quantity, item_id) 1133 Debug("%s: %sX%d (%d)", event_name, item_link, quantity, item_id)
1134 elseif container_id then 1134 elseif container_id then
1135 private.loot_toast_container_id = nil 1135 private.loot_toast_container_id = nil
1136 1136
1137 InitializeCurrentLoot()
1138
1137 if loot_type == "item" then 1139 if loot_type == "item" then
1138 if not item_id then 1140 if not item_id then
1139 Debug("%s: ItemID is nil, from item link %s", event_name, item_link) 1141 Debug("%s: ItemID is nil, from item link %s", event_name, item_link)
1140 return 1142 return
1141 end 1143 end
1142 InitializeCurrentLoot()
1143 current_loot.sources[container_id] = { 1144 current_loot.sources[container_id] = {
1144 [item_id] = quantity, 1145 [item_id] = quantity,
1145 } 1146 }
1146 elseif loot_type == "money" then 1147 elseif loot_type == "money" then
1147 table.insert(current_loot.list, ("money:%d"):format(quantity)) 1148 table.insert(current_loot.list, ("money:%d"):format(quantity))