Mercurial > wow > wowdb-profiler
diff Main.lua @ 159:75cf16f95ad0 1.0.17
Hard-code NPC IDs for Sha of Anger and Galleon to see if they're simply not being recognized as NPCs.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Fri, 05 Oct 2012 22:31:14 -0500 |
parents | d16d4848f059 |
children | 7c01f8f3b709 |
line wrap: on
line diff
--- a/Main.lua Fri Oct 05 18:39:46 2012 -0500 +++ b/Main.lua Fri Oct 05 22:31:14 2012 -0500 @@ -165,6 +165,13 @@ _G.print(...) end +local SHA_OF_ANGER_ID = 60491 +local GALLEON_ID = 62346 + +local function IsHardCodedNPC(unit_id) + return unit_id == SHA_OF_ANGER_ID or unit_id == GALLEON_ID +end + local ActualCopperCost do @@ -684,7 +691,7 @@ if _G.type(func) == "boolean" then self[event_name](self, ...) elseif _G.type(func) == "function" then - self[EVENT_MAPPING[event_name]](self, ...) + self[func](self, ...) end end @@ -799,7 +806,7 @@ end local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) - if unit_type ~= private.UNIT_TYPES.NPC or not unit_idnum then + if not unit_idnum or (unit_type ~= private.UNIT_TYPES.NPC and not IsHardCodedNPC(unit_idnum)) then return end current_target_id = unit_idnum @@ -986,7 +993,7 @@ end local source_type, source_id = ParseGUID(source_guid) - if not source_id or source_type ~= private.UNIT_TYPES.NPC then + if not source_id or (source_type ~= private.UNIT_TYPES.NPC and not IsHardCodedNPC(source_id)) then return end