color BN friends name according to wow char class
yaroot [07-13-11 - 03:32]
color BN friends name according to wow char class
diff --git a/friends.lua b/friends.lua
index 6ff71b6..cc88193 100644
--- a/friends.lua
+++ b/friends.lua
@@ -30,9 +30,7 @@ local function friendsFrame()
if(isOnline and client==BNET_CLIENT_WOW) then
local hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime = BNGetToonInfo(toonID)
if(givenName and surname and toonName and class) then
- -- color them all
- --if CanCooperateWithToon(toonID) then
- nameText = format(BATTLENET_NAME_FORMAT, givenName, surname) ..' '.. FRIENDS_WOW_NAME_COLOR_CODE .. '(' .. ycc.classColor[class] .. ycc.classColor[class] .. toonName .. FRIENDS_WOW_NAME_COLOR_CODE .. ')'
+ nameText = ycc.classColor[class]..format(BATTLENET_NAME_FORMAT, givenName, surname)..' '..FRIENDS_WOW_NAME_COLOR_CODE..'('..toonName..')'
if(zoneName == playerArea) then
infoText = format('|cff00ff00%s|r', zoneName)
end