fix(Core/BG): do not start new BGs if there are BGs with free slots (#3082)

This commit is contained in:
Francesco Borzì
2020-06-05 16:40:15 +02:00
committed by GitHub
parent 0550a8d553
commit 64e0867c28

View File

@@ -712,6 +712,12 @@ void BattlegroundQueue::BattlegroundQueueUpdate(BattlegroundBracketId bracket_id
for (auto itr : m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups)
BattlegroundMgr::InviteGroupToBG(itr, bg, itr->RealTeamID);
}
// prevent new BGs to be created if there are some non-empty BGs running
// TODO: note that this is a workaround,
// however it shouldn't cause issues as the queue update is constantly called
if (!bg_template->isArena() && !bgsToCheck.empty())
return;
}
// finished iterating through battlegrounds with free slots, maybe we need to create a new bg