mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Configuration] Fixed level
This commit is contained in:
@@ -97,6 +97,10 @@ AiPlayerbot.SummonWhenGroup = 1
|
|||||||
AiPlayerbot.RandomBotShowHelmet = 1
|
AiPlayerbot.RandomBotShowHelmet = 1
|
||||||
AiPlayerbot.RandomBotShowCloak = 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
|
# Disable random levels for randombots
|
||||||
# Every bots started on the specified level and level up by killing mobs.
|
# Every bots started on the specified level and level up by killing mobs.
|
||||||
AiPlayerbot.DisableRandomLevels = 0
|
AiPlayerbot.DisableRandomLevels = 0
|
||||||
|
|||||||
@@ -265,6 +265,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
// SPP switches
|
// SPP switches
|
||||||
enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true);
|
enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true);
|
||||||
summonWhenGroup = sConfigMgr->GetOption<bool>("AiPlayerbot.SummonWhenGroup", true);
|
summonWhenGroup = sConfigMgr->GetOption<bool>("AiPlayerbot.SummonWhenGroup", true);
|
||||||
|
randomBotFixedLevel = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotFixedLevel", false);
|
||||||
disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false);
|
disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false);
|
||||||
randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true);
|
randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true);
|
||||||
downgradeMaxLevelBot = sConfigMgr->GetOption<bool>("AiPlayerbot.DowngradeMaxLevelBot", true);
|
downgradeMaxLevelBot = sConfigMgr->GetOption<bool>("AiPlayerbot.DowngradeMaxLevelBot", true);
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ class PlayerbotAIConfig
|
|||||||
bool summonWhenGroup;
|
bool summonWhenGroup;
|
||||||
bool randomBotShowHelmet;
|
bool randomBotShowHelmet;
|
||||||
bool randomBotShowCloak;
|
bool randomBotShowCloak;
|
||||||
|
bool randomBotFixedLevel;
|
||||||
bool disableRandomLevels;
|
bool disableRandomLevels;
|
||||||
uint32 playerbotsXPrate;
|
uint32 playerbotsXPrate;
|
||||||
bool disableDeathKnightLogin;
|
bool disableDeathKnightLogin;
|
||||||
|
|||||||
@@ -2159,6 +2159,9 @@ void RandomItemMgr::BuildEquipCacheNew()
|
|||||||
if (IsTestItem(itemId)) {
|
if (IsTestItem(itemId)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (itemId == 22784) { // Sunwell Orb
|
||||||
|
continue;
|
||||||
|
}
|
||||||
equipCacheNew[proto->RequiredLevel][proto->InventoryType].push_back(itemId);
|
equipCacheNew[proto->RequiredLevel][proto->InventoryType].push_back(itemId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,18 @@
|
|||||||
|
|
||||||
#include "XpGainAction.h"
|
#include "XpGainAction.h"
|
||||||
#include "Event.h"
|
#include "Event.h"
|
||||||
|
#include "PlayerbotAIConfig.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
|
|
||||||
bool XpGainAction::Execute(Event event)
|
bool XpGainAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
context->GetValue<uint32>("death count")->Set(0);
|
context->GetValue<uint32>("death count")->Set(0);
|
||||||
|
|
||||||
|
if (sPlayerbotAIConfig->randomBotFixedLevel) {
|
||||||
|
bot->SetUInt32Value(PLAYER_XP, 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1)
|
if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user