mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Configuration] Random bots fixed level
This commit is contained in:
@@ -448,6 +448,12 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
|
||||
uint32 accountId = bot->GetSession()->GetAccountId();
|
||||
bool isRandomAccount = sPlayerbotAIConfig->IsInRandomAccountList(accountId);
|
||||
|
||||
if (isRandomAccount && sPlayerbotAIConfig->randomBotFixedLevel) {
|
||||
bot->SetPlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||
} else {
|
||||
bot->RemovePlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||
}
|
||||
|
||||
bot->SaveToDB(false, false);
|
||||
if (master && isRandomAccount && master->GetLevel() < bot->GetLevel()) {
|
||||
// PlayerbotFactory factory(bot, master->getLevel());
|
||||
|
||||
@@ -11,11 +11,6 @@ bool XpGainAction::Execute(Event event)
|
||||
{
|
||||
context->GetValue<uint32>("death count")->Set(0);
|
||||
|
||||
if (sRandomPlayerbotMgr->IsRandomBot(bot) && sPlayerbotAIConfig->randomBotFixedLevel) {
|
||||
bot->SetUInt32Value(PLAYER_XP, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1)
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user