mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user