mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge pull request #591 from hermensbas/feature/BotActiveAlone_SmartScale_Toggle_Min_Max_level
[performance] Added min-max botLevel to apply smartScale on.
This commit is contained in:
@@ -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<uint8, uint8> priorityBracket = GetPriorityBracket(type);
|
||||
if (!priorityBracket.second) return true;
|
||||
|
||||
@@ -466,6 +466,8 @@ bool PlayerbotAIConfig::Initialize()
|
||||
disableDeathKnightLogin = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableDeathKnightLogin", 0);
|
||||
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 100);
|
||||
botActiveAloneSmartScale = sConfigMgr->GetOption<bool>("AiPlayerbot.botActiveAloneSmartScale", 1);
|
||||
botActiveAloneSmartScaleWhenMinLevel = sConfigMgr->GetOption<uint32>("AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel", 1);
|
||||
botActiveAloneSmartScaleWhenMaxLevel = sConfigMgr->GetOption<uint32>("AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel", 80);
|
||||
|
||||
enablePrototypePerformanceDiff = sConfigMgr->GetOption<bool>("AiPlayerbot.EnablePrototypePerformanceDiff", false);
|
||||
diffWithPlayer = sConfigMgr->GetOption<int32>("AiPlayerbot.DiffWithPlayer", 100);
|
||||
|
||||
@@ -264,6 +264,8 @@ public:
|
||||
bool disableDeathKnightLogin;
|
||||
uint32 botActiveAlone;
|
||||
bool botActiveAloneSmartScale;
|
||||
uint32 botActiveAloneSmartScaleWhenMinLevel;
|
||||
uint32 botActiveAloneSmartScaleWhenMaxLevel;
|
||||
|
||||
uint32 enablePrototypePerformanceDiff;
|
||||
uint32 diffWithPlayer;
|
||||
|
||||
Reference in New Issue
Block a user