Mercurial > wow > wowdb-profiler
comparison Main.lua @ 326:66b136635f6b 5.4.7-1
Fixes for "Disguise" and tradeskill spells.
| author | James D. Callahan III <jcallahan@curse.com> | 
|---|---|
| date | Thu, 27 Mar 2014 14:55:46 -0500 | 
| parents | 9cc4ffab84d1 | 
| children | 3487529df8e5 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 325:30bf6ac91bca | 326:66b136635f6b | 
|---|---|
| 44 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) | 44 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) | 
| 45 local PLAYER_FACTION = _G.UnitFactionGroup("player") | 45 local PLAYER_FACTION = _G.UnitFactionGroup("player") | 
| 46 local PLAYER_GUID | 46 local PLAYER_GUID | 
| 47 local PLAYER_NAME = _G.UnitName("player") | 47 local PLAYER_NAME = _G.UnitName("player") | 
| 48 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) | 48 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) | 
| 49 | |
| 50 local SPELL_ID_DISGUISE = 121308 | |
| 49 | 51 | 
| 50 local ALLOWED_LOCALES = { | 52 local ALLOWED_LOCALES = { | 
| 51 enUS = true, | 53 enUS = true, | 
| 52 enGB = true, | 54 enGB = true, | 
| 53 } | 55 } | 
| 1430 do -- do-block | 1432 do -- do-block | 
| 1431 local FLAGS_NPC = bit.bor(_G.COMBATLOG_OBJECT_TYPE_GUARDIAN, _G.COMBATLOG_OBJECT_CONTROL_NPC) | 1433 local FLAGS_NPC = bit.bor(_G.COMBATLOG_OBJECT_TYPE_GUARDIAN, _G.COMBATLOG_OBJECT_CONTROL_NPC) | 
| 1432 local FLAGS_NPC_CONTROL = bit.bor(_G.COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, _G.COMBATLOG_OBJECT_CONTROL_NPC) | 1434 local FLAGS_NPC_CONTROL = bit.bor(_G.COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, _G.COMBATLOG_OBJECT_CONTROL_NPC) | 
| 1433 | 1435 | 
| 1434 local function RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) | 1436 local function RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) | 
| 1435 if not spell_id then | 1437 if not spell_id or spell_id == SPELL_ID_DISGUISE then | 
| 1436 return | 1438 return | 
| 1437 end | 1439 end | 
| 1438 local source_type, source_id = ParseGUID(source_guid) | 1440 local source_type, source_id = ParseGUID(source_guid) | 
| 1439 | 1441 | 
| 1440 if not source_id or not UnitTypeIsNPC(source_type) then | 1442 if not source_id or not UnitTypeIsNPC(source_type) then | 
| 1817 | 1819 | 
| 1818 if num_guids == 0 then | 1820 if num_guids == 0 then | 
| 1819 Debug("%s: No GUIDs found in loot. Blank loot window?", log_source) | 1821 Debug("%s: No GUIDs found in loot. Blank loot window?", log_source) | 
| 1820 return false | 1822 return false | 
| 1821 end | 1823 end | 
| 1824 | |
| 1825 if private.previous_spell_id and private.EXTRAPOLATION_BANNED_SPELL_IDS[private.previous_spell_id] then | |
| 1826 Debug("%s: Problematic spell id %s found. Loot extrapolation for this set of loot would have run an increased risk of introducing bad data into the system.", log_source, private.previous_spell_id) | |
| 1827 return false | |
| 1828 end | |
| 1829 | |
| 1822 local num_npcs = 0 | 1830 local num_npcs = 0 | 
| 1823 local num_objects = 0 | 1831 local num_objects = 0 | 
| 1824 local num_itemcontainers = 0 | 1832 local num_itemcontainers = 0 | 
| 1825 | 1833 | 
| 1826 for source_guid, guid_data in pairs(extrapolated_guid_registry) do | 1834 for source_guid, guid_data in pairs(extrapolated_guid_registry) do | 
