mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Added min and max level for smartScale
This commit is contained in:
@@ -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, ...
|
||||
|
||||
@@ -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