mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Merge pull request #13051 from Dekadencee/FixEmotes
Player/Emotes: Fix infinite dance and read map animation
This commit is contained in:
@@ -746,6 +746,10 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData)
|
||||
case EMOTE_STATE_KNEEL:
|
||||
case EMOTE_ONESHOT_NONE:
|
||||
break;
|
||||
case EMOTE_STATE_DANCE:
|
||||
case EMOTE_STATE_READ:
|
||||
GetPlayer()->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote_anim);
|
||||
break;
|
||||
default:
|
||||
// Only allow text-emotes for "dead" entities (feign death included)
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
|
||||
@@ -297,6 +297,10 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
// stop some emotes at player move
|
||||
if (plrMover && (plrMover->GetUInt32Value(UNIT_NPC_EMOTESTATE) != 0))
|
||||
plrMover->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
|
||||
/* handle special cases */
|
||||
if (movementInfo.transport.guid)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user