mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fixed issue with random bots not respecting RandomBotFixedLevel (#714)
* Update RandomPlayerbotMgr.cpp Added check during random bot login for RandomBotFixedLevel and set PLAYER_FLAGS_NO_XP_GAIN * Update RandomPlayerbotMgr.cpp Removed if from else
This commit is contained in:
@@ -2243,6 +2243,15 @@ void RandomPlayerbotMgr::OnBotLoginInternal(Player* const bot)
|
|||||||
{
|
{
|
||||||
LOG_INFO("playerbots", "{}/{} Bot {} logged in", playerBots.size(), sRandomPlayerbotMgr->GetMaxAllowedBotCount(),
|
LOG_INFO("playerbots", "{}/{} Bot {} logged in", playerBots.size(), sRandomPlayerbotMgr->GetMaxAllowedBotCount(),
|
||||||
bot->GetName().c_str());
|
bot->GetName().c_str());
|
||||||
|
|
||||||
|
if (sPlayerbotAIConfig->randomBotFixedLevel)
|
||||||
|
{
|
||||||
|
bot->SetPlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bot->RemovePlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RandomPlayerbotMgr::OnPlayerLogin(Player* player)
|
void RandomPlayerbotMgr::OnPlayerLogin(Player* player)
|
||||||
|
|||||||
Reference in New Issue
Block a user