Merge pull request #330 from BenWagner-UX/Lfg-Fix

fixed: Bots are now able to join LFG - Missing worker activation implementation
This commit is contained in:
Yunfan Li
2024-07-13 11:45:55 +08:00
committed by GitHub

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);