Playerbot: save bots on logout so quests/progress persist
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.
This commit is contained in:
@@ -106,7 +106,13 @@ 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();
|
||||||
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
|
// else: login in flight — removing from sessions_ is enough to abort tracking
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user