From 0e1b70a8220761285621e2d969bf01df0814af95 Mon Sep 17 00:00:00 2001 From: espkk Date: Mon, 7 Sep 2026 16:52:42 +0100 Subject: [PATCH] fix: list rated arena teams from the rated arena bucket Core moves rated arena teams out of the faction premade lists into BG_QUEUE_RATED_ARENA, so the rated list read from the premade lists comes back empty. Read the rated bucket instead. It holds nothing else, so the IsRated filter goes too. Also stop the battleground cache walking the arena queue types. They have no premade or normal entries to list, and their rated teams come from UpdateArenaRated. Requires the core change that adds BG_QUEUE_RATED_ARENA. --- src/QueueListCache.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/QueueListCache.cpp b/src/QueueListCache.cpp index 0c852d7..3cdb4e6 100644 --- a/src/QueueListCache.cpp +++ b/src/QueueListCache.cpp @@ -78,19 +78,13 @@ void QueueListCache::UpdateArenaRated() if (bgQueue.IsAllQueuesEmpty(bracketID)) continue; - for (uint8 ii = BG_QUEUE_PREMADE_ALLIANCE; ii <= BG_QUEUE_PREMADE_HORDE; ii++) + for (auto const& itr : bgQueue.m_QueuedGroups[bracketID][BG_QUEUE_RATED_ARENA]) { - for (auto const& itr : bgQueue.m_QueuedGroups[bracketID][ii]) - { - if (!itr->IsRated) - continue; - - ArenaTeam* team = sArenaTeamMgr->GetArenaTeamById(itr->ArenaTeamId); - if (!team) - continue; + ArenaTeam* team = sArenaTeamMgr->GetArenaTeamById(itr->ArenaTeamId); + if (!team) + continue; - queueArenaRatedList.emplace_back(team->GetName(), itr->ArenaType, itr->ArenaTeamRating); - } + queueArenaRatedList.emplace_back(team->GetName(), itr->ArenaType, itr->ArenaTeamRating); } } } @@ -248,7 +242,9 @@ void QueueListCache::UpdateBg() AddCacheToVector(queueCacheList, groupInfo, &bgQueue, bracket); }; - for (uint32 qtype = BATTLEGROUND_QUEUE_AV; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype) + // Battleground queue types only. The arena types above them have no premade or normal + // faction buckets to cache, and their rated teams are listed by UpdateArenaRated. + for (uint32 qtype = BATTLEGROUND_QUEUE_AV; qtype <= BATTLEGROUND_QUEUE_RB; ++qtype) { for (uint32 bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket) {