Playerbot: REVERT save-bots-on-logout — it corrupts player data

LogoutBot's LogoutPlayer(true) ran the FULL account-scoped SaveToDB on a
headless bot sharing the owner's account, corrupting player/character data on
logout and server-reset (confirmed: corruption started exactly with this
change; fresh characters then crash the client at world-enter with
CombatLogEntry empty-guid-type). Revert to LogoutPlayer(false) (the safe,
long-standing behaviour).
This commit is contained in:
devbox
2026-08-20 18:22:17 +10:00
parent 802acdfc3a
commit 9ab5265e0c
@@ -106,13 +106,14 @@ bool BotSessionMgr::LogoutBot(ObjectGuid playerGuid)
bot->RemovePet(pet, PET_SAVE_AS_DELETED, false);
if (bot->GetGroup())
bot->RemoveFromGroup();
// 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);
// save=false matches the long-standing pre-corruption behaviour. The
// earlier `true` here (to persist bot quests) ran the FULL SaveToDB on
// a headless bot sharing the owner's account and corrupted player data
// on logout/server-reset — the bot save's per-account state leaked into
// the owner's / other characters' records. Bots get their quest state
// persisted via the module's own explicit save path instead, NOT the
// core's account-scoped LogoutPlayer save.
sess->LogoutPlayer(false);
}
// else: login in flight — removing from sessions_ is enough to abort tracking
return true;