Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-29-18, 08:02 PM   #1
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
Name Tag (name UNKNOWN)

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))
...

Last edited by p3lim : 12-30-18 at 02:42 AM. Reason: made the code readable
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Name Tag (name UNKNOWN)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off