Quantcast

Fixed issue where the NPC ID wasn't showing correctly due to UnitGUID() being changed in 4.0.1

mike [10-17-10 - 03:33]
Fixed issue where the NPC ID wasn't showing correctly due to UnitGUID() being changed in 4.0.1
Filename
Scanner.lua
diff --git a/Scanner.lua b/Scanner.lua
index 40259b1..5b1670f 100644
--- a/Scanner.lua
+++ b/Scanner.lua
@@ -668,7 +668,7 @@ do
 			return
 		end
 		local targetname = UnitName("target")	-- Get its name
-		local targetID = tonumber(string.sub(UnitGUID("target"), -12, -7), 16)	-- Get the NPC ID
+		local targetID = tonumber(string.sub(UnitGUID("target"), -12, -9), 16)	-- Get the NPC ID

 		if not IsTradeskillTrainer() then		-- Are we at a trade skill trainer?
 			if not autoscan then
@@ -1136,7 +1136,7 @@ do
 			return
 		end
 		local targetname = UnitName("target")		-- Get its name
-		local targetID = tonumber(string.sub(UnitGUID("target"), -12, -7), 16)		-- Get the NPC ID
+		local targetID = tonumber(string.sub(UnitGUID("target"), -12, -9), 16)		-- Get the NPC ID
 		local added = false

 		table.wipe(output)