aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-07-15 00:45:06 +0200
committerShauren <shauren.trinity@gmail.com>2012-07-15 00:45:06 +0200
commit52f7ca8693523fde1e0082a2b0180d9b83f94505 (patch)
tree1a461803d4b2e1ece9e84ae05f295b54a2e19722 /src
parent973d6d4aea9d131b5f2f6391aa86f4e86c5a976d (diff)
Core/PacketIO: Updated and enabled SMSG_PLAYER_MOVE
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Handlers/MovementHandler.cpp6
-rw-r--r--src/server/game/Movement/MovementStructures.h145
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp2
3 files changed, 81 insertions, 72 deletions
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index df28e01d5c7..b719afb736f 100755
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -776,7 +776,7 @@ void WorldSession::ReadMovementInfo(WorldPacket& data, MovementInfo* mi)
if (hasFallDirection)
data >> mi->j_xyspeed;
break;
- case MSESplineElev:
+ case MSESplineElevation:
if (hasSplineElevation)
data >> mi->splineElevation;
break;
@@ -898,6 +898,8 @@ void WorldSession::WriteMovementInfo(WorldPacket &data, MovementInfo* mi)
for(uint32 i = 0; i < MSE_COUNT; ++i)
{
MovementStatusElements element = sequence[i];
+ if (element == MSEEnd)
+ break;
if (element >= MSEHasGuidByte0 && element <= MSEHasGuidByte7)
{
@@ -1049,7 +1051,7 @@ void WorldSession::WriteMovementInfo(WorldPacket &data, MovementInfo* mi)
if (hasFallDirection)
data << mi->j_xyspeed;
break;
- case MSESplineElev:
+ case MSESplineElevation:
if (hasSplineElevation)
data << mi->splineElevation;
break;
diff --git a/src/server/game/Movement/MovementStructures.h b/src/server/game/Movement/MovementStructures.h
index 87439bbedbc..d87878ad26c 100644
--- a/src/server/game/Movement/MovementStructures.h
+++ b/src/server/game/Movement/MovementStructures.h
@@ -87,7 +87,7 @@ enum MovementStatusElements
MSEFallCosAngle,
MSEFallSinAngle,
MSEFallHorizontalSpeed,
- MSESplineElev,
+ MSESplineElevation,
// Special
MSEZeroBit, // writes bit value 1 or skips read bit
@@ -96,70 +96,77 @@ enum MovementStatusElements
MSE_COUNT
};
-//4.2.2
-MovementStatusElements PlayerMoveSequence[] = {
+//4.3.4
+MovementStatusElements PlayerMoveSequence[] =
+{
+ MSEHasFallData,
+ MSEHasGuidByte3,
+ MSEHasGuidByte6,
+ MSEHasMovementFlags2,
+ MSEHasSpline,
+ MSEHasTimestamp,
+ MSEHasGuidByte0,
+ MSEHasGuidByte1,
+ MSEMovementFlags2,
+ MSEHasGuidByte7,
+ MSEHasMovementFlags,
+ MSEHasOrientation,
+ MSEHasGuidByte2,
MSEHasSplineElev,
- MSEHasTransportData,
+ MSEZeroBit,
+ MSEHasGuidByte4,
+ MSEHasFallDirection,
MSEHasGuidByte5,
- MSEHasTransportGuidByte2,
- MSEHasTransportGuidByte4,
- MSEHasTransportGuidByte1,
+ MSEHasTransportData,
+ MSEMovementFlags,
MSEHasTransportGuidByte3,
- MSEHasTransportGuidByte0,
- MSEHasTransportTime2,
- MSEHasTransportGuidByte7,
MSEHasTransportTime3,
MSEHasTransportGuidByte6,
+ MSEHasTransportGuidByte1,
+ MSEHasTransportGuidByte7,
+ MSEHasTransportGuidByte0,
+ MSEHasTransportGuidByte4,
+ MSEHasTransportTime2,
MSEHasTransportGuidByte5,
- MSEHasGuidByte7,
- MSEHasGuidByte3,
- MSEHasGuidByte1,
- MSEHasGuidByte4,
- MSEHasGuidByte0,
- MSEMovementFlags,
+ MSEHasTransportGuidByte2,
MSEHasPitch,
- MSEHasGuidByte2,
- MSEMovementFlags2,
- MSEHasGuidByte6,
- MSEHasFallData,
- MSEHasFallDirection,
- MSEHasSpline,
- MSEGuidByte4,
- MSEGuidByte0,
- MSEOrientation,
- MSEGuidByte6,
+ MSEGuidByte5,
+ MSEFallHorizontalSpeed,
+ MSEFallCosAngle,
+ MSEFallSinAngle,
+ MSEFallVerticalSpeed,
+ MSEFallTime,
+ MSESplineElevation,
MSEGuidByte7,
- MSESplineElev,
- MSETransportGuidByte4,
- MSETransportGuidByte2,
- MSETransportOrientation,
- MSETransportTime,
+ MSEPositionY,
+ MSEGuidByte3,
+ MSETransportTime3,
+ MSETransportGuidByte6,
MSETransportSeat,
- MSETransportGuidByte3,
+ MSETransportGuidByte5,
MSETransportPositionX,
- MSETransportPositionY,
- MSETransportPositionZ,
MSETransportGuidByte1,
+ MSETransportOrientation,
+ MSETransportGuidByte2,
MSETransportTime2,
- MSETransportTime3,
- MSETransportGuidByte5,
MSETransportGuidByte0,
- MSETransportGuidByte6,
+ MSETransportPositionZ,
MSETransportGuidByte7,
- MSEGuidByte2,
- MSETimestamp,
- MSEGuidByte1,
- MSEPitch,
+ MSETransportGuidByte4,
+ MSETransportGuidByte3,
+ MSETransportPositionY,
+ MSETransportTime,
+ MSEGuidByte4,
MSEPositionX,
- MSEPositionY,
+ MSEGuidByte6,
MSEPositionZ,
- MSEGuidByte5,
- MSEGuidByte3,
- MSEFallHorizontalSpeed,
- MSEFallCosAngle,
- MSEFallSinAngle,
- MSEFallVerticalSpeed,
- MSEFallTime,
+ MSETimestamp,
+ MSEGuidByte2,
+ MSEPitch,
+ MSEGuidByte0,
+ MSEOrientation,
+ MSEGuidByte1,
+ MSEEnd,
};
//4.2.2
@@ -224,7 +231,7 @@ MovementStatusElements MovementFallLandSequence[] = {
MSETransportGuidByte1,
MSETransportGuidByte0,
MSETransportGuidByte4,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte1,
};
@@ -263,7 +270,7 @@ MovementStatusElements MovementHeartBeatSequence[] = {
MSEOrientation,
MSEGuidByte7,
MSEGuidByte5,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte1,
MSEGuidByte6,
MSEGuidByte4,
@@ -327,7 +334,7 @@ MovementStatusElements MovementJumpSequence[] = {
MSEPositionX,
MSEPositionY,
MSEPositionZ,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte0,
MSEGuidByte5,
MSEGuidByte3,
@@ -395,7 +402,7 @@ MovementStatusElements MovementSetFacingSequence[] = {
MSEPositionZ,
MSEGuidByte7,
MSEGuidByte5,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte4,
MSEGuidByte1,
MSEGuidByte2,
@@ -461,7 +468,7 @@ MovementStatusElements MovementSetPitchSequence[] = {
MSEOrientation,
MSEGuidByte1,
MSEGuidByte4,
- MSESplineElev,
+ MSESplineElevation,
MSETransportSeat,
MSETransportOrientation,
MSETransportPositionX,
@@ -528,7 +535,7 @@ MovementStatusElements MovementStartBackwardSequence[] = {
MSEGuidByte3,
MSEGuidByte0,
MSEGuidByte1,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte4,
MSEPitch,
MSEGuidByte7,
@@ -624,7 +631,7 @@ MovementStatusElements MovementStartForwardSequence[] =
MSETransportGuidByte0,
MSETransportSeat,
MSETransportTime2,
- MSESplineElev,
+ MSESplineElevation,
MSEPitch,
MSEOrientation,
MSETimestamp,
@@ -666,7 +673,7 @@ MovementStatusElements MovementStartStrafeLeftSequence[] = {
MSEOrientation,
MSETimestamp,
MSEPitch,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte7,
MSEGuidByte5,
MSEFallTime,
@@ -734,7 +741,7 @@ MovementStatusElements MovementStartStrafeRightSequence[] = {
MSEGuidByte4,
MSEGuidByte1,
MSEGuidByte2,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte0,
MSEPitch,
MSEGuidByte6,
@@ -820,7 +827,7 @@ MovementStatusElements MovementStartTurnLeftSequence[] = {
MSEGuidByte6,
MSEGuidByte5,
MSEGuidByte3,
- MSESplineElev,
+ MSESplineElevation,
MSEFallTime,
MSEFallVerticalSpeed,
MSEFallHorizontalSpeed,
@@ -892,7 +899,7 @@ MovementStatusElements MovementStartTurnRightSequence[] = {
MSEGuidByte3,
MSEGuidByte1,
MSEGuidByte0,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte5,
};
@@ -957,7 +964,7 @@ MovementStatusElements MovementStopSequence[] = {
MSETransportGuidByte4,
MSEGuidByte1,
MSEGuidByte0,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte6,
MSEGuidByte4,
};
@@ -1008,7 +1015,7 @@ MovementStatusElements MovementStopStrafeSequence[] = {
MSEFallSinAngle,
MSEGuidByte3,
MSEPitch,
- MSESplineElev,
+ MSESplineElevation,
MSETransportSeat,
MSETransportOrientation,
MSETransportPositionX,
@@ -1073,7 +1080,7 @@ MovementStatusElements MovementStopTurnSequence[] = {
MSEFallHorizontalSpeed,
MSEFallCosAngle,
MSEFallSinAngle,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte0,
MSEGuidByte2,
MSETransportSeat,
@@ -1136,7 +1143,7 @@ MovementStatusElements MovementStartAscendSequence[] = {
MSEPitch,
MSEGuidByte0,
MSEGuidByte5,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte1,
MSETransportSeat,
MSETransportOrientation,
@@ -1193,7 +1200,7 @@ MovementStatusElements MovementStartDescendSequence[] = {
MSEPositionY,
MSEPositionZ,
MSEOrientation,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte7,
MSEGuidByte4,
MSEGuidByte2,
@@ -1260,7 +1267,7 @@ MovementStatusElements MovementStartSwimSequence[] = {
MSEOrientation,
MSETimestamp,
MSEPitch,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte2,
MSEGuidByte0,
MSEGuidByte5,
@@ -1354,7 +1361,7 @@ MovementStatusElements MovementStopAscendSequence[] = {
MSEGuidByte5,
MSEGuidByte4,
MSEGuidByte3,
- MSESplineElev,
+ MSESplineElevation,
MSEGuidByte6,
};
@@ -1362,8 +1369,8 @@ MovementStatusElements* GetMovementStatusElementsSequence(Opcodes opcode)
{
switch (opcode)
{
- //case SMSG_PLAYER_MOVE:
- // return PlayerMoveSequence;
+ case SMSG_PLAYER_MOVE:
+ return PlayerMoveSequence;
//case MSG_MOVE_FALL_LAND:
// return MovementFallLandSequence;
//case MSG_MOVE_HEARTBEAT:
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index bdf8a23412d..3919b1c6fd0 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -1172,7 +1172,7 @@ void InitOpcodes()
//DEFINE_OPCODE_HANDLER(SMSG_PLAYED_TIME, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_PLAYERBINDERROR, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_PLAYERBOUND, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
- //DEFINE_OPCODE_HANDLER(SMSG_PLAYER_MOVE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
+ DEFINE_OPCODE_HANDLER(SMSG_PLAYER_MOVE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_PLAYER_SKINNED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_PLAYER_VEHICLE_DATA, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_PLAY_DANCE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );