Так я думаю лучше будет :)PHP код:
function idnps(self)
local unit = select(2, self:GetUnit());
local unitGUID = UnitGUID(unit);
if(not UnitIsPlayer(unit)) then
self:AddLine(("|cFFCA3C3C%s:|r %d"):format(ID, tonumber(string.sub(unitGUID, 9, 12), 16)));
end
end
GameTooltip:HookScript("OnTooltipSetUnit", idnps);