diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index e0356cb7..fe34fde4 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -1464,7 +1464,11 @@ AiPlayerbot.BotActiveAlone = 100 # Specify smart scaling is enabled or not. # The default is 1. When enabled (smart) scales the 'BotActiveAlone' value. +# Only when botLevel is between WhenMinLevel and WhenMaxLevel. AiPlayerbot.botActiveAloneSmartScale = 1 +AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel = 1 +AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80 + # Premade spell to avoid (undetected spells) # spellid-radius, ... diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 0df602d8..bba3753a 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -4288,7 +4288,9 @@ bool PlayerbotAI::AllowActive(ActivityType activityType) // GetPriorityBracket acitivity float activePerc = 100; - if (sPlayerbotAIConfig->botActiveAloneSmartScale) + if (sPlayerbotAIConfig->botActiveAloneSmartScale && + bot->GetLevel() >= sPlayerbotAIConfig->botActiveAloneSmartScaleWhenMinLevel && + bot->GetLevel() <= sPlayerbotAIConfig->botActiveAloneSmartScaleWhenMaxLevel) { std::pair priorityBracket = GetPriorityBracket(type); if (!priorityBracket.second) return true; diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index d6c8e972..270d3ae5 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -466,6 +466,8 @@ bool PlayerbotAIConfig::Initialize() disableDeathKnightLogin = sConfigMgr->GetOption("AiPlayerbot.DisableDeathKnightLogin", 0); botActiveAlone = sConfigMgr->GetOption("AiPlayerbot.BotActiveAlone", 100); botActiveAloneSmartScale = sConfigMgr->GetOption("AiPlayerbot.botActiveAloneSmartScale", 1); + botActiveAloneSmartScaleWhenMinLevel = sConfigMgr->GetOption("AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel", 1); + botActiveAloneSmartScaleWhenMaxLevel = sConfigMgr->GetOption("AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel", 80); enablePrototypePerformanceDiff = sConfigMgr->GetOption("AiPlayerbot.EnablePrototypePerformanceDiff", false); diffWithPlayer = sConfigMgr->GetOption("AiPlayerbot.DiffWithPlayer", 100); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 24609eae..4a2ec5b9 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -264,6 +264,8 @@ public: bool disableDeathKnightLogin; uint32 botActiveAlone; bool botActiveAloneSmartScale; + uint32 botActiveAloneSmartScaleWhenMinLevel; + uint32 botActiveAloneSmartScaleWhenMaxLevel; uint32 enablePrototypePerformanceDiff; uint32 diffWithPlayer;