mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
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:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user