Player/Emotes: Fix infinite dance and read map animation

Thx to @Kinzcool and @SeTM for the info
This closes #10067

(cherry picked from commit 57ceeae828)
This commit is contained in:
Dekadence
2014-09-06 03:20:39 +02:00
committed by Shauren
parent ae6b9bd8e8
commit 515294f0ac
2 changed files with 7 additions and 0 deletions

View File

@@ -649,6 +649,9 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData)
case EMOTE_STATE_KNEEL:
case EMOTE_ONESHOT_NONE:
break;
case EMOTE_STATE_DANCE:
GetPlayer()->SetEmoteState(emote);
break;
default:
// Only allow text-emotes for "dead" entities (feign death included)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))

View File

@@ -303,6 +303,10 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
if (!mover->movespline->Finalized())
return;
// stop some emotes at player move
if (plrMover && (plrMover->GetEmoteState() != 0))
plrMover->SetEmoteState(EMOTE_ONESHOT_NONE);
/* handle special cases */
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
{