comparison Main.lua @ 176:48b43068e2e0

Renamed the LOOT_UPDATE/VERIFY_FUNCS tables to LOOT_OPENED_X for clarification.
author James D. Callahan III <jcallahan@curse.com>
date Thu, 01 Nov 2012 14:46:27 -0500
parents ac9f0ccb27a8
children 2fdc940c1748
comparison
equal deleted inserted replaced
175:ac9f0ccb27a8 176:48b43068e2e0
1306 end 1306 end
1307 return _moneyMatch(money, RE_GOLD) * 10000 + _moneyMatch(money, RE_SILVER) * 100 + _moneyMatch(money, RE_COPPER) 1307 return _moneyMatch(money, RE_GOLD) * 10000 + _moneyMatch(money, RE_SILVER) * 100 + _moneyMatch(money, RE_COPPER)
1308 end 1308 end
1309 1309
1310 1310
1311 local LOOT_VERIFY_FUNCS = { 1311 local LOOT_OPENED_VERIFY_FUNCS = {
1312 [AF.ITEM] = function() 1312 [AF.ITEM] = function()
1313 local locked_item_id 1313 local locked_item_id
1314 1314
1315 for bag_index = 0, _G.NUM_BAG_FRAMES do 1315 for bag_index = 0, _G.NUM_BAG_FRAMES do
1316 for slot_index = 1, _G.GetContainerNumSlots(bag_index) do 1316 for slot_index = 1, _G.GetContainerNumSlots(bag_index) do
1351 return true 1351 return true
1352 end, 1352 end,
1353 } 1353 }
1354 1354
1355 1355
1356 local LOOT_UPDATE_FUNCS = { 1356 local LOOT_OPENED_UPDATE_FUNCS = {
1357 [AF.ITEM] = function() 1357 [AF.ITEM] = function()
1358 GenericLootUpdate("items") 1358 GenericLootUpdate("items")
1359 end, 1359 end,
1360 [AF.NPC] = function() 1360 [AF.NPC] = function()
1361 local difficulty_token = InstanceDifficultyToken() 1361 local difficulty_token = InstanceDifficultyToken()
1456 return 1456 return
1457 else 1457 else
1458 Debug(("current_action.target_type: %s"):format(private.ACTION_TYPE_NAMES[current_action.target_type])) 1458 Debug(("current_action.target_type: %s"):format(private.ACTION_TYPE_NAMES[current_action.target_type]))
1459 end 1459 end
1460 1460
1461 local verify_func = LOOT_VERIFY_FUNCS[current_action.target_type] 1461 local verify_func = LOOT_OPENED_VERIFY_FUNCS[current_action.target_type]
1462 local update_func = LOOT_UPDATE_FUNCS[current_action.target_type] 1462 local update_func = LOOT_OPENED_UPDATE_FUNCS[current_action.target_type]
1463 1463
1464 if not verify_func or not update_func then 1464 if not verify_func or not update_func then
1465 return 1465 return
1466 end 1466 end
1467 1467