Core/PacketIO: Updated player move speed change packet structures

This commit is contained in:
Shauren committed 2012-08-11 20:15:02 +02:00
1 parent 98909c049b
commit 7c728f7b39
2 files changed
+293 -305

No files matched your search

+291 -303
View File
@@ -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);