Skip to content

Commit 515294f

Browse files
DekadenceeShauren
authored andcommitted
Player/Emotes: Fix infinite dance and read map animation
Thx to @Kinzcool and @SeTM for the info This closes #10067 (cherry picked from commit 57ceeae)
1 parent ae6b9bd commit 515294f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/server/game/Handlers/ChatHandler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,9 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData)
649649
case EMOTE_STATE_KNEEL:
650650
case EMOTE_ONESHOT_NONE:
651651
break;
652+
case EMOTE_STATE_DANCE:
653+
GetPlayer()->SetEmoteState(emote);
654+
break;
652655
default:
653656
// Only allow text-emotes for "dead" entities (feign death included)
654657
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))

src/server/game/Handlers/MovementHandler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
303303
if (!mover->movespline->Finalized())
304304
return;
305305

306+
// stop some emotes at player move
307+
if (plrMover && (plrMover->GetEmoteState() != 0))
308+
plrMover->SetEmoteState(EMOTE_ONESHOT_NONE);
309+
306310
/* handle special cases */
307311
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
308312
{

0 commit comments

Comments
 (0)