Skip to content

Commit

Permalink
[11559] Not command character to sitdown at logout request when unexp…
Browse files Browse the repository at this point in the history
…ected.

This fix swiming/form flight cases animation in logout request.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
Den authored and VladimirMangos committed May 29, 2011
1 parent 13c9f4e commit 08a7d0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/game/MiscHandler.cpp
Expand Up @@ -292,7 +292,9 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
// 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);
float height = GetPlayer()->GetTerrain()->GetHeight(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY(), GetPlayer()->GetPositionZ());
if ((GetPlayer()->GetPositionZ() < height + 0.1f) && !(GetPlayer()->IsInWater()))
GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);

WorldPacket data( SMSG_FORCE_MOVE_ROOT, (8+4) ); // guess size
data << GetPlayer()->GetPackGUID();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11558"
#define REVISION_NR "11559"
#endif // __REVISION_NR_H__

0 comments on commit 08a7d0a

Please sign in to comment.