Merge pull request #13051 from Dekadencee/FixEmotes

Player/Emotes: Fix infinite dance and read map animation
This commit is contained in:
Duarte Duarte
2014-09-08 15:04:24 +01:00
2 changed files with 8 additions and 0 deletions

View File

@@ -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))

View File

@@ -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)
{