mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55: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:
@@ -549,13 +549,20 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
// too many spam in log at lags/debug stop
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_STANDSTATECHANGE");
|
||||
#endif
|
||||
uint32 animstate;
|
||||
recv_data >> animstate;
|
||||
|
||||
switch (animstate)
|
||||
{
|
||||
case UNIT_STAND_STATE_STAND:
|
||||
case UNIT_STAND_STATE_SIT:
|
||||
case UNIT_STAND_STATE_SLEEP:
|
||||
case UNIT_STAND_STATE_KNEEL:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
_player->SetStandState(animstate);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user