diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index e28a473d..17bbce3b 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -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; diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 1416ae48..1e30be99 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -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) { diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index c6b7cf98..99959ad1 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -470,6 +470,7 @@ bool PlayerbotAIConfig::Initialize() botActiveAlone = sConfigMgr->GetOption("AiPlayerbot.BotActiveAlone", 100); BotActiveAloneWhenInRadius = sConfigMgr->GetOption("AiPlayerbot.BotActiveAloneWhenInRadius", 150); BotActiveAloneForceWhenInZone = sConfigMgr->GetOption("AiPlayerbot.BotActiveAloneForceWhenInZone", 1); + BotActiveAloneForceWhenInMap = sConfigMgr->GetOption("AiPlayerbot.BotActiveAloneForceWhenInMap", 0); BotActiveAloneForceWhenIsFriend = sConfigMgr->GetOption("AiPlayerbot.BotActiveAloneForceWhenIsFriend", 1); BotActiveAloneForceWhenInGuild = sConfigMgr->GetOption("AiPlayerbot.BotActiveAloneForceWhenInGuild", 1); botActiveAloneSmartScale = sConfigMgr->GetOption("AiPlayerbot.botActiveAloneSmartScale", 1); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 749047ce..2dbfabc3 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -266,6 +266,7 @@ public: uint32 botActiveAlone; uint32 BotActiveAloneWhenInRadius; bool BotActiveAloneForceWhenInZone; + bool BotActiveAloneForceWhenInMap; bool BotActiveAloneForceWhenIsFriend; bool BotActiveAloneForceWhenInGuild; bool botActiveAloneSmartScale;