Mercurial > wow > wowdb-profiler
comparison Main.lua @ 124:8669b4c43278 1.0.8
Improved loot sentry - scoped outside of current_action, since current_action can be wiped by subsequent actions. Hopefully prevents mixing action types for loot.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Mon, 17 Sep 2012 15:58:37 -0500 |
parents | 9b5dcdc5a1e8 |
children | f0c0819058b4 |
comparison
equal
deleted
inserted
replaced
123:9b5dcdc5a1e8 | 124:8669b4c43278 |
---|---|
59 COMBAT_TEXT_UPDATE = true, | 59 COMBAT_TEXT_UPDATE = true, |
60 FORGE_MASTER_OPENED = true, | 60 FORGE_MASTER_OPENED = true, |
61 GOSSIP_SHOW = true, | 61 GOSSIP_SHOW = true, |
62 GUILDBANKFRAME_OPENED = true, | 62 GUILDBANKFRAME_OPENED = true, |
63 ITEM_TEXT_BEGIN = true, | 63 ITEM_TEXT_BEGIN = true, |
64 LOOT_CLOSED = true, | |
64 LOOT_OPENED = true, | 65 LOOT_OPENED = true, |
65 MAIL_SHOW = true, | 66 MAIL_SHOW = true, |
66 MERCHANT_SHOW = "UpdateMerchantItems", | 67 MERCHANT_SHOW = "UpdateMerchantItems", |
67 MERCHANT_UPDATE = "UpdateMerchantItems", | 68 MERCHANT_UPDATE = "UpdateMerchantItems", |
68 PET_BAR_UPDATE = true, | 69 PET_BAR_UPDATE = true, |
1107 end, | 1108 end, |
1108 } | 1109 } |
1109 | 1110 |
1110 -- Prevent opening the same loot window multiple times from recording data multiple times. | 1111 -- Prevent opening the same loot window multiple times from recording data multiple times. |
1111 local loot_guid_registry = {} | 1112 local loot_guid_registry = {} |
1113 local currently_looting | |
1114 | |
1115 | |
1116 function WDP:LOOT_CLOSED(event_name) | |
1117 currently_looting = nil | |
1118 end | |
1119 | |
1112 | 1120 |
1113 function WDP:LOOT_OPENED(event_name) | 1121 function WDP:LOOT_OPENED(event_name) |
1114 if current_action.looting or not current_action.target_type then | 1122 if currently_looting or not current_action.target_type then |
1115 return | 1123 return |
1116 end | 1124 end |
1117 local verify_func = LOOT_VERIFY_FUNCS[current_action.target_type] | 1125 local verify_func = LOOT_VERIFY_FUNCS[current_action.target_type] |
1118 local update_func = LOOT_UPDATE_FUNCS[current_action.target_type] | 1126 local update_func = LOOT_UPDATE_FUNCS[current_action.target_type] |
1119 | 1127 |
1125 return | 1133 return |
1126 end | 1134 end |
1127 local guids_used = {} | 1135 local guids_used = {} |
1128 current_action.loot_list = {} | 1136 current_action.loot_list = {} |
1129 current_action.loot_sources = {} | 1137 current_action.loot_sources = {} |
1130 current_action.looting = true | 1138 currently_looting = true |
1131 | 1139 |
1132 for loot_slot = 1, _G.GetNumLootItems() do | 1140 for loot_slot = 1, _G.GetNumLootItems() do |
1133 local icon_texture, item_text, quantity, quality, locked = _G.GetLootSlotInfo(loot_slot) | 1141 local icon_texture, item_text, quantity, quality, locked = _G.GetLootSlotInfo(loot_slot) |
1134 local slot_type = _G.GetLootSlotType(loot_slot) | 1142 local slot_type = _G.GetLootSlotType(loot_slot) |
1135 | 1143 |