Quantcast
WoWInterface - View Single Post - GuildList player name color
View Single Post
06-24-20, 02:46 PM   #5
Kanegasi
A Firelord
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 499
Lua Code:
  1. hooksecurefunc("GuildStatus_Update",function(_)
  2.     local index,name,rank,online
  3.     local showOffline=GetGuildRosterShowOffline()
  4.     local offset=FauxScrollFrame_GetOffset(GuildListScrollFrame)
  5.     local frame=FriendsFrame.playerStatusFrame and "GuildFrameButton" or "GuildFrameGuildStatusButton"
  6.     for i=1,GUILDMEMBERS_TO_DISPLAY do
  7.         index=offset+i
  8.         name,_,rank,_,_,_,_,_,online=GetGuildRosterInfo(index)
  9.         if name then
  10.             if online then
  11.  
  12.                     -- colors for online players
  13.  
  14.  
  15.                         -- Guild Master
  16.                 if rank==0 then
  17.                     _G[frame..i.."Name"]:SetTextColor(1.0,0.82,0.0)
  18.  
  19.                         -- rank immediately under GM
  20.                 elseif rank==1 then
  21.                     _G[frame..i.."Name"]:SetTextColor(1.0,0.82,0.0)
  22.  
  23.                         -- and so on
  24.                 elseif rank==2 then
  25.                     _G[frame..i.."Name"]:SetTextColor(1.0,0.82,0.0)
  26.  
  27.  
  28.                 end
  29.             elseif showOffline then
  30.  
  31.                     -- colors for offline players
  32.  
  33.  
  34.                         -- Guild Master
  35.                 if rank==0 then
  36.                     _G[frame..i.."Name"]:SetTextColor(0.5,0.5,0.5)
  37.  
  38.                         -- rank immediately under GM
  39.                 elseif rank==1 then
  40.                     _G[frame..i.."Name"]:SetTextColor(0.5,0.5,0.5)
  41.  
  42.                         -- and so on
  43.                 elseif rank==2 then
  44.                     _G[frame..i.."Name"]:SetTextColor(0.5,0.5,0.5)
  45.  
  46.  
  47.  
  48.                 end
  49.             end
  50.         end
  51.     end
  52. end)

Last edited by Kanegasi : 06-24-20 at 02:50 PM.
  Reply With Quote