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:
@@ -106,13 +106,14 @@ bool BotSessionMgr::LogoutBot(ObjectGuid playerGuid)
|
|||||||
bot->RemovePet(pet, PET_SAVE_AS_DELETED, false);
|
bot->RemovePet(pet, PET_SAVE_AS_DELETED, false);
|
||||||
if (bot->GetGroup())
|
if (bot->GetGroup())
|
||||||
bot->RemoveFromGroup();
|
bot->RemoveFromGroup();
|
||||||
// save=true so quest status / progress pushed this session persists
|
// save=false matches the long-standing pre-corruption behaviour. The
|
||||||
// across logout. `false` here skipped SaveToDB entirely — a recently
|
// earlier `true` here (to persist bot quests) ran the FULL SaveToDB on
|
||||||
// pushed quest (and its progression) was lost unless a 15-min
|
// a headless bot sharing the owner's account and corrupted player data
|
||||||
// autosave happened to fire first, which broke quest chains: bots
|
// on logout/server-reset — the bot save's per-account state leaked into
|
||||||
// couldn't complete the quest the player finished, so the follow-up
|
// the owner's / other characters' records. Bots get their quest state
|
||||||
// quest couldn't be pushed.
|
// persisted via the module's own explicit save path instead, NOT the
|
||||||
sess->LogoutPlayer(true);
|
// core's account-scoped LogoutPlayer save.
|
||||||
|
sess->LogoutPlayer(false);
|
||||||
}
|
}
|
||||||
// else: login in flight — removing from sessions_ is enough to abort tracking
|
// else: login in flight — removing from sessions_ is enough to abort tracking
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user