mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Better error handling when no eligible bots for level login range
This commit is contained in:
parent
0c3a799aae
commit
5f8754123d
@ -360,7 +360,7 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/)
|
||||
// Cap eligible bots by maxRandomBots
|
||||
uint32 effectiveMaxBots = std::min(eligibleBotCount, sPlayerbotAIConfig->maxRandomBots);
|
||||
|
||||
LOG_INFO("playerbots", "Level filter active: {} eligible bots found in range {}-{}. Effective maximum: {} bots",
|
||||
LOG_INFO("playerbots", "Level filter active: {} eligible bots found in range {}-{}. Effective maximum: {} bots.",
|
||||
eligibleBotCount, sPlayerbotAIConfig->randomBotMinLoginLevel,
|
||||
sPlayerbotAIConfig->randomBotMaxLoginLevel, effectiveMaxBots);
|
||||
|
||||
@ -382,8 +382,11 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/)
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("playerbots", "No eligible bots found with level filter {}-{}",
|
||||
LOG_ERROR("playerbots", "No eligible bots found with level filter {}-{}. Change the level range.",
|
||||
sPlayerbotAIConfig->randomBotMinLoginLevel, sPlayerbotAIConfig->randomBotMaxLoginLevel);
|
||||
SetEventValue(0, "bot_count", 0, 999999999);
|
||||
maxAllowedBotCount = 0;
|
||||
currentBots.clear();
|
||||
levelFilterAdjusted = true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user