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
|
# Force botActiveAlone when bot is ... of real player
|
||||||
AiPlayerbot.BotActiveAloneForceWhenInRadius = 150;
|
AiPlayerbot.BotActiveAloneForceWhenInRadius = 150;
|
||||||
AiPlayerbot.BotActiveAloneForceWhenInZone = 1;
|
AiPlayerbot.BotActiveAloneForceWhenInZone = 1;
|
||||||
|
AiPlayerbot.BotActiveAloneForceWhenInMap = 0;
|
||||||
AiPlayerbot.BotActiveAloneForceWhenIsFriend = 1;
|
AiPlayerbot.BotActiveAloneForceWhenIsFriend = 1;
|
||||||
AiPlayerbot.BotActiveAloneForceWhenInGuild = 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.
|
// bot zone has active players.
|
||||||
if (sPlayerbotAIConfig->BotActiveAloneForceWhenInZone)
|
if (sPlayerbotAIConfig->BotActiveAloneForceWhenInZone)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -470,6 +470,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 100);
|
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 100);
|
||||||
BotActiveAloneWhenInRadius = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAloneWhenInRadius", 150);
|
BotActiveAloneWhenInRadius = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAloneWhenInRadius", 150);
|
||||||
BotActiveAloneForceWhenInZone = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInZone", 1);
|
BotActiveAloneForceWhenInZone = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInZone", 1);
|
||||||
|
BotActiveAloneForceWhenInMap = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInMap", 0);
|
||||||
BotActiveAloneForceWhenIsFriend = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenIsFriend", 1);
|
BotActiveAloneForceWhenIsFriend = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenIsFriend", 1);
|
||||||
BotActiveAloneForceWhenInGuild = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInGuild", 1);
|
BotActiveAloneForceWhenInGuild = sConfigMgr->GetOption<bool>("AiPlayerbot.BotActiveAloneForceWhenInGuild", 1);
|
||||||
botActiveAloneSmartScale = sConfigMgr->GetOption<bool>("AiPlayerbot.botActiveAloneSmartScale", 1);
|
botActiveAloneSmartScale = sConfigMgr->GetOption<bool>("AiPlayerbot.botActiveAloneSmartScale", 1);
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ public:
|
|||||||
uint32 botActiveAlone;
|
uint32 botActiveAlone;
|
||||||
uint32 BotActiveAloneWhenInRadius;
|
uint32 BotActiveAloneWhenInRadius;
|
||||||
bool BotActiveAloneForceWhenInZone;
|
bool BotActiveAloneForceWhenInZone;
|
||||||
|
bool BotActiveAloneForceWhenInMap;
|
||||||
bool BotActiveAloneForceWhenIsFriend;
|
bool BotActiveAloneForceWhenIsFriend;
|
||||||
bool BotActiveAloneForceWhenInGuild;
|
bool BotActiveAloneForceWhenInGuild;
|
||||||
bool botActiveAloneSmartScale;
|
bool botActiveAloneSmartScale;
|
||||||
|
|||||||
Reference in New Issue
Block a user