Auto Join BG config

This commit is contained in:
郑佩茹
2023-04-04 13:41:01 -06:00
parent e1f8a849e4
commit 9871cd34c4
4 changed files with 8 additions and 0 deletions

View File

@@ -245,6 +245,9 @@ bool BGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battlegroun
bool hasPlayers = (sRandomPlayerbotMgr->BgPlayers[queueTypeId][bracketId][TEAM_ALLIANCE] + sRandomPlayerbotMgr->BgPlayers[queueTypeId][bracketId][TEAM_HORDE]) > 0;
bool hasBots = (sRandomPlayerbotMgr->BgBots[queueTypeId][bracketId][TEAM_ALLIANCE] + sRandomPlayerbotMgr->BgBots[queueTypeId][bracketId][TEAM_HORDE]) >= bg->GetMinPlayersPerTeam();
if (!sPlayerbotAIConfig->randomBotAutoJoinBG && !hasPlayers)
return false;
if (!(hasPlayers || hasBots))
return false;