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:
@@ -1464,7 +1464,11 @@ AiPlayerbot.BotActiveAlone = 100
|
|||||||
|
|
||||||
# Specify smart scaling is enabled or not.
|
# Specify smart scaling is enabled or not.
|
||||||
# The default is 1. When enabled (smart) scales the 'BotActiveAlone' value.
|
# The default is 1. When enabled (smart) scales the 'BotActiveAlone' value.
|
||||||
|
# Only when botLevel is between WhenMinLevel and WhenMaxLevel.
|
||||||
AiPlayerbot.botActiveAloneSmartScale = 1
|
AiPlayerbot.botActiveAloneSmartScale = 1
|
||||||
|
AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel = 1
|
||||||
|
AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80
|
||||||
|
|
||||||
|
|
||||||
# Premade spell to avoid (undetected spells)
|
# Premade spell to avoid (undetected spells)
|
||||||
# spellid-radius, ...
|
# spellid-radius, ...
|
||||||
|
|||||||
@@ -4288,7 +4288,9 @@ bool PlayerbotAI::AllowActive(ActivityType activityType)
|
|||||||
|
|
||||||
// GetPriorityBracket acitivity
|
// GetPriorityBracket acitivity
|
||||||
float activePerc = 100;
|
float activePerc = 100;
|
||||||
if (sPlayerbotAIConfig->botActiveAloneSmartScale)
|
if (sPlayerbotAIConfig->botActiveAloneSmartScale &&
|
||||||
|
bot->GetLevel() >= sPlayerbotAIConfig->botActiveAloneSmartScaleWhenMinLevel &&
|
||||||
|
bot->GetLevel() <= sPlayerbotAIConfig->botActiveAloneSmartScaleWhenMaxLevel)
|
||||||
{
|
{
|
||||||
std::pair<uint8, uint8> priorityBracket = GetPriorityBracket(type);
|
std::pair<uint8, uint8> priorityBracket = GetPriorityBracket(type);
|
||||||
if (!priorityBracket.second) return true;
|
if (!priorityBracket.second) return true;
|
||||||
|
|||||||
@@ -466,6 +466,8 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
disableDeathKnightLogin = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableDeathKnightLogin", 0);
|
disableDeathKnightLogin = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableDeathKnightLogin", 0);
|
||||||
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 100);
|
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 100);
|
||||||
botActiveAloneSmartScale = sConfigMgr->GetOption<bool>("AiPlayerbot.botActiveAloneSmartScale", 1);
|
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);
|
enablePrototypePerformanceDiff = sConfigMgr->GetOption<bool>("AiPlayerbot.EnablePrototypePerformanceDiff", false);
|
||||||
diffWithPlayer = sConfigMgr->GetOption<int32>("AiPlayerbot.DiffWithPlayer", 100);
|
diffWithPlayer = sConfigMgr->GetOption<int32>("AiPlayerbot.DiffWithPlayer", 100);
|
||||||
|
|||||||
@@ -264,6 +264,8 @@ public:
|
|||||||
bool disableDeathKnightLogin;
|
bool disableDeathKnightLogin;
|
||||||
uint32 botActiveAlone;
|
uint32 botActiveAlone;
|
||||||
bool botActiveAloneSmartScale;
|
bool botActiveAloneSmartScale;
|
||||||
|
uint32 botActiveAloneSmartScaleWhenMinLevel;
|
||||||
|
uint32 botActiveAloneSmartScaleWhenMaxLevel;
|
||||||
|
|
||||||
uint32 enablePrototypePerformanceDiff;
|
uint32 enablePrototypePerformanceDiff;
|
||||||
uint32 diffWithPlayer;
|
uint32 diffWithPlayer;
|
||||||
|
|||||||
Reference in New Issue
Block a user