mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -481,6 +481,10 @@ void WorldSession::HandlePlayerLogoutOpcode(WorldPackets::Character::PlayerLogou
|
||||
|
||||
void WorldSession::HandleLogoutCancelOpcode(WorldPackets::Character::LogoutCancel& /*logoutCancel*/)
|
||||
{
|
||||
// Player have already logged out serverside, too late to cancel
|
||||
if (!GetPlayer())
|
||||
return;
|
||||
|
||||
SetLogoutStartTime(0);
|
||||
|
||||
SendPacket(WorldPackets::Character::LogoutCancelAck().Write());
|
||||
|
||||
@@ -527,7 +527,7 @@ void WorldSession::HandleBeginTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
|
||||
void WorldSession::SendCancelTrade()
|
||||
{
|
||||
if (PlayerLogout())
|
||||
if (PlayerRecentlyLoggedOut() || PlayerLogout())
|
||||
return;
|
||||
|
||||
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
|
||||
@@ -535,7 +535,9 @@ void WorldSession::SendCancelTrade()
|
||||
|
||||
void WorldSession::HandleCancelTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
_player->TradeCancel(true);
|
||||
// sended also after LOGOUT COMPLETE
|
||||
if (_player) // needed because STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT
|
||||
_player->TradeCancel(true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
|
||||
|
||||
Reference in New Issue
Block a user