Quantcast

For whatever reason, guid data is split by hyphens instead of colons in build 18888

Adrian L Lange [10-15-14 - 16:57]
For whatever reason, guid data is split by hyphens instead of colons in build 18888
Filename
QuickQuest.lua
diff --git a/QuickQuest.lua b/QuickQuest.lua
index 0123bee..1503564 100644
--- a/QuickQuest.lua
+++ b/QuickQuest.lua
@@ -111,10 +111,7 @@ end
 local GetNPCID
 if(WoD) then
 	function GetNPCID()
-		local type, _, _, _, _, id = string.split(':', UnitGUID('npc') or '')
-		if(type == 'Creature' and id and tonumber(id)) then
-			return tonumber(id)
-		end
+		return tonumber(string.match(UnitGUID('npc') or '', 'Creature%-.-%-.-%-.-%-.-%-(.-)%-'))
 	end
 else
 	function GetNPCID()