[Configuration] Fixed level

This commit is contained in:
Yunfan Li
2024-06-27 23:30:04 +08:00
parent 10527eed2a
commit 009be18646
5 changed files with 15 additions and 0 deletions

View File

@@ -265,6 +265,7 @@ bool PlayerbotAIConfig::Initialize()
// SPP switches
enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true);
summonWhenGroup = sConfigMgr->GetOption<bool>("AiPlayerbot.SummonWhenGroup", true);
randomBotFixedLevel = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotFixedLevel", false);
disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false);
randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true);
downgradeMaxLevelBot = sConfigMgr->GetOption<bool>("AiPlayerbot.DowngradeMaxLevelBot", true);

View File

@@ -174,6 +174,7 @@ class PlayerbotAIConfig
bool summonWhenGroup;
bool randomBotShowHelmet;
bool randomBotShowCloak;
bool randomBotFixedLevel;
bool disableRandomLevels;
uint32 playerbotsXPrate;
bool disableDeathKnightLogin;

View File

@@ -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);
}
}

View File

@@ -4,12 +4,18 @@
#include "XpGainAction.h"
#include "Event.h"
#include "PlayerbotAIConfig.h"
#include "Playerbots.h"
bool XpGainAction::Execute(Event event)
{
context->GetValue<uint32>("death count")->Set(0);
if (sPlayerbotAIConfig->randomBotFixedLevel) {
bot->SetUInt32Value(PLAYER_XP, 0);
return true;
}
if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1)
return true;