Hello,
anyone was able to help me with name tag?
My problem is:
Some time by joining the party, name of some players show as UNKNOWN (server lag?), but the problem is, it stays and won't be refreshing until reload UI.
Here is my tag code:
Code:
tags['lumen:reactionname'] = function(unit)
local playerName = UnitName(unit) or ""
local color
if UnitIsPlayer(unit) then
local class, key = UnitClassBase(unit)
color = key and RAID_CLASS_COLORS[class].colorStr or "ffffffff"
else
local reaction = UnitReaction(unit,'player') or 5
local col = FACTION_BAR_COLORS[reaction]
color = string.format("ff%02x%02x%02x",col.r*255,col.g*255,col.b*255)
end
return string.format("|c%s%s",color,playerName)
end
and the code inside the party1.lua
Code:
core:createNameString(self, font_big, cfg.fontsize - 1, "THINOUTLINE", 80, 29, "LEFT", 130)
...
self:Tag(self.Name, '[lumen:reactionname]')
self.Name:SetTextColor(unpack(cfg.colors.health))
...