mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Misc: Fix current player state when logging out
Sit should only be apply'd when player is standing. For example when sitting on a chair when logging out, player should stay on the chair until fully logged out and not sit on the floor.
This commit is contained in:
@@ -414,7 +414,8 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/)
|
||||
// not set flags if player can't free move to prevent lost state at logout cancel
|
||||
if (GetPlayer()->CanFreeMove())
|
||||
{
|
||||
GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);
|
||||
if (GetPlayer()->getStandState() == UNIT_STAND_STATE_STAND)
|
||||
GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);
|
||||
|
||||
WorldPacket data(SMSG_FORCE_MOVE_ROOT, (8+4)); // guess size
|
||||
data << GetPlayer()->GetPackGUID();
|
||||
|
||||
Reference in New Issue
Block a user