Core/PacketIO: Restrict CMSG_EMOTE to only allow emotes that are hardcoded in client

This commit is contained in:
Shauren
2019-11-05 16:04:52 +01:00
committed by Ovahlord
parent cca7e81895
commit ff018e4d75

View File

@@ -710,6 +710,11 @@ void WorldSession::HandleEmoteOpcode(WorldPacket& recvData)
uint32 emote;
recvData >> emote;
// restrict to the only emotes hardcoded in client
if (emote != EMOTE_ONESHOT_NONE && emote != EMOTE_ONESHOT_WAVE)
return;
sScriptMgr->OnPlayerClearEmote(GetPlayer());
if (_player->GetUInt32Value(UNIT_NPC_EMOTESTATE))