- code fix

This commit is contained in:
kadeshar
2025-05-26 22:18:23 +02:00
parent ccbe8ae63f
commit ceb27c5ae4
2 changed files with 13 additions and 2 deletions

2
.gitignore vendored
View File

@@ -48,5 +48,3 @@ local.properties
.cproject .cproject
.vscode/ .vscode/
.vsconfig/ .vsconfig/
/conf/.vs
/.vs

View File

@@ -467,6 +467,14 @@ static bool IsBotSafeForLevelReset(Player* bot)
} }
return false; return false;
} }
if (bot->GetSession()->isLogingOut())
{
if (g_BotDistFullDebugMode)
{
LOG_INFO("server.loading", "[BotLevelBrackets] Bot {} (Level {}) is logging out.", bot->GetName(), bot->GetLevel());
}
return false;
}
if (!bot->IsInWorld()) if (!bot->IsInWorld())
{ {
if (g_BotDistFullDebugMode) if (g_BotDistFullDebugMode)
@@ -537,6 +545,11 @@ static std::vector<PendingResetEntry> g_PendingLevelResets;
static void ProcessPendingLevelResets() static void ProcessPendingLevelResets()
{ {
if (!sRandomPlayerbotMgr->GetDisabledWithoutRealPlayerLogoutInProgress())
{
g_PendingLevelResets.clear();
return;
}
if (g_BotDistFullDebugMode) if (g_BotDistFullDebugMode)
{ {
LOG_INFO("server.loading", "[BotLevelBrackets] Processing {} pending resets...", g_PendingLevelResets.size()); LOG_INFO("server.loading", "[BotLevelBrackets] Processing {} pending resets...", g_PendingLevelResets.size());