1
0
Fork 0

Fixed coloring of on-alt members

This commit is contained in:
pigmonkey 2011-09-04 20:01:49 -04:00
parent 38f03047f8
commit ddebbedb6c

View file

@ -120,17 +120,13 @@ function mod:GuildRoster_Update()
end end
local lastCache = 0 local lastCache = 0
function mod:ModifyRosterPane()
end
function mod:CacheRaiders() function mod:CacheRaiders()
wipe(rosterRaidersCache)
wipe(rosterRaidersAlts) wipe(rosterRaidersAlts)
rosterRaidersCount = 0 rosterRaidersCount = 0
for i=1,GetNumGuildMembers() do for i=1,GetNumGuildMembers() do
local name, _, rank, _, _, _, note, _, online = GetGuildRosterInfo(i)
if self:IsRaider(i) then if self:IsRaider(i) then
local name, _, rank, _, _, _, note, _, online = GetGuildRosterInfo(i)
rosterRaidersCache[name] = true rosterRaidersCache[name] = true
rosterRaidersCount = rosterRaidersCount + 1 rosterRaidersCount = rosterRaidersCount + 1
@ -138,6 +134,8 @@ function mod:CacheRaiders()
if (rank == 4 or rank == 2) and online then if (rank == 4 or rank == 2) and online then
rosterRaidersAlts[note] = true rosterRaidersAlts[note] = true
end end
else
rosterRaidersCache[name] = nil
end end
end end
end end
@ -316,20 +314,21 @@ function mod:RosterUpdatePostHook()
else else
button:UnlockHighlight(); button:UnlockHighlight();
end end
-- color differntly if they are on an alt
if (not online and rosterRaidersAlts[name]) then
for i=1,4 do
local f = button["string"..i]
if f then
f:SetTextColor(255/255, 218/255, 185/255)
end
end
end
else else
offset = offset - 1 offset = offset - 1
nonMembers = nonMembers + 1 nonMembers = nonMembers + 1
end end
-- color differntly if they are on an alt
if (not online and rosterRaidersAlts[name]) then
for i=1,4 do
local f = button["string"..i]
if f then
f:SetTextColor(255/255, 218/255, 185/255)
end
end
end
else else
nonMembers = nonMembers + 1 nonMembers = nonMembers + 1
end end