# HG changeset patch # User MMOSimca # Date 1419224834 18000 # Node ID d65875caafd61682d9dc2813e1a6281cde2f275a # Parent f96f53dfb531f28810b3425e2d9fcf298c202716 Added a new blacklisted spell for NPC recording and made the blacklist into a table. diff -r f96f53dfb531 -r d65875caafd6 Main.lua --- a/Main.lua Mon Dec 22 00:06:12 2014 -0500 +++ b/Main.lua Mon Dec 22 00:07:14 2014 -0500 @@ -40,6 +40,8 @@ local DEBUGGING = false local EVENT_DEBUG = false +local ITEM_ID_TIMBER = 114781 + local OBJECT_ID_ANVIL = 192628 local OBJECT_ID_FISHING_BOBBER = 35591 local OBJECT_ID_FORGE = 1685 @@ -54,12 +56,6 @@ local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY -local TIMBER_ITEM_ID = 114781 - --- Ignoring NPC casts of the following spells -local CHI_WAVE_SPELL_ID = 132464 -local DISGUISE_SPELL_ID = 121308 - -- Constant for duplicate boss data; a dirty hack to get around world bosses that cannot be identified individually and cannot be linked on wowdb because they are not in a raid local DUPLICATE_WORLD_BOSS_IDS = { [71952] = { 71953, 71954, 71955, }, @@ -1589,7 +1585,7 @@ end -- Set update category - if last_timber_spell_id and item_id == TIMBER_ITEM_ID then + if last_timber_spell_id and item_id == ITEM_ID_TIMBER then category = AF.OBJECT -- Recently changed from ~= "EXTRACT_GAS" because of some occassional bad data, and, as far as I know, no benefit. elseif current_action.spell_label == "FISHING" then @@ -1711,8 +1707,15 @@ local FLAGS_NPC = bit.bor(_G.COMBATLOG_OBJECT_TYPE_GUARDIAN, _G.COMBATLOG_OBJECT_CONTROL_NPC) local FLAGS_NPC_CONTROL = bit.bor(_G.COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, _G.COMBATLOG_OBJECT_CONTROL_NPC) + -- Spells that are cast by players that are mistakely assigned as being cast by the target; must be blacklisted + local BLACKLISTED_SPELLS = { + [117526] = true, -- Binding Shot + [132464] = true, -- Chi Wave + [121308] = true, -- Disguise + } + local function RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) - if not spell_id or spell_id == CHI_WAVE_SPELL_ID or spell_id == DISGUISE_SPELL_ID then + if not spell_id or BLACKLISTED_SPELLS[spell_id] then return end local source_type, source_id = ParseGUID(source_guid)