From 9432a31ef76c2954a37a58de342f1d4bbbf9e51f Mon Sep 17 00:00:00 2001 From: FrancescoBorzi Date: Thu, 2 Jul 2026 12:27:20 +0200 Subject: [PATCH] fix: allow core .debug bg test starts under CFBG --- src/CFBG.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CFBG.cpp b/src/CFBG.cpp index b2d9b97..05ff029 100644 --- a/src/CFBG.cpp +++ b/src/CFBG.cpp @@ -5,6 +5,7 @@ */ #include "CFBG.h" +#include "BattlegroundMgr.h" #include "BattlegroundQueue.h" #include "BattlegroundUtils.h" #include "Chat.h" @@ -896,7 +897,13 @@ bool CFBG::CheckCrossFactionMatch(BattlegroundQueue* queue, BattlegroundBracketI if (!IsEnableSystem()) return false; - SelectBalancedGroups(queue, bracket_id, nullptr, maxPlayers, IsEnableEvenTeams() ? 0 : 1); + bool isTesting = sBattlegroundMgr->isTesting(); + SelectBalancedGroups(queue, bracket_id, nullptr, maxPlayers, isTesting ? maxPlayers : (IsEnableEvenTeams() ? 0 : 1)); + + // Mirror core CanStartMatch's testing arm: under .debug bg a single + // non-empty pool is enough to start (1v0), so skip the pool reset. + if (isTesting && (queue->m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() || queue->m_SelectionPools[TEAM_HORDE].GetPlayerCount())) + return true; // Return when we're ready to start a BG, if we're in startup process if (queue->m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() >= minPlayers &&