# HG changeset patch # User James D. Callahan III # Date 1349591464 18000 # Node ID ef88920c634bc51d6f02c85d96f3f1b04ce19917 # Parent 7c01f8f3b709c181e0bc305a233e986145d8e5ea Removed hard-coded NPC IDs. diff -r 7c01f8f3b709 -r ef88920c634b Main.lua --- a/Main.lua Sun Oct 07 01:29:51 2012 -0500 +++ b/Main.lua Sun Oct 07 01:31:04 2012 -0500 @@ -165,13 +165,6 @@ _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 @@ -803,7 +796,7 @@ end local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) - if not unit_idnum or (unit_type ~= private.UNIT_TYPES.NPC and not IsHardCodedNPC(unit_idnum)) then + if not unit_idnum or unit_type ~= private.UNIT_TYPES.NPC then return end current_target_id = unit_idnum @@ -990,7 +983,7 @@ end local source_type, source_id = ParseGUID(source_guid) - if not source_id or (source_type ~= private.UNIT_TYPES.NPC and not IsHardCodedNPC(source_id)) then + if not source_id or source_type ~= private.UNIT_TYPES.NPC then return end