refactor(Core/Packet): Character packets (#9546)

* Character

* Update CharacterHandler.cpp
This commit is contained in:
IntelligentQuantum
2022-01-06 15:25:00 +03:30
committed by GitHub
parent 43ea4aa2df
commit 93322bcb4d
8 changed files with 228 additions and 51 deletions

View File

@@ -22,6 +22,7 @@
#include "WorldSession.h"
#include "AccountMgr.h"
#include "BattlegroundMgr.h"
#include "CharacterPackets.h"
#include "Common.h"
#include "DatabaseEnv.h"
#include "Group.h"
@@ -687,8 +688,7 @@ void WorldSession::LogoutPlayer(bool save)
//! Send the 'logout complete' packet to the client
//! Client will respond by sending 3x CMSG_CANCEL_TRADE, which we currently dont handle
WorldPacket data(SMSG_LOGOUT_COMPLETE, 0);
SendPacket(&data);
SendPacket(WorldPackets::Character::LogoutComplete().Write());
LOG_DEBUG("network", "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
//! Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
@@ -699,7 +699,7 @@ void WorldSession::LogoutPlayer(bool save)
m_playerLogout = false;
m_playerSave = false;
LogoutRequest(0);
SetLogoutStartTime(0);
}
/// Kick a player out of the World