Core/Movement: converted SMSG_MOVE_KNOCK_BACK to packet class
This commit is contained in:
1 parent
d4ef0b91b9
commit
fe4ff01e30
3 files changed
+61
-32
No files matched your search
@@ -95,3 +95,37 @@ WorldPacket const* WorldPackets::Movement::MoveSetCollisionHeight::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveKnockBack::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(MoverGUID[0]);
|
||||
_worldPacket.WriteBit(MoverGUID[3]);
|
||||
_worldPacket.WriteBit(MoverGUID[6]);
|
||||
_worldPacket.WriteBit(MoverGUID[7]);
|
||||
_worldPacket.WriteBit(MoverGUID[2]);
|
||||
_worldPacket.WriteBit(MoverGUID[5]);
|
||||
_worldPacket.WriteBit(MoverGUID[1]);
|
||||
_worldPacket.WriteBit(MoverGUID[4]);
|
||||
|
||||
_worldPacket.WriteByteSeq(MoverGUID[1]);
|
||||
|
||||
_worldPacket << float(Direction.Pos.GetPositionY());
|
||||
_worldPacket << int32(SequenceIndex);
|
||||
|
||||
_worldPacket.WriteByteSeq(MoverGUID[6]);
|
||||
_worldPacket.WriteByteSeq(MoverGUID[7]);
|
||||
|
||||
_worldPacket << float(Speeds.HorzSpeed);
|
||||
|
||||
_worldPacket.WriteByteSeq(MoverGUID[4]);
|
||||
_worldPacket.WriteByteSeq(MoverGUID[5]);
|
||||
_worldPacket.WriteByteSeq(MoverGUID[3]);
|
||||
|
||||
_worldPacket << float(Speeds.VertSpeed);
|
||||
_worldPacket << float(Direction.Pos.GetPositionX());
|
||||
|
||||
_worldPacket.WriteByteSeq(MoverGUID[2]);
|
||||
_worldPacket.WriteByteSeq(MoverGUID[0]);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -88,6 +88,25 @@ namespace WorldPackets
|
||||
float Height = 1.0f;
|
||||
UpdateCollisionHeightReason Reason = UPDATE_COLLISION_HEIGHT_MOUNT;
|
||||
};
|
||||
|
||||
struct MoveKnockBackSpeeds
|
||||
{
|
||||
float HorzSpeed = 0.0f;
|
||||
float VertSpeed = 0.0f;
|
||||
};
|
||||
|
||||
class MoveKnockBack final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveKnockBack() : ServerPacket(SMSG_MOVE_KNOCK_BACK, 1 + 8 + 4 + 4 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid MoverGUID;
|
||||
TaggedPosition<Position::XY> Direction;
|
||||
MoveKnockBackSpeeds Speeds;
|
||||
uint32 SequenceIndex = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user