fixed: Bots are now able to join LFG - Missing worker activation implemented

This commit is contained in:
Ben Wagner
2024-07-12 23:46:58 +02:00
parent 2b62329b58
commit 83ae7a7bd5

View File

@@ -384,6 +384,12 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/)
activateCheckBgQueueThread();
}
if (sPlayerbotAIConfig->randomBotJoinLfg/* && !players.empty()*/)
{
if (time(nullptr) > (LfgCheckTimer + 30))
activateCheckLfgQueueThread();
}
uint32 updateBots = sPlayerbotAIConfig->randomBotsPerInterval * onlineBotFocus / 100;
uint32 maxNewBots = onlineBotCount < maxAllowedBotCount ? maxAllowedBotCount - onlineBotCount : 0;
uint32 loginBots = std::min(sPlayerbotAIConfig->randomBotsPerInterval - updateBots, maxNewBots);