Commit b26f5b62 authored by Robin Schoonover's avatar Robin Schoonover

Fix something involving uids.

parent 5aea66a9
......@@ -21,13 +21,17 @@ addon:HookTipScript("OnTooltipSetUnit", function(self)
end
local guid = UnitGUID(unit)
local utype = strsub(guid, 5, 5)
if utype == "1" then
-- world object
addon:AddIDLine(self, "Object", tonumber(strsub(guid, 6, 12), 16))
elseif utype == "3" or utype == "5" then
-- npc/pet/vehicle
addon:AddIDLine(self, "NPC", tonumber(strsub(guid, 6, 10), 16))
if guid then
local utype = strsub(guid, 5, 5)
if utype == "1" then
-- world object
addon:AddIDLine(self, "Object", tonumber(strsub(guid, 6, 12), 16))
elseif utype == "3" or utype == "5" then
-- npc/pet/vehicle
addon:AddIDLine(self, "NPC", tonumber(strsub(guid, 6, 10), 16))
end
else
-- TODO check for battle pet
end
end)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment