diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 2e60259f..fa867e68 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -97,6 +97,10 @@ AiPlayerbot.SummonWhenGroup = 1 AiPlayerbot.RandomBotShowHelmet = 1 AiPlayerbot.RandomBotShowCloak = 1 +# Fix the level of random bot (won't level up by grinding) +# Default: 0 (disable) +AiPlayerbot.RandomBotFixedLevel = 0 + # Disable random levels for randombots # Every bots started on the specified level and level up by killing mobs. AiPlayerbot.DisableRandomLevels = 0 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index c3892b91..96142144 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -265,6 +265,7 @@ bool PlayerbotAIConfig::Initialize() // SPP switches enableGreet = sConfigMgr->GetOption("AiPlayerbot.EnableGreet", true); summonWhenGroup = sConfigMgr->GetOption("AiPlayerbot.SummonWhenGroup", true); + randomBotFixedLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotFixedLevel", false); disableRandomLevels = sConfigMgr->GetOption("AiPlayerbot.DisableRandomLevels", false); randomBotRandomPassword = sConfigMgr->GetOption("AiPlayerbot.RandomBotRandomPassword", true); downgradeMaxLevelBot = sConfigMgr->GetOption("AiPlayerbot.DowngradeMaxLevelBot", true); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 5356bc49..cc5e72be 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -174,6 +174,7 @@ class PlayerbotAIConfig bool summonWhenGroup; bool randomBotShowHelmet; bool randomBotShowCloak; + bool randomBotFixedLevel; bool disableRandomLevels; uint32 playerbotsXPrate; bool disableDeathKnightLogin; diff --git a/src/RandomItemMgr.cpp b/src/RandomItemMgr.cpp index f2ff7bcb..d909b4b0 100644 --- a/src/RandomItemMgr.cpp +++ b/src/RandomItemMgr.cpp @@ -2159,6 +2159,9 @@ void RandomItemMgr::BuildEquipCacheNew() if (IsTestItem(itemId)) { continue; } + if (itemId == 22784) { // Sunwell Orb + continue; + } equipCacheNew[proto->RequiredLevel][proto->InventoryType].push_back(itemId); } } diff --git a/src/strategy/actions/XpGainAction.cpp b/src/strategy/actions/XpGainAction.cpp index fbf313cb..a82eacff 100644 --- a/src/strategy/actions/XpGainAction.cpp +++ b/src/strategy/actions/XpGainAction.cpp @@ -4,12 +4,18 @@ #include "XpGainAction.h" #include "Event.h" +#include "PlayerbotAIConfig.h" #include "Playerbots.h" bool XpGainAction::Execute(Event event) { context->GetValue("death count")->Set(0); + if (sPlayerbotAIConfig->randomBotFixedLevel) { + bot->SetUInt32Value(PLAYER_XP, 0); + return true; + } + if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1) return true;