hondacrx
2023-05-19 16:23:44 -04:00
parent 24b0836710
commit dfceb4c044
40 changed files with 1910 additions and 1549 deletions
@@ -83,8 +83,7 @@ namespace Game.Networking.Packets
data.ReadPackedGuid();
}
// ResetBitReader
bool hasStandingOnGameObjectGUID = data.HasBit();
bool hasTransport = data.HasBit();
bool hasFall = data.HasBit();
bool hasSpline = data.HasBit(); // todo 6.x read this infos
@@ -97,6 +96,9 @@ namespace Game.Networking.Packets
if (hasTransport)
ReadTransportInfo(data, ref movementInfo.transport);
if (hasStandingOnGameObjectGUID)
movementInfo.standingOnGameObjectGUID = data.ReadPackedGuid();
if (hasInertia)
{
MovementInfo.Inertia inertia = new();
@@ -143,6 +145,7 @@ namespace Game.Networking.Packets
bool hasSpline = false; // todo 6.x send this infos
bool hasInertia = movementInfo.inertia.HasValue;
bool hasAdvFlying = movementInfo.advFlying.HasValue;
bool hasStandingOnGameObjectGUID = movementInfo.standingOnGameObjectGUID.HasValue;
data.WritePackedGuid(movementInfo.Guid);
data.WriteUInt32((uint)movementInfo.GetMovementFlags());
@@ -167,6 +170,7 @@ namespace Game.Networking.Packets
_worldPacket << ObjectGuid;
}*/
data.WriteBit(hasStandingOnGameObjectGUID);
data.WriteBit(hasTransportData);
data.WriteBit(hasFallData);
data.WriteBit(hasSpline);
@@ -179,6 +183,9 @@ namespace Game.Networking.Packets
if (hasTransportData)
WriteTransportInfo(data, movementInfo.transport);
if (hasStandingOnGameObjectGUID)
data.WritePackedGuid(movementInfo.standingOnGameObjectGUID.Value);
if (hasInertia)
{
data.WriteInt32(movementInfo.inertia.Value.id);