mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Auto Join BG config
This commit is contained in:
@@ -32,6 +32,9 @@ AiPlayerbot.SuggestDungeonsInLowerCaseRandomly = 0
|
||||
# Enable BG/Arena for random Bots
|
||||
AiPlayerbot.RandomBotJoinBG = 1
|
||||
|
||||
# Enable Auto join BG - bots randomly join WSG and 2v2 Arena if server is not lagging
|
||||
AiPlayerbot.RandomBotAutoJoinBG = 0
|
||||
|
||||
# Mark many quests <= Bot level as complete (slows down bot creation)
|
||||
AiPlayerbot.PreQuests = 0
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
randomBotSuggestDungeons = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotSuggestDungeons", true);
|
||||
suggestDungeonsInLowerCaseRandomly = sConfigMgr->GetOption<bool>("AiPlayerbot.SuggestDungeonsInLowerCaseRandomly", false);
|
||||
randomBotJoinBG = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotJoinBG", true);
|
||||
randomBotAutoJoinBG = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotAutoJoinBG", false);
|
||||
logInGroupOnly = sConfigMgr->GetOption<bool>("AiPlayerbot.LogInGroupOnly", true);
|
||||
logValuesPerTick = sConfigMgr->GetOption<bool>("AiPlayerbot.LogValuesPerTick", false);
|
||||
fleeingEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.FleeingEnabled", true);
|
||||
|
||||
@@ -73,6 +73,7 @@ class PlayerbotAIConfig
|
||||
bool randomBotSuggestDungeons;
|
||||
bool suggestDungeonsInLowerCaseRandomly;
|
||||
bool randomBotJoinBG;
|
||||
bool randomBotAutoJoinBG;
|
||||
bool randomBotLoginAtStartup;
|
||||
uint32 randomBotTeleLevel;
|
||||
bool logInGroupOnly, logValuesPerTick;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user