Originally Posted by Clamsoda
I mean....it doesn't necessarily pertain to anything in particular, it is just applied API. Technically, you could pass any name token through it as long as there aren't any "-" outside of the delimitation. If there is no realm name, you just get a name; if there is a realm name, you get the "(*)".
The one issue I see is the inconsistency in how name-realm tokens are passed through certain functions and events at the moment. "(*)" has typically been used for units on other realms, but some events -- CLEU for example -- are passing names with realms attached regardless of if they are on your realm or not.
Tl;dr: You may get "(*)" for units that are on your realm as well, giving the false impression that they are cross-realm.
Of course, you could cache your realm and match it against what got split and go from there.
|
Ok so something like:
Lua Code:
if db.unitframes.party.enable then
for i = 1, MAX_PARTY_MEMBERS do
local partyFrame = "PartyMemberFrame"..i
local originalName = _G[partyFrame].name
local unitName, unitRealm = strsplit("-", originalName)
_G[partyFrame].name:SetText(unitRealm and unitName.."(*)" or unitName)
_G[partyFrame]:SetScale(db.unitframes.party.scale);
_G[partyFrame.."HealthBarText"]:SetFont(db.fontNormal, db.unitframes.party.fontSize, "THINOUTLINE");
_G[partyFrame.."ManaBarText"]:SetFont(db.fontNormal, db.unitframes.party.fontSize, "THINOUTLINE");
end
Should set the name of my party members to just there name?