Fix unique equip init and bots login

This commit is contained in:
Yunfan Li
2024-09-05 15:04:46 +08:00
parent bbc95c953a
commit 369f3373ed
3 changed files with 42 additions and 24 deletions

View File

@@ -370,7 +370,7 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/)
break;
}
if (loginBots)
if (loginBots && botLoading.empty())
{
loginBots += updateBots;
loginBots = std::min(loginBots, maxNewBots);
@@ -1041,6 +1041,9 @@ bool RandomPlayerbotMgr::ProcessBot(uint32 bot)
SetEventValue(bot, "login", 0, 0);
if (!player->IsInWorld())
return false;
if (player->GetGroup() || player->HasUnitState(UNIT_STATE_IN_FLIGHT))
return false;