Fixed a problem with guild roster number counts. Hopefully fixed the problem with bottom members being cut off.
This commit is contained in:
parent
6563c571db
commit
b9b3342455
1 changed files with 12 additions and 8 deletions
|
@ -148,6 +148,7 @@ function mod:RosterUpdatePostHook()
|
||||||
end
|
end
|
||||||
if GetTime() - lastCache > 60*5 then
|
if GetTime() - lastCache > 60*5 then
|
||||||
self:CacheRaiders()
|
self:CacheRaiders()
|
||||||
|
lastCache = GetTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- begin modified blizzard code
|
-- begin modified blizzard code
|
||||||
|
@ -168,19 +169,18 @@ function mod:RosterUpdatePostHook()
|
||||||
local maxWeeklyXP, maxTotalXP = GetGuildRosterLargestContribution();
|
local maxWeeklyXP, maxTotalXP = GetGuildRosterLargestContribution();
|
||||||
local maxAchievementsPoints = GetGuildRosterLargestAchievementPoints();
|
local maxAchievementsPoints = GetGuildRosterLargestAchievementPoints();
|
||||||
-- numVisible
|
-- numVisible
|
||||||
local visibleMembers = 0;
|
local visibleMembers, onlineRaiders = 0, 0
|
||||||
for i=1,onlineMembers do
|
local numMembers = GetGuildRosterShowOffline() and totalMembers or onlineMembers
|
||||||
|
for i=1,numMembers do
|
||||||
if self:IsRaider(i) then
|
if self:IsRaider(i) then
|
||||||
visibleMembers = visibleMembers + 1
|
visibleMembers = visibleMembers + 1
|
||||||
|
if select(9, GetGuildRosterInfo(i)) then
|
||||||
|
onlineRaiders = onlineRaiders + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- copy visibleMembers to local for referencing
|
-- copy visibleMembers to local for referencing
|
||||||
rosterRaidersOnline = visibleMembers
|
rosterRaidersOnline = onlineRaiders
|
||||||
|
|
||||||
if ( GetGuildRosterShowOffline() ) then
|
|
||||||
visibleMembers = rosterRaidersCount;
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- self:Print("Start", visibleMembers, rosterRaidersCount)
|
-- self:Print("Start", visibleMembers, rosterRaidersCount)
|
||||||
local safety = 1000
|
local safety = 1000
|
||||||
|
@ -313,6 +313,10 @@ function mod:RosterUpdatePostHook()
|
||||||
GuildRosterContainer.update = function() end
|
GuildRosterContainer.update = function() end
|
||||||
HybridScrollFrame_Update(scrollFrame, totalHeight, displayedHeight);
|
HybridScrollFrame_Update(scrollFrame, totalHeight, displayedHeight);
|
||||||
GuildRosterContainer.update = guildUpdate
|
GuildRosterContainer.update = guildUpdate
|
||||||
|
if rosterRaidersOnline > 0 then
|
||||||
|
-- Shouldn't need to pass a string
|
||||||
|
GuildFrameMembersCount:SetText()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mod:GuildRosterButton_OnClick(this, button, ...)
|
function mod:GuildRosterButton_OnClick(this, button, ...)
|
||||||
|
|
Loading…
Reference in a new issue