本文整理汇总了C#中WowPacketParser.Misc.Vector4类的典型用法代码示例。如果您正苦于以下问题:C# Vector4类的具体用法?C# Vector4怎么用?C# Vector4使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Vector4类属于WowPacketParser.Misc命名空间,在下文中一共展示了Vector4类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestToString
public void TestToString()
{
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
var quat = new Vector4(1.1f, 2.0f, 0f, 4.0f);
Assert.AreEqual("X: 1.1 Y: 2 Z: 0 O: 4", quat.ToString());
}
示例2: TestGetHashCode
public void TestGetHashCode()
{
var vect1 = new Vector4(1.1f, 2.0f, 0f, 4.0f);
var vect15 = new Vector4(1.1f, 2.0f, 0f, 4.0f);
var vect2 = new Vector4(1.1f, 2.0f, 0.0001f, 4.0f);
Assert.AreEqual(vect1.GetHashCode(), vect15.GetHashCode());
Assert.AreNotEqual(vect1.GetHashCode(), vect2.GetHashCode());
}
示例3: TestConstructor
public void TestConstructor()
{
var vect = new Vector4(1.0f, 2.0f, 3.0f, 4.0f);
Assert.IsNotNull(vect);
Assert.AreEqual(1.0f, vect.X);
Assert.AreEqual(2.0f, vect.Y);
Assert.AreEqual(3.0f, vect.Z);
Assert.AreEqual(4.0f, vect.O);
}
示例4: TestEquals
public void TestEquals()
{
var vect1 = new Vector4(1.1f, 2.0f, 0f, 4.0f);
var vect15 = new Vector4(1.1f, 2.0f, 0f, 4.0f);
var vect2 = new Vector4(1.1f, 2.0f, 3.0f, 4.0f);
Assert.IsTrue(vect1.Equals(vect15));
Assert.IsTrue(vect1.Equals(vect1));
Assert.IsFalse(vect1.Equals(vect2));
}
示例5: TestOperators
public void TestOperators()
{
var vect1 = new Vector4(1.1f, 2.0f, 0f, 4.0f);
var vect15 = new Vector4(1.1f, 2.0f, 0f, 4.0f);
var vect2 = new Vector4(1.1f, 2.0f, 3.0f, 4.0f);
Assert.IsTrue(vect1 == vect15);
#pragma warning disable 1718
Assert.IsTrue(vect1 == vect1);
#pragma warning restore 1718
Assert.IsFalse(vect1 == vect2);
}
示例6: HandleLoginVerifyWorld
public static void HandleLoginVerifyWorld(Packet packet)
{
var pos = new Vector4();
pos.Z = packet.ReadSingle();
packet.ReadInt32<MapId>("Map");
pos.Y = packet.ReadSingle();
pos.X = packet.ReadSingle();
pos.O = packet.ReadSingle();
packet.AddValue("Position", pos);
}
示例7: HandleLoginVerifyWorld
public static void HandleLoginVerifyWorld(Packet packet)
{
var pos = new Vector4();
pos.X = packet.ReadSingle();
pos.O = packet.ReadSingle();
pos.Y = packet.ReadSingle();
CoreParsers.MovementHandler.CurrentMapId = (uint)packet.ReadInt32<MapId>("Map");
pos.Z = packet.ReadSingle();
packet.AddValue("Position", pos);
packet.AddSniffData(StoreNameType.Map, (int)CoreParsers.MovementHandler.CurrentMapId, "NEW_WORLD");
}
示例8: ReadPlayerMovementInfo
public static void ReadPlayerMovementInfo(Packet packet, params MovementStatusElements[] movementStatusElements)
{
var guid = new byte[8];
var transportGUID = new byte[8];
var pos = new Vector4();
var transportPos = new Vector4();
bool hasMovementFlags = false;
bool hasMovementFlags2 = false;
bool hasTimestamp = false;
bool hasOrientation = false;
bool hasTransportData = false;
bool hasTransportTime2 = false;
bool hasTransportTime3 = false;
bool hasPitch = false;
bool hasFallData = false;
bool hasFallDirection = false;
bool hasSplineElevation = false;
bool hasUnkTime = false;
bool hasUnkBitA = false;
uint count = 0;
foreach (var movementInfo in movementStatusElements)
{
switch (movementInfo)
{
case MovementStatusElements.MSEHasGuidByte0:
guid[0] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte1:
guid[1] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte2:
guid[2] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte3:
guid[3] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte4:
guid[4] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte5:
guid[5] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte6:
guid[6] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasGuidByte7:
guid[7] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte0:
if (hasTransportData)
transportGUID[0] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte1:
if (hasTransportData)
transportGUID[1] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte2:
if (hasTransportData)
transportGUID[2] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte3:
if (hasTransportData)
transportGUID[3] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte4:
if (hasTransportData)
transportGUID[4] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte5:
if (hasTransportData)
transportGUID[5] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte6:
if (hasTransportData)
transportGUID[6] = packet.ReadBit();
break;
case MovementStatusElements.MSEHasTransportGuidByte7:
if (hasTransportData)
transportGUID[7] = packet.ReadBit();
break;
case MovementStatusElements.MSEGuidByte0:
packet.ReadXORByte(guid, 0);
break;
case MovementStatusElements.MSEGuidByte1:
packet.ReadXORByte(guid, 1);
break;
case MovementStatusElements.MSEGuidByte2:
packet.ReadXORByte(guid, 2);
break;
case MovementStatusElements.MSEGuidByte3:
packet.ReadXORByte(guid, 3);
break;
case MovementStatusElements.MSEGuidByte4:
packet.ReadXORByte(guid, 4);
break;
case MovementStatusElements.MSEGuidByte5:
//.........这里部分代码省略.........
示例9: HandleSubmitComplain
public static void HandleSubmitComplain(Packet packet)
{
var pos = new Vector4();
var guid = new byte[8];
guid[5] = packet.ReadBit();
guid[0] = packet.ReadBit();
guid[1] = packet.ReadBit();
var length = packet.ReadBits(12);
guid[3] = packet.ReadBit();
guid[2] = packet.ReadBit();
guid[4] = packet.ReadBit();
guid[7] = packet.ReadBit();
packet.ReadBits("Unk bits", 4); // ##
guid[6] = packet.ReadBit();
packet.ReadXORByte(guid, 3);
packet.ReadXORByte(guid, 5);
packet.ReadXORByte(guid, 1);
packet.ReadXORByte(guid, 2);
packet.ReadXORByte(guid, 6);
packet.ReadXORByte(guid, 0);
packet.ReadWoWString("Text", length);
packet.ReadXORByte(guid, 7);
packet.ReadXORByte(guid, 4);
pos.Y = packet.ReadSingle();
pos.Z = packet.ReadSingle();
pos.X = packet.ReadSingle();
packet.ReadInt32("Unk Int32 1"); // ##
pos.O = packet.ReadSingle();
packet.ReadBit("Unk bit"); // ##
var count = packet.ReadBits("Count", 22);
var strLength = new uint[count];
for (int i = 0; i < count; ++i)
strLength[i] = packet.ReadBits(13);
for (int i = 0; i < count; ++i)
{
packet.ReadTime("Time", i);
packet.ReadWoWString("Data", strLength[i], i);
}
packet.ReadInt32("Unk Int32 2"); // ##
packet.WriteGuid("Guid", guid);
packet.AddValue("Position", pos);
}
示例10: HandleMoveHeartbeat
public static void HandleMoveHeartbeat(Packet packet)
{
var guid = new byte[8];
var transportGuid = new byte[8];
var pos = new Vector4();
var hasTransportTime2 = false;
var hasTransportTime3 = false;
var hasFallDirection = false;
pos.X = packet.ReadSingle();
pos.Y = packet.ReadSingle();
pos.Z = packet.ReadSingle();
guid[2] = packet.ReadBit();
guid[6] = packet.ReadBit();
var hasPitch = !packet.ReadBit();
var hasFallData = packet.ReadBit();
var bits98 = (int)packet.ReadBits(22);
var bit95 = packet.ReadBit();
guid[1] = packet.ReadBit();
guid[3] = packet.ReadBit();
var hasTrans = packet.ReadBit();
guid[5] = packet.ReadBit();
guid[7] = packet.ReadBit();
guid[4] = packet.ReadBit();
var hasOrientation = !packet.ReadBit();
var bit94 = packet.ReadBit();
var bitA8 = !packet.ReadBit();
var hasTimestamp = !packet.ReadBit();
guid[0] = packet.ReadBit();
var bitAC = packet.ReadBit();
var hasMovementFlagExtra = !packet.ReadBit();
var bit90 = !packet.ReadBit();
var hasMovementFlag = !packet.ReadBit();
if (hasMovementFlagExtra)
packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13);
if (hasTrans)
{
transportGuid[3] = packet.ReadBit();
hasTransportTime3 = packet.ReadBit();
transportGuid[4] = packet.ReadBit();
transportGuid[6] = packet.ReadBit();
transportGuid[7] = packet.ReadBit();
transportGuid[0] = packet.ReadBit();
transportGuid[2] = packet.ReadBit();
hasTransportTime2 = packet.ReadBit();
transportGuid[1] = packet.ReadBit();
transportGuid[5] = packet.ReadBit();
}
if (hasFallData)
hasFallDirection = packet.ReadBit();
if (hasMovementFlag)
packet.ReadBitsE<MovementFlag>("Movement Flags", 30);
packet.ReadXORByte(guid, 3);
packet.ReadXORByte(guid, 5);
packet.ReadXORByte(guid, 4);
packet.ReadXORByte(guid, 6);
packet.ReadXORByte(guid, 1);
packet.ReadXORByte(guid, 2);
packet.ReadXORByte(guid, 7);
for (var i = 0; i < bits98; ++i)
packet.ReadInt32("IntED", i);
packet.ReadXORByte(guid, 0);
if (hasTrans)
{
var tpos = new Vector4();
tpos.Y = packet.ReadSingle();
tpos.X = packet.ReadSingle();
packet.ReadByte("Transport Seat");
packet.ReadXORByte(transportGuid, 7);
tpos.O = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 1);
packet.ReadXORByte(transportGuid, 0);
packet.ReadXORByte(transportGuid, 2);
if (hasTransportTime3)
packet.ReadUInt32("Transport Time 3");
packet.ReadXORByte(transportGuid, 3);
packet.ReadUInt32("Transport Time");
if (hasTransportTime2)
packet.ReadUInt32("Transport Time 2");
packet.ReadXORByte(transportGuid, 5);
tpos.Z = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 4);
packet.ReadXORByte(transportGuid, 6);
//.........这里部分代码省略.........
示例11: HandleMoveTeleport434
public static void HandleMoveTeleport434(Packet packet)
{
var guid = new byte[8];
var transGuid = new byte[8];
var pos = new Vector4();
guid[6] = packet.ReadBit();
guid[0] = packet.ReadBit();
guid[3] = packet.ReadBit();
guid[2] = packet.ReadBit();
var bit48 = packet.ReadBit();
if (bit48)
{
packet.ReadBit("Unk bit 50");
packet.ReadBit("Unk bit 51");
}
var onTransport = packet.ReadBit("On transport");
guid[1] = packet.ReadBit();
if (onTransport)
transGuid = packet.StartBitStream(1, 3, 2, 5, 0, 7, 6, 4);
guid[4] = packet.ReadBit();
guid[7] = packet.ReadBit();
guid[5] = packet.ReadBit();
if (onTransport)
{
packet.ParseBitStream(transGuid, 5, 6, 1, 7, 0, 2, 4, 3);
packet.WriteGuid("Transport Guid", transGuid);
}
packet.ReadUInt32("Time");
packet.ReadXORByte(guid, 1);
packet.ReadXORByte(guid, 2);
packet.ReadXORByte(guid, 3);
packet.ReadXORByte(guid, 5);
pos.X = packet.ReadSingle();
packet.ReadXORByte(guid, 4);
pos.O = packet.ReadSingle();
packet.ReadXORByte(guid, 7);
pos.Z = packet.ReadSingle();
if (bit48)
packet.ReadUInt32("Unk int");
packet.ReadXORByte(guid, 0);
packet.ReadXORByte(guid, 6);
pos.Y = packet.ReadSingle();
packet.AddValue("Destination", pos);
packet.WriteGuid("Guid", guid);
}
示例12: HandleMoveUpdateRunSpeed
public static void HandleMoveUpdateRunSpeed(Packet packet)
{
var guid = new byte[8];
var transportGuid = new byte[8];
var pos = new Vector4();
var hasTransportTime3 = false;
var hasTransportTime2 = false;
guid[7] = packet.ReadBit();
var hasPitch = !packet.ReadBit();
guid[0] = packet.ReadBit();
var hasFallData = packet.ReadBit();
packet.StartBitStream(guid, 1, 4, 5);
var hasMovementFlags = !packet.ReadBit();
var hasFallDirection = false;
if (hasFallData)
hasFallDirection = packet.ReadBit();
guid[2] = packet.ReadBit();
packet.ReadBit("Has spline data");
var hasMovementFlagsExtra = !packet.ReadBit();
var hasTransport = packet.ReadBit();
var hasSplineElevation = !packet.ReadBit();
var bitA8 = !packet.ReadBit();
var hasTime = !packet.ReadBit();
if (hasTransport)
{
hasTransportTime3 = packet.ReadBit();
hasTransportTime2 = packet.ReadBit();
packet.StartBitStream(transportGuid, 4, 5, 3, 2, 7, 0, 1, 6);
}
var bit95 = packet.ReadBit();
if (hasMovementFlagsExtra)
packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13);
if (hasMovementFlags)
packet.ReadBitsE<MovementFlag>("Movement flags", 30);
var hasO = !packet.ReadBit();
guid[3] = packet.ReadBit();
var counter = packet.ReadBits(22);
var bit94 = packet.ReadBit();
guid[6] = packet.ReadBit();
packet.ReadXORByte(guid, 2);
packet.ReadXORByte(guid, 4);
if (hasTransport)
{
var tpos = new Vector4();
packet.ReadXORByte(transportGuid, 7);
if (hasTransportTime3)
packet.ReadUInt32("Transport Time 3");
tpos.O = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 1);
packet.ReadXORByte(transportGuid, 6);
packet.ReadXORByte(transportGuid, 0);
if (hasTransportTime2)
packet.ReadUInt32("Transport Time 2");
packet.ReadSByte("Transport Seat");
tpos.Z = packet.ReadSingle();
tpos.Y = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 2);
tpos.X = packet.ReadSingle();
packet.ReadUInt32("Transport Time");
packet.ReadXORByte(transportGuid, 4);
packet.ReadXORByte(transportGuid, 5);
packet.ReadXORByte(transportGuid, 3);
packet.WriteGuid("Transport GUID", transportGuid);
packet.AddValue("Transport Position", tpos);
}
if (hasFallData)
{
if (hasFallDirection)
{
packet.ReadSingle("Fall Cos");
packet.ReadSingle("Fall Sin");
//.........这里部分代码省略.........
示例13: HandleUnknown6754
public static void HandleUnknown6754(Packet packet)
{
var guid1 = new byte[8];
var guid2 = new byte[8];
var bit64 = false;
var bit6C = false;
var bit90 = false;
var pos = new Vector4();
pos.O = packet.ReadSingle();
pos.X = packet.ReadSingle();
packet.ReadSingle("Float10");
pos.X = packet.ReadSingle();
pos.Z = packet.ReadSingle();
var hasMovementFlags = !packet.ReadBit();
guid1[1] = packet.ReadBit();
var bit70 = packet.ReadBit();
guid1[0] = packet.ReadBit();
var bit94 = packet.ReadBit();
if (hasMovementFlags)
packet.ReadBitsE<MovementFlag>("Movement flags", 30);
var bitB4 = packet.ReadBit();
if (bit70)
{
bit6C = packet.ReadBit();
packet.StartBitStream(guid2, 2, 7);
bit64 = packet.ReadBit();
packet.StartBitStream(guid2, 5, 4, 6, 0, 1, 3);
}
var bit98 = !packet.ReadBit();
var bit9C = packet.ReadBit();
packet.StartBitStream(guid1, 3, 5, 4);
var bit78 = !packet.ReadBit();
var bit38 = !packet.ReadBit();
if (bit94)
bit90 = packet.ReadBit();
guid1[6] = packet.ReadBit();
var bitsA0 = packet.ReadBits(22);
var bit9D = packet.ReadBit();
guid1[7] = packet.ReadBit();
var bitB0 = !packet.ReadBit();
guid1[2] = packet.ReadBit();
var hasExtraMovementFlags = !packet.ReadBit();
var bit28 = !packet.ReadBit();
if (hasExtraMovementFlags)
packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13);
if (bit70)
{
packet.ReadXORByte(guid2, 0);
packet.ReadXORByte(guid2, 6);
if (bit64)
packet.ReadInt32("Int60");
packet.ReadXORByte(guid2, 1);
packet.ReadXORByte(guid2, 4);
packet.ReadInt32("Int5C");
packet.ReadSingle("Float54");
packet.ReadXORByte(guid2, 3);
packet.ReadSingle("Float50");
packet.ReadByte("Byte58");
packet.ReadXORByte(guid2, 7);
packet.ReadXORByte(guid2, 2);
if (bit6C)
packet.ReadInt32("Int68");
packet.ReadSingle("Float4C");
packet.ReadXORByte(guid2, 5);
packet.ReadSingle("Float48");
packet.WriteGuid("Guid8", guid2);
}
packet.ReadXORByte(guid1, 1);
packet.ReadXORByte(guid1, 6);
if (bit38)
packet.ReadSingle("Float38");
packet.ReadXORByte(guid1, 0);
if (bit78)
packet.ReadSingle("Float78");
packet.ReadXORByte(guid1, 4);
packet.ReadXORByte(guid1, 5);
if (bit98)
packet.ReadSingle("Float98");
if (bit94)
{
packet.ReadSingle("Float80");
packet.ReadInt32("Int7C");
if (bit90)
{
packet.ReadSingle("Float88");
packet.ReadSingle("Float84");
packet.ReadSingle("Float8C");
}
}
//.........这里部分代码省略.........
示例14: HandleMoveForceFlightSpeedChangeAck434
public static void HandleMoveForceFlightSpeedChangeAck434(Packet packet)
{
var guid = new byte[8];
var transportGuid = new byte[8];
var hasTransTime2 = false;
var hasTransTime3 = false;
var hasFallDirection = false;
var pos = new Vector4();
packet.ReadInt32("Unk Int32 1"); // ##
pos.Z = packet.ReadSingle();
pos.X = packet.ReadSingle();
pos.Y = packet.ReadSingle();
packet.ReadSingle("Speed");
guid[4] = packet.ReadBit();
guid[5] = packet.ReadBit();
packet.ReadBit();
var hasMovementFlags = !packet.ReadBit();
var hasSplineElev = !packet.ReadBit("Has Spline Elevation");
guid[3] = packet.ReadBit();
var hasMovementFlags2 = !packet.ReadBit();
guid[7] = packet.ReadBit();
var hasTrans = packet.ReadBit("Has transport");
guid[0] = packet.ReadBit();
var hasFallData = packet.ReadBit("Has fall data");
var hasTime = !packet.ReadBit("Has timestamp");
var hasPitch = !packet.ReadBit("Has pitch");
packet.ReadBit("Has Spline");
var hasO = !packet.ReadBit();
guid[6] = packet.ReadBit();
guid[2] = packet.ReadBit();
guid[1] = packet.ReadBit();
if (hasTrans)
{
transportGuid[6] = packet.ReadBit();
transportGuid[1] = packet.ReadBit();
transportGuid[7] = packet.ReadBit();
hasTransTime2 = packet.ReadBit();
transportGuid[0] = packet.ReadBit();
hasTransTime3 = packet.ReadBit();
transportGuid[3] = packet.ReadBit();
transportGuid[2] = packet.ReadBit();
transportGuid[5] = packet.ReadBit();
transportGuid[4] = packet.ReadBit();
}
if (hasFallData)
hasFallDirection = packet.ReadBit();
if (hasMovementFlags2)
packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 12);
if (hasMovementFlags)
packet.ReadBitsE<MovementFlag>("Movement Flags", 30);
packet.ParseBitStream(guid, 5, 6, 1, 7, 3, 0, 2, 4);
if (hasTrans)
{
var tpos = new Vector4();
packet.ReadXORByte(transportGuid, 6);
packet.ReadXORByte(transportGuid, 0);
packet.ReadSByte("Transport Seat");
if (hasTransTime2)
packet.ReadUInt32("Transport Time 2");
tpos.O = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 1);
packet.ReadXORByte(transportGuid, 5);
if (hasTransTime3)
packet.ReadUInt32("Transport Time 3");
packet.ReadXORByte(transportGuid, 2);
tpos.Z = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 7);
packet.ReadXORByte(transportGuid, 3);
packet.ReadXORByte(transportGuid, 4);
tpos.X = packet.ReadSingle();
packet.ReadUInt32("Transport Time");
tpos.Y = packet.ReadSingle();
packet.WriteGuid("Transport Guid", transportGuid);
packet.AddValue("Transport Position", tpos);
}
if (hasTime)
packet.ReadUInt32("Timestamp");
if (hasSplineElev)
packet.ReadSingle("Spline elevation");
if (hasFallData)
{
if (hasFallDirection)
{
packet.ReadSingle("Fall Cos");
packet.ReadSingle("Fall Sin");
//.........这里部分代码省略.........
示例15: HandlePlayerMove434
public static void HandlePlayerMove434(Packet packet)
{
var guid = new byte[8];
var transportGuid = new byte[8];
var hasFallDirection = false;
var pos = new Vector4();
var hasFallData = packet.ReadBit();
guid[3] = packet.ReadBit();
guid[6] = packet.ReadBit();
var hasMovementFlagsExtra = !packet.ReadBit();
packet.ReadBit("Has spline data");
var hasTime = !packet.ReadBit();
guid[0] = packet.ReadBit();
guid[1] = packet.ReadBit();
if (hasMovementFlagsExtra)
packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 12);
guid[7] = packet.ReadBit();
var hasMovementFlags = !packet.ReadBit();
var hasO = !packet.ReadBit();
guid[2] = packet.ReadBit();
var hasSplineElevation = !packet.ReadBit();
packet.ReadBit();
guid[4] = packet.ReadBit();
if (hasFallData)
hasFallDirection = packet.ReadBit();
guid[5] = packet.ReadBit();
var hasTransport = packet.ReadBit();
if (hasMovementFlags)
packet.ReadBitsE<MovementFlag>("Movement flags", 30);
var hasTransportTime3 = false;
var hasTransportTime2 = false;
if (hasTransport)
{
transportGuid[3] = packet.ReadBit();
hasTransportTime3 = packet.ReadBit();
transportGuid[6] = packet.ReadBit();
transportGuid[1] = packet.ReadBit();
transportGuid[7] = packet.ReadBit();
transportGuid[0] = packet.ReadBit();
transportGuid[4] = packet.ReadBit();
hasTransportTime2 = packet.ReadBit();
transportGuid[5] = packet.ReadBit();
transportGuid[2] = packet.ReadBit();
}
var hasPitch = !packet.ReadBit();
packet.ReadXORByte(guid, 5);
if (hasFallData)
{
if (hasFallDirection)
{
packet.ReadSingle("Horizontal speed");
packet.ReadSingle("Fall Cos");
packet.ReadSingle("Fall Sin");
}
packet.ReadSingle("Vertical speed");
packet.ReadUInt32("Fall time");
}
if (hasSplineElevation)
packet.ReadSingle("Spline elevation");
packet.ReadXORByte(guid, 7);
pos.Y = packet.ReadSingle();
packet.ReadXORByte(guid, 3);
if (hasTransport)
{
var tpos = new Vector4();
if (hasTransportTime3)
packet.ReadUInt32("Transport Time 3");
packet.ReadXORByte(transportGuid, 6);
packet.ReadSByte("Transport Seat");
packet.ReadXORByte(transportGuid, 5);
tpos.X = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 1);
tpos.O = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 2);
if (hasTransportTime2)
packet.ReadUInt32("Transport Time 2");
packet.ReadXORByte(transportGuid, 0);
tpos.Z = packet.ReadSingle();
packet.ReadXORByte(transportGuid, 7);
packet.ReadXORByte(transportGuid, 4);
packet.ReadXORByte(transportGuid, 3);
tpos.Y = packet.ReadSingle();
packet.ReadUInt32("Transport Time");
packet.WriteGuid("Transport Guid", transportGuid);
packet.AddValue("Transport Position", tpos);
}
packet.ReadXORByte(guid, 4);
pos.X = packet.ReadSingle();
//.........这里部分代码省略.........