botActiveAlone; added new botActiveAlone confguration option (#783)

This commit is contained in:
bash
2024-12-15 20:04:24 +01:00
committed by GitHub
parent 183bf7ae8e
commit 19cda1068d
4 changed files with 12 additions and 0 deletions

View File

@@ -1514,6 +1514,7 @@ AiPlayerbot.BotActiveAlone = 100
# Force botActiveAlone when bot is ... of real player
AiPlayerbot.BotActiveAloneForceWhenInRadius = 150;
AiPlayerbot.BotActiveAloneForceWhenInZone = 1;
AiPlayerbot.BotActiveAloneForceWhenInMap = 0;
AiPlayerbot.BotActiveAloneForceWhenIsFriend = 1;
AiPlayerbot.BotActiveAloneForceWhenInGuild = 1;

View File

@@ -4172,6 +4172,15 @@ bool PlayerbotAI::AllowActive(ActivityType activityType)
}
}
// bot map has active players.
if (sPlayerbotAIConfig->BotActiveAloneForceWhenInMap)
{
if (HasRealPlayers(bot->GetMap()))
{
return true;
}
}
// bot zone has active players.
if (sPlayerbotAIConfig->BotActiveAloneForceWhenInZone)
{

View File

@@ -470,6 +470,7 @@ bool PlayerbotAIConfig::Initialize()
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 100);
BotActiveAloneWhenInRadius = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAloneWhenInRadius", 150);
BotActiveAloneForceWhenInZone = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInZone", 1);
BotActiveAloneForceWhenInMap = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInMap", 0);
BotActiveAloneForceWhenIsFriend = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenIsFriend", 1);
BotActiveAloneForceWhenInGuild = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInGuild", 1);
botActiveAloneSmartScale = sConfigMgr->GetOption<bool>("AiPlayerbot.botActiveAloneSmartScale", 1);

View File

@@ -266,6 +266,7 @@ public:
uint32 botActiveAlone;
uint32 BotActiveAloneWhenInRadius;
bool BotActiveAloneForceWhenInZone;
bool BotActiveAloneForceWhenInMap;
bool BotActiveAloneForceWhenIsFriend;
bool BotActiveAloneForceWhenInGuild;
bool botActiveAloneSmartScale;