mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: fire PLAYER_LOGOUT event when logout begins
Fire PLAYER_LOGOUT from SMSG_LOGOUT_RESPONSE when the server confirms logout. Addons use this to save state and perform cleanup before the player leaves the world.
This commit is contained in:
parent
1fd220de29
commit
1f6865afce
1 changed files with 1 additions and 0 deletions
|
|
@ -24645,6 +24645,7 @@ void GameHandler::handleLogoutResponse(network::Packet& packet) {
|
||||||
logoutCountdown_ = 20.0f;
|
logoutCountdown_ = 20.0f;
|
||||||
}
|
}
|
||||||
LOG_INFO("Logout response: success, instant=", (int)data.instant);
|
LOG_INFO("Logout response: success, instant=", (int)data.instant);
|
||||||
|
if (addonEventCallback_) addonEventCallback_("PLAYER_LOGOUT", {});
|
||||||
} else {
|
} else {
|
||||||
// Failure
|
// Failure
|
||||||
addSystemChatMessage("Cannot logout right now.");
|
addSystemChatMessage("Cannot logout right now.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue