From c2a1632d6ce7031c587ecf96e00f0f91c59ced0f Mon Sep 17 00:00:00 2001 From: devbox Date: Tue, 18 Aug 2026 14:51:50 +1000 Subject: [PATCH] Playerbot: save bots on logout so quests/progress persist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LogoutBot called LogoutPlayer(false), which skips SaveToDB — a quest pushed and progressed this session was lost on logout unless a 15-min autosave happened to fire first. Bots then couldn't complete the quest the player finished, breaking the chain (follow-up quest un-pushable). Use LogoutPlayer(true), matching the BotSession idle-timeout path. --- src/modules/PlayerbotV2/Session/BotSessionMgr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/PlayerbotV2/Session/BotSessionMgr.cpp b/src/modules/PlayerbotV2/Session/BotSessionMgr.cpp index baa9307f8c..34a7196583 100644 --- a/src/modules/PlayerbotV2/Session/BotSessionMgr.cpp +++ b/src/modules/PlayerbotV2/Session/BotSessionMgr.cpp @@ -106,7 +106,13 @@ bool BotSessionMgr::LogoutBot(ObjectGuid playerGuid) bot->RemovePet(pet, PET_SAVE_AS_DELETED, false); if (bot->GetGroup()) bot->RemoveFromGroup(); - sess->LogoutPlayer(false); + // save=true so quest status / progress pushed this session persists + // across logout. `false` here skipped SaveToDB entirely — a recently + // pushed quest (and its progression) was lost unless a 15-min + // autosave happened to fire first, which broke quest chains: bots + // couldn't complete the quest the player finished, so the follow-up + // quest couldn't be pushed. + sess->LogoutPlayer(true); } // else: login in flight — removing from sessions_ is enough to abort tracking return true;