feat(Core/PacketIO): restrict CMSG_EMOTE/CMSG_STANDSTATECHANGE to only allow emotes/stand states that client can send by itself (#2412)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Viste
2019-11-15 12:28:54 +03:00
committed by Kargatum
parent ab637800e7
commit 7a1ac8245b
2 changed files with 16 additions and 4 deletions

View File

@@ -642,6 +642,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->OnPlayerEmote(GetPlayer(), emote);
GetPlayer()->HandleEmoteCommand(emote);
}