private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            var guid1 = new byte[8];
            var transportGuid = new byte[8];
            var goTransportGuid = new byte[8];
            var attackingTargetGuid = new byte[8];
            var guid5 = new byte[8];
            var guid6 = new byte[8];
            var guid7 = new byte[8];

            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var hasFullSpline = false;
            var hasSplineStartTime = false;
            var hasSplineVerticalAcceleration = false;
            var hasMovementFlags = false;
            var hasMoveFlagsExtra = false;
            var hasTimestamp = false;
            var hasOrientation = false;
            var hasTransportData = false;
            var hasTransportTime2 = false;
            var hasTransportTime3 = false;
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var hasPitch = false;
            var hasFallData = false;
            var hasFallDirection = false;
            var hasSplineElevation = false;

            var bit134 = false;
            var bitA8 = false;
            var bit23C = false;
            var bit298 = false;
            var bit230 = false;
            var bit284 = false;
            var bit228 = false;
            var bit258 = false;
            var bit218 = false;
            var bit220 = false;

            var bits168 = 0u;
            var splineCount = 0u;
            var bits138 = 0u;
            var bits98 = 0u;
            var bits25C = 0u;
            var bits26C = 0u;
            var bits288 = 0u;
            var bits418 = 0u;
            var bits2AA = 0u;
            var splineType = SplineType.Stop;

            var bit2A4 = packet.ReadBit(); // 676
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index); // 488
            var bit414 = packet.ReadBit(); // 1044
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index); // 512
            packet.ReadBit(); // fake 0
            var isLiving = packet.ReadBit("Is Living", index); // 368
            var hasSceneObjectData = packet.ReadBit("Has Scene Object Data", index); // 1032
            packet.ReadBit(); // fake 2
            var bit29C = packet.ReadBit(); // 668
            var bit2A8 = packet.ReadBit(); // 680
            var bit2A9 = packet.ReadBit(); // 681
            packet.ReadBit(); // fake 1
            var hasTransportPosition = packet.ReadBit("Has Transport Position", index); // 424
            var bit1DC = packet.ReadBit(); // 476
            var hasAnimKits = packet.ReadBit("Has Anim Kits", index); // 498
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index); // 448
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index); // 464
            packet.ReadBit(); // fake 3
            var transportFrames = packet.ReadBits("Transport Frames Count", 22, index); // 1068
            var bit32A = packet.ReadBit(); // 810
            var bit428 = packet.ReadBit(); // 1064

            if (bit428)
                bits418 = packet.ReadBits(22);

            if (hasTransportPosition)
            {
                packet.StartBitStream(goTransportGuid, 3, 5, 2, 1, 4);
                hasGOTransportTime3 = packet.ReadBit();
                hasGOTransportTime2 = packet.ReadBit();
                packet.StartBitStream(goTransportGuid, 0, 6, 7);
            }

            if (isLiving)
            {
                hasTransportData = packet.ReadBit("Has Transport Data", index);
                if (hasTransportData)
                {
                    transportGuid[4] = packet.ReadBit();
                    transportGuid[0] = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                    transportGuid[2] = packet.ReadBit();
                    transportGuid[3] = packet.ReadBit();
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[7] = packet.ReadBit();
                    transportGuid[6] = packet.ReadBit();
                    transportGuid[1] = packet.ReadBit();
                    hasTransportTime3 = packet.ReadBit();
                }

                hasPitch = !packet.ReadBit("Has Pitch", index);
                packet.ReadBit();
                bits168 = packet.ReadBits(19);
                guid1[1] = packet.ReadBit();
                hasMoveFlagsExtra = !packet.ReadBit();
                packet.ReadBit();
                hasSplineElevation = !packet.ReadBit("Has SplineElevation", index);

                if (hasMoveFlagsExtra)
                    moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13, index);

                hasOrientation = !packet.ReadBit();
                hasTimestamp = !packet.ReadBit();
                hasMovementFlags = !packet.ReadBit();
                bitA8 = !packet.ReadBit("bitA8", index);
                guid1[2] = packet.ReadBit();
                guid1[6] = packet.ReadBit();
                hasFallData = packet.ReadBit();
                guid1[5] = packet.ReadBit();
                guid1[4] = packet.ReadBit();
                guid1[0] = packet.ReadBit();

                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadBitsE<MovementFlag>("Movement Flags", 30, index);
                packet.ReadBit();
                if (hasFallData)
                    hasFallDirection = packet.ReadBit();
                bits98 = packet.ReadBits("bits98", 22, index);

                guid1[7] = packet.ReadBit();
                moveInfo.HasSplineData = packet.ReadBit();
                guid1[3] = packet.ReadBit();

                if (moveInfo.HasSplineData)
                {
                    hasFullSpline = packet.ReadBit();
                    if (hasFullSpline)
                    {
                        hasSplineVerticalAcceleration = packet.ReadBit();
                        packet.ReadBitsE<SplineMode>("Spline Mode", 2, index);
                        splineCount = packet.ReadBits(20);
                        packet.ReadBitsE<SplineFlag434>("Spline flags", 25, index);

                        hasSplineStartTime = packet.ReadBit();
                        bit134 = packet.ReadBit();
                        if (bit134)
                        {
                            bits138 = packet.ReadBits(21);
                            packet.ReadBits(2);
                        }
                    }
                }
            }

            if (bit29C)
            {
                bit230 = packet.ReadBit();
                bit258 = packet.ReadBit();
                packet.ReadBit("bit20E", index);
                packet.ReadBit("bit20F", index);
                bit228 = packet.ReadBit();
                packet.ReadBit("bit20C", index);
                bit218 = packet.ReadBit();
                packet.ReadBit("bit20D", index);
                bit284 = packet.ReadBit();

                if (bit284)
                {
                    bits25C = packet.ReadBits(21);
                    bits26C = packet.ReadBits(21);
                }

                bit298 = packet.ReadBit();

                if (bit298)
                    bits288 = packet.ReadBits(20);

                bit23C = packet.ReadBit();
                packet.ReadBit("bit210", index);
                bit220 = packet.ReadBit();
            }

            if (hasAttackingTarget)
                attackingTargetGuid = packet.StartBitStream(4, 6, 3, 5, 0, 2, 7, 1);

            if (hasAnimKits)
            {
                hasAnimKit1 = !packet.ReadBit();
                hasAnimKit2 = !packet.ReadBit();
                hasAnimKit3 = !packet.ReadBit();
            }

            if (bit32A)
                bits2AA = packet.ReadBits(7);

            packet.ResetBitReader();

            for (var i = 0; i < transportFrames; ++i)
                packet.ReadInt32("Transport frame", index, i);

            if (bit29C)
            {
                if (bit23C)
                {
                    packet.ReadSingle("Float234", index);
                    packet.ReadSingle("Float238", index);
                }

                if (bit284)
                {
                    for (var i = 0; i < bits26C; ++i)
                    {
                        packet.ReadSingle("Float270+0", index, i);
                        packet.ReadSingle("Float270+1", index, i);
                    }

                    packet.ReadSingle("Float27C", index);

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

                    packet.ReadSingle("Float280", index);
                }

                if (bit258)
                {
                    packet.ReadSingle("Float244", index);
                    packet.ReadSingle("Float250", index);
                    packet.ReadSingle("Float254", index);
                    packet.ReadSingle("Float248", index);
                    packet.ReadSingle("Float240", index);
                    packet.ReadSingle("Float24C", index);
                }

                packet.ReadInt32("Int208", index);

                if (bit298)
                {
                    for (var i = 0; i < bits288; ++i)
                    {
                        packet.ReadSingle("Float28C+0", index, i);
                        packet.ReadSingle("Float28C+1", index, i);
                        packet.ReadSingle("Float28C+2", index, i);
                    }
                }

                if (bit220)
                    packet.ReadInt32("int21C", index);

                if (bit218)
                    packet.ReadInt32("int214", index);

                if (bit230)
                    packet.ReadInt32("int22C", index);

                if (bit228)
                    packet.ReadInt32("int224", index);
            }

            if (isLiving)
            {
                if (hasFallData)
                {
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump Sin Angle", index);
                        packet.ReadSingle("Jump Cos Angle", index);
                        packet.ReadSingle("Jump XY Speed", index);
                    }

                    packet.ReadSingle("Jump Z Speed", index);
                    packet.ReadUInt32("Jump Fall Time", index);
                }

                if (moveInfo.HasSplineData)
                {
                    if (hasFullSpline)
                    {
                        packet.ReadSingle("Duration Mod Next", index);
                        for (uint i = 0; i < splineCount; i++)
                        {
                            Vector3 v = new Vector3();
                            v.Z = packet.ReadSingle();
                            v.Y = packet.ReadSingle();
                            v.X = packet.ReadSingle();

                            packet.AddValue("Spline", v, index);
                        }

                        var type = packet.ReadByte();
                        switch (type)
                        {
                            case 1:
                                splineType = SplineType.Normal;
                                break;
                            case 2:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 3:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 4:
                                splineType = SplineType.FacingAngle;
                                break;
                        }

                        packet.ReadSingle("Duration Mod", index);

                        //    NYI block here

                        if (splineType == SplineType.FacingSpot)
                            packet.ReadVector3("Facing spot", index);

                        if (hasSplineVerticalAcceleration)
                            packet.ReadSingle("Spline Vertical Acceleration", index);

                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);

                        packet.ReadUInt32("Spline FULL Time", index);
                        if (hasSplineStartTime)
                            packet.ReadUInt32("Spline Start time", index);

                        packet.ReadUInt32("Spline Time", index);
                    }

                    packet.ReadUInt32("Spline ID", index);
                    packet.ReadVector3("Spline Endpoint", index);
                }

                /*for (var i = 0; i < 10; ++i)
                    packet.ReadSingle("unk float");
                if (bits98 > 0)
                    packet.ReadBits((int)bits98);*/
                //for (var i = 0; i < bits98; ++i)
                //    packet.ReadInt32("Int9C", index, i);

                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Position.Y = packet.ReadSingle();
                packet.ReadSingle("Fly Speed", index);
                packet.ReadXORByte(guid1, 6);
                packet.ReadSingle("Fly Back Speed", index);

                if (hasTransportData)
                {
                    packet.ReadXORByte(transportGuid, 7);
                    packet.ReadXORByte(transportGuid, 4);

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

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

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

                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 6);
                    packet.ReadXORByte(transportGuid, 3);
                    packet.ReadXORByte(transportGuid, 2);
                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    var seat = packet.ReadSByte("Transport Seat", index);
                    packet.ReadXORByte(transportGuid, 1);
                    packet.ReadXORByte(transportGuid, 0);
                    packet.ReadXORByte(transportGuid, 5);

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

                    if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                        guid.HasEntry() && guid.GetHighType() == HighGuidType.Creature)
                    {
                        var vehicleAccessory = new VehicleTemplateAccessory
                        {
                            AccessoryEntry = guid.GetEntry(),
                            SeatId = seat
                        };

                        Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                    }
                }

                moveInfo.Position.X = packet.ReadSingle();
                packet.AddValue("Position", moveInfo.Position, index);
                packet.ReadXORByte(guid1, 2);

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

                packet.ReadSingle("Swim Speed", index);
                packet.ReadXORByte(guid1, 1);
                packet.ReadSingle("Run Back Speed", index);
                packet.ReadSingle("Swim Back Speed", index);
                packet.ReadXORByte(guid1, 5);

                if (hasSplineElevation)
                    packet.ReadSingle("Spline Elevation", index);

                if (bitA8)
                    packet.ReadInt32("IntA8", index);

                packet.ReadSingle("Turn Speed", index);
                packet.ReadXORByte(guid1, 3);
                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f;
                packet.ReadXORByte(guid1, 7);
                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index) / 2.5f;
                packet.ReadSingle("Pitch Speed", index);

                if (hasTimestamp)
                    packet.ReadUInt32("Time?", index);

                packet.ReadXORByte(guid1, 4);
                packet.ReadXORByte(guid1, 0);
                packet.WriteGuid("GUID2", guid1);

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

            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 (hasTransportPosition)
            {
                packet.ReadSByte("Transport Seat", index);
                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadXORBytes(goTransportGuid, 1, 0, 2, 6, 5, 4);

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

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

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

                packet.ReadXORByte(goTransportGuid, 3);
                packet.ReadUInt32("Transport Time", index);

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

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

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

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

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

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

            if (bit414)
                packet.ReadInt32("int410", 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 (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];
                packet.StartBitStream(facingTargetGuid, 6, 7, 3, 0, 5, 1, 4, 2);
                packet.ParseBitStream(facingTargetGuid, 4, 2, 5, 6, 0, 7, 1, 3);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }

            return moveInfo;
        }
        private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            var guid1 = new byte[8];
            var transportGuid = new byte[8];
            var goTransportGuid = new byte[8];
            var attackingTargetGuid = new byte[8];

            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var hasFullSpline = false;
            var hasSplineStartTime = false;
            var hasSplineVerticalAcceleration = false;
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var hasSplineElevation = false;
            var hasMovementFlags = false;
            var hasMoveFlagsExtra = false;
            var hasTimestamp = false;
            var hasOrientation = false;
            var hasTransportData = false;
            var hasTransportTime3 = false;
            var hasTransportTime2 = false;
            var hasPitch = false;
            var hasFallData = false;
            var hasFallDirection = false;

            var bit130 = false;
            var bitA0 = false;
            var bit23C = false;
            var bit298 = false;
            var bit230 = false;
            var bit284 = false;
            var bit228 = false;
            var bit258 = false;
            var bit218 = false;
            var bit220 = false;

            var bits160 = 0u;
            var splineCount = 0u;
            var bits11C = 0u;
            var bits90 = 0u;
            var bits25C = 0u;
            var bits26C = 0u;
            var bits288 = 0u;
            var bits418 = 0u;
            var bits2AA = 0u;
            SplineType splineType = SplineType.Stop;

            var bit2A9 = packet.ReadBit();
            var bit29C = packet.ReadBit();
            packet.ReadBit(); // fake 1
            var bit1DC = packet.ReadBit();
            var bit2A4 = packet.ReadBit();
            var bit2A8 = packet.ReadBit();
            packet.ReadBit(); // fake 0
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index);
            var transportFrames = packet.ReadBits("Transport Frames Count", 22, index);
            var bit414 = packet.ReadBit();
            packet.ReadBit(); // fake 3
            var bit428 = packet.ReadBit();
            var bit32A = packet.ReadBit();
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index);
            packet.ReadBit(); // fake 2
            var isLiving = packet.ReadBit("Is Living", index);
            var hasAnimKits = packet.ReadBit("Has Anim Kits", index);
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index);
            var hasGameObjectPosition = packet.ReadBit("Has GameObject Position", index);
            var hasSceneObjectData = packet.ReadBit("Has Scene Object Data", index);
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index);

            if (bit29C)
            {
                bit284 = packet.ReadBit();
                if (bit284)
                {
                    bits25C = packet.ReadBits(21);
                    bits26C = packet.ReadBits(21);
                }

                packet.ReadBit("bit20C", index);
                packet.ReadBit("bit210", index);
                bit23C = packet.ReadBit();
                bit298 = packet.ReadBit();
                packet.ReadBit("bit20F", index);
                packet.ReadBit("bit20E", index);
                bit218 = packet.ReadBit();
                bit220 = packet.ReadBit();
                if (bit298)
                    bits288 = packet.ReadBits(20);

                bit228 = packet.ReadBit();
                packet.ReadBit("bit20D", index);
                bit230 = packet.ReadBit();
                bit258 = packet.ReadBit();
            }

            if (bit428)
                bits418 = packet.ReadBits(22);

            if (isLiving)
            {
                guid1[4] = packet.ReadBit();
                guid1[1] = packet.ReadBit();
                bits160 = packet.ReadBits(19);
                for (var i = 0; i < bits160; ++i)
                    packet.ReadBits("bits164", 2, index, i);

                guid1[5] = packet.ReadBit();
                hasOrientation = !packet.ReadBit();
                guid1[7] = packet.ReadBit();
                bits90 = packet.ReadBits(22);
                moveInfo.HasSplineData = packet.ReadBit();
                hasSplineElevation = !packet.ReadBit();
                if (moveInfo.HasSplineData)
                {
                    hasFullSpline = packet.ReadBit();
                    if (hasFullSpline)
                    {
                        bit130 = packet.ReadBit();
                        hasSplineVerticalAcceleration = packet.ReadBit("has Spline Vertical Acceleration", index);
                        packet.ReadBitsE<SplineMode>("Spline Mode", 2, index);
                        if (bit130)
                        {
                            bits11C = packet.ReadBits(21);
                            packet.ReadBits("bits12C", 2, index);
                        }
                        packet.ReadBitsE<SplineFlag434>("Spline flags", 25, index);
                        hasSplineStartTime = packet.ReadBit("Has Spline Start Time", index);
                        splineCount = packet.ReadBits("SplineWaypointsCount", 20, index);
                    }
                }

                bitA0 = !packet.ReadBit();
                guid1[3] = packet.ReadBit();
                packet.ReadBit("bitA4", index);
                hasMovementFlags = !packet.ReadBit();
                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadBitsE<MovementFlag>("Movement Flags", 30, index);

                packet.ReadBit("bit8C", index);
                packet.ReadBit("bit8D", index);
                guid1[2] = packet.ReadBit();
                hasTimestamp = !packet.ReadBit();
                guid1[0] = packet.ReadBit();
                hasTransportData = packet.ReadBit();
                if (hasTransportData)
                {
                    packet.StartBitStream(transportGuid, 4, 7, 3, 1, 6);
                    hasTransportTime2 = packet.ReadBit();
                    packet.StartBitStream(transportGuid, 2, 0, 5);
                    hasTransportTime3 = packet.ReadBit();
                }

                guid1[6] = packet.ReadBit();
                hasFallData = packet.ReadBit();
                if (hasFallData)
                    hasFallDirection = packet.ReadBit();

                hasMoveFlagsExtra = !packet.ReadBit();
                hasPitch = !packet.ReadBit();
                if (hasMoveFlagsExtra)
                    moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13, index);
            }

            if (hasGameObjectPosition)
            {
                packet.StartBitStream(goTransportGuid, 0, 7);
                hasGOTransportTime3 = packet.ReadBit();
                goTransportGuid[1] = packet.ReadBit();
                hasGOTransportTime2 = packet.ReadBit();
                packet.StartBitStream(goTransportGuid, 6, 5, 4, 3, 2);
            }

            if (bit32A)
                bits2AA = packet.ReadBits(7);

            if (hasAttackingTarget)
                packet.StartBitStream(attackingTargetGuid, 5, 4, 6, 0, 1, 7, 2, 3);

            // Sceneobject data
            var CreatorGUID = new byte[8];
            byte[][] guid358 = null;
            byte[][][] guid358_6 = null;
            uint[] bits358_10 = null;
            uint[][] bits358_6_84 = null;
            uint[][] bits358_6_94 = null;
            uint[][] bits358_6_31 = null;
            uint[][] bits358_6_74 = null;
            byte[][][] bit358_6_78_9 = null;
            byte[][][] bit358_6_88_10 = null;
            bool[][][] bit358_6_88_C = null;
            bool[][][] bit358_6_88_8 = null;
            bool[][] bit358_6_2E = null;
            bool[][] bit358_6_30 = null;
            bool[] bit358_20 = null;
            bool[] bit358_C = null;
            bool[] bit358_24 = null;

            var bit338 = false;
            var bit330 = false;
            var bit341 = false;
            var bit340 = false;
            var bit332 = false;
            var bit33C = false;

            uint[] bits388 = null;
            uint[] bits388_10 = null;
            byte[][] bit388_1_10 = null;
            bool[][] bit388_1_C = null;
            bool[][] bit388_1_8 = null;

            if (hasSceneObjectData)
            {
                guid358 = new byte[2][];
                guid358_6 = new byte[2][][];
                bits358_10 = new uint[2];
                bits358_6_84 = new uint[2][];
                bits358_6_94 = new uint[2][];
                bits358_6_31 = new uint[2][];
                bits358_6_74 = new uint[2][];
                bit358_6_78_9 = new byte[2][][];
                bit358_6_88_10 = new byte[2][][];
                bit358_6_88_C = new bool[2][][];
                bit358_6_88_8 = new bool[2][][];
                bit358_6_2E = new bool[2][];
                bit358_6_30 = new bool[2][];
                bit358_20 = new bool[2];
                bit358_C = new bool[2];
                bit358_24 = new bool[2];

                for (var i = 0; i < 2; ++i)
                {
                    guid358[i] = new byte[8];
                    packet.StartBitStream(guid358[i], 3, 4, 1, 0);
                    bits358_10[i] = packet.ReadBits(2);
                    bit358_20[i] = !packet.ReadBit();

                    guid358_6[i] = new byte[bits358_10[i]][];
                    bits358_6_84[i] = new uint[bits358_10[i]];
                    bits358_6_94[i] = new uint[bits358_10[i]];
                    bits358_6_31[i] = new uint[bits358_10[i]];
                    bits358_6_74[i] = new uint[bits358_10[i]];
                    bit358_6_78_9[i] = new byte[bits358_10[i]][];
                    bit358_6_88_10[i] = new byte[bits358_10[i]][];
                    bit358_6_88_C[i] = new bool[bits358_10[i]][];
                    bit358_6_88_8[i] = new bool[bits358_10[i]][];
                    bit358_6_2E[i] = new bool[bits358_10[i]];
                    bit358_6_30[i] = new bool[bits358_10[i]];

                    for (var j = 0; j < bits358_10[i]; ++j)
                    {
                        guid358_6[i][j] = new byte[8];
                        bits358_6_84[i][j] = packet.ReadBits(21);

                        bit358_6_88_8[i][j] = new bool[bits358_6_84[i][j]];
                        bit358_6_88_C[i][j] = new bool[bits358_6_84[i][j]];
                        bit358_6_88_10[i][j] = new byte[bits358_6_84[i][j]];
                        for (var k = 0; k < bits358_6_84[i][j]; ++k)
                        {
                            bit358_6_88_10[i][j][k] = (byte)(10 - packet.ReadBit());
                            bit358_6_88_C[i][j][k] = !packet.ReadBit();
                            bit358_6_88_8[i][j][k] = !packet.ReadBit();
                        }

                        packet.StartBitStream(guid358_6[i][j], 5, 3, 4, 1, 0, 6, 7);
                        bits358_6_31[i][j] = packet.ReadBits(7);
                        guid358_6[i][j][2] = packet.ReadBit();
                        bit358_6_2E[i][j] = !packet.ReadBit();
                        bits358_6_74[i][j] = packet.ReadBits(20);

                        bit358_6_78_9[i][j] = new byte[bits358_6_74[i][j]];
                        for (var k = 0; k < bits358_6_74[i][j]; ++k)
                            bit358_6_78_9[i][j][k] = (byte)(10 - packet.ReadBit());

                        bit358_6_30[i][j] = packet.ReadBit();
                        bits358_6_94[i][j] = packet.ReadBits(21);
                    }

                    guid358[i][6] = packet.ReadBit();
                    bit358_C[i] = !packet.ReadBit();
                    packet.StartBitStream(guid358[i], 2, 5);
                    bit358_24[i] = !packet.ReadBit();
                    guid358[i][7] = packet.ReadBit();
                }

                bit330 = !packet.ReadBit();
                bit340 = !packet.ReadBit();

                bits388 = new uint[3];
                bits388_10 = new uint[3];
                bit388_1_10 = new byte[3][];
                bit388_1_C = new bool[3][];
                bit388_1_8 = new bool[3][];

                for (var i = 0; i < 3; ++i)
                {
                    bits388_10[i] = packet.ReadBits(21);
                    bits388[i] = packet.ReadBits(21);
                    bit388_1_10[i] = new byte[bits388[i]];
                    bit388_1_C[i] = new bool[bits388[i]];
                    bit388_1_8[i] = new bool[bits388[i]];

                    for (var j = 0; j < bits388[i]; ++j)
                    {
                        bit388_1_8[i][j] = !packet.ReadBit();
                        bit388_1_10[i][j] = (byte)(10 - packet.ReadBit());
                        bit388_1_C[i][j] = !packet.ReadBit();
                    }
                }

                bit33C = !packet.ReadBit();
                bit341 = !packet.ReadBit();
                bit338 = !packet.ReadBit();
                bit332 = !packet.ReadBit();
                packet.ReadBit(); // fake bit
                packet.ReadBit("bit351", index);
                packet.ReadBit("bit350", index);
                packet.StartBitStream(CreatorGUID, 2, 7, 0, 5, 1, 3, 6, 4);
            }

            if (hasAnimKits)
            {
                hasAnimKit3 = !packet.ReadBit();
                hasAnimKit1 = !packet.ReadBit();
                hasAnimKit2 = !packet.ReadBit();
            }

            packet.ResetBitReader();

            for (var i = 0; i < transportFrames; ++i)
                packet.ReadInt32("Transport frame", index, i);

            if (hasSceneObjectData)
            {
                for (var i = 0; i < 2; ++i)
                {
                    for (var j = 0; j < bits358_10[i]; ++j)
                    {
                        for (var k = 0; k < bits358_6_74[i][j]; ++k)
                        {
                            packet.ReadInt32("int358+6+78+0", index, i, j, k);
                            packet.ReadInt16("short358+6+78+3", index, i, j, k);
                            packet.ReadByte("byte358+6+78+8", index, i, j, k);
                            packet.ReadInt16("short358+6+78+2", index, i, j, k);
                            if (bit358_6_78_9[i][j][k] != 9)
                                packet.ReadByte("byte358+6+78+9", index, i, j, k);
                        }

                        packet.ReadXORByte(guid358_6[i][j], 6);
                        for (var k = 0; k < bits358_6_84[i][j]; ++k)
                        {
                            packet.ReadInt32("int358+6+88+4", index, i, j, k);
                            packet.ReadInt32("int358+6+88+0", index, i, j, k);
                            if (bit358_6_88_8[i][j][k])
                                packet.ReadInt32("int358+6+88+8", index, i, j, k);

                            if (bit358_6_88_C[i][j][k])
                                packet.ReadInt32("int358+6+88+C", index, i, j, k);

                            if (bit358_6_88_10[i][j][k] != 9)
                                packet.ReadByte("byte358+6+88+10", index, i, j, k);
                        }

                        packet.ReadInt32("int358+6+28", index, i, j);
                        packet.ReadXORBytes(guid358_6[i][j], 5, 3);
                        packet.ReadInt32("int358+6+24", index, i, j);
                        packet.ReadXORByte(guid358_6[i][j], 1);
                        packet.ReadInt32("Int358+6+8", index, i, j);
                        packet.ReadInt16("short358+6+2C", index, i, j);
                        packet.ReadInt32("int358+6+C", index, i, j);
                        if (!bit358_6_30[i][j])
                            packet.ReadByte("byte358+6+30", index, i, j);

                        for (var k = 0; k < bits358_6_94[i][j]; ++k)
                        {
                            packet.ReadInt32("int358+6+98+4", index, i, j, k);
                            packet.ReadInt32("int358+6+98+0", index, i, j, k);
                        }

                        packet.ReadXORByte(guid358_6[i][j], 0);
                        packet.ReadWoWString("String358+6+31", (int)bits358_6_31[i][j], index, i, j);
                        packet.ReadInt32("int358+6+10", index, i, j);
                        packet.ReadInt16("short358+6+16", index, i, j);
                        packet.ReadInt16("short358+6+14", index, i, j);
                        packet.ReadXORByte(guid358_6[i][j], 2);
                        packet.ReadInt32("int358+6+18", index, i, j);
                        packet.ReadXORByte(guid358_6[i][j], 4);

                        if (bit358_6_2E[i][j])
                            packet.ReadInt16("short358+6+2E", index, i, j);

                        packet.ReadInt32("int358+6+1C", index, i, j);
                        packet.ReadInt32("int358+6+20", index, i, j);
                        packet.ReadXORByte(guid358_6[i][j], 7);

                        packet.WriteGuid("Guid 358_6", guid358_6[i][j], index, i, j);
                    }

                    packet.ReadXORBytes(guid358[i], 0, 7);
                    packet.ReadByte("byte358+25", index, i);
                    if (bit358_24[i])
                        packet.ReadInt32("int358+C", index, i);

                    packet.ReadXORBytes(guid358[i], 5, 4);
                    if (!bit358_20[i])
                        packet.ReadByte("byte358+24", index, i);

                    if (bit358_C[i])
                        packet.ReadInt16("Short358+10", index, i);

                    packet.ReadXORBytes(guid358[i], 1, 2, 3, 6);
                    packet.ReadInt32("int358+8", index, i);
                    packet.WriteGuid("Guid358", guid358[i], index, i);
                }

                for (var i = 0; i < 3; ++i)
                {
                    for (var j = 0; j < bits388_10[i]; ++j)
                    {
                        packet.ReadInt32("int388+6+4", index, i, j);
                        packet.ReadInt32("int388+6+0", index, i, j);
                    }

                    for (var j = 0; j < bits388[i]; ++j)
                    {
                        packet.ReadInt32("int388+1+0", index, i, j);
                        if (bit388_1_C[i][j])
                            packet.ReadInt32("int388+1+C", index, i, j);

                        if (bit388_1_8[i][j])
                            packet.ReadInt32("int388+1+8", index, i, j);

                        if (bit388_1_10[i][j] != 9)
                            packet.ReadByte("byte388+1+10", index, i, j);

                        packet.ReadInt32("int388+1+4", index, i, j);
                    }
                }

                if (bit338)
                    packet.ReadInt32("Int338", index);
                packet.ParseBitStream(CreatorGUID, 3, 5, 4, 2, 7, 6, 0, 1);

                if (bit33C)
                    packet.ReadInt32("Int33C", index);

                if (bit341)
                    packet.ReadByte("Byte341", index);

                if (bit340)
                    packet.ReadByte("Byte340", index);

                packet.ReadInt32("Int334", index);
                if (bit332)
                    packet.ReadInt16("Short332", index);

                if (bit330)
                    packet.ReadInt16("Short318", index);

                packet.WriteGuid("Creator GUID", CreatorGUID, index);
            }

            if (bit29C)
            {
                if (bit258)
                {
                    packet.ReadSingle("Float250", index);
                    packet.ReadSingle("Float254", index);
                    packet.ReadSingle("Float248", index);
                    packet.ReadSingle("Float24C", index);
                    packet.ReadSingle("Float240", index);
                    packet.ReadSingle("Float244", index);
                }

                if (bit284)
                {
                    packet.ReadSingle("Float280", index);
                    for (var i = 0; i < bits26C; ++i)
                    {
                        packet.ReadSingle("Float270+1", index, i);
                        packet.ReadSingle("Float270+0", index, i);
                    }

                    packet.ReadSingle("Float27C", index);
                    for (var i = 0; i < bits25C; ++i)
                    {
                        packet.ReadSingle("Float260+0", index, i);
                        packet.ReadSingle("Float260+1", index, i);
                    }
                }

                if (bit230)
                    packet.ReadInt32("int22C", index);

                if (bit220)
                    packet.ReadInt32("int21C", index);

                if (bit23C)
                {
                    packet.ReadSingle("Float238", index);
                    packet.ReadSingle("Float234", index);
                }

                if (bit298)
                {
                    for (var i = 0; i < bits288; ++i)
                    {
                        packet.ReadSingle("Float28C+0", index, i);
                        packet.ReadSingle("Float28C+2", index, i);
                        packet.ReadSingle("Float28C+1", index, i);
                    }
                }

                packet.ReadInt32("Int208", index);
                if (bit228)
                    packet.ReadInt32("int224", index);

                if (bit218)
                    packet.ReadInt32("int214", index);
            }

            if (isLiving)
            {
                moveInfo.Position.Y = packet.ReadSingle();
                if (moveInfo.HasSplineData)
                {
                    if (hasFullSpline)
                    {
                        for (var i = 0u; i < splineCount; ++i)
                        {
                            var wp = new Vector3
                            {
                                Z = packet.ReadSingle(),
                                X = packet.ReadSingle(),
                                Y = packet.ReadSingle()
                            };

                            packet.AddValue("Spline Waypoint", wp, index, i);
                        }

                        packet.ReadInt32("Spline Time", index); // if need swap with "Spline Full Time"
                        if (hasSplineVerticalAcceleration)
                            packet.ReadSingle("Spline Vertical Acceleration", index);

                        if (bit130)
                        {
                            for (var i = 0; i < bits11C; ++i)
                            {
                                packet.ReadSingle("Float13C+1", index, i);
                                packet.ReadSingle("Float13C+0", index, i);
                            }
                        }

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

                        if (hasSplineStartTime)
                            packet.ReadInt32("Spline Start Time", index);

                        var type = packet.ReadByte();
                        switch (type)
                        {
                            case 1:
                                splineType = SplineType.Normal;
                                break;
                            case 2:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 3:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 4:
                                splineType = SplineType.FacingAngle;
                                break;
                        }

                        packet.ReadSingle("Spline Duration Multiplier", index); // if need swap with "Spline Duration Multiplier Next"
                        packet.ReadSingle("Spline Duration Multiplier Next", index);

                        if (splineType == SplineType.FacingSpot)
                        {
                            var point = new Vector3
                            {
                                Y = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                X = packet.ReadSingle()
                            };

                            packet.AddValue("Facing Spot", point, index);
                        }

                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);
                    }

                    moveInfo.Position.Y = packet.ReadSingle();
                    moveInfo.Position.Z = packet.ReadSingle();
                    moveInfo.Position.X = packet.ReadSingle();
                    packet.ReadInt32("Spline Id", index);
                }

                packet.ReadSingle("FloatBC", index);
                packet.ReadSingle("FloatAC", index);
                packet.ReadXORByte(guid1, 4);
                packet.ReadSingle("FloatA8", index);

                if (hasFallData)
                {
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump Velocity", index);
                        packet.ReadSingle("Jump Sin", index);
                        packet.ReadSingle("Jump Cos", index);
                    }

                    packet.ReadUInt32("Time Fallen", index);
                    packet.ReadSingle("Fall Start Velocity", index);
                }

                if (hasTransportData)
                {
                    packet.ReadXORByte(transportGuid, 5);
                    var seat = packet.ReadByte("Transport Seat", index);
                    packet.ReadXORByte(transportGuid, 2);
                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    packet.ReadXORBytes(transportGuid, 4, 7);
                    if (hasTransportTime2)
                        packet.ReadUInt32("Transport Time 2", index);

                    packet.ReadUInt32("Transport Time", index);
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    packet.ReadXORBytes(transportGuid, 3, 6);
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 0);
                    if (hasTransportTime3)
                        packet.ReadUInt32("Transport Time 3", index);
                    packet.ReadXORByte(transportGuid, 1);
                    moveInfo.TransportOffset.Z = packet.ReadSingle();

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

                    if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                        guid.HasEntry() && guid.GetHighType() == HighGuidType.Creature)
                    {
                        var vehicleAccessory = new VehicleTemplateAccessory();
                        vehicleAccessory.AccessoryEntry = guid.GetEntry();
                        vehicleAccessory.SeatId = seat;
                        Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                    }
                }

                packet.ReadXORByte(guid1, 5);

                if (hasTimestamp)
                    packet.ReadUInt32("Time", index);

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

                if (bitA0)
                    packet.ReadInt32("Int98", index);

                packet.ReadXORByte(guid1, 1);
                packet.ReadSingle("FloatB0", index);
                packet.ReadSingle("FloatC0", index);
                packet.ReadXORByte(guid1, 6);
                packet.ReadSingle("FloatC4", index);

                for (var i = 0; i < bits160; ++i)
                {
                    packet.ReadSingle("Float16C+3", index, i);
                    packet.ReadSingle("Float16C+5", index, i);
                    packet.ReadSingle("Float16C+1", index, i);
                    packet.ReadInt32("Int16C+0", index, i);
                    packet.ReadInt32("Int16C+4", index, i);
                    packet.ReadSingle("Float16C+2", index, i);
                }

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

                packet.ReadSingle("FloatC8", index);
                packet.ReadSingle("FloatB4", index);
                if (hasSplineElevation)
                    packet.ReadSingle("Spline Elevation", index);

                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;
        }
        public static void HandleMonsterMove(Packet packet)
        {
            WowGuid guid = packet.ReadPackedGuid("GUID");

            if (Storage.Objects != null && Storage.Objects.ContainsKey(guid))
            {
                WoWObject obj = Storage.Objects[guid].Item1;
                UpdateField uf;
                if (obj.UpdateFields != null && obj.UpdateFields.TryGetValue(UpdateFields.GetUpdateField(UnitField.UNIT_FIELD_FLAGS), out uf))
                    if ((uf.UInt32Value & (uint)UnitFlags.IsInCombat) == 0) // movement could be because of aggro so ignore that
                        obj.Movement.HasWpsOrRandMov = true;
            }

            if (packet.Opcode == Opcodes.GetOpcode(Opcode.SMSG_MONSTER_MOVE_TRANSPORT, Direction.ServerToClient))
            {
                WowGuid transportGuid = packet.ReadPackedGuid("Transport GUID");

                int seat = -1;
                if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_0_9767)) // no idea when this was added exactly
                    seat = packet.ReadByte("Transport Seat");

                if (transportGuid.HasEntry() && transportGuid.GetHighType() == HighGuidType.Vehicle &&
                    guid.HasEntry() && guid.GetHighType() == HighGuidType.Creature)
                {
                    VehicleTemplateAccessory vehicleAccessory = new VehicleTemplateAccessory
                    {
                        Entry = transportGuid.GetEntry(),
                        AccessoryEntry = guid.GetEntry(),
                        SeatId = seat
                    };
                    Storage.VehicleTemplateAccessorys.Add(vehicleAccessory, packet.TimeSpan);
                }
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_0_9767)) // no idea when this was added exactly
                packet.ReadBool("Toggle AnimTierInTrans");

            var pos = packet.ReadVector3("Position");

            packet.ReadInt32("Move Ticks");

            var type = packet.ReadByteE<SplineType>("Spline Type");

            switch (type)
            {
                case SplineType.FacingSpot:
                {
                    packet.ReadVector3("Facing Spot");
                    break;
                }
                case SplineType.FacingTarget:
                {
                    packet.ReadGuid("Facing GUID");
                    break;
                }
                case SplineType.FacingAngle:
                {
                    packet.ReadSingle("Facing Angle");
                    break;
                }
                case SplineType.Stop:
                    return;
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_1_0_16309))
            {
                // Not the best way
                ReadSplineMovement510(packet, pos);
                return;
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
            {
                // Not the best way
                ReadSplineMovement422(packet, pos);
                return;
            }

            var flags = packet.ReadInt32E<SplineFlag>("Spline Flags");

            if (flags.HasAnyFlag(SplineFlag.AnimationTier))
            {
                packet.ReadByteE<MovementAnimationState>("Animation State");
                packet.ReadInt32("Async-time in ms");
            }

            packet.ReadInt32("Move Time");

            if (flags.HasAnyFlag(SplineFlag.Trajectory))
            {
                packet.ReadSingle("Vertical Speed");
                packet.ReadInt32("Async-time in ms");
            }

            var waypoints = packet.ReadInt32("Waypoints");

            if (flags.HasAnyFlag(SplineFlag.Flying | SplineFlag.CatmullRom))
            {
                for (var i = 0; i < waypoints; i++)
                    packet.ReadVector3("Waypoint", i);
            }
            else
            {
                var newpos = packet.ReadVector3("Waypoint Endpoint");

                Vector3 mid = (pos + newpos) * 0.5f;

                for (var i = 1; i < waypoints; i++)
                {
                    var vec = packet.ReadPackedVector3();
                    vec = mid - vec;
                    packet.AddValue("Waypoint", vec, i);
                }
            }
        }
        private static MovementInfo ReadMovementUpdateBlock434(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            // bits
            /*var bit3 =*/
            packet.ReadBit();
            /*var bit4 =*/
            packet.ReadBit();
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index);
            var hasAnimKits = packet.ReadBit("Has AnimKits", index);
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index);
            packet.ReadBit("Self", index);
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index);
            var living = packet.ReadBit("Living", index);
            var unkLoopCounter = packet.ReadBits("Unknown array size", 24, index);
            /*var bit1 =*/
            packet.ReadBit();
            var hasGameObjectPosition = packet.ReadBit("Has GameObject Position", index);
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index);
            var bit456 = packet.ReadBit();
            /*var bit2 =*/
            packet.ReadBit();
            var transport = packet.ReadBit("Transport", index);
            var hasOrientation = false;
            var guid2 = new byte[8];
            var hasPitch = false;
            var hasFallData = false;
            var hasSplineElevation = false;
            var hasTransportData = false;
            var hasTimestamp = false;
            var transportGuid = new byte[8];
            var hasTransportTime2 = false;
            var hasTransportTime3 = false;
            var bit216 = false;
            var hasSplineStartTime = false;
            var splineCount = 0u;
            var splineType = SplineType.Stop;
            var facingTargetGuid = new byte[8];
            var hasSplineVerticalAcceleration = false;
            var hasFallDirection = false;
            var goTransportGuid = new byte[8];
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var attackingTargetGuid = new byte[8];
            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;

            if (living)
            {
                var hasMovementFlags = !packet.ReadBit();
                hasOrientation = !packet.ReadBit("Lacks orientation", index);
                guid2[7] = packet.ReadBit();
                guid2[3] = packet.ReadBit();
                guid2[2] = packet.ReadBit();
                if (hasMovementFlags)
                    moveInfo.Flags = (MovementFlag)packet.ReadBitsE<Enums.MovementFlag>("Movement Flags", 30, index);

                packet.ReadBit("Has MovementInfo spline", index);
                hasPitch = !packet.ReadBit("Lacks pitch", index);
                moveInfo.HasSplineData = packet.ReadBit("Has Spline Data", index);
                hasFallData = packet.ReadBit("Has Fall Data", index);
                hasSplineElevation = !packet.ReadBit("Lacks spline elevation", index);
                guid2[5] = packet.ReadBit();
                hasTransportData = packet.ReadBit("Has Transport Data", index);
                hasTimestamp = !packet.ReadBit("Lacks timestamp", index);
                if (hasTransportData)
                {
                    transportGuid[1] = packet.ReadBit();
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[4] = packet.ReadBit();
                    transportGuid[0] = packet.ReadBit();
                    transportGuid[6] = packet.ReadBit();
                    hasTransportTime3 = packet.ReadBit();
                    transportGuid[7] = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                    transportGuid[3] = packet.ReadBit();
                    transportGuid[2] = packet.ReadBit();
                }

                guid2[4] = packet.ReadBit();
                if (moveInfo.HasSplineData)
                {
                    bit216 = packet.ReadBit("Has extended spline data", index);
                    if (bit216)
                    {
                        /*var splineMode =*/
                        packet.ReadBitsE<SplineMode>("Spline Mode", 2, index);
                        hasSplineStartTime = packet.ReadBit("Has spline start time", index);
                        splineCount = packet.ReadBits("Spline Waypoints", 22, index);
                        var bits57 = packet.ReadBits(2);
                        switch (bits57)
                        {
                            case 0:
                                splineType = SplineType.FacingAngle;
                                break;
                            case 1:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 2:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 3:
                                splineType = SplineType.Normal;
                                break;
                        }

                        if (splineType == SplineType.FacingTarget)
                            facingTargetGuid = packet.StartBitStream(4, 3, 7, 2, 6, 1, 0, 5);

                        hasSplineVerticalAcceleration = packet.ReadBit("Has spline vertical acceleration", index);
                        packet.AddValue("Spline type", splineType, index);
                        /*splineFlags =*/
                        packet.ReadBitsE<SplineFlag434>("Spline flags", 25, index);
                    }
                }

                guid2[6] = packet.ReadBit();
                if (hasFallData)
                    hasFallDirection = packet.ReadBit("Has Fall Direction", index);

                guid2[0] = packet.ReadBit();
                guid2[1] = packet.ReadBit();
                packet.ReadBit();
                if (!packet.ReadBit())
                    moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 12, index);
            }

            if (hasGameObjectPosition)
            {
                goTransportGuid[5] = packet.ReadBit();
                hasGOTransportTime3 = packet.ReadBit();
                goTransportGuid[0] = packet.ReadBit();
                goTransportGuid[3] = packet.ReadBit();
                goTransportGuid[6] = packet.ReadBit();
                goTransportGuid[1] = packet.ReadBit();
                goTransportGuid[4] = packet.ReadBit();
                goTransportGuid[2] = packet.ReadBit();
                hasGOTransportTime2 = packet.ReadBit();
                goTransportGuid[7] = packet.ReadBit();
            }

            if (hasAttackingTarget)
                attackingTargetGuid = packet.StartBitStream(2, 7, 0, 4, 5, 6, 1, 3);

            if (hasAnimKits)
            {
                hasAnimKit1 = !packet.ReadBit();
                hasAnimKit2 = !packet.ReadBit();
                hasAnimKit3 = !packet.ReadBit();
            }

            packet.ResetBitReader();

            // Reading data
            for (var i = 0u; i < unkLoopCounter; ++i)
                packet.ReadUInt32("Unk UInt32", index, (int)i);

            if (living)
            {
                packet.ReadXORByte(guid2, 4);

                packet.ReadSingle("RunBack Speed", index);
                if (hasFallData)
                {
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump XY Speed", index);
                        packet.ReadSingle("Jump Cos", index);
                        packet.ReadSingle("Jump Sin", index);
                    }

                    packet.ReadInt32("Time Fallen", index);
                    packet.ReadSingle("Fall Z Speed", index);
                }

                packet.ReadSingle("SwimBack Speed", index);
                if (hasSplineElevation)
                    packet.ReadSingle("Spline Elevation", index);

                if (moveInfo.HasSplineData)
                {
                    if (bit216)
                    {
                        if (hasSplineVerticalAcceleration)
                            packet.ReadSingle("Spline Vertical Acceleration", index);
                        packet.ReadUInt32("Spline Time", index);
                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);
                        else if (splineType == SplineType.FacingTarget)
                        {
                            packet.ParseBitStream(facingTargetGuid, 5, 3, 7, 1, 6, 4, 2, 0);
                            packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
                        }

                        for (var i = 0u; i < splineCount; ++i)
                        {
                            var wp = new Vector3
                            {
                                Z = packet.ReadSingle(),
                                X = packet.ReadSingle(),
                                Y = packet.ReadSingle()
                            };

                            packet.AddValue("Spline Waypoint", wp, index, i);
                        }

                        if (splineType == SplineType.FacingSpot)
                        {
                            var point = new Vector3
                            {
                                X = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                Y = packet.ReadSingle()
                            };

                            packet.AddValue("Facing Spot", point, index);
                        }

                        packet.ReadSingle("Spline Duration Multiplier Next", index);
                        packet.ReadUInt32("Spline Full Time", index);
                        if (hasSplineStartTime)
                            packet.ReadUInt32("Spline Start time", index);

                        packet.ReadSingle("Spline Duration Multiplier", index);
                    }

                    var endPoint = new Vector3
                    {
                        Z = packet.ReadSingle(),
                        X = packet.ReadSingle(),
                        Y = packet.ReadSingle()
                    };

                    packet.ReadUInt32("Spline Id", index);
                    packet.AddValue("Spline Endpoint:", endPoint, index);
                }

                moveInfo.Position.Z = packet.ReadSingle();
                packet.ReadXORByte(guid2, 5);

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

                    packet.ReadUInt32("Transport Time", index);
                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    if (hasTransportTime2)
                        packet.ReadUInt32("Transport Time 2", index);

                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 3);

                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 0);

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

                    var seat = packet.ReadSByte("Transport Seat", index);
                    packet.ReadXORByte(transportGuid, 1);
                    packet.ReadXORByte(transportGuid, 6);
                    packet.ReadXORByte(transportGuid, 2);
                    packet.ReadXORByte(transportGuid, 4);
                    moveInfo.TransportGuid = new WowGuid64(BitConverter.ToUInt64(transportGuid, 0));
                    packet.AddValue("Transport GUID", moveInfo.TransportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, index);

                    if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                        guid.HasEntry() && guid.GetHighType() == HighGuidType.Creature)
                    {
                        var vehicleAccessory = new VehicleTemplateAccessory();
                        vehicleAccessory.AccessoryEntry = guid.GetEntry();
                        vehicleAccessory.SeatId = seat;
                        Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                    }
                }

                moveInfo.Position.X = packet.ReadSingle();
                packet.ReadSingle("Pitch Speed", index);
                packet.ReadXORByte(guid2, 3);
                packet.ReadXORByte(guid2, 0);

                packet.ReadSingle("Swim Speed", index);
                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;
        }
        private static MovementInfo ReadMovementUpdateBlock(ref Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            var guid1 = new byte[8];
            var transportGuid = new byte[8];
            var goTransportGuid = new byte[8];
            var attackingTargetGuid = new byte[8];
            var guid5 = new byte[8];
            var guid6 = new byte[8];
            var guid7 = new byte[8];

            var bit160 = false;
            var bit528 = false;
            var bit600 = false;
            var bit544 = false;
            var bit526 = false;
            var bit552 = false;
            var bit524 = false;
            var bit572 = false;
            var bit525 = false;
            var bit664 = false;
            var bit527 = false;
            var bit536 = false;
            var bit644 = false;
            var bit560 = false;

            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var hasFullSpline = false;
            var hasSplineStartTime = false;
            var hasSplineVerticalAcceleration = false;
            var hasMovementFlags = false;
            var hasMoveFlagsExtra = false;
            var hasTimestamp = false;
            var hasOrientation = false;
            var hasTransportData = false;
            var hasTransportTime2 = false;
            var hasTransportTime3 = false;
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var hasPitch = false;
            var hasFallData = false;
            var hasFallDirection = false;
            var hasSplineElevation = false;

            var bits168 = 0u;

            var splineCount = 0u;
            var bits138 = 0u;
            var bits98 = 0u;
            var bits25C = 0u;
            var bits26C = 0u;
            var bits288 = 0u;
            var bits418 = 0u;
            var bits2AA = 0u;
            var splineType = SplineType.Stop;

            var bit676 = packet.ReadBit("bit676", index);
            var hasAnimKits = packet.ReadBit("Has Anim Kits", index); // 498
            var isLiving = packet.ReadBit("Is Living", index); // 368
            var bit810 = packet.ReadBit("bit810", index);
            packet.ReadBit(); //fake bit
            var transportFrames = packet.ReadBits("Transport Frames Count", 22, index); // 1068
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index); // 488
            var bit1044 = packet.ReadBit("bit1044", index);
            packet.ReadBit(); //fake bit
            var bit476 = packet.ReadBit("bit476", index);
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index); // 512
            packet.ReadBit(); //fake bit
            var bit680 = packet.ReadBit("bit680", index);
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index); // 464
            var hasSceneObjectData = packet.ReadBit("Has Scene Object Data", index); // 1032
            var bit1064 = packet.ReadBit("bit1064", index);
            packet.ReadBit(); //fake bit
            var bit668 = packet.ReadBit("bit668", index);
            var hasTransportPosition = packet.ReadBit("Has Transport Position", index); // 424
            var bit681 = packet.ReadBit("bit681", index);
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index); // 448

            if (isLiving)
            {
                guid1[2] = packet.ReadBit();
                var bit140 = packet.ReadBit();
                hasPitch = !packet.ReadBit("Has Pitch", index); //104
                hasTransportData = packet.ReadBit("Has Transport Data", index); //96
                packet.ReadBit(); // 164 fake bit

                if (hasTransportData)
                {
                    transportGuid[4] = packet.ReadBit();
                    transportGuid[2] = packet.ReadBit();
                    hasTransportTime3 = packet.ReadBit();
                    transportGuid[0] = packet.ReadBit();
                    transportGuid[1] = packet.ReadBit();
                    transportGuid[3] = packet.ReadBit();
                    transportGuid[6] = packet.ReadBit();
                    transportGuid[7] = packet.ReadBit();
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                }
                hasTimestamp = !packet.ReadBit();
                guid1[6] = packet.ReadBit();
                guid1[4] = packet.ReadBit();
                guid1[3] = packet.ReadBit();
                hasOrientation = !packet.ReadBit(); //40
                bit160 = !packet.ReadBit();
                guid1[5] = packet.ReadBit();
                bits98 = packet.ReadBits("bits98", 22, index); //144
                hasMovementFlags = !packet.ReadBit();
                bits168 = packet.ReadBits(19); //352

                /*var bits356 = new uint[bits168];
                for (var i = 0; i < bits168; ++i)
                {
                    bits356[i] = packet.ReadBits(2);
                }*/

                hasFallData = packet.ReadBit(); //132

                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadEnum<MovementFlag>("Movement Flags", 30, index);

                hasSplineElevation = !packet.ReadBit("Has SplineElevation", index);//136
                moveInfo.HasSplineData = packet.ReadBit("Has SplineData", index);
                var bit141 = packet.ReadBit();
                guid1[0] = packet.ReadBit();
                guid1[7] = packet.ReadBit();
                guid1[1] = packet.ReadBit();

                if (moveInfo.HasSplineData)
                {
                    hasFullSpline = packet.ReadBit();
                    if (hasFullSpline)
                    {
                        hasSplineVerticalAcceleration = packet.ReadBit(); //260
                        hasSplineStartTime = packet.ReadBit(); //252
                        var bit304 = packet.ReadBit();

                        splineCount = packet.ReadBits(20);
                        packet.ReadEnum<SplineMode>("Spline Mode", 2, index);
                        packet.ReadEnum<SplineFlag434>("Spline flags", 25, index);

                        if (bit304)
                        {
                            bits138 = packet.ReadBits(21);
                            packet.ReadBits(2);
                        }
                    }
                }

                hasMoveFlagsExtra = !packet.ReadBit(); //20

                if (hasFallData)
                    hasFallDirection = packet.ReadBit(); //128

                if (hasMoveFlagsExtra)
                    moveInfo.FlagsExtra = packet.ReadEnum<MovementFlagExtra>("Extra Movement Flags", 13, index);

            }

            /*if (hasSceneObjectData)
            {

            }*/

            if (hasTransportPosition) //424
            {
                packet.StartBitStream(goTransportGuid, 4, 1, 0);
                hasGOTransportTime2 = packet.ReadBit(); // 420
                packet.StartBitStream(goTransportGuid, 6, 5, 3, 2, 7);
                hasGOTransportTime3 = packet.ReadBit(); // 412

            }

            if (bit668)
            {
                bit528 = packet.ReadBit();
                bit600 = packet.ReadBit();
                bit544 = packet.ReadBit();
                bit526 = packet.ReadBit();
                bit552 = packet.ReadBit();
                bit524 = packet.ReadBit();
                bit572 = packet.ReadBit();
                bit525 = packet.ReadBit();
                bit664 = packet.ReadBit();
                bit527 = packet.ReadBit();

                if (bit664)
                    bits288 = packet.ReadBits(20);

                bit536 = packet.ReadBit();
                bit644 = packet.ReadBit();
                bit560 = packet.ReadBit();

                if (bit664)
                {
                    bits25C = packet.ReadBits(21); //604
                    bits26C = packet.ReadBits(21); //624
                }
            }

            if (hasAnimKits)
            {
                hasAnimKit2 = !packet.ReadBit();
                hasAnimKit3 = !packet.ReadBit();
                hasAnimKit1 = !packet.ReadBit();
            }

            if (hasAttackingTarget)
                attackingTargetGuid = packet.StartBitStream(4, 6, 5, 2, 0, 1, 3, 7);

            if (bit1064)
                bits418 = packet.ReadBits(22);

            if (bit810)
                bits2AA = packet.ReadBits(7);

            packet.ResetBitReader();

            for (var i = 0; i < transportFrames; ++i)
                packet.ReadInt32("Transport frame", index, i);

            /*if (hasSceneObjectData)
            {
                until if ( *(_BYTE *)(v3 + 668) )
            }*/

            if (isLiving)
            {
                if (hasTransportData) //96
                {
                    packet.ReadXORByte(transportGuid, 7);
                    moveInfo.TransportOffset.X = packet.ReadSingle();

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

                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 4);
                    packet.ReadXORByte(transportGuid, 1);
                    packet.ReadXORByte(transportGuid, 3);
                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 5);

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

                    packet.ReadXORByte(transportGuid, 0);
                    var seat = packet.ReadSByte("Transport Seat", index); //72
                    packet.ReadXORByte(transportGuid, 6);
                    packet.ReadXORByte(transportGuid, 2);
                    packet.ReadUInt32("Transport Time", index); //76

                    moveInfo.TransportGuid = new WowGuid(BitConverter.ToUInt64(transportGuid, 0));
                    packet.AddValue("Transport GUID", moveInfo.TransportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, index);

                    if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                        guid.HasEntry() && guid.GetHighType() == HighGuidType.Unit)
                    {
                        var vehicleAccessory = new VehicleTemplateAccessory();
                        vehicleAccessory.AccessoryEntry = guid.GetEntry();
                        vehicleAccessory.SeatId = seat;
                        Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                    }
                }

                packet.ReadXORByte(guid1, 4);

                /*for (var i = 0; i < 10; ++i)
                    packet.ReadSingle("unk float");
                if (bits98 > 0)
                    packet.ReadBits((int)bits98);*/
                //for (var i = 0; i < bits98; ++i)
                //    packet.ReadInt32("Int9C", index, i);

                if (moveInfo.HasSplineData) //344
                {
                    if (hasFullSpline) //336
                    {
                        packet.ReadUInt32("Spline Time", index); //232
                        packet.ReadSingle("Duration Mod Next", index); //244

                        //    NYI block here
                        packet.ReadSingle("Duration Mod", index); //240

                        for (uint i = 0; i < splineCount; i++)
                        {
                            Vector3 v = new Vector3();
                            v.X = packet.ReadSingle(); //0
                            v.Z = packet.ReadSingle(); //8
                            v.Y = packet.ReadSingle(); //4

                            packet.AddValue("Spline", v, index);
                        }

                        if (hasSplineStartTime)
                            packet.ReadUInt32("Spline Start time", index); //256

                        var type = packet.ReadByte(); // 228

                        switch (type)
                        {
                            case 1:
                                splineType = SplineType.Normal;
                                break;
                            case 2:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 3:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 4:
                                splineType = SplineType.FacingAngle;
                                break;
                        }

                        if (splineType == SplineType.FacingAngle) // == 4
                            packet.ReadSingle("Facing Angle", index);

                        if (splineType == SplineType.FacingSpot) // == 2
                            packet.ReadVector3("Facing spot", index);

                        if (hasSplineVerticalAcceleration) //252
                            packet.ReadSingle("Spline Vertical Acceleration", index);

                        packet.ReadUInt32("Spline FULL Time", index); //236

                    }

                    moveInfo.Position.X = packet.ReadSingle(); //212
                    moveInfo.Position.Z = packet.ReadSingle(); //220
                    packet.ReadUInt32("Spline ID", index); //208
                    moveInfo.Position.Y = packet.ReadSingle(); //216
                }
                packet.ReadSingle("Fly Speed", index); //188

                if (bit160)
                    packet.ReadUInt32("unk160");

                packet.ReadXORByte(guid1, 2);

                if (hasFallData) //132
                {
                    if (hasFallDirection)//128
                    {
                        packet.ReadSingle("Jump Sin Angle", index); //124
                        packet.ReadSingle("Jump XY Speed", index); //116
                        packet.ReadSingle("Jump Cos Angle", index); //120

                    }
                    packet.ReadUInt32("Jump Fall Time", index); //108
                    packet.ReadSingle("Jump Z Speed", index); //112
                }
                packet.ReadXORByte(guid1, 1);
                packet.ReadSingle("Turn Speed", index);

                if (hasTimestamp)
                    packet.ReadUInt32("Time?", index);

                packet.ReadSingle("Swim Speed", index); //176

                if (hasSplineElevation) //136
                    packet.ReadSingle("Spline Elevation", index);//196

                packet.ReadXORByte(guid1, 7);
                packet.ReadSingle("Pitch Speed", index); //200

                for (var i = 0; i < bits98; ++i)
                    packet.ReadInt32("UNK counter", index, i);

                moveInfo.Position.X = packet.ReadSingle(); //28

                if (hasPitch)
                    packet.ReadSingle("Pitch", index); //104

                if (hasOrientation)
                    moveInfo.Orientation = packet.ReadSingle("Orientation", index); //40

                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index) / 2.5f; // 168
                moveInfo.Position.Y = packet.ReadSingle(); //32
                packet.ReadSingle("Fly Back Speed", index); //192
                packet.ReadXORByte(guid1, 3);
                packet.ReadXORByte(guid1, 5);
                packet.ReadXORByte(guid1, 6);
                packet.ReadXORByte(guid1, 0);
                packet.ReadSingle("Run Back Speed", index);//184
                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f; //172
                packet.ReadSingle("Swim Back Speed", index);//180
                moveInfo.Position.Z = packet.ReadSingle(); //36
            }

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

            if (bit668)
            {
                if (bit664)
                {
                    for (var i = 0; i < bits288; ++i)
                    {
                        packet.ReadSingle("Float652+4", index, i);
                        packet.ReadSingle("Float652", index, i);
                        packet.ReadSingle("Float652+8", index, i);
                    }
                }

                if (bit600)
                {
                    packet.ReadSingle("Float584", index);
                    packet.ReadSingle("Float580", index);
                    packet.ReadSingle("Float596", index);
                    packet.ReadSingle("Float592", index);
                    packet.ReadSingle("Float576", index);
                    packet.ReadSingle("Float588", index);
                }

                if (bit644)
                {
                    for (var i = 0; i < bits25C; ++i)
                    {
                        packet.ReadSingle("Float608", index, i);
                        packet.ReadSingle("Float608+4", index, i);
                    }

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

                    packet.ReadSingle("Float624", index);
                    packet.ReadSingle("Float624+4", index);
                }

                packet.ReadUInt32("unk520", index);

                if (bit544)
                    packet.ReadUInt32("unk544", index);

                if (bit552)
                    packet.ReadUInt32("unk548", index);

                if (bit536)
                    packet.ReadUInt32("unk532", index);

                if (bit560)
                    packet.ReadUInt32("unk556", index);

                if (bit572)
                {
                    packet.ReadSingle("Float564", index);
                    packet.ReadSingle("Float568", index);
                }
            }

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

                moveInfo.TransportOffset.Y = packet.ReadSingle(); //388
                packet.ReadSByte("Transport Seat", index); //400
                moveInfo.TransportOffset.X = packet.ReadSingle();//384

                packet.ReadXORBytes(goTransportGuid, 2, 4, 1);

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

                packet.ReadUInt32("Transport Time", index); //404
                moveInfo.TransportOffset.O = packet.ReadSingle(); //396
                moveInfo.TransportOffset.Z = packet.ReadSingle(); //392

                packet.ReadXORBytes(goTransportGuid, 6, 0, 5, 3, 7);

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

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

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

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

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

            if (bit676)
                packet.ReadUInt32("unk672");

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

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

            if (bit476)
                packet.ReadUInt32("unk472");

            if (bit1064)
            {
                for (var i = 0; i < bits418; ++i)
                    packet.ReadInt32("unk1052+4", index, i);
            }

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

            if (bit1044)
                packet.ReadInt32("unk1040", index);

            if (isLiving && moveInfo.HasSplineData && hasFullSpline && splineType == SplineType.FacingTarget)
            {

                var facingTargetGuid = new byte[8];
                packet.StartBitStream(facingTargetGuid, 4, 7, 0, 5, 1, 2, 3, 6);
                packet.ParseBitStream(facingTargetGuid, 4, 2, 0, 5, 6, 3, 1, 7);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }
            return moveInfo;
        }
        private static MovementInfo ReadMovementUpdateBlock510(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            var bit654 = packet.ReadBit("Has bit654", index);
            packet.ReadBit();
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index);
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index);
            /*var bit2 = */ packet.ReadBit();
            var bit520 = packet.ReadBit("Has bit520", index);
            var unkLoopCounter = packet.ReadBits(24);
            var transport = packet.ReadBit("Transport", index);
            var hasGameObjectPosition = packet.ReadBit("Has GameObject Position", index);
            /*var bit653 = */ packet.ReadBit();
            var bit784 = packet.ReadBit("Has bit784", index);
            /*var isSelf = */ packet.ReadBit("Self", index);
            /*var bit1 = */ packet.ReadBit();
            var living = packet.ReadBit("Living", index);
            /*var bit3 = */ packet.ReadBit();
            var bit644 = packet.ReadBit("Has bit644", index);
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index);
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index);
            var bits360 = packet.ReadBits(21);
            var hasAnimKits = packet.ReadBit("Has AnimKits", index);
            for (var i = 0; i < bits360; ++i)
                packet.ReadBits(2);

            var guid2 = new byte[8];
            var facingTargetGuid = new byte[8];
            var unkSplineCounter = 0u;
            var attackingTargetGuid = new byte[8];
            var transportGuid = new byte[8];
            var goTransportGuid = new byte[8];
            var hasFallData = false;
            var hasFallDirection = false;
            var hasTimestamp = false;
            var hasOrientation = false;
            var hasPitch = false;
            var hasSplineElevation = false;
            var hasTransportData = false;
            var hasTransportTime2 = false;
            var hasTransportTime3 = false;
            var hasFullSpline = false;
            var hasSplineVerticalAcceleration = false;
            var hasUnkSplineCounter = false;
            var hasSplineStartTime = false;
            var hasGOTransportTime3 = false;
            var hasGOTransportTime2 = false;
            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var splineType = SplineType.Stop;
            var unkLoopCounter2 = 0u;
            var splineCount = 0u;

            var field8 = false;
            var bit540 = false;
            var bit552 = false;
            var bit580 = false;
            var bit624 = false;
            var bit147 = 0u;
            var bit151 = 0u;
            var bit158 = 0u;
            var bit198 = 0u;

            if (living)
            {
                guid2[3] = packet.ReadBit();
                hasFallData = packet.ReadBit("Has Fall Data", index);
                hasTimestamp = !packet.ReadBit("Lacks Timestamp", index);
                packet.ReadBit(); // bit172
                guid2[2] = packet.ReadBit();
                packet.ReadBit(); // bit149
                hasPitch = !packet.ReadBit("Lacks Pitch", index);
                var hasMoveFlagsExtra = !packet.ReadBit();
                guid2[4] = packet.ReadBit();
                guid2[5] = packet.ReadBit();
                unkLoopCounter2 = packet.ReadBits(24);
                hasSplineElevation = !packet.ReadBit();
                field8 = !packet.ReadBit();
                packet.ReadBit(); // bit148
                guid2[0] = packet.ReadBit();
                guid2[6] = packet.ReadBit();
                guid2[7] = packet.ReadBit();
                hasTransportData = packet.ReadBit("Has Transport Data", index);
                hasOrientation = !packet.ReadBit();

                if (hasTransportData)
                {
                    transportGuid[3] = packet.ReadBit();
                    transportGuid[0] = packet.ReadBit();
                    transportGuid[4] = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                    transportGuid[2] = packet.ReadBit();
                    transportGuid[7] = packet.ReadBit();
                    transportGuid[1] = packet.ReadBit();
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[6] = packet.ReadBit();
                    hasTransportTime3 = packet.ReadBit();
                }

                if (hasMoveFlagsExtra)
                    moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13, index);

                var hasMovementFlags = !packet.ReadBit();
                guid2[1] = packet.ReadBit();
                if (hasFallData)
                    hasFallDirection = packet.ReadBit("Has Fall Direction", index);

                moveInfo.HasSplineData = packet.ReadBit("Has Spline Data", index);
                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadBitsE<MovementFlag>("Movement Flags", 30, index);

                if (moveInfo.HasSplineData)
                {
                    hasFullSpline = packet.ReadBit("Has extended spline data", index);
                    if (hasFullSpline)
                    {
                        hasSplineStartTime = packet.ReadBit();
                        splineCount = packet.ReadBits("Spline Waypoints", 22, index);
                        /*var splineFlags = */ packet.ReadBitsE<SplineFlag434>("Spline flags", 25, index);
                        var bits57 = packet.ReadBits(2);
                        switch (bits57)
                        {
                            case 1:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 0:
                                splineType = SplineType.FacingAngle;
                                break;
                            case 2:
                                splineType = SplineType.Normal;
                                break;
                            case 3:
                                splineType = SplineType.FacingSpot;
                                break;
                        }

                        if (splineType == SplineType.FacingTarget)
                            facingTargetGuid = packet.StartBitStream(0, 1, 6, 5, 2, 3, 4, 7);

                        hasUnkSplineCounter = packet.ReadBit();
                        if (hasUnkSplineCounter)
                        {
                            unkSplineCounter = packet.ReadBits(23);
                            packet.ReadBits(2);
                        }

                        /*var splineMode = */ packet.ReadBitsE<SplineMode>("Spline Mode", 2, index);
                        hasSplineVerticalAcceleration = packet.ReadBit();
                    }
                }
            }

            if (hasGameObjectPosition)
            {
                hasGOTransportTime3 = packet.ReadBit();
                goTransportGuid[3] = packet.ReadBit();
                goTransportGuid[1] = packet.ReadBit();
                goTransportGuid[4] = packet.ReadBit();
                goTransportGuid[7] = packet.ReadBit();
                goTransportGuid[2] = packet.ReadBit();
                goTransportGuid[5] = packet.ReadBit();
                goTransportGuid[0] = packet.ReadBit();
                goTransportGuid[6] = packet.ReadBit();
                hasGOTransportTime2 = packet.ReadBit();
            }

            if (bit654)
                packet.ReadBits(9);

            if (bit520)
            {
                bit540 = packet.ReadBit("bit540", index);
                packet.ReadBit("bit536", index);
                bit552 = packet.ReadBit("bit552", index);
                packet.ReadBit("bit539", index);
                bit624 = packet.ReadBit("bit624", index);
                bit580 = packet.ReadBit("bit580", index);
                packet.ReadBit("bit537", index);

                if (bit580)
                {
                    bit147 = packet.ReadBits(23);
                    bit151 = packet.ReadBits(23);
                }

                if (bit624)
                    bit158 = packet.ReadBits(22);

                packet.ReadBit("bit538", index);
            }

            if (hasAttackingTarget)
                attackingTargetGuid = packet.StartBitStream(2, 6, 7, 1, 0, 3, 4, 5);

            if (bit784)
                bit198 = packet.ReadBits(24);

            if (hasAnimKits)
            {
                hasAnimKit3 = !packet.ReadBit();
                hasAnimKit1 = !packet.ReadBit();
                hasAnimKit2 = !packet.ReadBit();
            }

            packet.ResetBitReader();

            // Reading data
            for (var i = 0; i < bits360; ++i)
            {
                packet.ReadSingle();
                packet.ReadUInt32();
                packet.ReadSingle();
                packet.ReadUInt32();
                packet.ReadSingle();
                packet.ReadSingle();
            }

            for (var i = 0u; i < unkLoopCounter; ++i)
                packet.ReadUInt32("Unk UInt32", index, (int)i);

            if (living)
            {
                packet.ReadSingle("FlyBack Speed", index);
                if (moveInfo.HasSplineData)
                {
                    if (hasFullSpline)
                    {
                        if (hasUnkSplineCounter)
                        {
                            for (var i = 0; i < unkSplineCounter; ++i)
                            {
                                packet.ReadSingle("Unk Spline Float1", index, i);
                                packet.ReadSingle("Unk Spline Float2", index, i);
                            }
                        }

                        if (splineType == SplineType.FacingTarget)
                        {
                            packet.ParseBitStream(facingTargetGuid, 3, 2, 0, 5, 6, 7, 4, 1);
                            packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
                        }

                        packet.ReadUInt32("Spline Time", index);
                        packet.ReadUInt32("Spline Full Time", index);

                        if (hasSplineVerticalAcceleration)
                            packet.ReadSingle("Spline Vertical Acceleration", index);

                        packet.ReadSingle("Spline Duration Multiplier Next", index);
                        packet.ReadSingle("Spline Duration Multiplier", index);

                        if (splineType == SplineType.FacingSpot)
                        {
                            var point = new Vector3
                            {
                                X = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                Y = packet.ReadSingle()
                            };

                            packet.AddValue("Facing Spot", point, index);
                        }

                        if (hasSplineStartTime)
                            packet.ReadUInt32("Spline Start Time", index);

                        for (var i = 0u; i < splineCount; ++i)
                        {
                            var wp = new Vector3
                            {
                                Y = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                X = packet.ReadSingle()
                            };

                            packet.AddValue("Spline Waypoint", wp, index, i);
                        }

                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);
                    }

                    var endPoint = new Vector3
                    {
                        Y = packet.ReadSingle(),
                        X = packet.ReadSingle(),
                        Z = packet.ReadSingle()
                    };

                    packet.ReadUInt32("Spline Id", index);
                    packet.AddValue("Spline Endpoint", endPoint, index);
                }

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

                if (hasFallData)
                {
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump Velocity", index);
                        packet.ReadSingle("Jump Cos", index);
                        packet.ReadSingle("Jump Sin", index);
                    }

                    packet.ReadSingle("Fall Start Velocity", index);
                    packet.ReadInt32("Time Fallen", index);
                }

                if (hasTransportData)
                {
                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 4);
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    if (hasTransportTime3)
                        packet.ReadUInt32("Transport Time 3", index);

                    packet.ReadXORByte(transportGuid, 6);
                    packet.ReadXORByte(transportGuid, 5);
                    packet.ReadXORByte(transportGuid, 1);
                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    var seat = packet.ReadSByte("Transport Seat", index);
                    packet.ReadXORByte(transportGuid, 7);
                    if (hasTransportTime2)
                        packet.ReadUInt32("Transport Time 2", index);

                    packet.ReadUInt32("Transport Time", index);
                    packet.ReadXORByte(transportGuid, 0);
                    packet.ReadXORByte(transportGuid, 2);
                    packet.ReadXORByte(transportGuid, 3);

                    moveInfo.TransportGuid = packet.WriteGuid("Transport GUID", transportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, 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);
                    }
                }

                packet.ReadXORByte(guid2, 1);
                packet.ReadSingle("Turn Speed", index);
                moveInfo.Position.Y = packet.ReadSingle();
                packet.ReadXORByte(guid2, 3);
                moveInfo.Position.Z = packet.ReadSingle();
                if (hasOrientation)
                    moveInfo.Orientation = packet.ReadSingle();

                packet.ReadSingle("Run Back Speed", index);
                if (hasSplineElevation)
                    packet.ReadSingle("Spline Elevation", index);

                packet.ReadXORByte(guid2, 0);
                packet.ReadXORByte(guid2, 6);
                for (var i = 0u; i < unkLoopCounter2; ++i)
                    packet.ReadUInt32("Unk2 UInt32", index, (int)i);

                moveInfo.Position.X = packet.ReadSingle();
                if (hasTimestamp)
                    packet.ReadUInt32("Time", index);

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

                packet.ReadXORByte(guid2, 5);
                if (field8)
                    packet.ReadUInt32("Unk UInt32", index);

                packet.ReadSingle("Pitch Speed", index);
                packet.ReadXORByte(guid2, 2);
                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f;
                packet.ReadXORByte(guid2, 7);
                packet.ReadSingle("SwimBack Speed", index);
                packet.ReadXORByte(guid2, 4);
                packet.ReadSingle("Fly Speed", index);

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

            if (bit520)
            {
                if (bit580)
                {
                    packet.ReadSingle("field154", index);
                    packet.ReadSingle("field155", index);

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

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

                if (bit540)
                {
                    packet.ReadSingle("field136", index);
                    packet.ReadSingle("field134", index);
                }

                if (bit552)
                {
                    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.AddValue("Stationary Position", moveInfo.Position,index );
            }

            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 WowGuid64(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.AddValue("GO Transport GUID", moveInfo.TransportGuid, index);
                packet.AddValue("GO Transport Position", moveInfo.TransportOffset, 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 (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)
                moveInfo.Rotation = packet.ReadPackedQuaternion("GameObject Rotation", index);

            return moveInfo;
        }
        private static MovementInfo ReadMovementUpdateBlock432(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            /*bool bit2 = */packet.ReadBit();
            /*bool bit3 = */packet.ReadBit();
            /*bool bit4 = */packet.ReadBit();
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index);
            var hasAnimKits = packet.ReadBit("Has AnimKits", index);
            var unkLoopCounter = packet.ReadBits(24);
            /*bool bit1 = */packet.ReadBit();
            bool hasTransportExtra = packet.ReadBit("Has Transport Extra", index);
            bool hasGORotation = packet.ReadBit("Has GameObject Rotation", index);
            bool living = packet.ReadBit("Living", index);
            bool hasGameObjectPosition = packet.ReadBit("Has GameObject Position", index);
            bool hasVehicleData = packet.ReadBit("Has Vehicle Data", index);
            bool hasAttackingTarget = packet.ReadBit("Has Attacking Target", index);
            /*bool bit0 =*/packet.ReadBit();
            bool unkFloats = packet.ReadBit();

            bool unkFloat1 = false;
            bool hasFallData = false;
            bool unkFloat2 = false;
            bool bit216 = false;
            bool bit256 = false;
            bool hasSplineDurationMult = false;
            SplineType splineType = SplineType.Normal;
            var facingTarget = new byte[8];
            uint splineCount = 0u;
            bool hasTransportData = false;
            var transportGuid = new byte[8];
            bool hasTransportTime2 = false;
            bool hasTransportTime3 = false;
            bool hasFallDirection = false;
            bool hasUnkUInt = false;
            bool hasOrientation = false;
            var attackingTarget = new byte[8];
            var goTransportGuid = new byte[8];
            bool hasGOTransportTime2 = false;
            bool hasGOTransportTime3 = false;
            bool hasAnimKit1 = false;
            bool hasAnimKit2 = false;
            bool hasAnimKit3 = false;
            var guid2 = new byte[8];

            if (living)
            {
                unkFloat1 = !packet.ReadBit();
                hasOrientation = !packet.ReadBit();
                bool hasExtraMovementFlags = !packet.ReadBit();
                hasFallData = packet.ReadBit("Has Fall Data", index);
                guid2[0] = packet.ReadBit();
                guid2[5] = packet.ReadBit();
                guid2[4] = packet.ReadBit();
                bool hasMovementFlags = !packet.ReadBit();
                moveInfo.HasSplineData = packet.ReadBit("Has Spline Data", index);
                /*bool bit148 = */packet.ReadBit();

                if (hasExtraMovementFlags)
                    moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 12, index);

                hasUnkUInt = !packet.ReadBit();
                guid2[3] = packet.ReadBit();
                /*bool bit149 = */packet.ReadBit();

                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadBitsE<MovementFlag>("Movement Flags", 30, index);

                guid2[1] = packet.ReadBit();
                unkFloat2 = !packet.ReadBit();
                hasTransportData = packet.ReadBit("Has Transport Data", index);
                guid2[2] = packet.ReadBit();

                if (hasTransportData)
                {
                    transportGuid[3] = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                    transportGuid[1] = packet.ReadBit();
                    transportGuid[7] = packet.ReadBit();
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[4] = packet.ReadBit();
                    transportGuid[0] = packet.ReadBit();
                    transportGuid[2] = packet.ReadBit();
                    transportGuid[6] = packet.ReadBit();
                    hasTransportTime3 = packet.ReadBit();
                }

                if (moveInfo.HasSplineData)
                {
                    bit216 = packet.ReadBit();
                    if (bit216)
                    {
                        uint bits57 = packet.ReadBits(2);
                        splineCount = packet.ReadBits(22);
                        switch (bits57)
                        {
                            case 0:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 1:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 2:
                                splineType = SplineType.Normal;
                                break;
                            case 3:
                                splineType = SplineType.FacingAngle;
                                break;
                        }

                        if (splineType == SplineType.FacingTarget)
                            facingTarget = packet.StartBitStream(4, 3, 2, 5, 7, 1, 0, 6);

                        packet.ReadBitsE<SplineFlag422>("Spline flags", 25, index);
                        /*splineMode =*/packet.ReadBits(2);
                        hasSplineDurationMult = packet.ReadBit("HasSplineDurationMult", index);
                        bit256 = packet.ReadBit();
                    }
                }

                if (hasFallData)
                    hasFallDirection = packet.ReadBit("Has Fall Direction", index);

                guid2[6] = packet.ReadBit();
                guid2[7] = packet.ReadBit();
            }

            if (hasGameObjectPosition)
            {
                goTransportGuid[5] = packet.ReadBit();
                goTransportGuid[4] = packet.ReadBit();
                hasGOTransportTime3 = packet.ReadBit();
                goTransportGuid[7] = packet.ReadBit();
                goTransportGuid[6] = packet.ReadBit();
                goTransportGuid[1] = packet.ReadBit();
                goTransportGuid[2] = packet.ReadBit();
                hasGOTransportTime2 = packet.ReadBit();
                goTransportGuid[0] = packet.ReadBit();
                goTransportGuid[3] = packet.ReadBit();
            }

            if (hasAnimKits)
            {
                hasAnimKit1 = !packet.ReadBit();
                hasAnimKit3 = !packet.ReadBit();
                hasAnimKit2 = !packet.ReadBit();
            }

            if (hasAttackingTarget)
                attackingTarget = packet.StartBitStream(4, 3, 2, 5, 0, 6, 1, 7);

            for (var i = 0; i < unkLoopCounter; ++i)
            {
                packet.ReadInt32();
            }

            if (hasGameObjectPosition)
            {
                if (hasGOTransportTime3)
                    packet.ReadInt32("GO Transport Time 3", index);

                packet.ReadXORByte(goTransportGuid, 7);

                moveInfo.TransportOffset.Z = packet.ReadSingle();
                packet.ReadByte("GO Transport Seat", index);
                moveInfo.TransportOffset.X = packet.ReadSingle();
                moveInfo.TransportOffset.Y = packet.ReadSingle();

                packet.ReadXORByte(goTransportGuid, 4);
                packet.ReadXORByte(goTransportGuid, 5);
                packet.ReadXORByte(goTransportGuid, 6);

                moveInfo.TransportOffset.O = packet.ReadSingle();
                packet.ReadInt32("GO Transport Time", index);

                packet.ReadXORByte(goTransportGuid, 1);

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

                packet.ReadXORByte(goTransportGuid, 0);
                packet.ReadXORByte(goTransportGuid, 2);
                packet.ReadXORByte(goTransportGuid, 3);

                moveInfo.TransportGuid = packet.WriteGuid("GO Transport GUID", goTransportGuid, index);
                packet.AddValue("GO Transport Position", moveInfo.TransportOffset, index);
            }

            if (living)
            {
                if (moveInfo.HasSplineData)
                {
                    if (bit216)
                    {
                        packet.ReadSingle("Unknown Spline Float 2", index);
                        for (var i = 0u; i < splineCount; ++i)
                        {
                            var wp = new Vector3
                            {
                                Y = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                X = packet.ReadSingle()
                            };

                            packet.AddValue("Spline Waypoint", wp, index, i);
                        }

                        if (splineType == SplineType.FacingTarget)
                        {
                            packet.ParseBitStream(facingTarget, 2, 1, 3, 7, 0, 5, 4, 6);
                            packet.WriteGuid("Facing Target GUID", facingTarget, index);
                        }
                        else if (splineType == SplineType.FacingSpot)
                        {
                            var point = new Vector3
                            {
                                Y = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                X = packet.ReadSingle()
                            };

                            packet.AddValue("Facing Spot", point, index);
                        }

                        if (hasSplineDurationMult)
                            packet.ReadSingle("Spline Duration Modifier", index);

                        if (bit256)
                            packet.ReadUInt32("Unknown Spline Int32 1", index);

                        packet.ReadUInt32("Unknown Spline Int32 2", index);
                        packet.ReadSingle("Unknown Spline Float 1", index);
                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);

                        packet.ReadUInt32("Unknown Spline Int32 3", index);
                    }

                    packet.ReadUInt32("Spline Full Time", index);
                    var endPoint = new Vector3
                    {
                        Z = packet.ReadSingle(),
                        Y = packet.ReadSingle(),
                        X = packet.ReadSingle()
                    };

                    packet.AddValue("Spline Endpoint", endPoint, index);
                }

                if (hasTransportData)
                {
                    packet.ReadXORByte(transportGuid, 6);
                    if (hasTransportTime2)
                        packet.ReadInt32("Transport Time 2", index);

                    var seat = packet.ReadByte("Transport Seat", index);
                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 7);
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 3);
                    if (hasTransportTime3)
                        packet.ReadInt32("Transport Time 3", index);

                    packet.ReadInt32("Transport Time", index);
                    packet.ReadXORByte(transportGuid, 0);
                    packet.ReadXORByte(transportGuid, 1);
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 4);
                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 5);
                    packet.ReadXORByte(transportGuid, 2);

                    moveInfo.TransportGuid = new WowGuid64(BitConverter.ToUInt64(transportGuid, 0));
                    packet.AddValue("Transport GUID", moveInfo.TransportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, 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);
                    }
                }

                moveInfo.Position = new Vector3 {Z = packet.ReadSingle()};
                packet.ReadSingle("FlyBack Speed", index);
                moveInfo.Position.Y = packet.ReadSingle();
                packet.ReadXORByte(guid2, 4);
                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("Orientation");

                packet.AddValue("Position", moveInfo.Position, moveInfo.Orientation, index);
                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.WriteGuid("GUID 2", guid2, index);
                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("O", index);
                packet.AddValue("Stationary Position", moveInfo.Position, 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 (hasTransportExtra)
                packet.ReadInt32("Transport Time", index);

            packet.ResetBitReader();
            return moveInfo;
        }
        private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            packet.ResetBitReader();

            packet.ReadBit("NoBirthAnim", index);
            packet.ReadBit("EnablePortals", index);
            packet.ReadBit("PlayHoverAnim", index);
            packet.ReadBit("IsSuppressingGreetings", index);

            var hasMovementUpdate = packet.ReadBit("HasMovementUpdate", index);
            var hasMovementTransport = packet.ReadBit("HasMovementTransport", index);
            var hasStationaryPosition = packet.ReadBit("Stationary", index);
            var hasCombatVictim = packet.ReadBit("HasCombatVictim", index);
            var hasServerTime = packet.ReadBit("HasServerTime", index);
            var hasVehicleCreate = packet.ReadBit("HasVehicleCreate", index);
            var hasAnimKitCreate = packet.ReadBit("HasAnimKitCreate", index);
            var hasRotation = packet.ReadBit("HasRotation", index);
            var hasAreaTrigger = packet.ReadBit("HasAreaTrigger", index);
            var hasGameObject = packet.ReadBit("HasGameObject", index);

            packet.ReadBit("ThisIsYou", index);
            packet.ReadBit("ReplaceActive", index);

            var sceneObjCreate = packet.ReadBit("SceneObjCreate", index);
            var scenePendingInstances = packet.ReadBit("ScenePendingInstances", index);

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

            if (hasMovementUpdate) // 392
            {
                moveInfo = ReadMovementStatusData(packet, index);

                moveInfo.WalkSpeed = packet.ReadSingle("WalkSpeed", index) / 2.5f;
                moveInfo.RunSpeed = packet.ReadSingle("RunSpeed", index) / 7.0f;
                packet.ReadSingle("RunBackSpeed", index);
                packet.ReadSingle("SwimSpeed", index);
                packet.ReadSingle("SwimBackSpeed", index);
                packet.ReadSingle("FlightSpeed", index);
                packet.ReadSingle("FlightBackSpeed", index);
                packet.ReadSingle("TurnRate", index);
                packet.ReadSingle("PitchRate", index);

                var movementForceCount = packet.ReadInt32("MovementForceCount", index);

                for (var i = 0; i < movementForceCount; ++i)
                {
                    packet.ReadPackedGuid128("Id", index);
                    packet.ReadVector3("Direction", index);
                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V6_1_2_19802)) // correct?
                        packet.ReadVector3("TransportPosition", index);
                    packet.ReadInt32("TransportID", index);
                    packet.ReadSingle("Magnitude", index);
                    packet.ReadByte("Type", index);
                }

                packet.ResetBitReader();

                moveInfo.HasSplineData = packet.ReadBit("HasMovementSpline", index);

                if (moveInfo.HasSplineData)
                {
                    packet.ReadInt32("ID", index);
                    packet.ReadVector3("Destination", index);

                    packet.ResetBitReader();

                    var hasMovementSplineMove = packet.ReadBit("MovementSplineMove", index);
                    if (hasMovementSplineMove)
                    {
                        packet.ResetBitReader();

                        packet.ReadBitsE<SplineFlag434>("SplineFlags", ClientVersion.AddedInVersion(ClientVersionBuild.V6_2_0_20173) ? 28 : 25, index);
                        var face = packet.ReadBits("Face", 2, index);

                        var hasJumpGravity = packet.ReadBit("HasJumpGravity", index);
                        var hasSpecialTime = packet.ReadBit("HasSpecialTime", index);

                        packet.ReadBitsE<SplineMode>("Mode", 2, index);

                        var hasSplineFilterKey = packet.ReadBit("HasSplineFilterKey", index);

                        packet.ReadUInt32("Elapsed", index);
                        packet.ReadUInt32("Duration", index);

                        packet.ReadSingle("DurationModifier", index);
                        packet.ReadSingle("NextDurationModifier", index);

                        var pointsCount = packet.ReadUInt32("PointsCount", index);

                        if (face == 3) // FaceDirection
                            packet.ReadSingle("FaceDirection", index);

                        if (face == 2) // FaceGUID
                            packet.ReadPackedGuid128("FaceGUID", index);

                        if (face == 1) // FaceSpot
                            packet.ReadVector3("FaceSpot", index);

                        if (hasJumpGravity)
                            packet.ReadSingle("JumpGravity", index);

                        if (hasSpecialTime)
                            packet.ReadInt32("SpecialTime", index);

                        if (hasSplineFilterKey)
                        {
                            var filterKeysCount = packet.ReadUInt32("FilterKeysCount", index);
                            for (var i = 0; i < filterKeysCount; ++i)
                            {
                                packet.ReadSingle("In", index, i);
                                packet.ReadSingle("Out", index, i);
                            }

                            if (ClientVersion.AddedInVersion(ClientVersionBuild.V6_2_0_20173))
                                packet.ResetBitReader();

                            packet.ReadBits("FilterFlags", 2, index);
                        }

                        for (var i = 0; i < pointsCount; ++i)
                            packet.ReadVector3("Points", index, i);
                    }
                }
            }

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

                packet.ResetBitReader();

                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)
                {
                    var vehicleAccessory = new VehicleTemplateAccessory
                    {
                        AccessoryEntry = guid.GetEntry(),
                        SeatId = seat
                    };
                    Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                }
            }

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

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

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

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

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

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

            if (hasRotation) // 552
                packet.ReadPackedQuaternion("GameObject Rotation", index);

            if (hasAreaTrigger) // 772
            {
                // CliAreaTrigger
                packet.ReadInt32("ElapsedMs", index);

                packet.ReadVector3("RollPitchYaw1", index);

                packet.ResetBitReader();

                packet.ReadBit("HasAbsoluteOrientation", index);
                packet.ReadBit("HasDynamicShape", index);
                packet.ReadBit("HasAttached", index);
                packet.ReadBit("HasFaceMovementDir", index);
                packet.ReadBit("HasFollowsTerrain", index);

                if (ClientVersion.AddedInVersion(ClientVersionBuild.V6_2_0_20173))
                    packet.ReadBit("Unk bit WoD62x", index);

                var hasTargetRollPitchYaw = packet.ReadBit("HasTargetRollPitchYaw", index);
                var hasScaleCurveID = packet.ReadBit("HasScaleCurveID", index);
                var hasMorphCurveID = packet.ReadBit("HasMorphCurveID", index);
                var hasFacingCurveID = packet.ReadBit("HasFacingCurveID", index);
                var hasMoveCurveID = packet.ReadBit("HasMoveCurveID", index);
                var hasAreaTriggerSphere = packet.ReadBit("HasAreaTriggerSphere", index);
                var hasAreaTriggerBox = packet.ReadBit("HasAreaTriggerBox", index);
                var hasAreaTriggerPolygon = packet.ReadBit("HasAreaTriggerPolygon", index);
                var hasAreaTriggerCylinder = packet.ReadBit("HasAreaTriggerCylinder", index);
                var hasAreaTriggerSpline = packet.ReadBit("HasAreaTriggerSpline", index);

                if (hasTargetRollPitchYaw)
                    packet.ReadVector3("TargetRollPitchYaw", index);

                if (hasScaleCurveID)
                    packet.ReadInt32("ScaleCurveID, index");

                if (hasMorphCurveID)
                    packet.ReadInt32("MorphCurveID", index);

                if (hasFacingCurveID)
                    packet.ReadInt32("FacingCurveID", index);

                if (hasMoveCurveID)
                    packet.ReadInt32("MoveCurveID", index);

                if (hasAreaTriggerSphere)
                {
                    packet.ReadSingle("Radius", index);
                    packet.ReadSingle("RadiusTarget", index);
                }

                if (hasAreaTriggerBox)
                {
                    packet.ReadVector3("Extents", index);
                    packet.ReadVector3("ExtentsTarget", index);
                }

                if (hasAreaTriggerPolygon)
                {
                    var verticesCount = packet.ReadInt32("VerticesCount", index);
                    var verticesTargetCount = packet.ReadInt32("VerticesTargetCount", index);
                    packet.ReadSingle("Height", index);
                    packet.ReadSingle("HeightTarget", index);

                    for (var i = 0; i < verticesCount; ++i)
                        packet.ReadVector2("Vertices", index, i);

                    for (var i = 0; i < verticesTargetCount; ++i)
                        packet.ReadVector2("VerticesTarget", index, i);
                }

                if (hasAreaTriggerCylinder)
                {
                    packet.ReadSingle("Radius", index);
                    packet.ReadSingle("RadiusTarget", index);
                    packet.ReadSingle("Height", index);
                    packet.ReadSingle("HeightTarget", index);
                    packet.ReadSingle("Float4", index);
                    packet.ReadSingle("Float5", index);
                }

                if (hasAreaTriggerSpline)
                    AreaTriggerHandler.ReadAreaTriggerSpline(packet, index);
            }

            if (hasGameObject) // 788
            {
                packet.ReadInt32("WorldEffectID", index);

                packet.ResetBitReader();

                var bit8 = packet.ReadBit("bit8", index);
                if (bit8)
                    packet.ReadInt32("Int1", index);
            }

            if (sceneObjCreate) // 1184
            {
                packet.ResetBitReader();

                var hasSceneLocalScriptData = packet.ReadBit("HasSceneLocalScriptData", index);
                var petBattleFullUpdate = packet.ReadBit("HasPetBattleFullUpdate", index);

                if (hasSceneLocalScriptData)
                {
                    packet.ResetBitReader();
                    var dataLength = packet.ReadBits(7);
                    packet.ReadWoWString("Data", dataLength, index);
                }

                if (petBattleFullUpdate)
                    BattlePetHandler.ReadPetBattleFullUpdate(packet, index);
            }

            if (scenePendingInstances) // 1208
            {
                var sceneInstanceIDs = packet.ReadInt32("SceneInstanceIDsCount");

                for (var i = 0; i < sceneInstanceIDs; ++i)
                    packet.ReadInt32("SceneInstanceIDs", index, i);
            }

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

            return moveInfo;
        }
        private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            packet.ResetBitReader();

            packet.ReadBit("NoBirthAnim", index);
            packet.ReadBit("EnablePortals", index);
            packet.ReadBit("PlayHoverAnim", index);

            var hasMovementUpdate = packet.ReadBit("HasMovementUpdate", index);
            var hasMovementTransport = packet.ReadBit("HasMovementTransport", index);
            var hasStationaryPosition = packet.ReadBit("Stationary", index);
            var hasCombatVictim = packet.ReadBit("HasCombatVictim", index);
            var hasServerTime = packet.ReadBit("HasServerTime", index);
            var hasVehicleCreate = packet.ReadBit("HasVehicleCreate", index);
            var hasAnimKitCreate = packet.ReadBit("HasAnimKitCreate", index);
            var hasRotation = packet.ReadBit("HasRotation", index);
            var hasAreaTrigger = packet.ReadBit("HasAreaTrigger", index);
            var hasGameObject = packet.ReadBit("HasGameObject", index);
            var hasSmoothPhasing = packet.ReadBit("HasSmoothPhasing", index);

            packet.ReadBit("ThisIsYou", index);

            var sceneObjCreate = packet.ReadBit("SceneObjCreate", index);
            var playerCreateData = packet.ReadBit("HasPlayerCreateData", index);

            if (hasMovementUpdate)
            {
                packet.ResetBitReader();
                packet.ReadPackedGuid128("MoverGUID", index);

                packet.ReadUInt32("MoveTime", index);
                moveInfo.Position = packet.ReadVector3("Position", index);
                moveInfo.Orientation = packet.ReadSingle("Orientation", index);

                packet.ReadSingle("Pitch", index);
                packet.ReadSingle("StepUpStartElevation", index);

                var removeForcesIDsCount = packet.ReadInt32();
                packet.ReadInt32("MoveIndex", index);

                for (var i = 0; i < removeForcesIDsCount; i++)
                    packet.ReadPackedGuid128("RemoveForcesIDs", index, i);

                moveInfo.Flags = packet.ReadBitsE<MovementFlag>("Movement Flags", 30, index);
                moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 18, index);

                var hasTransport = packet.ReadBit("Has Transport Data", index);
                var hasFall = packet.ReadBit("Has Fall Data", index);
                packet.ReadBit("HasSpline", index);
                packet.ReadBit("HeightChangeFailed", index);
                packet.ReadBit("RemoteTimeValid", index);

                if (hasTransport)
                {
                    packet.ResetBitReader();
                    moveInfo.TransportGuid = packet.ReadPackedGuid128("Transport Guid", index);
                    moveInfo.TransportOffset = packet.ReadVector4("Transport Position", index);
                    packet.ReadSByte("Transport Seat", index);
                    packet.ReadInt32("Transport Time", index);

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

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

                    if (hasVehicleRecID)
                        packet.ReadUInt32("VehicleRecID", index);
                }

                if (hasFall)
                {
                    packet.ResetBitReader();
                    packet.ReadUInt32("Fall Time", index);
                    packet.ReadSingle("JumpVelocity", index);

                    var hasFallDirection = packet.ReadBit("Has Fall Direction", index);
                    if (hasFallDirection)
                    {
                        packet.ReadVector2("Fall", index);
                        packet.ReadSingle("Horizontal Speed", index);
                    }
                }

                moveInfo.WalkSpeed = packet.ReadSingle("WalkSpeed", index) / 2.5f;
                moveInfo.RunSpeed = packet.ReadSingle("RunSpeed", index) / 7.0f;
                packet.ReadSingle("RunBackSpeed", index);
                packet.ReadSingle("SwimSpeed", index);
                packet.ReadSingle("SwimBackSpeed", index);
                packet.ReadSingle("FlightSpeed", index);
                packet.ReadSingle("FlightBackSpeed", index);
                packet.ReadSingle("TurnRate", index);
                packet.ReadSingle("PitchRate", index);

                var movementForceCount = packet.ReadInt32("MovementForceCount", index);

                packet.ResetBitReader();

                moveInfo.HasSplineData = packet.ReadBit("HasMovementSpline", index);

                for (var i = 0; i < movementForceCount; ++i)
                {
                    packet.ResetBitReader();
                    packet.ReadPackedGuid128("Id", index);
                    packet.ReadVector3("Origin", index);
                    packet.ReadVector3("Direction", index);
                    packet.ReadInt32("TransportID", index);
                    packet.ReadSingle("Magnitude", index);
                    packet.ReadBits("Type", 2, index);
                }

                if (moveInfo.HasSplineData)
                {
                    packet.ResetBitReader();
                    packet.ReadInt32("ID", index);
                    packet.ReadVector3("Destination", index);

                    var hasMovementSplineMove = packet.ReadBit("MovementSplineMove", index);
                    if (hasMovementSplineMove)
                    {
                        packet.ResetBitReader();

                        packet.ReadUInt32E<SplineFlag434>("SplineFlags", index);
                        packet.ReadUInt32("Elapsed", index);
                        packet.ReadUInt32("Duration", index);
                        packet.ReadSingle("DurationModifier", index);
                        packet.ReadSingle("NextDurationModifier", index);

                        var face = packet.ReadBits("Face", 2, index);

                        var hasJumpGravity = packet.ReadBit("HasJumpGravity", index);
                        var hasSpecialTime = packet.ReadBit("HasSpecialTime", index);

                        var pointsCount = packet.ReadBits("PointsCount", 16, index);

                        packet.ReadBitsE<SplineMode>("Mode", 2, index);

                        var hasSplineFilterKey = packet.ReadBit("HasSplineFilterKey", index);
                        var hasSpellEffectExtraData = packet.ReadBit("HasSpellEffectExtraData", index);

                        if (hasSplineFilterKey)
                        {
                            packet.ResetBitReader();
                            var filterKeysCount = packet.ReadUInt32("FilterKeysCount", index);
                            for (var i = 0; i < filterKeysCount; ++i)
                            {
                                packet.ReadSingle("In", index, i);
                                packet.ReadSingle("Out", index, i);
                            }

                            packet.ReadBits("FilterFlags", 2, index);
                        }

                        if (face == 3)
                            packet.ReadSingle("FaceDirection", index);

                        if (face == 2)
                            packet.ReadPackedGuid128("FaceGUID", index);

                        if (face == 1)
                            packet.ReadVector3("FaceSpot", index);

                        if (hasJumpGravity)
                            packet.ReadSingle("JumpGravity", index);

                        if (hasSpecialTime)
                            packet.ReadInt32("SpecialTime", index);

                        for (var i = 0; i < pointsCount; ++i)
                            packet.ReadVector3("Points", index, i);

                        if (hasSpellEffectExtraData)
                        {
                            packet.ReadPackedGuid128("SpellEffectExtraGUID", index);
                            packet.ReadUInt32("SpellEffectExtra int 1", index);
                            packet.ReadUInt32("SpellEffectExtra int 2", index);
                            packet.ReadUInt32("SpellEffectExtra int 3", index);
                        }
                    }
                }
            }

            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);
                }
            }

            if (hasAreaTrigger)
            {
                packet.ResetBitReader();

                // CliAreaTrigger
                packet.ReadInt32("ElapsedMs", index);

                packet.ReadVector3("RollPitchYaw1", index);

                packet.ReadBit("HasAbsoluteOrientation", index);
                packet.ReadBit("HasDynamicShape", index);
                packet.ReadBit("HasAttached", index);
                packet.ReadBit("HasFaceMovementDir", index);
                packet.ReadBit("HasFollowsTerrain", index);
                packet.ReadBit("Unk bit WoD62x", index);

                var hasTargetRollPitchYaw = packet.ReadBit("HasTargetRollPitchYaw", index);
                var hasScaleCurveID = packet.ReadBit("HasScaleCurveID", index);
                var hasMorphCurveID = packet.ReadBit("HasMorphCurveID", index);
                var hasFacingCurveID = packet.ReadBit("HasFacingCurveID", index);
                var hasMoveCurveID = packet.ReadBit("HasMoveCurveID", index);
                var unkbit4C = packet.ReadBit();
                var unkbit50 = packet.ReadBit();
                var unkbit58 = packet.ReadBit();
                var hasAreaTriggerSphere = packet.ReadBit("HasAreaTriggerSphere", index);
                var hasAreaTriggerBox = packet.ReadBit("HasAreaTriggerBox", index);
                var hasAreaTriggerPolygon = packet.ReadBit("HasAreaTriggerPolygon", index);
                var hasAreaTriggerCylinder = packet.ReadBit("HasAreaTriggerCylinder", index);
                var hasAreaTriggerSpline = packet.ReadBit("HasAreaTriggerSpline", index);
                var hasAreaTriggerUnkType = packet.ReadBit("HasAreaTriggerUnkType", index);

                if (unkbit50)
                    packet.ReadBit();

                if (hasAreaTriggerSpline)
                    AreaTriggerHandler.ReadAreaTriggerSpline(packet, index);

                if (hasTargetRollPitchYaw)
                    packet.ReadVector3("TargetRollPitchYaw", index);

                if (hasScaleCurveID)
                    packet.ReadInt32("ScaleCurveID", index);

                if (hasMorphCurveID)
                    packet.ReadInt32("MorphCurveID", index);

                if (hasFacingCurveID)
                    packet.ReadInt32("FacingCurveID", index);

                if (hasMoveCurveID)
                    packet.ReadInt32("MoveCurveID", index);

                if (unkbit4C)
                    packet.ReadInt32();

                if (unkbit58)
                    packet.ReadUInt32();

                if (hasAreaTriggerSphere)
                {
                    packet.ReadSingle("Radius", index);
                    packet.ReadSingle("RadiusTarget", index);
                }

                if (hasAreaTriggerBox)
                {
                    packet.ReadVector3("Extents", index);
                    packet.ReadVector3("ExtentsTarget", index);
                }

                if (hasAreaTriggerPolygon)
                {
                    var verticesCount = packet.ReadInt32("VerticesCount", index);
                    var verticesTargetCount = packet.ReadInt32("VerticesTargetCount", index);
                    packet.ReadSingle("Height", index);
                    packet.ReadSingle("HeightTarget", index);

                    for (var i = 0; i < verticesCount; ++i)
                        packet.ReadVector2("Vertices", index, i);

                    for (var i = 0; i < verticesTargetCount; ++i)
                        packet.ReadVector2("VerticesTarget", index, i);
                }

                if (hasAreaTriggerCylinder)
                {
                    packet.ReadSingle("Radius", index);
                    packet.ReadSingle("RadiusTarget", index);
                    packet.ReadSingle("Height", index);
                    packet.ReadSingle("HeightTarget", index);
                    packet.ReadSingle("LocationZOffset", index);
                    packet.ReadSingle("LocationZOffsetTarget", index);
                }

                if (hasAreaTriggerUnkType)
                {
                    packet.ResetBitReader();
                    var unk1 = packet.ReadBit("AreaTriggerUnk1");
                    var hasCenter = packet.ReadBit("HasCenter", index);
                    packet.ReadBit("Unk bit 703 1", index);
                    packet.ReadBit("Unk bit 703 2", index);

                    packet.ReadUInt32();
                    packet.ReadInt32();
                    packet.ReadUInt32();
                    packet.ReadSingle("Radius", index);
                    packet.ReadSingle("BlendFromRadius", index);
                    packet.ReadSingle("InitialAngel", index);
                    packet.ReadSingle("ZOffset", index);

                    if (unk1)
                        packet.ReadPackedGuid128("AreaTriggerUnkGUID", index);

                    if (hasCenter)
                        packet.ReadVector3("Center", index);
                }
            }

            if (hasGameObject)
            {
                packet.ResetBitReader();
                packet.ReadInt32("WorldEffectID", index);

                var bit8 = packet.ReadBit("bit8", index);
                if (bit8)
                    packet.ReadInt32("Int1", index);
            }

            if (hasSmoothPhasing)
            {
                packet.ResetBitReader();
                packet.ReadBit("ReplaceActive", index);
                var replaceObject = packet.ReadBit();
                if (replaceObject)
                    packet.ReadGuid("ReplaceObject", index);
            }

            if (sceneObjCreate)
            {
                packet.ResetBitReader();

                var hasSceneLocalScriptData = packet.ReadBit("HasSceneLocalScriptData", index);
                var petBattleFullUpdate = packet.ReadBit("HasPetBattleFullUpdate", index);

                if (hasSceneLocalScriptData)
                {
                    packet.ResetBitReader();
                    var dataLength = packet.ReadBits(7);
                    packet.ReadWoWString("Data", dataLength, index);
                }

                if (petBattleFullUpdate)
                    V6_0_2_19033.Parsers.BattlePetHandler.ReadPetBattleFullUpdate(packet, index);
            }

            if (playerCreateData)
            {
                packet.ResetBitReader();
                var hasSceneInstanceIDs = packet.ReadBit("ScenePendingInstances", index);
                var hasRuneState = packet.ReadBit("Runes", index);

                if (hasSceneInstanceIDs)
                {
                    var sceneInstanceIDs = packet.ReadInt32("SceneInstanceIDsCount");
                    for (var i = 0; i < sceneInstanceIDs; ++i)
                        packet.ReadInt32("SceneInstanceIDs", index, i);
                }

                if (hasRuneState)
                {
                    packet.ReadByte("RechargingRuneMask", index);
                    packet.ReadByte("UsableRuneMask", index);
                    var runeCount = packet.ReadUInt32();
                    for (var i = 0; i < runeCount; ++i)
                        packet.ReadByte("RuneCooldown", index, i);
                }
            }

            return moveInfo;
        }
        private static MovementInfo ReadMovementUpdateBlock504(ref Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            // bits
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index);
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index);
            var unkLoopCounter = packet.ReadBits(24);
            var bit284 = packet.ReadBit();
            var hasGameObjectPosition = packet.ReadBit("Has GameObject Position", index);
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index);
            var bits16C = packet.ReadBits(21);
            var transport = packet.ReadBit("Transport", index);
            var bit208 = packet.ReadBit();
            /*var bit 28C =*/ packet.ReadBit();
            var living = packet.ReadBit("Living", index);
            /*var bit1 =*/ packet.ReadBit();
            var bit28D = packet.ReadBit();
            /*var bit2 =*/ packet.ReadBit();
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index);
            var hasAnimKits = packet.ReadBit("Has AnimKits", index);
            /*var bit3 =*/ packet.ReadBit();
            packet.ReadBit("Self", index);
            for (var i = 0; i < bits16C; ++i)
                packet.ReadBits(2);

            var hasOrientation = false;
            var guid2 = new byte[8];
            var hasPitch = false;
            var hasFallData = false;
            var hasSplineElevation = false;
            var hasTransportData = false;
            var hasTimestamp = false;
            var transportGuid = new byte[8];
            var hasTransportTime2 = false;
            var hasTransportTime3 = false;
            var hasFullSpline = false;
            var hasSplineStartTime = false;
            var splineCount = 0u;
            var splineType = SplineType.Stop;
            var facingTargetGuid = new byte[8];
            var hasSplineVerticalAcceleration = false;
            var hasFallDirection = false;
            var goTransportGuid = new byte[8];
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var attackingTargetGuid = new byte[8];
            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var bit228 = false;
            var bit21C = false;
            var bit278 = 0u;
            var bit244 = false;
            var bit24C = 0u;
            var bit25C = 0u;
            var field9C = 0u;
            var hasFieldA8 = false;
            var unkSplineCounter = 0u;

            if (hasGameObjectPosition)
            {
                goTransportGuid[4] = packet.ReadBit();
                goTransportGuid[3] = packet.ReadBit();
                goTransportGuid[6] = packet.ReadBit();
                goTransportGuid[0] = packet.ReadBit();
                goTransportGuid[5] = packet.ReadBit();
                goTransportGuid[1] = packet.ReadBit();
                hasGOTransportTime2 = packet.ReadBit();
                hasGOTransportTime3 = packet.ReadBit();
                goTransportGuid[2] = packet.ReadBit();
                goTransportGuid[7] = packet.ReadBit();
            }

            if (bit208)
            {
                bit228 = packet.ReadBit();
                var bit270 = packet.ReadBit();
                packet.ReadBit();   // bit219
                packet.ReadBit();   // bit21A
                bit21C = packet.ReadBit();
                if (bit270)
                    bit278 = packet.ReadBits(22);

                bit244 = packet.ReadBit();
                if (bit244)
                {
                    bit24C = packet.ReadBits(23);
                    bit25C = packet.ReadBits(23);
                }

                packet.ReadBit();   // bit218
            }

            if (living)
            {
                guid2[3] = packet.ReadBit();
                moveInfo.HasSplineData = packet.ReadBit("Has Spline Data", index);
                field9C = packet.ReadBits(24);
                guid2[4] = packet.ReadBit();
                hasPitch = !packet.ReadBit("Lacks Pitch", index);
                hasTransportData = packet.ReadBit("Has Transport Data", index);
                hasFallData = packet.ReadBit("Has Fall Data", index);
                hasTimestamp = !packet.ReadBit("Lacks Timestamp", index);
                if (hasTransportData)
                {
                    transportGuid[3] = packet.ReadBit();
                    hasTransportTime3 = packet.ReadBit();
                    transportGuid[7] = packet.ReadBit();
                    transportGuid[0] = packet.ReadBit();
                    transportGuid[6] = packet.ReadBit();
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[4] = packet.ReadBit();
                    transportGuid[1] = packet.ReadBit();
                    transportGuid[2] = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                }

                hasFieldA8 = !packet.ReadBit();
                guid2[7] = packet.ReadBit();
                var hasMoveFlagsExtra = !packet.ReadBit();
                guid2[0] = packet.ReadBit();
                packet.ReadBit();
                guid2[5] = packet.ReadBit();
                if (hasMoveFlagsExtra)
                    moveInfo.FlagsExtra = packet.ReadEnum<MovementFlagExtra>("Extra Movement Flags", 13, index);

                guid2[2] = packet.ReadBit();
                guid2[6] = packet.ReadBit();
                var hasMovementFlags = !packet.ReadBit();
                if (hasFallData)
                    hasFallDirection = packet.ReadBit("Has Fall Direction", index);

                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadEnum<MovementFlag>("Movement Flags", 30, index);

                hasOrientation = !packet.ReadBit();
                packet.ReadBit();
                packet.ReadBit();

                if (moveInfo.HasSplineData)
                {
                    hasFullSpline = packet.ReadBit("Has extended spline data", index);
                    if (hasFullSpline)
                    {
                        hasSplineVerticalAcceleration = packet.ReadBit();
                        /*var splineMode =*/ packet.ReadEnum<SplineMode>("Spline Mode", 2, index);
                        var bit134 = packet.ReadBit();
                        if (bit134)
                        {
                            unkSplineCounter = packet.ReadBits(23);
                            packet.ReadBits(2);
                        }

                        /*splineFlags =*/ packet.ReadBits("Spline flags", 25, index);
                        hasSplineStartTime = packet.ReadBit();
                        splineCount = packet.ReadBits("Spline Waypoints", 22, index);
                        var bits57 = packet.ReadBits(2);
                        switch (bits57)
                        {
                            case 0:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 1:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 2:
                                splineType = SplineType.Normal;
                                break;
                            case 3:
                                splineType = SplineType.FacingAngle;
                                break;
                        }

                        if (splineType == SplineType.FacingTarget)
                            facingTargetGuid = packet.StartBitStream(4, 5, 0, 7, 1, 3, 2, 6);

                        packet.AddValue("Spline type", splineType, index);
                    }
                }

                guid2[1] = packet.ReadBit();
                hasSplineElevation = !packet.ReadBit();
            }

            if (hasAttackingTarget)
                attackingTargetGuid = packet.StartBitStream(2, 6, 5, 1, 7, 3, 4, 0);

            if (hasAnimKits)
            {
                hasAnimKit2 = !packet.ReadBit();
                hasAnimKit3 = !packet.ReadBit();
                hasAnimKit1 = !packet.ReadBit();
            }

            if (bit28D)
                packet.ReadBits(9);

            packet.ResetBitReader();

            // Reading data
            for (var i = 0; i < bits16C; ++i)
            {
                packet.ReadUInt32();
                packet.ReadSingle();
                packet.ReadSingle();
                packet.ReadUInt32();
                packet.ReadSingle();
                packet.ReadSingle();
            }

            for (var i = 0u; i < unkLoopCounter; ++i)
                packet.ReadUInt32("Unk UInt32", index, (int)i);

            if (living)
            {
                if (moveInfo.HasSplineData)
                {
                    if (hasFullSpline)
                    {
                        if (splineType == SplineType.FacingSpot)
                        {
                            var point = new Vector3
                            {
                                X = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                Y = packet.ReadSingle(),
                            };

                            packet.AddValue("Facing Spot", point, index);
                        }
                        else if (splineType == SplineType.FacingTarget)
                        {
                            packet.ParseBitStream(facingTargetGuid, 5, 6, 0, 1, 2, 4, 7, 3);
                            packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
                        }

                        packet.ReadUInt32("Spline Time", index);
                        if (hasSplineVerticalAcceleration)
                            packet.ReadSingle("Spline Vertical Acceleration", index);

                        if (hasSplineStartTime)
                            packet.ReadUInt32("Spline Start time", index);

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

                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);

                        for (var i = 0u; i < splineCount; ++i)
                        {
                            var wp = new Vector3
                            {
                                X = packet.ReadSingle(),
                                Y = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                            };

                            packet.AddValue("Spline Waypoint", wp, index, i);
                        }

                        packet.ReadSingle("Spline Duration Multiplier", index);
                        packet.ReadUInt32("Spline Full Time", index);
                        packet.ReadSingle("Spline Duration Multiplier Next", index);
                    }

                    var endPoint = new Vector3();
                    endPoint.Z = packet.ReadSingle();
                    packet.ReadUInt32("Spline Id", index);
                    endPoint.X = packet.ReadSingle();
                    endPoint.Y = packet.ReadSingle();

                    packet.AddValue("Spline Endpoint", endPoint, index);
                }

                for (var i = 0; i < field9C; ++i)
                    packet.ReadUInt32();

                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index) / 2.5f;
                if (hasTransportData)
                {
                    packet.ReadXORByte(transportGuid, 4);
                    packet.ReadXORByte(transportGuid, 0);
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    var seat = packet.ReadSByte("Transport Seat", index);
                    packet.ReadXORByte(transportGuid, 7);
                    packet.ReadXORByte(transportGuid, 3);
                    if (hasTransportTime3)
                        packet.ReadUInt32("Transport Time 3", index);

                    packet.ReadXORByte(transportGuid, 6);
                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    packet.ReadUInt32("Transport Time", index);
                    packet.ReadXORByte(transportGuid, 2);
                    packet.ReadXORByte(transportGuid, 1);
                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    packet.ReadXORByte(transportGuid, 5);
                    if (hasTransportTime2)
                        packet.ReadUInt32("Transport Time 2", index);

                    moveInfo.TransportGuid = new WowGuid(BitConverter.ToUInt64(transportGuid, 0));
                    packet.AddValue("Transport GUID",  moveInfo.TransportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, index);

                    if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                        guid.HasEntry() && guid.GetHighType() == HighGuidType.Unit)
                    {
                        var vehicleAccessory = new VehicleTemplateAccessory();
                        vehicleAccessory.AccessoryEntry = guid.GetEntry();
                        vehicleAccessory.SeatId = seat;
                        Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                    }
                }

                packet.ReadXORByte(guid2, 2);
                if (hasFallData)
                {
                    packet.ReadInt32("Time Fallen", index);
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump Sin", index);
                        packet.ReadSingle("Jump Cos", index);
                        packet.ReadSingle("Jump Velocity", index);
                    }

                    packet.ReadSingle("Fall Start Velocity", index);
                }

                packet.ReadXORByte(guid2, 7);
                if (hasTimestamp)
                    packet.ReadUInt32("Time", index);

                packet.ReadSingle("Fly Speed", index);
                moveInfo.Position.X = packet.ReadSingle();
                if (hasFieldA8)
                    packet.ReadUInt32();

                moveInfo.Position.Y = packet.ReadSingle();
                packet.ReadXORByte(guid2, 5);
                moveInfo.Position.Z = packet.ReadSingle();
                if (hasPitch)
                    packet.ReadSingle("Pitch", index);

                packet.ReadXORByte(guid2, 3);
                packet.ReadXORByte(guid2, 6);
                packet.ReadXORByte(guid2, 1);
                if (hasSplineElevation)
                    packet.ReadSingle("Spline Elevation", index);

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

                packet.ReadXORByte(guid2, 4);
                packet.ReadSingle("Swim Speed", index);
                packet.ReadSingle("SwimBack Speed", index);
                packet.ReadSingle("FlyBack Speed", index);
                packet.ReadSingle("RunBack Speed", index);
                packet.ReadXORByte(guid2, 0);

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

            if (bit208)
            {
                if (bit228)
                {
                    packet.ReadSingle();
                    packet.ReadSingle();
                    packet.ReadSingle();
                    packet.ReadSingle();
                    packet.ReadSingle();
                    packet.ReadSingle();
                }

                if (bit21C)
                {
                    packet.ReadSingle();
                    packet.ReadSingle();
                }

                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 WowGuid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.AddValue("GO Transport GUID", moveInfo.TransportGuid, index);
                packet.AddValue("GO Transport Position", moveInfo.TransportOffset, index);
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.Y = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Position.X = packet.ReadSingle();
                packet.AddValue("Stationary Position", moveInfo.Position, index);
                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;
        }
        private static MovementInfo ReadMovementUpdateBlock(ref Packet packet, WowGuid guid, object index)
        {
            var moveInfo = new MovementInfo();

            var guid1 = new byte[8];
            var transportGuid = new byte[8];
            var goTransportGuid = new byte[8];
            var attackingTargetGuid = new byte[8];
            var guid5 = new byte[8];
            var guid6 = new byte[8];
            var guid7 = new byte[8];

            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var hasFullSpline = false;
            var hasSplineStartTime = false;
            var hasSplineVerticalAcceleration = false;
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var hasSplineElevation = false;
            var hasMovementFlags = false;
            var hasMoveFlagsExtra = false;
            var hasTimestamp = false;
            var hasOrientation = false;
            var hasTransportData = false;
            var hasTransportTime3 = false;
            var hasTransportTime2 = false;
            var hasPitch = false;
            var hasFallData = false;
            var hasFallDirection = false;

            var bit95 = false;
            var bit94 = false;
            var bit134 = false;
            var bitA8 = false;
            var bit228 = false;
            var bit270 = false;
            var bit21C = false;
            var bit244 = false;

            var bits168 = 0u;
            var splineCount = 0u;
            var bits138 = 0u;
            var bits98 = 0u;
            var bits248 = 0u;
            var bits258 = 0u;
            var bits274 = 0u;
            var bits3F4 = 0u;
            var bits28F = 0u;
            var splineType = SplineType.Stop;

            var bit28D = packet.ReadBit();
            var transportFrames = packet.ReadBits(22);
            var hasVehicleData = packet.ReadBit("Has Vehicle Data", index);
            var bit3F0 = packet.ReadBit();
            var hasGameObjectPosition = packet.ReadBit("Has GameObject Position", index);
            packet.ReadBit(); // fake bit
            var isSceneObject = packet.ReadBit("Scene Object", index);
            var transport = packet.ReadBit("On transport", index);
            var bit284 = packet.ReadBit();
            var bit208 = packet.ReadBit();
            var hasGameObjectRotation = packet.ReadBit("Has GameObject Rotation", index);
            var hasAttackingTarget = packet.ReadBit("Has Attacking Target", index);
            packet.ReadBit(); // fake bit
            packet.ReadBit(); // fake bit
            var isSelf = packet.ReadBit("Self", index);
            packet.ReadBit(); // fake bit
            var living = packet.ReadBit("Living", index);
            var bit3E8 = packet.ReadBit(); // something with scene object
            var bit28E = packet.ReadBit();
            var hasAnimKits = packet.ReadBit("Has AnimKits", index);
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index);

            if (living)
            {
                guid1[0] = packet.ReadBit();
                hasSplineElevation = !packet.ReadBit();
                packet.StartBitStream(guid1, 4, 7);
                hasMoveFlagsExtra = !packet.ReadBit();
                packet.StartBitStream(guid1, 5, 2);
                moveInfo.HasSplineData = packet.ReadBit("Has spline data", index);
                hasMovementFlags = !packet.ReadBit();
                hasTimestamp = !packet.ReadBit("Lacks timestamp", index);
                bit95 = packet.ReadBit();
                bit94 = packet.ReadBit();
                hasOrientation = !packet.ReadBit();
                if (hasMovementFlags)
                    moveInfo.Flags = packet.ReadEnum<MovementFlag>("Movement Flags", 30, index);

                hasTransportData = packet.ReadBit("Has Transport Data", index);
                if (hasTransportData)
                {
                    packet.StartBitStream(transportGuid, 1, 0, 6);
                    hasTransportTime3 = packet.ReadBit();
                    packet.StartBitStream(transportGuid, 2, 7, 4, 3);
                    hasTransportTime2 = packet.ReadBit();
                    transportGuid[5] = packet.ReadBit();
                }

                hasPitch = !packet.ReadBit("Lacks pitch", index);
                guid1[6] = packet.ReadBit();
                bits168 = packet.ReadBits(19);
                for (var i = 0; i < bits168; ++i)
                    packet.ReadBits("bits168", 2, index);

                guid1[1] = packet.ReadBit();
                if (moveInfo.HasSplineData)
                {
                    hasFullSpline = packet.ReadBit();
                    if (hasFullSpline)
                    {
                        hasSplineStartTime = packet.ReadBit();
                        bit134 = packet.ReadBit();
                        packet.ReadEnum<SplineMode>("Spline Mode", 2, index);
                        splineCount = packet.ReadBits("SplineWaypointsCount", 20, index);
                        hasSplineVerticalAcceleration = packet.ReadBit("Has Spline Vertical Acceleration", index);
                        if (bit134)
                        {
                            bits138 = packet.ReadBits(21);
                            packet.ReadBits("bits148", 2, index);
                        }
                        packet.ReadEnum<SplineFlag434>("Spline flags", 25, index);
                    }
                }

                bitA8 = !packet.ReadBit();
                guid1[3] = packet.ReadBit();
                bits98 = packet.ReadBits(22);
                if (hasMoveFlagsExtra)
                    moveInfo.FlagsExtra = packet.ReadEnum<MovementFlagExtra>("Extra Movement Flags", 13, index);

                hasFallData = packet.ReadBit("Has Fall Data", index);
                if (hasFallData)
                    hasFallDirection = packet.ReadBit("Has Fall Direction", index);

                packet.ReadBit("bitAC", index);
            }

            if (hasGameObjectPosition)
            {
                packet.StartBitStream(goTransportGuid, 7, 3);
                hasGOTransportTime2 = packet.ReadBit();
                packet.StartBitStream(goTransportGuid, 1, 4, 0, 2, 6);
                hasGOTransportTime3 = packet.ReadBit();
                goTransportGuid[5] = packet.ReadBit();
            }

            if (hasAnimKits)
            {
                hasAnimKit2 = !packet.ReadBit();
                hasAnimKit3 = !packet.ReadBit();
                hasAnimKit1 = !packet.ReadBit();
            }

            if (hasAttackingTarget)
                attackingTargetGuid = packet.StartBitStream(7, 3, 6, 1, 5, 4, 0, 2);

            if (bit208)
            {
                packet.ReadBit("bit21A", index);
                bit228 = packet.ReadBit();
                bit270 = packet.ReadBit();
                packet.ReadBit("bit219", index);
                packet.ReadBit("bit218", index);
                bit21C = packet.ReadBit();
                bit244 = packet.ReadBit();

                if (bit244)
                {
                    bits248 = packet.ReadBits(21);
                    bits258 = packet.ReadBits(21);
                }

                if (bit270)
                    bits274 = packet.ReadBits(20);

                packet.ReadBit("bit21B", index);
            }

            // Sceneobject data
            var CreatorGUID = new byte[8];
            byte[][] guid310 = null;
            byte[][][] guid34C_4 = null;
            uint[] bits34C_0 = null;
            uint[][] bits34C_4_84 = null;
            uint[][] bits34C_4_94 = null;
            uint[][] bits34C_4_31 = null;
            uint[][] bits34C_4_74 = null;
            byte[][][] bit34C_4_78_9 = null;
            byte[][][] bit34C_4_88_10 = null;
            bool[][][] bit34C_4_88_C = null;
            bool[][][] bit34C_4_88_8 = null;
            bool[][] bit34C_4_2E = null;
            bool[][] bit34C_4_30 = null;
            bool[] bit34C_4 = null;
            bool[] bit34C_8 = null;

            var bit318 = false;
            var bit31A = false;
            var bit329 = false;
            var bit320 = false;
            var bit328 = false;
            var bit324 = false;

            uint[] bits388 = null;
            uint[] bits388_10 = null;
            byte[][] bit388_1_10 = null;
            bool[][] bit388_1_C = null;
            bool[][] bit388_1_8 = null;

            if (isSceneObject)
            {
                guid310 = new byte[2][];
                guid34C_4 = new byte[2][][];
                bits34C_0 = new uint[2];
                bits34C_4_84 = new uint[2][];
                bits34C_4_94 = new uint[2][];
                bits34C_4_31 = new uint[2][];
                bits34C_4_74 = new uint[2][];
                bit34C_4_78_9 = new byte[2][][];
                bit34C_4_88_10 = new byte[2][][];
                bit34C_4_88_C = new bool[2][][];
                bit34C_4_88_8 = new bool[2][][];
                bit34C_4_2E = new bool[2][];
                bit34C_4_30 = new bool[2][];
                bit34C_4 = new bool[2];
                bit34C_8 = new bool[2];

                for (var i = 0; i < 2; ++i)
                {
                    guid310[i] = new byte[8];
                    packet.StartBitStream(guid310[i], 7, 6);
                    bits34C_0[i] = packet.ReadBits(2);

                    guid34C_4[i] = new byte[bits34C_0[i]][];
                    bits34C_4_84[i] = new uint[bits34C_0[i]];
                    bits34C_4_94[i] = new uint[bits34C_0[i]];
                    bits34C_4_31[i] = new uint[bits34C_0[i]];
                    bits34C_4_74[i] = new uint[bits34C_0[i]];
                    bit34C_4_78_9[i] = new byte[bits34C_0[i]][];
                    bit34C_4_88_10[i] = new byte[bits34C_0[i]][];
                    bit34C_4_88_C[i] = new bool[bits34C_0[i]][];
                    bit34C_4_88_8[i] = new bool[bits34C_0[i]][];
                    bit34C_4_2E[i] = new bool[bits34C_0[i]];
                    bit34C_4_30[i] = new bool[bits34C_0[i]];

                    for (var j = 0; j < bits34C_0[i]; ++j)
                    {
                        guid34C_4[i][j] = new byte[8];
                        bit34C_4_2E[i][j] = !packet.ReadBit();
                        packet.StartBitStream(guid34C_4[i][j], 7, 0, 6, 3);

                        bits34C_4_84[i][j] = packet.ReadBits(21);
                        bit34C_4_88_8[i][j] = new bool[bits34C_4_84[i][j]];
                        bit34C_4_88_C[i][j] = new bool[bits34C_4_84[i][j]];
                        bit34C_4_88_10[i][j] = new byte[bits34C_4_84[i][j]];

                        for (var k = 0; k < bits34C_4_84[i][j]; ++k)
                        {
                            bit34C_4_88_10[i][j][k] = (byte)(10 - packet.ReadBit());
                            bit34C_4_88_C[i][j][k] = !packet.ReadBit();
                            bit34C_4_88_8[i][j][k] = !packet.ReadBit();
                        }

                        bits34C_4_94[i][j] = packet.ReadBits(21);
                        packet.StartBitStream(guid34C_4[i][j], 2);
                        bit34C_4_30[i][j] = packet.ReadBit();
                        packet.StartBitStream(guid34C_4[i][j], 5, 4, 1);

                        bits34C_4_74[i][j] = packet.ReadBits(20);
                        bit34C_4_78_9[i][j] = new byte[bits34C_4_74[i][j]];

                        for (var k = 0; k < bits34C_4_74[i][j]; ++k)
                            bit34C_4_78_9[i][j][k] = (byte)(10 - packet.ReadBit());

                        bits34C_4_31[i][j] = packet.ReadBits(7);
                    }

                    bit34C_8[i] = !packet.ReadBit();
                    packet.StartBitStream(guid310[i], 3, 5, 2);
                    bit34C_4[i] = packet.ReadBit();
                    packet.StartBitStream(guid310[i], 1, 0, 4);
                }

                bits388 = new uint[3];
                bits388_10 = new uint[3];
                bit388_1_10 = new byte[3][];
                bit388_1_C = new bool[3][];
                bit388_1_8 = new bool[3][];

                for (var i = 0; i < 3; ++i)
                {
                    bits388[i] = packet.ReadBits(21);
                    bit388_1_10[i] = new byte[bits388[i]];
                    bit388_1_C[i] = new bool[bits388[i]];
                    bit388_1_8[i] = new bool[bits388[i]];

                    for (var j = 0; j < bits388[i]; ++j)
                    {
                        bit388_1_10[i][j] = (byte)(10 - packet.ReadBit());
                        bit388_1_C[i][j] = packet.ReadBit();
                        bit388_1_8[i][j] = packet.ReadBit();
                    }

                    bits388_10[i] = packet.ReadBits(21);
                }

                bit31A = !packet.ReadBit();
                bit329 = !packet.ReadBit();
                bit320 = !packet.ReadBit();
                bit328 = !packet.ReadBit();
                packet.ReadBit(); // fake bit
                packet.StartBitStream(CreatorGUID, 7, 1, 0, 2, 3, 6, 4, 5);
                bit324 = !packet.ReadBit();
                bit318 = !packet.ReadBit();
            }

            if (bit3F0)
                bits3F4 = packet.ReadBits(22);

            if (bit28E)
                bits28F = packet.ReadBits(7);

            packet.ResetBitReader();

            for (var i = 0; i < transportFrames; ++i)
                packet.ReadInt32("Transport frame", i, index);

            if (living)
            {
                if (hasTimestamp)
                    packet.ReadUInt32("Time", index);

                for (var i = 0; i < bits168; ++i)
                {
                    packet.ReadSingle("Float16C+5", index);
                    packet.ReadInt32("Int16C+4", index);
                    packet.ReadSingle("Float16C+1", index);
                    packet.ReadInt32("Int16C+0", index);
                    packet.ReadSingle("Float16C+2", index);
                    packet.ReadSingle("Float16C+3", index);
                }

                if (moveInfo.HasSplineData)
                {
                    if (hasFullSpline)
                    {
                        if (hasSplineStartTime)
                            packet.ReadInt32("Spline Start Time", index);

                        packet.ReadSingle("Spline Duration Multiplier", index);
                        if (hasSplineVerticalAcceleration)
                            packet.ReadSingle("Spline Vertical Acceleration", index);

                        packet.ReadInt32("Spline Time", index);
                        for (var i = 0u; i < splineCount; ++i)
                        {
                            var wp = new Vector3
                            {
                                Z = packet.ReadSingle(),
                                Y = packet.ReadSingle(),
                                X = packet.ReadSingle(),
                            };

                            packet.AddValue("Spline Waypoint", wp, index, i);
                        }

                        if (bit134)
                        {
                            for (var i = 0; i < bits138; ++i)
                            {
                                packet.ReadSingle("Float13C+1", index, i);
                                packet.ReadSingle("Float13C+0", index, i);
                            }
                        }

                        packet.ReadSingle("Spline Duration Multiplier Next", index);
                        var type = packet.ReadByte();
                        switch (type)
                        {
                            case 1:
                                splineType = SplineType.Normal;
                                break;
                            case 2:
                                splineType = SplineType.FacingSpot;
                                break;
                            case 3:
                                splineType = SplineType.FacingTarget;
                                break;
                            case 4:
                                splineType = SplineType.FacingAngle;
                                break;
                        }

                        if (splineType == SplineType.FacingAngle)
                            packet.ReadSingle("Facing Angle", index);

                        if (splineType == SplineType.FacingSpot)
                        {
                            var point = new Vector3
                            {
                                X = packet.ReadSingle(),
                                Z = packet.ReadSingle(),
                                Y = packet.ReadSingle(),
                            };

                            packet.AddValue("Facing Spot", point, index);
                        }

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

                    moveInfo.Position.Y = packet.ReadSingle();
                    moveInfo.Position.Z = packet.ReadSingle();
                    packet.ReadInt32("Spline Id", index);
                    moveInfo.Position.X = packet.ReadSingle();
                }

                if (hasTransportData)
                {
                    packet.ReadXORByte(transportGuid, 4);
                    moveInfo.TransportOffset.Z = packet.ReadSingle();
                    moveInfo.TransportOffset.Y = packet.ReadSingle();
                    packet.ReadUInt32("Transport Time", index);
                    var seat = packet.ReadByte("Transport Seat", index);
                    packet.ReadXORBytes(transportGuid, 3, 1, 6);
                    if (hasTransportTime2)
                        packet.ReadUInt32("Transport Time 2", index);

                    packet.ReadXORByte(transportGuid, 5);
                    moveInfo.TransportOffset.O = packet.ReadSingle();
                    moveInfo.TransportOffset.X = packet.ReadSingle();
                    packet.ReadXORBytes(transportGuid, 2, 0, 7);
                    if (hasTransportTime3)
                        packet.ReadUInt32("Transport Time 3", index);

                    moveInfo.TransportGuid = new WowGuid(BitConverter.ToUInt64(transportGuid, 0));
                    packet.AddValue("Transport GUID", moveInfo.TransportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, index);

                    if (moveInfo.TransportGuid.HasEntry() && moveInfo.TransportGuid.GetHighType() == HighGuidType.Vehicle &&
                        guid.HasEntry() && guid.GetHighType() == HighGuidType.Unit)
                    {
                        var vehicleAccessory = new VehicleTemplateAccessory();
                        vehicleAccessory.AccessoryEntry = guid.GetEntry();
                        vehicleAccessory.SeatId = seat;
                        Storage.VehicleTemplateAccessorys.Add(moveInfo.TransportGuid.GetEntry(), vehicleAccessory, packet.TimeSpan);
                    }
                }

                packet.ReadXORBytes(guid1, 2, 1);
                packet.ReadSingle("RunBack Speed", index);
                packet.ReadSingle("Fly Speed", index);
                packet.ReadXORBytes(guid1, 0, 3);
                packet.ReadSingle("SwimBack Speed", index);
                if (hasFallData)
                {
                    if (hasFallDirection)
                    {
                        packet.ReadSingle("Jump Sin", index);
                        packet.ReadSingle("Jump Velocity", index);
                        packet.ReadSingle("Jump Cos", index);
                    }
                    packet.ReadSingle("Fall Start Velocity", index);
                    packet.ReadUInt32("Time Fallen", index);
                }

                packet.ReadSingle("Turn Speed", index);
                packet.ReadXORByte(guid1, 5);
                moveInfo.Position.Z = packet.ReadSingle();
                if (hasOrientation)
                    moveInfo.Orientation = packet.ReadSingle();

                packet.ReadXORByte(guid1, 6);
                if (hasSplineElevation)
                    packet.ReadSingle("Spline Elevation", index);

                packet.ReadSingle("Pitch Speed", index);
                if (hasPitch)
                    packet.ReadSingle("Pitch", index);

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

                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index) / 2.5f;
                if (bitA8)
                    packet.ReadInt32("IntA8", index);

                moveInfo.Position.Y = packet.ReadSingle();
                packet.ReadSingle("Swim Speed", index);
                packet.ReadSingle("FlyBack Speed", index);
                packet.ReadXORByte(guid1, 7);
                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index) / 7.0f;
                moveInfo.Position.X = packet.ReadSingle();
                packet.ReadXORByte(guid1, 4);

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

            if (isSceneObject)
            {
                if (bit318)
                    packet.ReadInt16("Short318", index);

                for (var i = 0; i < 2; ++i)
                {
                    for (var j = 0; j < bits34C_0[i]; ++j)
                    {
                        packet.ReadXORBytes(guid34C_4[i][j], 0, 2);
                        packet.ReadInt32("Int34C+4+8", index, i, j);
                        packet.ReadXORBytes(guid34C_4[i][j], 5, 7);
                        packet.ReadInt32("Int34C+4+18", index, i, j);

                        for (var k = 0; k < bits34C_4_84[i][j]; ++k)
                        {
                            if (bit34C_4_88_C[i][j][k])
                                packet.ReadInt32("int34C+4+88+C", index, i, j, k);

                            if (bit34C_4_88_8[i][j][k])
                                packet.ReadInt32("int34C+4+88+8", index, i, j, k);

                            if (bit34C_4_88_10[i][j][k] != 9)
                                packet.ReadByte("byte34C+4+88+10", index, i, j, k);

                            packet.ReadInt32("int34C+4+88+0", index, i, j, k);
                            packet.ReadInt32("int34C+4+88+4", index, i, j, k);
                        }

                        packet.ReadInt32("int34C+4+28", index, i, j);

                        for (var k = 0; k < bits34C_4_94[i][j]; ++k)
                        {
                            packet.ReadInt32("int34C+4+98+0", index, i, j, k);
                            packet.ReadInt32("int34C+4+98+4", index, i, j, k);
                        }

                        packet.ReadBytes("Bytes34C+4+31", (int)bits34C_4_31[i][j], index, i, j);
                        packet.ReadXORByte(guid34C_4[i][j], 6);

                        for (var k = 0; k < bits34C_4_74[i][j]; ++k)
                        {
                            packet.ReadInt32("int34C+4+78+0", index, i, j, k);
                            packet.ReadByte("byte34C+4+78+8", index, i, j, k);
                            packet.ReadInt16("short34C+4+78+3", index, i, j, k);
                            packet.ReadInt16("short34C+4+78+2", index, i, j, k);
                            if (bit34C_4_78_9[i][j][k] != 9)
                                packet.ReadByte("byte34C+4+78+9", index, i, j, k);
                        }

                        if (bit34C_4_2E[i][j])
                            packet.ReadInt16("short34C+4+2E", index, i, j);

                        packet.ReadXORByte(guid34C_4[i][j], 4);
                        packet.ReadInt32("int34C+4+24", index, i, j);
                        packet.ReadXORBytes(guid34C_4[i][j], 1, 3);
                        packet.ReadInt16("short34C+4+16", index, i, j);
                        packet.ReadInt32("int34C+4+C", index, i, j);
                        packet.ReadInt32("int34C+4+10", index, i, j);

                        if (!bit34C_4_30[i][j])
                            packet.ReadByte("byte34C+4+30", index, i, j);

                        packet.ReadInt32("int34C+4+20", index, i, j);
                        packet.ReadInt32("int34C+4+1C", index, i, j);
                        packet.ReadInt16("short34C+4+14", index, i, j);
                        packet.ReadInt16("short34C+4+2C", index, i, j);
                        packet.WriteGuid("Guid 34C_4", guid34C_4[i][j]);
                    }

                    if (!bit34C_4[i])
                        packet.ReadByte("byte34C-4", index, i);

                    packet.ReadXORBytes(guid310[i], 6, 3, 7);
                    packet.ReadInt32("int34C-12", index, i);
                    packet.ReadXORBytes(guid310[i], 5, 1, 4, 0);
                    packet.ReadByte("byte34C+16", index, i);

                    if (bit34C_8[i])
                        packet.ReadInt32("int34C-8", index, i);

                    packet.ReadXORByte(guid310[i], 2);
                    packet.WriteGuid("Guid34C-20", guid310[i], index, i);
                }

                packet.ParseBitStream(CreatorGUID, 2, 5, 4, 7, 3, 1, 0, 6);
                packet.WriteGuid("Creator GUID", CreatorGUID);

                if (bit329)
                    packet.ReadByte("byte329", index);

                for (var i = 0; i < 3; ++i)
                {
                    for (var j = 0; j < bits388_10[i]; ++j)
                    {
                        packet.ReadByte("byte388+4+4", index, i, j);
                        packet.ReadByte("byte388+4+0", index, i, j);
                    }

                    for (var j = 0; j < bits388[i]; ++j)
                    {
                        if (bit388_1_10[i][j] != 9)
                            packet.ReadByte("byte388+1+10", index, i, j);

                        if (bit388_1_C[i][j])
                            packet.ReadInt32("int388+1+C", index, i, j);

                        packet.ReadInt32("int388+1+4", index, i, j);
                        packet.ReadInt32("int388+1+0", index, i, j);

                        if (bit388_1_8[i][j])
                            packet.ReadInt32("int388+1+8", index, i, j);
                    }
                }

                if (bit320)
                    packet.ReadInt32("int320", index);
                if (bit31A)
                    packet.ReadInt16("short31A", index);

                packet.ReadInt32("int31C", index);
                if (bit324)
                    packet.ReadInt32("int324", index);
                if (bit328)
                    packet.ReadByte("byte328", index);
            }

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

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

                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadXORBytes(goTransportGuid, 2, 4, 5, 6);

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

            if (bit208)
            {
                if (bit21C)
                {
                    packet.ReadSingle("Float224", index);
                    packet.ReadSingle("Float220", index);
                }

                packet.ReadSingle("Float210", index);
                if (bit244)
                {
                    for (var i = 0; i < bits258; ++i)
                    {
                        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;
        }
        private static MovementInfo ReadMovementUpdateBlock548(ref Packet packet, Guid guid, int index)
        {
            var moveInfo = new MovementInfo();

            var guid1            = new byte[8];
            var transportGuid    = new byte[8];
            var goTransportGuid  = new byte[8];
            var targetGuid       = new byte[8];
            var SplineFacingTargetGuid = new byte[8];
            var hasFallDirection = false;
            var hasOrientation = false;
            var hasFallData = false;
            var bit336 = false;
            var hasSplineStartTime = false;
            var splineCount = 0u;
            var splineType = SplineType.Stop;
            var hasSplineVerticalAcceleration = false;
            var hasSplineUnkPart = false;
            var hasTransport = false;
            var hasTransportTime2 = false;
            var hasTransportTime3 = false;
            var hasGOTransportTime2 = false;
            var hasGOTransportTime3 = false;
            var hasAnimKit1 = false;
            var hasAnimKit2 = false;
            var hasAnimKit3 = false;
            var Unk2Count = 0u;
            var Unk9Count = 0u;
            var loopcnt = 0u;
            var unk284count = 0u;
            var readUint32 = false;
            var unk144count = 0u;
            var hasPitch = false;
            var skipInt = false;
            var hasSplineElevation = false;

            packet.ResetBitReader();

            var hasUnk1 = packet.ReadBit("hasUnk1", index); // 676+
            var hasAnimKits = packet.ReadBit("Has AnimKits", index); // 498+
            var hasLiving = packet.ReadBit("Has Living", index); // 368+-
            var hasUnk2 = packet.ReadBit("hasUnk2", index); // 810+
            var hasUnk3 = packet.ReadBit("hasUnk3", index); // 2-
            var transportFrames = packet.ReadBits("Unknown array size", 22, index); // 1068+
            var hasVehicle = packet.ReadBit("Has Vehicle Data", index); // 488+
            var hasUnk4 = packet.ReadBit("hasUnk4", index); // 1044+
            var hasUnk5 = packet.ReadBit("hasUnk5", index); // 1
            var hasUnk6 = packet.ReadBit("hasUnk6", index); // 476+
            var hasGobjectRotation = packet.ReadBit("Has GameObject Rotation", index); // 512+
            var hasUnk7 = packet.ReadBit("hasUnk7", index); // 3
            var hasUpdateFlagSelf = packet.ReadBit("Has Update Flag Self", index); // 680-
            var hasTarget = packet.ReadBit("Has Target", index); // 464+
            var hasSceneObjectData = packet.ReadBit("hasSceneObjectData", index); // 1032+
            var hasUnk9 = packet.ReadBit("hasUnk9", index); // 1064+
            var hasUnk10 = packet.ReadBit("hasUnk10", index); // 0
            var hasUnk11 = packet.ReadBit("hasUnk11", index); // 668+
            var hasGOPosition = packet.ReadBit("Has goTransport Position", index); // 424+
            var hasUnk12 = packet.ReadBit("hasUnk12", index); // 681-
            var hasStationaryPosition = packet.ReadBit("Has Stationary Position", index); // 448

            //42bits
            if (hasLiving) // 368
            {
                guid1[2] = packet.ReadBit(); // 10
                packet.ReadBit(); // 140-
                hasPitch = !packet.ReadBit("!Has Pitch", index); // 104+ if (skipFloat) dword ptr [esi+68h] = 0 else dword ptr [esi+68h] = ds:dword_D26EA8
                hasTransport = packet.ReadBit("has transport", index); // 96+
                packet.ReadBit(); // 164-

                if (hasTransport) // 96
                {
                    transportGuid[4] = packet.ReadBit(); // 52
                    transportGuid[2] = packet.ReadBit(); // 50
                    hasTransportTime3 = packet.ReadBit("Transport Time3", index); // 92+
                    transportGuid[0] = packet.ReadBit(); // 48
                    transportGuid[1] = packet.ReadBit(); // 49
                    transportGuid[3] = packet.ReadBit(); // 51
                    transportGuid[6] = packet.ReadBit(); // 54
                    transportGuid[7] = packet.ReadBit(); // 55
                    hasTransportTime2 = packet.ReadBit("Transport Time2", index); // 84+
                    transportGuid[5] = packet.ReadBit(); // 53
                }

                readUint32 = !packet.ReadBit("skip readunit32", index); // 24+
                guid1[6] = packet.ReadBit(); // 14
                guid1[4] = packet.ReadBit(); // 12
                guid1[3] = packet.ReadBit(); // 11

                hasOrientation = !packet.ReadBit("skip Orient", index); // 40+ if (hasOrientation) dword ptr [esi+28h] = 0 else dword ptr [esi+28h] = ds:dword_D26EA8

                skipInt = !packet.ReadBit("no has Int", index); // 160*4 +

                guid1[5] = packet.ReadBit(); // 13
                unk144count = packet.ReadBits("Is Living Unk Counter", 22, index); // 144+
                var hasMovementFlags = !packet.ReadBit("!hasMovementFlags", index); // 16*4 +
                loopcnt = packet.ReadBits("IsLicingUnkLoop", 19, index); // 352+

                for (var i = 0; i < loopcnt; i++ ) // 352
                {
                    packet.ReadBits("unk356", 2, index, i);  // 356
                }

                hasFallData = packet.ReadBit("has fall data", index); // 132+

                if (hasMovementFlags) // 16*4
                    moveInfo.Flags = packet.ReadBitsE<MovementFlag>("Movement Flags", 30, index);

                hasSplineElevation = !packet.ReadBit("!Has SplineElevation", index); // 136+ if (skipFloat3) dword ptr [esi+88h] = 0 else dword ptr [esi+88h] = ds:dword_D26EA8
                moveInfo.HasSplineData = packet.ReadBit("has Spline", index); // 344+
                packet.ReadBit(); // 141-
                guid1[0] = packet.ReadBit(); // 8
                guid1[7] = packet.ReadBit(); // 15
                guid1[1] = packet.ReadBit(); // 9

                if (moveInfo.HasSplineData) // 344
                {
                    bit336 = packet.ReadBit("Has extended spline data", index); // 336+
                    if (bit336)
                    {
                        hasSplineVerticalAcceleration = packet.ReadBit("Has spline vertical acceleration", index); // 260+
                        hasSplineStartTime = packet.ReadBit("Has spline start time", index); // 252+
                        hasSplineUnkPart = packet.ReadBit(); // 304+
                        splineCount = packet.ReadBits("Spline Waypoints", 20, index); // 264+
                        packet.ReadBitsE<SplineMode>("Spline Mode", 2, index); // 280-
                        packet.ReadBitsE<SplineFlag434>("Spline flags", 25, index); // 224

                        if (hasSplineUnkPart) // 304
                        {
                            unk284count = packet.ReadBits("Unk dword284", 21, index); // 284
                            packet.ReadBits("Unk word300", 2, index);  // unk word300
                        }
                    }
                }

                var hasMovementFlagsExtra = !packet.ReadBit("!hasMovementFlagsExtra", index); // 20*4

                if (hasFallData) // 132
                    hasFallDirection = packet.ReadBit("Has Fall Direction", index); // 128

                if (hasMovementFlagsExtra) // 20*4
                    moveInfo.FlagsExtra = packet.ReadBitsE<MovementFlagExtra>("Extra Movement Flags", 13, index); // 20*4
            }
            //107bits

            var guid856 = new byte[2][];

            var guid840 = new byte[8];

            var count952 = new uint[3];
            var count936 = new uint[3];
            var unk32 = new byte[3][];
            var unk48 = new uint[3][];
            var unk64 = new uint[3][];
            var unk816 = false;
            var count876 = new uint[2];
            var guid880 = new byte[2][][];
            var unk868 = new bool[2];
            var unk892 = new int[2];
            var unk170 = new uint[2][];
            var unk136 = new int[2][];
            var unk180 = new bool[2][];
            var unk284 = new uint[2][];
            var unk616 = new uint[2][];
            var unk4096 = new bool[2][][];
            var unk4112 = new bool[2][][];
            var unk4128 = new bool[2][][];
            var unk552 = new uint[2][];
            var unk577 = new bool[2][][];
            var unk872 = new bool[2];
            var unk818 = false;
            var unk824 = false;
            var unk828 = false;
            var unk832 = false;
            var unk833 = false;
            if (hasSceneObjectData) // 1032
            {
                for (var i = 0; i < 2; i++)
                {
                    guid856[i] = new byte[8];

                    guid856[i][5] = packet.ReadBit();
                    guid856[i][2] = packet.ReadBit();
                    guid856[i][3] = packet.ReadBit();
                    guid856[i][1] = packet.ReadBit();
                    guid856[i][6] = packet.ReadBit();
                    guid856[i][7] = packet.ReadBit();
                    unk868[i] = !packet.ReadBit("!unk868", index, i);
                    unk892[i] = packet.ReadBit("-unk892", index, i) ? -1 : 0;
                    count876[i] = packet.ReadBits("unk876", 2, index, i);

                    guid880[i] = new byte[count876[i]][];
                    unk170[i] = new uint[count876[i]];
                    unk136[i] = new int[count876[i]];
                    unk180[i] = new bool[count876[i]];
                    unk284[i] = new uint[count876[i]];
                    unk616[i] = new uint[count876[i]];
                    unk4096[i] = new bool[count876[i]][];
                    unk4112[i] = new bool[count876[i]][];
                    unk4128[i] = new bool[count876[i]][];
                    unk552[i] = new uint[count876[i]];
                    unk577[i] = new bool[count876[i]][];
                    for (var j = 0; j < count876[i]; j++)
                    {
                        guid880[i][j] = new byte[8];
                        unk170[i][j] = packet.ReadBits("unk170", 21, index, i, j);
                        //sub_70FC09;
                        guid880[i][j][7] = packet.ReadBit();
                        unk136[i][j] = packet.ReadBit("-unk136", index, i, j) ? -1 : 0;
                        guid880[i][j][0] = packet.ReadBit();
                        guid880[i][j][5] = packet.ReadBit();
                        guid880[i][j][3] = packet.ReadBit();
                        guid880[i][j][4] = packet.ReadBit();
                        unk180[i][j] = !packet.ReadBit("!unk46", index, i, j);
                        guid880[i][j][1] = packet.ReadBit();
                        guid880[i][j][6] = packet.ReadBit();
                        unk284[i][j] = packet.ReadBits("unk284", 7, index, i, j);
                        unk616[i][j] = packet.ReadBits("count616", 21, index, i, j);
                        //sub_70fb9c
                        unk4096[i][j] = new bool[unk616[i][j]];
                        unk4112[i][j] = new bool[unk616[i][j]];
                        unk4128[i][j] = new bool[unk616[i][j]];

                        for (var k = 0; k < unk616[i][j]; k++)
                        {
                            unk4096[i][j][k] = !packet.ReadBit("!unk4096", index, i, j, k);
                            unk4112[i][j][k] = !packet.ReadBit("!unk4112", index, i, j, k);
                            unk4128[i][j][k] = !packet.ReadBit("!unk4128(10-b)", index, i, j, k);
                        }
                        guid880[i][j][2] = packet.ReadBit();
                        unk552[i][j] = packet.ReadBits("count552", 20, index, i, j);
                        unk577[i][j] = new bool[unk552[i][j]];
                        for (var k = 0; k < unk552[i][j]; k++)
                        {
                            unk577[i][j][k] = !packet.ReadBit("!unk577(10-b)", index, i, j, k);
                        }
                    }
                    guid856[i][4] = packet.ReadBit();
                    unk872[i] = !packet.ReadBit("!unk872", index, i);
                    guid856[i][0] = packet.ReadBit();
                }
                unk832 = !packet.ReadBit("!unk832", index);

                for (var i = 0; i < 3; i++)
                {
                    count952[i] = packet.ReadBits("count952", 21, index, i);
                    count936[i] = packet.ReadBits("count936", 21, index, i);
                    unk32[i] = new byte[count936[i]];
                    unk48[i] = new uint[count936[i]];
                    unk64[i] = new uint[count936[i]];
                    for (var j = 0; j < count936[i]; j++)
                    {
                        unk32[i][j] = packet.ReadBit("unk32", index, i, j) ? (byte)9 : (byte)10;
                        unk48[i][j] = packet.ReadBit("!unk48", index, i, j) ? 0u : 1u;
                        unk64[i][j] = packet.ReadBit("!unk64", index, i, j) ? 0u : 1u;
                    }
                }

                unk828 = !packet.ReadBit("!unk828", index);
                packet.ReadBit("unk848", index);
                unk816 = !packet.ReadBit("!unk816*2", index);
                unk824 = !packet.ReadBit("!unk824", index);
                packet.ReadBit("!unk840*4", index);

                guid840 = packet.StartBitStream(6, 2, 4, 5, 1, 0, 3, 7);

                unk818 = !packet.ReadBit("!unk818", index);
                unk833 = !packet.ReadBit("!unk833", index);
                var unk849 = packet.ReadBit("unk849", index);
            }

            if (hasGOPosition) // 424
            {
                goTransportGuid[4] = packet.ReadBit(); // 380
                goTransportGuid[1] = packet.ReadBit(); // 377
                goTransportGuid[0] = packet.ReadBit(); // 376
                hasGOTransportTime3 = packet.ReadBit("goTransport Time3", index); // 420
                goTransportGuid[6] = packet.ReadBit(); // 382
                goTransportGuid[5] = packet.ReadBit(); // 381
                goTransportGuid[3] = packet.ReadBit(); // 379
                goTransportGuid[2] = packet.ReadBit(); // 378
                goTransportGuid[7] = packet.ReadBit(); // 383
                hasGOTransportTime2 = packet.ReadBit("goTransport Time2", index); // 412
            }

            var unkBlock1bit664 = false;
            var count648 = 0u;
            var unkBlock1bit644 = false;
            var unkBlock1bit528 = false;
            var unkBlock1bit600 = false;
            var unkBlock1bit544 = false;
            var unkblock1bit526 = false;
            var unkBlock1bit552 = false;
            var unkBlock1bit524 = false;
            var unkBlock1bit572 = false;
            var unkBlock1bit525 = false;
            var unkBlock1bit527 = false;
            var unkBlock1bit536 = false;
            var unkBlock1bit560 = false;
            var count604 = 0u;
            var count620 = 0u;

            if (hasUnk11) // 668
            {
                unkBlock1bit528 = packet.ReadBit(); // 528
                unkBlock1bit600 = packet.ReadBit(); // 600
                unkBlock1bit544 = packet.ReadBit(); // 544
                unkblock1bit526 = packet.ReadBit(); // 526
                unkBlock1bit552 = packet.ReadBit(); // 552
                unkBlock1bit524 = packet.ReadBit(); // 524
                unkBlock1bit572 = packet.ReadBit(); // 572
                unkBlock1bit525 = packet.ReadBit(); // 525
                unkBlock1bit664 = packet.ReadBit(); // 664
                unkBlock1bit527 = packet.ReadBit(); // 527

                if (unkBlock1bit664) // 664
                {
                    count648 = packet.ReadBits("Block1 unk648", 20, index); // 648
                }

                unkBlock1bit536 = packet.ReadBit(); // 536
                unkBlock1bit644 = packet.ReadBit(); // 644
                unkBlock1bit560 = packet.ReadBit(); // 560

                if (unkBlock1bit644) // 644
                {
                    count604 = packet.ReadBits("Block1 unk604", 21, index); // 604
                    count620 = packet.ReadBits("Block1 unk620", 21, index); // 620
                }
            }

            if (hasAnimKits) // 498
            {
                hasAnimKit2 = !packet.ReadBit("skip AnimKit2", index); // 494*2
                hasAnimKit3 = !packet.ReadBit("skip AnimKit3", index); // 496*2
                hasAnimKit1 = !packet.ReadBit("skip AnimKit1", index); // 492*2
            }

            if (hasTarget) // 464
                targetGuid = packet.StartBitStream(4, 6, 5, 2, 0, 1, 3, 7);

            if (hasUnk9) // 1064
            {
                Unk9Count = packet.ReadBits("unk1048", 22, index); // 1048
            }

            if (hasUnk2) // 810
            {
                Unk2Count = packet.ReadBits("unk682", 7, index); // 682*4
            }

            // Reading data
            for (var i = 0u; i < transportFrames; i++) // 1068*4
                packet.ReadUInt32("Unk UInt32", index, (int)i); // 1072*4

            packet.ResetBitReader(); //???

            if (hasSceneObjectData) // 1032
            {
                for (var i = 0; i < 3; i++)
                {
                    for (var j = 0; j < count936[i]; j++)
                    {
                        packet.ReadInt32("unk934*4", index, i, j);
                        if (unk32[i][j] != 9)
                            packet.ReadInt32("unk32", index, i, j);
                        if (unk64[i][j] > 0)
                            packet.ReadByte("unk64", index, i, j);
                        packet.ReadInt32("unk940*4", index, i, j);
                        if (unk48[i][j] > 0)
                            packet.ReadInt32("unk48", index, i, j);
                    }
                    for (var j = 0; j < count952[i]; j++)
                    {
                        packet.ReadInt32("unk80", index, i, j);
                        packet.ReadInt32("unk96", index, i, j);
                    }
                }

                if (unk816)
                    packet.ReadInt16("unk816*2", index);

                for (var i = 0; i < 2; i++)
                {
                    for (var j = 0; j < count876[i]; j++)
                    {
                        packet.ReadInt16("unk856+24+22", index, i, j);
                        packet.ParseBitStream(guid880[i][j], 3, 5, 7, 6);
                        for (var k = 0; k < unk616[i][j]; k++)
                        {
                            packet.ReadInt32("unk640", index, i, j, k);
                            if (unk4096[i][j][k])
                                packet.ReadInt32("unk4096", index, i, j, k);
                            if (unk4128[i][j][k])
                                packet.ReadByte("unk4128", index, i, j, k);
                            packet.ReadInt32("unk4080", index, i, j, k);
                            if (unk4112[i][j][k])
                                packet.ReadInt32("unk4112", index, i, j, k);
                        }
                        packet.ReadInt32("unk3680", index, i, j);
                        packet.ParseBitStream(guid880[i][j], 4, 0);
                        for (var k = 0; k < unk552[i][j]; k++)
                        {
                            packet.ReadInt32("unk4000", index, i, j, k);
                            packet.ReadInt16("unk4016", index, i, j, k);
                            packet.ReadInt16("unk4024", index, i, j, k);
                            packet.ReadByte("unk4032", index, i, j, k);

                            if (unk577[i][j][k])
                                packet.ReadByte("unk577(10-b)", index, i, j, k);
                        }
                        packet.ReadInt32("unk3664", index, i, j);
                        packet.ReadInt32("unk3648", index, i, j);
                        packet.ReadInt32("unk3632", index, i, j);
                        for (var k = 0; k < unk170[i][j]; k++)
                        {
                            packet.ReadInt32("unk4128", index, i, j, k);
                            packet.ReadInt32("unk4132", index, i, j, k);
                        }
                        packet.ParseBitStream(guid880[i][j], 1);
                        packet.ReadWoWString("str", unk284[i][j], index, i, j);
                        packet.ReadInt32("unk3544", index, i, j);
                        if (unk136[i][j] == 0)
                            packet.ReadByte("unk136", index, i, j);
                        packet.ReadInt32("unk3528", index, i, j);
                        if (unk180[i][j])
                            packet.ReadInt16("unk3566", index, i, j);
                        packet.ReadInt16("unk3564", index, i, j);
                        packet.ReadInt32("unk3536", index, i, j);
                        packet.ReadInt32("unk3532", index, i, j);
                        packet.ParseBitStream(guid880[i][j], 2);
                        packet.ReadInt16("unk3540", index, i, j);
                        packet.WriteGuid("Guid880", guid880[i][j], index, i, j);
                    }
                    packet.ParseBitStream(guid856[i], 0);
                    packet.ReadByte("unk893", index, i);
                    if (unk892[i] != -1)
                        packet.ReadByte("unk892", index, i);
                    packet.ParseBitStream(guid856[i], 4, 3);
                    if (unk868[i])
                        packet.ReadInt32("unk868", index, i);
                    packet.ParseBitStream(guid856[i], 7, 2);
                    packet.ReadInt32("unk864", index, i);
                    packet.ParseBitStream(guid856[i], 5);
                    if (unk872[i])
                        packet.ReadInt16("unk872", index, i);
                    packet.ParseBitStream(guid856[i], 1, 6);

                    packet.WriteGuid("Guid856", guid856[i], index, i);
                }
                packet.ParseBitStream(guid840, 2, 0, 5, 4, 3, 7, 1, 6);
                packet.WriteGuid("Guid840", guid840, index);

                if (unk828)
                    packet.ReadInt32("unk828", index);
                if (unk833)
                    packet.ReadByte("unk833", index);
                if (unk824)
                    packet.ReadInt32("unk824", index);
                if (unk818)
                    packet.ReadInt16("unk818", index);
                packet.ReadInt32("unk820", index);
                if (unk832)
                    packet.ReadByte("unk832", index);
            }

            if (hasLiving) // 368
            {
                if (hasTransport) // 96
                {
                    packet.ReadXORByte(transportGuid, 7); // 55
                    moveInfo.TransportOffset.X = packet.ReadSingle(); // 56

                    if (hasTransportTime3) // 92
                        packet.ReadUInt32("Transport Time 3", index); // 88

                    moveInfo.TransportOffset.O = packet.ReadSingle(); // 68
                    moveInfo.TransportOffset.Y = packet.ReadSingle(); // 60
                    packet.ReadXORByte(transportGuid, 4); // 52
                    packet.ReadXORByte(transportGuid, 1); // 49
                    packet.ReadXORByte(transportGuid, 3); // 51
                    moveInfo.TransportOffset.Z = packet.ReadSingle(); // 64
                    packet.ReadXORByte(transportGuid, 5); // 53

                    if (hasTransportTime2) // 84
                        packet.ReadUInt32("Transport Time 2", index); // 80

                    packet.ReadXORByte(transportGuid, 0); // 48
                    var seat = packet.ReadSByte("Transport Seat", index); // 72
                    packet.ReadXORByte(transportGuid, 6); // 54
                    packet.ReadXORByte(transportGuid, 2); // 50
                    packet.ReadUInt32("Transport Time", index); // 76

                    moveInfo.TransportGuid = new WowGuid64(BitConverter.ToUInt64(transportGuid, 0));
                    packet.AddValue("Transport GUID", moveInfo.TransportGuid, index);
                    packet.AddValue("Transport Position", moveInfo.TransportOffset, 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);
                    }
                }

                packet.ReadXORByte(guid1, 4); // 12

                for (var i = 0; i < loopcnt; i++ ) // 352
                {
                    packet.ReadSingle("Single364", index); // 364
                    packet.ReadSingle("Single368", index); // 368
                    packet.ReadSingle("Single360", index); // 360
                    packet.ReadInt32("Int356", index); // 356
                    packet.ReadInt32("Int372", index); // 372
                    packet.ReadSingle("Single376", index); // 376
                }

                if (moveInfo.HasSplineData) // 344
                {
                    if (bit336) // 336
                    {
                        packet.ReadUInt32("Spline Time", index); // 232
                        packet.ReadSingle("Spline Duration Multiplier Next", index); // 244

                        if (hasSplineUnkPart) // 304
                        {
                            for (var i = 0; i < unk284count; i++ )
                            {
                                packet.ReadSingle("unk292", index, i); // 292
                                packet.ReadSingle("unk288", index, i); // 288
                            }
                        }

                        packet.ReadSingle("Spline Duration Multiplier", index); // 240

                        for (var i = 0u; i < splineCount; i++) // 264
                        {
                            var wp = new Vector3
                            {
                                X = packet.ReadSingle(), // 268
                                Z = packet.ReadSingle(), // 276
                                Y = packet.ReadSingle(), // 272
                            };

                            packet.WriteLine("[{0}][{1}] Spline Waypoint: {2}", index, i, wp);
                        }

                        if (hasSplineVerticalAcceleration) // 260
                            packet.ReadInt32("Spline Vertical Acceleration", index); // 256

                        splineType = packet.ReadByteE<SplineType>("Spline Type", index); // 228

                        if (splineType == SplineType.FacingAngle) // 228
                            packet.ReadSingle("Facing Angle", index); // 308

                        if (splineType == SplineType.FacingSpot) // 228
                        {
                            var point = new Vector3
                            {
                                X = packet.ReadSingle(), // 320
                                Z = packet.ReadSingle(), // 328
                                Y = packet.ReadSingle(), // 324
                            };

                            packet.WriteLine("[{0}] Facing Spot: {1}", index, point);
                        }

                        if (hasSplineStartTime) // 252
                            packet.ReadUInt32("Spline Start time", index); // 248

                        packet.ReadUInt32("Spline Full Time", index); // 236
                    }

                    var endPoint = new Vector3();

                    endPoint.X = packet.ReadSingle(); // 212
                    endPoint.Z = packet.ReadSingle(); // 220
                    packet.ReadUInt32("Spline Id", index); // 208
                    endPoint.Y = packet.ReadSingle(); // 216

                    packet.WriteLine("[{0}] Spline Endpoint: {1}", index, endPoint);
                }

                packet.ReadSingle("Flight Speed", index); // 188

                if (skipInt) // 160
                    packet.ReadInt32("unk160", index); // 160

                packet.ReadXORByte(guid1, 2); // 10

                if (hasFallData) // 132
                {
                    if (hasFallDirection) // 128
                    {
                        packet.ReadSingle("Jump Speed", index); // 124
                        packet.ReadSingle("Jump Sin Angle", index); // 116
                        packet.ReadSingle("Jump Cos Angle", index); // 120
                    }

                    packet.ReadUInt32("Fall Time", index); // 108
                    packet.ReadSingle("Jump Z Speed", index); // 112
                }

                packet.ReadXORByte(guid1, 1); // 9
                packet.ReadSingle("Turn Speed", index); // 196

                if (readUint32) // 24
                    packet.ReadInt32("unk24", index); // 24

                packet.ReadSingle("Flight Back Speed", index); // 176

                if (hasSplineElevation) // 136
                    packet.ReadSingle("Spline Elevation", index); // 136

                packet.ReadXORByte(guid1, 7); // 15
                packet.ReadSingle("Pitch Rate", index); // 200

                for (var i = 0u; i < unk144count; i++ ) // 144
                    packet.ReadInt32("unk148", index); // 148

                moveInfo.Position.X = packet.ReadSingle(); // 28

                if (hasPitch) // 104
                    packet.ReadSingle("Pitch", index); // 104

                if (hasOrientation) // 40
                    moveInfo.Orientation = packet.ReadSingle("Orientation", index); // 40

                moveInfo.WalkSpeed = packet.ReadSingle("Walk Speed", index); // 168
                moveInfo.Position.Y = packet.ReadSingle(); // 32

                packet.ReadSingle("Run Back Speed", index); // 192
                packet.ReadXORByte(guid1, 3); // 11
                packet.ReadXORByte(guid1, 5); // 13
                packet.ReadXORByte(guid1, 6); // 14
                packet.ReadXORByte(guid1, 0); // 8

                packet.ReadSingle("Swim Back Speed", index); // 184
                moveInfo.RunSpeed = packet.ReadSingle("Run Speed", index); // 172
                packet.ReadSingle("Swim Speed", index); // 180
                moveInfo.Position.Z = packet.ReadSingle(); // 36

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

            if (hasUnk11) // 668
            {
                if (unkBlock1bit664) // 664
                {
                    for (var i = 0; i < count648; i++)
                    {
                        packet.ReadSingle("unk652*4+4", i);
                        packet.ReadSingle("unk652*4", i);
                        packet.ReadSingle("unk652*4+8", i);
                    }
                }
                if (unkBlock1bit600)
                {
                    packet.ReadSingle("unk584");
                    packet.ReadSingle("unk580");
                    packet.ReadSingle("unk596");
                    packet.ReadSingle("unk592");
                    packet.ReadSingle("unk576");
                    packet.ReadSingle("unk588");
                }
                if (unkBlock1bit644)
                {
                    for (var i = 0; i < count604; i++)
                    {
                        packet.ReadSingle("unk608*4", i);
                        packet.ReadSingle("unk608*4+4", i);
                    }
                    for (var i = 0; i < count620; i++)
                    {
                        packet.ReadSingle("unk624*4", i);
                        packet.ReadSingle("unk624*4+4", i);
                    }
                    packet.ReadSingle("unk640");
                    packet.ReadSingle("unk636");
                }
                packet.ReadInt32("unk520");
                if (unkBlock1bit544)
                    packet.ReadInt32("unk540");
                if (unkBlock1bit552)
                    packet.ReadInt32("unk548");
                if (unkBlock1bit536)
                    packet.ReadInt32("unk532");
                if (unkBlock1bit560)
                    packet.ReadInt32("unk556");
                if (unkBlock1bit572)
                {
                    packet.ReadSingle("unk564");
                    packet.ReadSingle("unk568");
                }
            }

            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;
        }