Skip to content

Instantly share code, notes, and snippets.

@nefftd
Created January 18, 2015 22:19
Show Gist options
  • Save nefftd/6ff5b879eae475fec48e to your computer and use it in GitHub Desktop.
Save nefftd/6ff5b879eae475fec48e to your computer and use it in GitHub Desktop.
nametext:Listen('name',function(self,name,realm)
name = mod.abbrev_shortname(name)
if UnitCanAttack('player','targettarget') then
name = '|cff993333>|r '..name
else
name = '|cffffffff>|r '..name
end
self:SetText(name)
end)
nametext:Listen('class',function(self,_,enclass,isplayer)
if isplayer then
self:SetTextColor(mod.classcolor(enclass))
else
self:SetTextColor(unpack(mod.color_npc))
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment