aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp594
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp4
2 files changed, 293 insertions, 305 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 984c1899564..9d924230a76 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12745,200 +12745,199 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
propagateSpeedChange();
WorldPacket data;
- uint64 guid = GetGUID();
- uint8* bytes = (uint8*)&guid;
+ ObjectGuid guid = GetGUID();
if (!forced)
{
switch (mtype)
{
case MOVE_WALK:
data.Initialize(SMSG_SPLINE_MOVE_SET_WALK_SPEED, 8+4+2+4+4+4+4+4+4+4);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[4]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[4]);
data.FlushBits();
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[3]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[3]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[9]);
- data.WriteByteSeq(bytes[5]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[5]);
break;
case MOVE_RUN:
data.Initialize(SMSG_SPLINE_MOVE_SET_RUN_SPEED, 1 + 8 + 4);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[2]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[2]);
data.FlushBits();
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[4]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[4]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[1]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[1]);
break;
case MOVE_RUN_BACK:
data.Initialize(SMSG_SPLINE_MOVE_SET_RUN_BACK_SPEED, 1 + 8 + 4);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[4]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[4]);
data.FlushBits();
- data.WriteByteSeq(bytes[1]);
+ data.WriteByteSeq(guid[1]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[7]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[7]);
break;
case MOVE_SWIM:
data.Initialize(SMSG_SPLINE_MOVE_SET_SWIM_SPEED, 1 + 8 + 4);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[1]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[1]);
data.FlushBits();
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[4]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[4]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[3]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[3]);
break;
case MOVE_SWIM_BACK:
data.Initialize(SMSG_SPLINE_MOVE_SET_SWIM_BACK_SPEED, 1 + 8 + 4);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[2]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[2]);
data.FlushBits();
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[6]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[6]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[2]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[2]);
break;
case MOVE_TURN_RATE:
data.Initialize(SMSG_SPLINE_MOVE_SET_TURN_RATE, 1 + 8 + 4);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[0]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[0]);
data.FlushBits();
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[0]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[0]);
break;
case MOVE_FLIGHT:
data.Initialize(SMSG_SPLINE_MOVE_SET_FLIGHT_SPEED, 1 + 8 + 4);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[2]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[2]);
data.FlushBits();
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[6]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[6]);
data << float(GetSpeed(mtype));
break;
case MOVE_FLIGHT_BACK:
data.Initialize(SMSG_SPLINE_MOVE_SET_FLIGHT_BACK_SPEED, 1 + 8 + 4);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[7]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[7]);
data.FlushBits();
- data.WriteByteSeq(bytes[5]);
+ data.WriteByteSeq(guid[5]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[4]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[4]);
break;
case MOVE_PITCH_RATE:
data.Initialize(SMSG_SPLINE_MOVE_SET_PITCH_RATE, 1 + 8 + 4);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[2]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[2]);
data.FlushBits();
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[2]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[2]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[4]);
+ data.WriteByteSeq(guid[4]);
break;
default:
sLog->outError(LOG_FILTER_UNITS, "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
@@ -12964,203 +12963,192 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
{
case MOVE_WALK:
data.Initialize(SMSG_MOVE_SET_WALK_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[3]);
-
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[1]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[7]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[5]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[5]);
+ data.WriteByteSeq(guid[2]);
data << uint32(0);
- data.WriteByteSeq(bytes[0]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[3]);
break;
case MOVE_RUN:
data.Initialize(SMSG_MOVE_SET_RUN_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[4]);
-
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[4]);
-
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[4]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[4]);
data << uint32(0);
data << float(GetSpeed(mtype));
-
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[2]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[2]);
break;
case MOVE_RUN_BACK:
data.Initialize(SMSG_MOVE_SET_RUN_BACK_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[7]);
-
- data.WriteByteSeq(bytes[5]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[7]);
+ data.WriteByteSeq(guid[5]);
data << uint32(0);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[6]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[6]);
break;
case MOVE_SWIM:
data.Initialize(SMSG_MOVE_SET_SWIM_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[6]);
-
- data.WriteByteSeq(bytes[0]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[6]);
+ data.WriteByteSeq(guid[0]);
data << uint32(0);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[2]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[2]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[4]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[4]);
break;
case MOVE_SWIM_BACK:
data.Initialize(SMSG_MOVE_SET_SWIM_BACK_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[7]);
-
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[7]);
data << uint32(0);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[1]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[1]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[7]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[2]);
break;
case MOVE_TURN_RATE:
data.Initialize(SMSG_MOVE_SET_TURN_RATE, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[3]);
-
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[2]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[3]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[2]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[0]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[0]);
data << uint32(0);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[4]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[4]);
break;
case MOVE_FLIGHT:
data.Initialize(SMSG_MOVE_SET_FLIGHT_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[5]);
-
- data.WriteByteSeq(bytes[3]);
- data << uint32(0);
- data.WriteByteSeq(bytes[6]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[4]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[5]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[0]);
- data.WriteByteSeq(bytes[5]);
- data.WriteByteSeq(bytes[7]);
+ data << uint32(0);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[4]);
break;
case MOVE_FLIGHT_BACK:
data.Initialize(SMSG_MOVE_SET_FLIGHT_BACK_SPEED, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[4]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[7]);
-
- data.WriteByteSeq(bytes[0]);
- data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[7]);
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[4]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[5]);
+ data.WriteByteSeq(guid[3]);
data << uint32(0);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[5]);
+ data.WriteByteSeq(guid[6]);
+ data << float(GetSpeed(mtype));
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[0]);
+ data.WriteByteSeq(guid[5]);
+ data.WriteByteSeq(guid[7]);
break;
case MOVE_PITCH_RATE:
data.Initialize(SMSG_MOVE_SET_PITCH_RATE, 1 + 8 + 4 + 4);
- data.WriteBit(bytes[1]);
- data.WriteBit(bytes[2]);
- data.WriteBit(bytes[6]);
- data.WriteBit(bytes[7]);
- data.WriteBit(bytes[0]);
- data.WriteBit(bytes[3]);
- data.WriteBit(bytes[5]);
- data.WriteBit(bytes[4]);
-
+ data.WriteBit(guid[1]);
+ data.WriteBit(guid[2]);
+ data.WriteBit(guid[6]);
+ data.WriteBit(guid[7]);
+ data.WriteBit(guid[0]);
+ data.WriteBit(guid[3]);
+ data.WriteBit(guid[5]);
+ data.WriteBit(guid[4]);
data << float(GetSpeed(mtype));
- data.WriteByteSeq(bytes[6]);
- data.WriteByteSeq(bytes[4]);
- data.WriteByteSeq(bytes[0]);
+ data.WriteByteSeq(guid[6]);
+ data.WriteByteSeq(guid[4]);
+ data.WriteByteSeq(guid[0]);
data << uint32(0);
- data.WriteByteSeq(bytes[1]);
- data.WriteByteSeq(bytes[2]);
- data.WriteByteSeq(bytes[7]);
- data.WriteByteSeq(bytes[3]);
- data.WriteByteSeq(bytes[5]);
+ data.WriteByteSeq(guid[1]);
+ data.WriteByteSeq(guid[2]);
+ data.WriteByteSeq(guid[7]);
+ data.WriteByteSeq(guid[3]);
+ data.WriteByteSeq(guid[5]);
break;
default:
sLog->outError(LOG_FILTER_UNITS, "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 160e1f520bb..a9a45a21e9d 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -985,7 +985,7 @@ void InitOpcodes()
//DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_COLLISION_HEIGHT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_COMPOUND_STATE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
- //DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_FLIGHT_BACK_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
+ DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_FLIGHT_BACK_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_FLIGHT_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_HOVER, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_PITCH_RATE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
@@ -994,7 +994,7 @@ void InitOpcodes()
DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_SWIM_BACK_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_SWIM_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_TURN_RATE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
- //DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_WALK_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
+ DEFINE_OPCODE_HANDLER(SMSG_MOVE_SET_WALK_SPEED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_UNROOT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
DEFINE_OPCODE_HANDLER(SMSG_MOVE_UNSET_CAN_FLY, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );