fix(Core/Misc): Consider /dance as an emote state. (#14275)

This commit is contained in:
UltraNix
2022-12-22 07:38:09 +01:00
committed by GitHub
parent 20c9e80d4a
commit 962cefdcd8
3 changed files with 15 additions and 0 deletions

View File

@@ -370,6 +370,15 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
movementInfo.guid = guid;
ReadMovementInfo(recvData, &movementInfo);
// Stop emote on move
if (Player* plrMover = mover->ToPlayer())
{
if (plrMover->GetUInt32Value(UNIT_NPC_EMOTESTATE) != EMOTE_ONESHOT_NONE)
{
plrMover->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
}
}
if (!movementInfo.pos.IsPositionValid())
{
if (plrMover)