aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-06-26 21:27:10 +0200
committerMachiavelli <machiavelli.trinity@gmail.com>2011-06-26 21:27:10 +0200
commitad81d4132c7df0741c6396697cfb32e0f1c3706c (patch)
tree661fe19d546964bb1296831c13c34ebf0faf6096 /src
parent5c0c2ea8734fc8c2852aefafaf76aab1f15142b4 (diff)
Core/Packets: Remove MOVEMENTFLAG_ROOT flag from movementinfo that is sent from client to server. This flag is not valid in this case and is a packet spoofing attempt. When used in conjunction with any of the moving movement flags such as MOVEMENTFLAG_FORWARD this will freeze surrounding clients that receive the cheater's movementinfo.
Thanks to Dvlpr for help with research.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Server/WorldSession.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index d3c23c6e5c3..7a00d92a71c 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -754,6 +754,12 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
if (mi->HasMovementFlag(MOVEMENTFLAG_SPLINE_ELEVATION))
data >> mi->splineElevation;
+
+ // This must be a packet spoofing attempt. MOVEMENTFLAG_ROOT sent from the client is not valid,
+ // and when used in conjunction with any of the moving movement flags such as MOVEMENTFLAG_FORWARD
+ // it will freeze clients that receive this player's movement info.
+ if (mi->HasMovementFlag(MOVEMENTFLAG_ROOT))
+ mi->flags &= ~MOVEMENTFLAG_ROOT;
}
void WorldSession::WriteMovementInfo(WorldPacket *data, MovementInfo *mi)