# HG changeset patch # User James D. Callahan III # Date 1346853904 18000 # Node ID f9c81739cfe606295645a8d1656e22eb4d0a43f9 # Parent 1bb078930f230921a9d5fc2ab69959639b6e9ad6 Changed labeling on action_data fields to be more explicit. Don't set loot_label on non-loot spells. diff -r 1bb078930f23 -r f9c81739cfe6 Constants.lua --- a/Constants.lua Tue Sep 04 11:54:47 2012 -0500 +++ b/Constants.lua Wed Sep 05 09:05:04 2012 -0500 @@ -63,6 +63,10 @@ [_G.GetSpellInfo(8613)] = "SKINNING", } +private.NON_LOOT_SPELL_LABELS = { + MIND_CONTROL = true, +} + local AF = private.ACTION_TYPE_FLAGS private.SPELL_FLAGS_BY_LABEL = { diff -r 1bb078930f23 -r f9c81739cfe6 Main.lua --- a/Main.lua Tue Sep 04 11:54:47 2012 -0500 +++ b/Main.lua Wed Sep 05 09:05:04 2012 -0500 @@ -355,7 +355,7 @@ table.wipe(action_data) action_data.type = AF.ITEM action_data.identifier = item_id - action_data.label = "contains" + action_data.loot_label = "contains" break end end @@ -421,7 +421,7 @@ end function GenericLootUpdate(data_type, top_field) - local loot_type = action_data.label or "drops" + local loot_type = action_data.loot_label or "drops" local loot_count = ("%s_count"):format(loot_type) local source_list = {} @@ -933,7 +933,7 @@ end, [AF.NPC] = function() local difficulty_token = InstanceDifficultyToken() - local loot_type = action_data.label or "drops" + local loot_type = action_data.loot_label or "drops" local source_list = {} for source_guid, loot_data in pairs(action_data.loot_sources) do @@ -989,7 +989,7 @@ drops = {} } end - local loot_count = ("%s_count"):format(action_data.label or "drops") + local loot_count = ("%s_count"):format(action_data.loot_label or "drops") action_data.zone_data[location_token][loot_count] = (action_data.zone_data[location_token][loot_count] or 0) + 1 for index = 1, #action_data.loot_list do @@ -1210,7 +1210,7 @@ function WDP:PET_BAR_UPDATE(event_name) - if not action_data.label or not action_data.label == "mind_control" then + if action_data.spell_label ~= "MIND_CONTROL" then return end local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("pet")) @@ -1546,7 +1546,10 @@ action_data.y = y action_data.zone = ("%s:%d"):format(zone_name, area_id) action_data.spell_label = spell_label - action_data.label = spell_label:lower() + + if not private.NON_LOOT_SPELL_LABELS[spell_label] then + action_data.loot_label = spell_label:lower() + end if tt_unit_name and not tt_item_name then if bit.band(spell_flags, AF.NPC) == AF.NPC then