mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
botActiveAlone; added new botActiveAlone confguration option (#783)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -266,6 +266,7 @@ public:
|
||||
uint32 botActiveAlone;
|
||||
uint32 BotActiveAloneWhenInRadius;
|
||||
bool BotActiveAloneForceWhenInZone;
|
||||
bool BotActiveAloneForceWhenInMap;
|
||||
bool BotActiveAloneForceWhenIsFriend;
|
||||
bool BotActiveAloneForceWhenInGuild;
|
||||
bool botActiveAloneSmartScale;
|
||||
|
||||
Reference in New Issue
Block a user