Mercurial > wow > wowdb-profiler
comparison Main.lua @ 405:d65875caafd6 6.0.3-4
Added a new blacklisted spell for NPC recording and made the blacklist into a table.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Mon, 22 Dec 2014 00:07:14 -0500 |
parents | f96f53dfb531 |
children | 0825513e6af1 |
comparison
equal
deleted
inserted
replaced
404:f96f53dfb531 | 405:d65875caafd6 |
---|---|
38 local CLIENT_LOCALE = _G.GetLocale() | 38 local CLIENT_LOCALE = _G.GetLocale() |
39 local DB_VERSION = 18 | 39 local DB_VERSION = 18 |
40 local DEBUGGING = false | 40 local DEBUGGING = false |
41 local EVENT_DEBUG = false | 41 local EVENT_DEBUG = false |
42 | 42 |
43 local ITEM_ID_TIMBER = 114781 | |
44 | |
43 local OBJECT_ID_ANVIL = 192628 | 45 local OBJECT_ID_ANVIL = 192628 |
44 local OBJECT_ID_FISHING_BOBBER = 35591 | 46 local OBJECT_ID_FISHING_BOBBER = 35591 |
45 local OBJECT_ID_FORGE = 1685 | 47 local OBJECT_ID_FORGE = 1685 |
46 | 48 |
47 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) | 49 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) |
51 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) | 53 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) |
52 | 54 |
53 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY | 55 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY |
54 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM | 56 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM |
55 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY | 57 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY |
56 | |
57 local TIMBER_ITEM_ID = 114781 | |
58 | |
59 -- Ignoring NPC casts of the following spells | |
60 local CHI_WAVE_SPELL_ID = 132464 | |
61 local DISGUISE_SPELL_ID = 121308 | |
62 | 58 |
63 -- 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 | 59 -- 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 |
64 local DUPLICATE_WORLD_BOSS_IDS = { | 60 local DUPLICATE_WORLD_BOSS_IDS = { |
65 [71952] = { 71953, 71954, 71955, }, | 61 [71952] = { 71953, 71954, 71955, }, |
66 } | 62 } |
1587 if not item_id then | 1583 if not item_id then |
1588 return | 1584 return |
1589 end | 1585 end |
1590 | 1586 |
1591 -- Set update category | 1587 -- Set update category |
1592 if last_timber_spell_id and item_id == TIMBER_ITEM_ID then | 1588 if last_timber_spell_id and item_id == ITEM_ID_TIMBER then |
1593 category = AF.OBJECT | 1589 category = AF.OBJECT |
1594 -- Recently changed from ~= "EXTRACT_GAS" because of some occassional bad data, and, as far as I know, no benefit. | 1590 -- Recently changed from ~= "EXTRACT_GAS" because of some occassional bad data, and, as far as I know, no benefit. |
1595 elseif current_action.spell_label == "FISHING" then | 1591 elseif current_action.spell_label == "FISHING" then |
1596 category = AF.ZONE | 1592 category = AF.ZONE |
1597 elseif raid_boss_id then | 1593 elseif raid_boss_id then |
1709 | 1705 |
1710 do | 1706 do |
1711 local FLAGS_NPC = bit.bor(_G.COMBATLOG_OBJECT_TYPE_GUARDIAN, _G.COMBATLOG_OBJECT_CONTROL_NPC) | 1707 local FLAGS_NPC = bit.bor(_G.COMBATLOG_OBJECT_TYPE_GUARDIAN, _G.COMBATLOG_OBJECT_CONTROL_NPC) |
1712 local FLAGS_NPC_CONTROL = bit.bor(_G.COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, _G.COMBATLOG_OBJECT_CONTROL_NPC) | 1708 local FLAGS_NPC_CONTROL = bit.bor(_G.COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, _G.COMBATLOG_OBJECT_CONTROL_NPC) |
1713 | 1709 |
1710 -- Spells that are cast by players that are mistakely assigned as being cast by the target; must be blacklisted | |
1711 local BLACKLISTED_SPELLS = { | |
1712 [117526] = true, -- Binding Shot | |
1713 [132464] = true, -- Chi Wave | |
1714 [121308] = true, -- Disguise | |
1715 } | |
1716 | |
1714 local function RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) | 1717 local function RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) |
1715 if not spell_id or spell_id == CHI_WAVE_SPELL_ID or spell_id == DISGUISE_SPELL_ID then | 1718 if not spell_id or BLACKLISTED_SPELLS[spell_id] then |
1716 return | 1719 return |
1717 end | 1720 end |
1718 local source_type, source_id = ParseGUID(source_guid) | 1721 local source_type, source_id = ParseGUID(source_guid) |
1719 | 1722 |
1720 if not source_id or not UnitTypeIsNPC(source_type) then | 1723 if not source_id or not UnitTypeIsNPC(source_type) then |