当前位置: 首页>>代码示例>>C#>>正文


C# Packet.ReadPackedQuaternion方法代码示例

本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadPackedQuaternion方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadPackedQuaternion方法的具体用法?C# Packet.ReadPackedQuaternion怎么用?C# Packet.ReadPackedQuaternion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WowPacketParser.Misc.Packet的用法示例。


在下文中一共展示了Packet.ReadPackedQuaternion方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadMovementUpdateBlock432


//.........这里部分代码省略.........
                packet.ReadXORByte(guid2, 0);
                moveInfo.Position.X = packet.ReadSingle();
                if (hasFallData)
                {
                    packet.ReadInt32("Time Fallen", index);
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump Sin", index);
                        packet.ReadSingle("Jump Velocity", index);
                        packet.ReadSingle("Jump Cos", index);
                    }
                    packet.ReadSingle("Fall Start Velocity", index);
                }

                if (hasOrientation)
                    moveInfo.Orientation = packet.ReadSingle();

                packet.WriteLine("[{0}] Position: {1} Orientation: {2}", index, moveInfo.Position, moveInfo.Orientation);
                packet.ReadSingle("Swim Speed", index);
                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f;
                packet.ReadSingle("Fly Speed", index);
                packet.ReadXORByte(guid2, 2);
                if (unkFloat2)
                    packet.ReadSingle("Unk float +36", index);

                if (unkFloat1)
                    packet.ReadSingle("Unk float +28", index);

                packet.ReadXORByte(guid2, 3);
                packet.ReadSingle("RunBack Speed", index);
                packet.ReadXORByte(guid2, 6);
                packet.ReadSingle("Pitch Speed", index);
                packet.ReadXORByte(guid2, 7);
                packet.ReadXORByte(guid2, 5);
                packet.ReadSingle("Turn Speed", index);
                packet.ReadSingle("SwimBack Speed", index);
                packet.ReadXORByte(guid2, 1);
                packet.WriteLine("[{0}] GUID 2 {1}", index, new Guid(BitConverter.ToUInt64(guid2, 0)));
                if (hasUnkUInt)
                    packet.ReadInt32();

                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index) / 2.5f;
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTarget, 6, 5, 3, 2, 0, 1, 7, 4);
                packet.WriteGuid("Attacking Target GUID", attackingTarget, index);
            }

            if (unkFloats)
            {
                int i;
                for (i = 0; i < 13; ++i)
                    packet.ReadSingle("Unk float 456", index, i);

                packet.ReadByte("Unk byte 456", index);

                for (; i < 16; ++i)
                    packet.ReadSingle("Unk float 456", index, i);
            }

            if (hasVehicleData)
            {
                packet.ReadSingle("Vehicle Orientation", index);
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
            }

            if (hasGORotation)
                moveInfo.Rotation = packet.ReadPackedQuaternion("GO Rotation", index);

            if (hasStationaryPosition)
            {
                moveInfo.Position = new Vector3
                {
                    X = packet.ReadSingle(),
                    Z = packet.ReadSingle(),
                    Y = packet.ReadSingle(),
                };

                moveInfo.Orientation = packet.ReadSingle();
                packet.WriteLine("[{0}] Stationary Position: {1}, O: {2}", index, moveInfo.Position, moveInfo.Orientation);
            }

            if (hasAnimKits)
            {
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
            }

            if (hasTransportExtra)
                packet.ReadInt32("Transport Time", index);

            packet.ResetBitReader();
            return moveInfo;
        }
开发者ID:Huri,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例2: ReadMovementUpdateBlock504


//.........这里部分代码省略.........
                if (bit244)
                {
                    for (var i = 0; i < bit24C; ++i)
                    {
                        packet.ReadSingle();
                        packet.ReadSingle();
                    }

                    packet.ReadSingle();
                    for (var i = 0; i < bit25C; ++i)
                    {
                        packet.ReadSingle();
                        packet.ReadSingle();
                    }

                    packet.ReadSingle();
                }

                packet.ReadUInt32();
                for (var i = 0; i < bit278; ++i)
                {
                    packet.ReadSingle();
                    packet.ReadSingle();
                    packet.ReadSingle();
                }

                packet.ReadSingle();
                packet.ReadSingle();
            }

            if (hasGameObjectPosition)
            {
                packet.ReadXORByte(goTransportGuid, 7);
                packet.ReadXORByte(goTransportGuid, 3);
                packet.ReadXORByte(goTransportGuid, 5);
                moveInfo.TransportOffset.O = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 6);
                packet.ReadXORByte(goTransportGuid, 0);
                packet.ReadXORByte(goTransportGuid, 2);
                packet.ReadUInt32("GO Transport Time", index);
                if (hasGOTransportTime3)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ReadXORByte(goTransportGuid, 1);
                moveInfo.TransportOffset.Z = packet.ReadSingle();
                packet.ReadSByte("GO Transport Seat", index);
                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 4);
                moveInfo.TransportOffset.Y = packet.ReadSingle();

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.Y = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Position.X = packet.ReadSingle();
                packet.WriteLine("[{0}] Stationary Position: {1}", index, moveInfo.Position);
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 3, 6, 4, 1, 5, 7, 0, 2);
                packet.WriteGuid("Attacking Target GUID", attackingTargetGuid, index);
            }

            if (transport)
                packet.ReadUInt32("Transport path timer", index);

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasVehicleData)
            {
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
                packet.ReadSingle("Vehicle Orientation", index);
            }

            if (hasAnimKits)
            {
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
            }

            if (bit284)
                packet.ReadUInt32();

            return moveInfo;
        }
开发者ID:Huri,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例3: ReadMovementUpdateBlock510


//.........这里部分代码省略.........
                {
                    packet.ReadSingle("field143", index);
                    packet.ReadSingle("field141", index);
                    packet.ReadSingle("field142", index);
                    packet.ReadSingle("field140", index);
                    packet.ReadSingle("field139", index);
                    packet.ReadSingle("field144", index);
                }

                packet.ReadSingle("field132", index);
                if (bit624)
                {
                    for (var i = 0; i < bit158; ++i)
                    {
                        packet.ReadSingle();
                        packet.ReadSingle();
                        packet.ReadSingle();
                    }
                }

                packet.ReadSingle("field133", index);
                packet.ReadSingle("field131", index);
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 3, 4, 2, 5, 1, 6, 7, 0);
                packet.WriteGuid("Attacking Target GUID", attackingTargetGuid, index);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.X = packet.ReadSingle();
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                moveInfo.Position.Y = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                packet.WriteLine("[{0}] Stationary Position: {1}", index, moveInfo.Position);
            }

            if (hasGameObjectPosition)
            {
                packet.ReadXORByte(goTransportGuid, 3);
                packet.ReadXORByte(goTransportGuid, 1);
                packet.ReadSByte("GO Transport Seat", index);
                moveInfo.TransportOffset.Z = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 2);
                packet.ReadXORByte(goTransportGuid, 7);
                if (hasGOTransportTime3)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ReadXORByte(goTransportGuid, 6);
                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                packet.ReadUInt32("GO Transport Time", index);
                moveInfo.TransportOffset.Y = packet.ReadSingle();
                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 0);
                packet.ReadXORByte(goTransportGuid, 4);
                packet.ReadXORByte(goTransportGuid, 5);
                moveInfo.TransportOffset.O = packet.ReadSingle();

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (hasAnimKits)
            {
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
            }

            if (hasVehicleData)
            {
                packet.ReadSingle("Vehicle Orientation", index);
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
            }

            if (transport)
                packet.ReadUInt32("Transport Path Timer", index);

            if (bit644)
                packet.ReadUInt32("field162", index);

            if (bit784)
            {
                for (var i = 0; i < bit198; ++i)
                    packet.ReadUInt32();
            }

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            return moveInfo;
        }
开发者ID:Huri,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例4: ReadMovementUpdateBlock434


//.........这里部分代码省略.........

                packet.ReadSingle("FlyBack Speed", index);
                if (guid2[6] != 0) guid2[6] ^= packet.ReadByte();

                packet.ReadSingle("Turn Speed", index);
                if (hasOrientation)
                    moveInfo.Orientation = packet.ReadSingle();

                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f;
                if (dword28)
                    packet.ReadSingle();

                packet.ReadSingle("Fly Speed", index);

                packet.WriteLine("[{0}] GUID 2: {1}", index, new Guid(BitConverter.ToUInt64(guid2, 0)));
                packet.WriteLine("[{0}] Position: {1}", index, moveInfo.Position);
                packet.WriteLine("[{0}] Orientation: {1}", index, moveInfo.Orientation);
            }

            if (hasVehicleData)
            {
                packet.ReadSingle("Vehicle Orientation", index);
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
            }

            if (hasGameObjectPosition)
            {
                var tPos = new Vector4();

                if (goTransportGuid[0] != 0) goTransportGuid[0] ^= packet.ReadByte();
                if (goTransportGuid[5] != 0) goTransportGuid[5] ^= packet.ReadByte();
                if (hasGOTransportTime3)
                    packet.ReadUInt32("GO Transport Time 3", index);

                if (goTransportGuid[3] != 0) goTransportGuid[3] ^= packet.ReadByte();

                tPos.X = packet.ReadSingle();
                if (goTransportGuid[4] != 0) goTransportGuid[4] ^= packet.ReadByte();
                if (goTransportGuid[6] != 0) goTransportGuid[6] ^= packet.ReadByte();
                if (goTransportGuid[1] != 0) goTransportGuid[1] ^= packet.ReadByte();

                packet.ReadSingle("GO Transport Time", index);
                tPos.Y = packet.ReadSingle();
                if (goTransportGuid[2] != 0) goTransportGuid[2] ^= packet.ReadByte();
                if (goTransportGuid[7] != 0) goTransportGuid[7] ^= packet.ReadByte();

                tPos.Z = packet.ReadSingle();
                packet.ReadByte("GO Transport Seat", index);
                tPos.O = packet.ReadSingle();
                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                packet.WriteLine("[{0}] GO Transport Position: {1}", index, tPos);
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, new Guid(BitConverter.ToUInt64(goTransportGuid, 0)));
            }

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (bit456)
            {
                // float[] arr = new float[16];
                // ordering: 13, 4, 7, 15, BYTE, 10, 11, 3, 5, 14, 6, 1, 8, 12, 0, 2, 9
                packet.ReadBytes(4 * 16 + 1);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                moveInfo.Position = packet.ReadVector3("Stationary Position", index);
            }

            if (hasAttackingTarget)
            {
                if (attackingTargetGuid[0] != 0) attackingTargetGuid[0] ^= packet.ReadByte();
                if (attackingTargetGuid[3] != 0) attackingTargetGuid[3] ^= packet.ReadByte();
                if (attackingTargetGuid[5] != 0) attackingTargetGuid[5] ^= packet.ReadByte();
                if (attackingTargetGuid[7] != 0) attackingTargetGuid[7] ^= packet.ReadByte();
                if (attackingTargetGuid[6] != 0) attackingTargetGuid[6] ^= packet.ReadByte();
                if (attackingTargetGuid[2] != 0) attackingTargetGuid[2] ^= packet.ReadByte();
                if (attackingTargetGuid[1] != 0) attackingTargetGuid[1] ^= packet.ReadByte();
                if (attackingTargetGuid[4] != 0) attackingTargetGuid[4] ^= packet.ReadByte();
                packet.WriteLine("[{0}] Attacking Target GUID {1}", index, new Guid(BitConverter.ToUInt64(attackingTargetGuid, 0)));
            }

            if (hasAnimKits)
            {
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
            }

            if (bit408)
                packet.ReadUInt32();

            return moveInfo;
        }
开发者ID:skypeak,项目名称:WowPacketParser_SkyFire,代码行数:101,代码来源:UpdateHandler.cs

示例5: ReadMovementUpdateBlock


//.........这里部分代码省略.........
                    }
                    else
                    {
                        var splineFlags = packet.ReadEnum<SplineFlag>("Spline Flags", TypeCode.Int32, index);
                        if (splineFlags.HasAnyFlag(SplineFlag.FinalTarget))
                            packet.ReadGuid("Final Spline Target GUID", index);
                        else if (splineFlags.HasAnyFlag(SplineFlag.FinalOrientation))
                            packet.ReadSingle("Final Spline Orientation", index);
                        else if (splineFlags.HasAnyFlag(SplineFlag.FinalPoint))
                            packet.ReadVector3("Final Spline Coords", index);
                    }

                    packet.ReadInt32("Spline Time", index);
                    packet.ReadInt32("Spline Full Time", index);
                    packet.ReadInt32("Spline ID", index);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_0_9767))
                    {
                        packet.ReadSingle("Spline Duration Multiplier", index);
                        packet.ReadSingle("Spline Duration Multiplier Next", index);
                        packet.ReadSingle("Spline Vertical Acceleration", index);
                        packet.ReadInt32("Spline Start Time", index);
                    }

                    var splineCount = packet.ReadInt32();
                    for (var i = 0; i < splineCount; i++)
                        packet.ReadVector3("Spline Waypoint", index, i);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_0_9767))
                        packet.ReadEnum<SplineMode>("Spline Mode", TypeCode.Byte, index);

                    packet.ReadVector3("Spline Endpoint", index);
                }
            }
            else // !UpdateFlag.Living
            {
                if (flags.HasAnyFlag(UpdateFlag.GOPosition))
                {
                    moveInfo.TransportGuid = packet.ReadPackedGuid("GO Position GUID", index);

                    moveInfo.Position = packet.ReadVector3("[" + index + "] GO Position");
                    packet.ReadVector3("GO Transport Position", index);

                    moveInfo.Orientation = packet.ReadSingle("[" + index + "] GO Orientation");
                    packet.ReadSingle("Corpse Orientation", index);
                }
                else if (flags.HasAnyFlag(UpdateFlag.StationaryObject))
                {
                    moveInfo.Position = packet.ReadVector3();
                    moveInfo.Orientation = packet.ReadSingle();
                    packet.WriteLine("[{0}] Stationary Position: {1}, O: {2}", index, moveInfo.Position, moveInfo.Orientation);
                }
            }

            if (ClientVersion.RemovedInVersion(ClientVersionBuild.V4_2_2_14545))
            {
                if (flags.HasAnyFlag(UpdateFlag.Unknown1))
                    packet.ReadUInt32("Unk Int32", index);

                if (flags.HasAnyFlag(UpdateFlag.LowGuid))
                    packet.ReadUInt32("Low GUID", index);
            }

            if (flags.HasAnyFlag(UpdateFlag.AttackingTarget))
                packet.ReadPackedGuid("Target GUID", index);

            if (flags.HasAnyFlag(UpdateFlag.Transport))
                packet.ReadUInt32("Transport unk timer", index);

            if (flags.HasAnyFlag(UpdateFlag.Vehicle))
            {
                moveInfo.VehicleId = packet.ReadUInt32("[" + index + "] Vehicle ID");
                packet.ReadSingle("Vehicle Orientation", index);
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
            {
                if (flags.HasAnyFlag(UpdateFlag.AnimKits))
                {
                    packet.ReadInt16("Unk Int16", index);
                    packet.ReadInt16("Unk Int16", index);
                    packet.ReadInt16("Unk Int16", index);
                }
            }

            if (flags.HasAnyFlag(UpdateFlag.GORotation))
                moveInfo.Rotation = packet.ReadPackedQuaternion("GO Rotation", index);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
            {
                if (flags.HasAnyFlag(UpdateFlag.TransportUnkArray))
                {
                    var count = packet.ReadByte("Count", index);
                    for (var i = 0; i < count; i++)
                        packet.ReadInt32("Unk Int32", index, count);
                }
            }

            return moveInfo;
        }
开发者ID:Huri,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例6: ReadMovementUpdateBlock


//.........这里部分代码省略.........

                packet.ReadXORByte(guid1, 3);
                if (hasPitch)
                    packet.ReadSingle("Pitch", index);

                packet.ReadSingle("FloatB8", index);
                packet.ReadXORBytes(guid1, 7, 2);
                moveInfo.Position.Z = packet.ReadSingle();
                packet.ReadXORByte(guid1, 0);

                packet.WriteGuid("GUID1", guid1, index);
                packet.AddValue("Position", moveInfo.Position, index);
                packet.AddValue("Orientation", moveInfo.Orientation, index);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.X = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Position.Y = packet.ReadSingle();
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);

                packet.AddValue("Stationary Position", moveInfo.Position, index);
            }

            if (hasGameObjectPosition)
            {
                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                packet.ReadXORBytes(goTransportGuid, 4, 2, 7, 3);
                packet.ReadUInt32("GO Transport Time", index);
                moveInfo.TransportOffset.Y = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 1);
                moveInfo.TransportOffset.Z = packet.ReadSingle();
                packet.ReadSByte("GO Transport Seat", index);
                if (hasGOTransportTime3)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ReadXORByte(goTransportGuid, 6);
                moveInfo.TransportOffset.O = packet.ReadSingle();
                packet.ReadXORBytes(goTransportGuid, 5, 0);
                moveInfo.TransportOffset.X = packet.ReadSingle();

                moveInfo.TransportGuid = new WowGuid64(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.AddValue("GO Transport GUID", moveInfo.TransportGuid, index);
                packet.AddValue("GO Transport Position", moveInfo.TransportOffset, index);
            }

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 4, 6, 3, 0, 7, 1, 2, 5);
                packet.WriteGuid("Attacking GUID", attackingTargetGuid, index);
            }

            if (hasAnimKits)
            {
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
            }

            if (bit1DC)
                packet.ReadInt32("int1D8", index);

            if (hasVehicleData)
            {
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
                packet.ReadSingle("Vehicle Orientation", index);
            }

            if (bit2A4)
                packet.ReadInt32("int2A0", index);

            if (bit414)
                packet.ReadInt32("int410", index);

            if (bit32A)
                packet.ReadBytes("Bytes", (int)bits2AA);

            if (bit428)
                for (var i = 0; i < bits418; ++i)
                    packet.ReadInt32("Int3F8", index, i);

            if (isLiving && moveInfo.HasSplineData && hasFullSpline && splineType == SplineType.FacingTarget)
            {
                var facingTargetGuid = new byte[8];
                facingTargetGuid = packet.StartBitStream(5, 3, 6, 2, 7, 0, 1, 4);
                packet.ParseBitStream(facingTargetGuid, 7, 0, 1, 4, 2, 5, 3, 6);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }

            return moveInfo;
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例7: ReadMovementUpdateBlock548


//.........这里部分代码省略.........
               ... // not completed
            }
            */

            if (hasGOPosition) // 424
            {
                if (hasGOTransportTime3) // 420
                    packet.ReadUInt32("GO Transport Time 3", index); // 416

                moveInfo.TransportOffset.Y = packet.ReadSingle(); // 388
                packet.ReadByte("GO Transport Seat", index); // 400
                moveInfo.TransportOffset.X = packet.ReadSingle(); // 384
                packet.ReadXORByte(goTransportGuid, 2); // 378
                packet.ReadXORByte(goTransportGuid, 4); // 380
                packet.ReadXORByte(goTransportGuid, 1); // 377

                if (hasGOTransportTime2) // 412
                    packet.ReadUInt32("GO Transport Time 2", index); // 408

                packet.ReadUInt32("GO Transport Time", index); // 404

                moveInfo.TransportOffset.O = packet.ReadSingle(); // 396
                moveInfo.TransportOffset.Z = packet.ReadSingle(); // 392
                packet.ReadXORByte(goTransportGuid, 6); // 382
                packet.ReadXORByte(goTransportGuid, 0); // 376
                packet.ReadXORByte(goTransportGuid, 5); // 381
                packet.ReadXORByte(goTransportGuid, 3); // 379
                packet.ReadXORByte(goTransportGuid, 7); // 383

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (hasTarget) // 464
            {
                packet.ParseBitStream(targetGuid, 7, 1, 5, 2, 6, 3, 0, 4);  // 456
                packet.WriteGuid("Target GUID", targetGuid, index);
            }

            if (hasVehicle) // 488
            {
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index); // 480
                packet.ReadSingle("Vehicle Orientation", index); // 484
            }

            if (hasStationaryPosition) // 448
            {
                moveInfo.Position.Y = packet.ReadSingle("Stationary Y", index); // 436
                moveInfo.Position.Z = packet.ReadSingle("Stationary Z", index); // 440
                moveInfo.Orientation = packet.ReadSingle("Stationary O", index); // 444
                moveInfo.Position.X = packet.ReadSingle("Stationary X", index); // 432
            }

            if (hasUnk1) // 676
                packet.ReadInt32("unk672", index); // 672

            if (hasAnimKits) // 498
            {
                if (hasAnimKit1) // 492
                    packet.ReadUInt16("AnimKit1", index); // 492
                if (hasAnimKit3) // 496
                    packet.ReadUInt16("AnimKit3", index); // 496
                if (hasAnimKit2) // 494
                    packet.ReadUInt16("AnimKit2", index); // 494
            }

            if (hasUnk2) // 810
                packet.ReadWoWString("Str", Unk2Count, index);

            if (hasUnk6) // 476
                packet.ReadInt32("unk472", index); // 472

            if (hasUnk9) // 1064
                for (var i = 0; i < Unk9Count; i++) // 1048
                    packet.ReadInt32("unk1052", index, i); // 1052

            if (hasGobjectRotation) // 512
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasUnk4) // 1044
                packet.ReadInt32("unk1040", index); // 1040

            if (hasLiving) // 368
                if (moveInfo.HasSplineData) // 344
                    if (bit336) // 336
                        if (splineType == SplineType.FacingTarget)
                        {
                            SplineFacingTargetGuid = packet.StartBitStream(4, 7, 0, 5, 1, 2, 3, 6);
                            packet.ParseBitStream(SplineFacingTargetGuid, 4, 2, 0, 5, 6, 3, 1, 7);
                            packet.WriteGuid("Spline Facing Target GUID", SplineFacingTargetGuid, index);
                        }

            /* Don't know why this is commented out. Check IDA
            if (hasLiving && hasSpline)
                Movement::PacketBuilder::WriteFacingTargetPart(*ToUnit()->movespline, *data);
            */

            return moveInfo;
        }
开发者ID:nelegalno,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例8: ReadMovementUpdateBlock547


//.........这里部分代码省略.........
                    moveInfo.Orientation = packet.ReadSingle();

                packet.WriteLine("[{0}] GUID 2: {1}", index, new Guid(BitConverter.ToUInt64(guid2, 0)));
                packet.WriteLine("[{0}] Position: {1}", index, moveInfo.Position);
                packet.WriteLine("[{0}] Orientation: {1}", index, moveInfo.Orientation);
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 5, 1, 2, 0, 3, 4, 6, 7);
                packet.WriteGuid("Attacking Target GUID", attackingTargetGuid, index);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                moveInfo.Position = packet.ReadVector3("Stationary Position", index);
            }

            if (hasGameObjectPosition)
            {
                packet.ReadByte("GO Transport Seat", index);
                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 1);
                packet.ReadXORByte(goTransportGuid, 0);
                packet.ReadXORByte(goTransportGuid, 2);
                packet.ReadXORByte(goTransportGuid, 6);
                packet.ReadXORByte(goTransportGuid, 5);
                packet.ReadXORByte(goTransportGuid, 4);

                if (hasGOTransportTime3)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ReadXORByte(goTransportGuid, 7);
                moveInfo.TransportOffset.O = packet.ReadSingle();
                moveInfo.TransportOffset.Z = packet.ReadSingle();
                moveInfo.TransportOffset.Y = packet.ReadSingle();

                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                packet.ReadXORByte(goTransportGuid, 3);

                packet.ReadUInt32("GO Transport Time", index);

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (transport)
                packet.ReadUInt32("Transport path timer", index);

            if (hasUnkDword676)
                packet.ReadUInt32("Unk DWORD676", index);

            if (hasUnkString)
                packet.ReadWoWString("Unk String", UnkStringLen, index);

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasVehicleData)
            {
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
                packet.ReadSingle("Vehicle Orientation", index);
            }

            if (hasUnkDword1044)
                packet.ReadUInt32("Unk DWORD1044", index);

            if (hasAnimKits)
            {
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
            }

            /*if (bit456)
            {
                // float[] arr = new float[16];
                // ordering: 13, 4, 7, 15, BYTE, 10, 11, 3, 5, 14, 6, 1, 8, 12, 0, 2, 9
                packet.ReadBytes(4 * 16 + 1);
            }*/

            if(living && moveInfo.HasSplineData && bit216)
            {
                if (splineType == SplineType.FacingTarget)
                {
                    SplineFacingTargetGuid = packet.StartBitStream(6, 7, 3, 0, 5, 1, 4, 2);
                    packet.ParseBitStream(SplineFacingTargetGuid, 4, 2, 5, 6, 0, 7, 1, 3);
                    packet.WriteGuid("Spline Facing Target GUID", SplineFacingTargetGuid, index);
                }
            }

            return moveInfo;
        }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例9: ReadMovementUpdateBlock


//.........这里部分代码省略.........
                        packet.ReadSingle("Float25C+0", index);
                    }

                    for (var i = 0; i < bits248; ++i)
                    {
                        packet.ReadSingle("Float24C+0", index);
                        packet.ReadSingle("Float24C+1", index);
                    }

                    packet.ReadSingle("Float26C", index);
                    packet.ReadSingle("Float268", index);
                }

                if (bit228)
                {
                    packet.ReadSingle("Float22C", index);
                    packet.ReadSingle("Float230", index);
                    packet.ReadSingle("Float23C", index);
                    packet.ReadSingle("Float234", index);
                    packet.ReadSingle("Float238", index);
                    packet.ReadSingle("Float240", index);
                }

                if (bit270)
                {
                    for (var i = 0; i < bits274; ++i)
                    {
                        packet.ReadSingle("Float277+1", index);
                        packet.ReadSingle("Float277+0", index);
                        packet.ReadSingle("Float277+2", index);
                    }
                }

                packet.ReadSingle("Float214", index);
                packet.ReadInt32("Int20C", index);
            }

            if (hasVehicleData)
            {
                packet.ReadSingle("Vehicle Orientation", index);
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 7, 1, 4, 6, 0, 2, 5, 3);
                packet.WriteGuid("Attacking GUID", attackingTargetGuid, index);
            }

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasAnimKits)
            {
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
            }

            if (bit28E)
            {
                var bytes = packet.ReadBytes((int)bits28F);
                packet.WriteLine("Bytes", bytes.ToString(), index);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.X = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                moveInfo.Position.Y = packet.ReadSingle();
                packet.WriteLine("[{0}] Stationary Position: {1}", index, moveInfo.Position);
            }

            if (transport)
                packet.ReadInt32("Transport path timer", index);

            if (bit3F0)
                for (var i = 0; i < bits3F4; ++i)
                    packet.ReadInt32("Int1DC", index, i);

            if (bit284)
                packet.ReadInt32("Int288", index);

            if (bit3E8)
                packet.ReadInt32("Int3EC", index);

            if (living && moveInfo.HasSplineData && hasFullSpline && splineType == 3)
            {
                var facingTargetGuid = new byte[8];
                facingTargetGuid = packet.StartBitStream(2, 4, 6, 3, 1, 5, 7, 0);
                packet.ParseBitStream(facingTargetGuid, 1, 3, 6, 7, 2, 4, 5, 0);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }

            return moveInfo;
        }
开发者ID:rodrigoalv,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例10: ReadMovementUpdateBlock


//.........这里部分代码省略.........
            }

            var pauseTimesCount = packet.ReadUInt32("PauseTimesCount", index);

            if (hasStationaryPosition)
            {
                moveInfo.Position = packet.ReadVector3();
                moveInfo.Orientation = packet.ReadSingle();

                packet.AddValue("Stationary Position", moveInfo.Position, index);
                packet.AddValue("Stationary Orientation", moveInfo.Orientation, index);
            }

            if (hasCombatVictim)
                packet.ReadPackedGuid128("CombatVictim Guid", index);

            if (hasServerTime)
                packet.ReadUInt32("ServerTime", index);

            if (hasVehicleCreate)
            {
                moveInfo.VehicleId = packet.ReadUInt32("RecID", index);
                packet.ReadSingle("InitialRawFacing", index);
            }

            if (hasAnimKitCreate)
            {
                packet.ReadUInt16("AiID", index);
                packet.ReadUInt16("MovementID", index);
                packet.ReadUInt16("MeleeID", index);
            }

            if (hasRotation)
                moveInfo.Rotation = packet.ReadPackedQuaternion("GameObject Rotation", index);

            for (var i = 0; i < pauseTimesCount; ++i)
                packet.ReadInt32("PauseTimes", index, i);

            if (hasMovementTransport)
            {
                packet.ResetBitReader();
                moveInfo.TransportGuid = packet.ReadPackedGuid128("TransportGUID", index);
                moveInfo.TransportOffset = packet.ReadVector4("TransportPosition", index);
                var seat = packet.ReadByte("VehicleSeatIndex", index);
                packet.ReadUInt32("MoveTime", index);

                var hasPrevMoveTime = packet.ReadBit("HasPrevMoveTime", index);
                var hasVehicleRecID = packet.ReadBit("HasVehicleRecID", index);

                if (hasPrevMoveTime)
                    packet.ReadUInt32("PrevMoveTime", index);

                if (hasVehicleRecID)
                    packet.ReadInt32("VehicleRecID", index);

                if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                    guid.HasEntry() && guid.GetHighType() == HighGuidType.Creature)
                {
                    VehicleTemplateAccessory vehicleAccessory = new VehicleTemplateAccessory
                    {
                        Entry = moveInfo.TransportGuid.GetEntry(),
                        AccessoryEntry = guid.GetEntry(),
                        SeatId = seat
                    };
                    Storage.VehicleTemplateAccessories.Add(vehicleAccessory, packet.TimeSpan);
                }
开发者ID:jackpoz,项目名称:WowPacketParser,代码行数:67,代码来源:UpdateHandler.cs

示例11: ReadMovementUpdateBlock504


//.........这里部分代码省略.........
                    packet.ReadSingle("Unk 127", index);
                    packet.ReadSingle("Unk 128", index);
                    packet.ReadSingle("Unk 129", index);
                    packet.ReadSingle("Unk 130", index);
                }

                if (bit29)
                {
                    packet.ReadSingle("Unk 131", index);
                    packet.ReadSingle("Unk 132", index);
                }

                if (bit30)
                {
                    // if ( v4->dword24C > 0u ) loop not taken?
                    packet.ReadSingle("Unk 133", index);
                    // if ( v4->dword25C > 0u ) another loop not taken?
                    packet.ReadSingle("Unk 134", index);
                }

                packet.ReadUInt32("Unk 135", index);

                // if ( v4->byte270 ) if to another loop not taken
                packet.ReadSingle("Unk 136", index);
                packet.ReadSingle("Unk 137", index);
            }

            if (hasGOTransportPosition)
            {
                packet.ReadXORByte(transportGuid, 7);
                packet.ReadXORByte(transportGuid, 3);
                packet.ReadXORByte(transportGuid, 5);

                packet.ReadSingle("Unk 138", index);

                packet.ReadXORByte(transportGuid, 6);
                packet.ReadXORByte(transportGuid, 0);
                packet.ReadXORByte(transportGuid, 2);

                packet.ReadUInt32("Unk 139", index);

                packet.ReadXORByte(transportGuid, 1);

                packet.ReadSingle("Unk 140", index);
                packet.ReadSByte("Transport Seat", index);

                if (bit16)
                    packet.ReadUInt32("Unk 142", index);

                packet.ReadSingle("Unk 143", index);

                packet.ReadXORByte(transportGuid, 4);

                packet.ReadSingle("Unk 144", index);

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(transportGuid, 0));
                packet.WriteGuid("Transport Guid", transportGuid, index);
            }

            if (hasStationaryPosition)
            {
                packet.ReadSingle("Stationary Position X/Y", index);
                packet.ReadSingle("Stationary Position Z", index);
                packet.ReadSingle("Stationary Position X/Y", index);
                packet.ReadSingle("Stationary Orientation", index);
            }

            if (hasTarget)
            {
                packet.ParseBitStream(targetGuid, 3, 6, 4, 1, 5, 7, 0, 2);
                packet.WriteGuid("Target Guid", targetGuid);
            }

            if (bit4)
                packet.ReadUInt32("Unk 149");

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasVehicleData)
            {
                packet.ReadUInt32("Vehicle Id", index);
                packet.ReadSingle("Vehicle Orientation", index);
            }

            if (hasAnimKits)
            {
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1");
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2");
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3");
            }

            if (bit1)
                packet.ReadUInt32("Unk 152");

            return moveInfo;
        }
开发者ID:hodobaj,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例12: ReadMovementUpdateBlock


//.........这里部分代码省略.........
                        packet.ReadSingle("Float25C+1", index);
                        packet.ReadSingle("Float25C+0", index);
                    }

                    for (var i = 0; i < bits248; ++i)
                    {
                        packet.ReadSingle("Float24C+0", index);
                        packet.ReadSingle("Float24C+1", index);
                    }

                    packet.ReadSingle("Float26C", index);
                    packet.ReadSingle("Float268", index);
                }

                if (bit228)
                {
                    packet.ReadSingle("Float22C", index);
                    packet.ReadSingle("Float230", index);
                    packet.ReadSingle("Float23C", index);
                    packet.ReadSingle("Float234", index);
                    packet.ReadSingle("Float238", index);
                    packet.ReadSingle("Float240", index);
                }

                if (bit270)
                {
                    for (var i = 0; i < bits274; ++i)
                    {
                        packet.ReadSingle("Float277+1", index);
                        packet.ReadSingle("Float277+0", index);
                        packet.ReadSingle("Float277+2", index);
                    }
                }

                packet.ReadSingle("Float214", index);
                packet.ReadInt32("Int20C", index);
            }

            if (hasVehicleData)
            {
                packet.ReadSingle("Vehicle Orientation", index);
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 7, 1, 4, 6, 0, 2, 5, 3);
                packet.WriteGuid("Attacking GUID", attackingTargetGuid, index);
            }

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasAnimKits)
            {
                if (hasAnimKit2)
                    packet.ReadUInt16("Anim Kit 2", index);
                if (hasAnimKit1)
                    packet.ReadUInt16("Anim Kit 1", index);
                if (hasAnimKit3)
                    packet.ReadUInt16("Anim Kit 3", index);
            }

            if (bit28E)
            {
                packet.ReadBytes("Bytes", (int)bits28F, index);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.X = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                moveInfo.Position.Y = packet.ReadSingle();
                packet.AddValue("Stationary Position", moveInfo.Position, index);
            }

            if (transport)
                packet.ReadInt32("Transport path timer", index);

            if (bit3F0)
                for (var i = 0; i < bits3F4; ++i)
                    packet.ReadInt32("Int3F8", index, i);

            if (bit284)
                packet.ReadInt32("Int288", index);

            if (bit3E8)
                packet.ReadInt32("Int3EC", index);

            if (living && moveInfo.HasSplineData && hasFullSpline && splineType == SplineType.FacingTarget)
            {
                var facingTargetGuid = new byte[8];
                facingTargetGuid = packet.StartBitStream(2, 4, 6, 3, 1, 5, 7, 0);
                packet.ParseBitStream(facingTargetGuid, 1, 3, 6, 7, 2, 4, 5, 0);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }

            return moveInfo;
        }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例13: ReadMovementUpdateBlock


//.........这里部分代码省略.........
                    packet.ReadInt32();
                }

                packet.ReadXORByte(guid1, 4);
                packet.ReadSingle("Swim Back Speed", index);
                moveInfo.Position.Z = packet.ReadSingle();
                packet.ReadXORByte(guid1, 3);
            }

            if (isSceneObject)
            {
                // need update
            }

            if (hasGameObjectPosition)
            {
                packet.ReadSByte("GO Transport Seat", index);

                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                packet.ParseBitStream(goTransportGuid, 4, 3);

                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ParseBitStream(goTransportGuid, 7, 6, 5, 0);
                moveInfo.TransportOffset.Z = packet.ReadSingle();
                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadUInt32("GO Transport Time", index);
                moveInfo.TransportOffset.O = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 1);
                moveInfo.TransportOffset.Y = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 2);

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (hasVehicleData)
            {
                // need update
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 1, 3, 5, 4, 7, 6, 2, 0);
                packet.WriteGuid("Attacking GUID", attackingTargetGuid, index);
            }

            if (hasGameObjectRotation)
            {
                packet.ReadPackedQuaternion("GameObject Rotation", index);
            }

            if (hasAnimKits)
            {
                // need update
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.X = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Position.Y = packet.ReadSingle();
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                packet.WriteLine("[{0}] Stationary Position: {1}", index, moveInfo.Position);
            }

            if (transport)
            {
                // need update
            }

            if (living && moveInfo.HasSplineData && hasFullSpline && splineType == SplineType.FacingTarget)
            {
                var facingTargetGuid = new byte[8];
                facingTargetGuid = packet.StartBitStream(5, 0, 2, 4, 1, 3, 6, 7);
                packet.ParseBitStream(facingTargetGuid, 5, 0, 4, 6, 3, 2, 1, 7);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }

            if (byte32A)
                packet.ReadString();

            if (byte414)
                packet.ReadInt32();

            if (byte2A4)
                packet.ReadInt32();

            if (byte428)
            {
                for (uint l_I = 0; l_I < dword418; l_I++)
                    packet.ReadInt32();
            }

            return moveInfo;
        }
开发者ID:Walkum,项目名称:WowPacketParser_Skyfire,代码行数:101,代码来源:UpdateHandler.cs

示例14: ReadMovementUpdateBlock548


//.........这里部分代码省略.........
                }
            }

            if (hasGOPosition) // 424
            {
                if (hasGOTransportTime3) // 420
                    packet.ReadUInt32("GO Transport Time 3", index); // 416

                moveInfo.TransportOffset.Y = packet.ReadSingle(); // 388
                packet.ReadByte("GO Transport Seat", index); // 400
                moveInfo.TransportOffset.X = packet.ReadSingle(); // 384
                packet.ReadXORByte(goTransportGuid, 2); // 378
                packet.ReadXORByte(goTransportGuid, 4); // 380
                packet.ReadXORByte(goTransportGuid, 1); // 377

                if (hasGOTransportTime2) // 412
                    packet.ReadUInt32("GO Transport Time 2", index); // 408

                packet.ReadUInt32("GO Transport Time", index); // 404

                moveInfo.TransportOffset.O = packet.ReadSingle(); // 396
                moveInfo.TransportOffset.Z = packet.ReadSingle(); // 392
                packet.ReadXORByte(goTransportGuid, 6); // 382
                packet.ReadXORByte(goTransportGuid, 0); // 376
                packet.ReadXORByte(goTransportGuid, 5); // 381
                packet.ReadXORByte(goTransportGuid, 3); // 379
                packet.ReadXORByte(goTransportGuid, 7); // 383

                moveInfo.TransportGuid = new WowGuid64(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (hasTarget) // 464
            {
                packet.ParseBitStream(targetGuid, 7, 1, 5, 2, 6, 3, 0, 4);  // 456
                packet.WriteGuid("Target GUID", targetGuid, index);
            }

            if (hasVehicle) // 488
            {
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index); // 480
                packet.ReadSingle("Vehicle Orientation", index); // 484
            }

            if (hasStationaryPosition) // 448
            {
                moveInfo.Position.Y = packet.ReadSingle("Stationary Y", index); // 436
                moveInfo.Position.Z = packet.ReadSingle("Stationary Z", index); // 440
                moveInfo.Orientation = packet.ReadSingle("Stationary O", index); // 444
                moveInfo.Position.X = packet.ReadSingle("Stationary X", index); // 432
            }

            if (hasUnk1) // 676
                packet.ReadInt32("unk672", index); // 672

            if (hasAnimKits) // 498
            {
                if (hasAnimKit1) // 492
                    packet.ReadUInt16("AnimKit1", index); // 492
                if (hasAnimKit3) // 496
                    packet.ReadUInt16("AnimKit3", index); // 496
                if (hasAnimKit2) // 494
                    packet.ReadUInt16("AnimKit2", index); // 494
            }

            if (hasUnk2) // 810
                packet.ReadWoWString("Str", Unk2Count, index);

            if (hasUnk6) // 476
                packet.ReadInt32("unk472", index); // 472

            if (hasUnk9) // 1064
                for (var i = 0; i < Unk9Count; i++) // 1048
                    packet.ReadInt32("unk1052", index, i); // 1052

            if (hasGobjectRotation) // 512
                moveInfo.Rotation = packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasUnk4) // 1044
                packet.ReadInt32("unk1040", index); // 1040

            if (hasLiving) // 368
                if (moveInfo.HasSplineData) // 344
                    if (bit336) // 336
                        if (splineType == SplineType.FacingTarget)
                        {
                            packet.ResetBitReader();
                            SplineFacingTargetGuid = packet.StartBitStream(4, 7, 0, 5, 1, 2, 3, 6);
                            packet.ParseBitStream(SplineFacingTargetGuid, 4, 2, 0, 5, 6, 3, 1, 7);
                            packet.WriteGuid("Spline Facing Target GUID", SplineFacingTargetGuid, index);
                        }

            /* Don't know why this is commented out. Check IDA
            if (hasLiving && hasSpline)
                Movement::PacketBuilder::WriteFacingTargetPart(*ToUnit()->movespline, *data);
            */

            return moveInfo;
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs

示例15: ReadMovementUpdateBlock434


//.........这里部分代码省略.........
                moveInfo.Position.Y = packet.ReadSingle();
                packet.ReadXORByte(guid2, 7);
                packet.ReadXORByte(guid2, 1);
                packet.ReadXORByte(guid2, 2);

                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index) / 2.5f;
                if (hasTimestamp)
                    packet.ReadUInt32("Time", index);

                packet.ReadSingle("FlyBack Speed", index);
                packet.ReadXORByte(guid2, 6);

                packet.ReadSingle("Turn Speed", index);
                if (hasOrientation)
                    moveInfo.Orientation = packet.ReadSingle();

                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f;
                if (hasPitch)
                    packet.ReadSingle("Pitch", index);

                packet.ReadSingle("Fly Speed", index);

                packet.WriteGuid("GUID 2", guid2);
                packet.AddValue("Position", moveInfo.Position, index);
                packet.AddValue("Orientation", moveInfo.Orientation, index);
            }

            if (hasVehicleData)
            {
                packet.ReadSingle("Vehicle Orientation", index);
                moveInfo.VehicleId = packet.ReadUInt32("Vehicle Id", index);
            }

            if (hasGameObjectPosition)
            {
                packet.ReadXORByte(goTransportGuid, 0);
                packet.ReadXORByte(goTransportGuid, 5);
                if (hasGOTransportTime3)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ReadXORByte(goTransportGuid, 3);

                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 4);
                packet.ReadXORByte(goTransportGuid, 6);
                packet.ReadXORByte(goTransportGuid, 1);

                packet.ReadSingle("GO Transport Time", index);
                moveInfo.TransportOffset.Y = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 2);
                packet.ReadXORByte(goTransportGuid, 7);

                moveInfo.TransportOffset.Z = packet.ReadSingle();
                packet.ReadByte("GO Transport Seat", index);
                moveInfo.TransportOffset.O = packet.ReadSingle();
                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                moveInfo.TransportGuid = new WowGuid64(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.AddValue("GO Transport GUID", moveInfo.TransportGuid, index);
                packet.AddValue("GO Transport Position", moveInfo.TransportOffset, index);
            }

            if (hasGameObjectRotation)
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (bit456)
            {
                // float[] arr = new float[16];
                // ordering: 13, 4, 7, 15, BYTE, 10, 11, 3, 5, 14, 6, 1, 8, 12, 0, 2, 9
                packet.ReadBytes(4 * 16 + 1);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                moveInfo.Position = packet.ReadVector3("Stationary Position", index);
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 4, 0, 3, 5, 7, 6, 2, 1);
                packet.WriteGuid("Attacking Target GUID", attackingTargetGuid, index);
            }

            if (hasAnimKits)
            {
                if (hasAnimKit1)
                    packet.ReadUInt16("AI Anim Kit Id", index);
                if (hasAnimKit2)
                    packet.ReadUInt16("Movement Anim Kit Id", index);
                if (hasAnimKit3)
                    packet.ReadUInt16("Melee Anim Kit Id", index);
            }

            if (transport)
                packet.ReadUInt32("Transport path timer", index);

            return moveInfo;
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:101,代码来源:UpdateHandler.cs


注:本文中的WowPacketParser.Misc.Packet.ReadPackedQuaternion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。