mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Restrict CMSG_STANDSTATECHANGE to only allow the same stand states that client can send by itself
This commit is contained in:
@@ -496,10 +496,20 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::HandleStandStateChangeOpcode(WorldPacket& recvData)
|
||||
{
|
||||
// TC_LOG_DEBUG("network", "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop
|
||||
uint32 animstate;
|
||||
recvData >> 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