diff --git a/WowPacketParser.Proto/PacketStructures/structures.proto b/WowPacketParser.Proto/PacketStructures/structures.proto index 3f6792c9db..748f0a3024 100644 --- a/WowPacketParser.Proto/PacketStructures/structures.proto +++ b/WowPacketParser.Proto/PacketStructures/structures.proto @@ -344,15 +344,6 @@ enum UniversalSplineFlag { Steering = 0x40000000; } -enum CreatureMovementFlags { - NormalPathfinding = 0; // pathfinding - ExactPath = 1; // sent fully - ExactPathFlying = 2; // sent fully + flying flag - ExactPathFlyingCyclic = 3; // sent fully + flying flag + cyclic flag - ExactPathAndJump = 4; // sent fully + parabolic movement at the end - CombatMovement = 100; -} - message PacketMonsterMove { UniversalGuid mover = 1; Vec3 position = 2; @@ -371,8 +362,7 @@ message PacketMonsterMove { repeated Vec3 points = 13; repeated Vec3 packedPoints = 14; optional SplineJump jump = 15; - optional CreatureMovementFlags creatureMovementFlags = 16; - bool creationSpline = 17; + bool creationSpline = 16; } message SplineJump { diff --git a/WowPacketParser/PacketStructures/ProtoExtensions.cs b/WowPacketParser/PacketStructures/ProtoExtensions.cs index b5592c9a0b..d8fa527b5c 100644 --- a/WowPacketParser/PacketStructures/ProtoExtensions.cs +++ b/WowPacketParser/PacketStructures/ProtoExtensions.cs @@ -256,5 +256,101 @@ public static CreateObjectType ToCreateObjectType(this UpdateTypeCataclysm updat return CreateObjectType.Spawn; throw new ArgumentOutOfRangeException(); } + + public static ObjectType ToObjectType(this UniversalHighGuid highGuid) + { + switch (highGuid) + { + case UniversalHighGuid.Player: + return ObjectType.Player; + case UniversalHighGuid.DynamicObject: + return ObjectType.DynamicObject; + case UniversalHighGuid.Item: + return ObjectType.Item; + case UniversalHighGuid.GameObject: + case UniversalHighGuid.Transport: + return ObjectType.GameObject; + case UniversalHighGuid.Vehicle: + case UniversalHighGuid.Creature: + case UniversalHighGuid.Pet: + return ObjectType.Unit; + case UniversalHighGuid.AreaTrigger: + return ObjectType.AreaTrigger; + default: + return ObjectType.Object; + } + } + + public static string ToWowParserString(this UniversalGuid guid) + { + if (guid.KindCase == UniversalGuid.KindOneofCase.Guid128 && (guid.Guid128.High != 0 || guid.Guid128.Low != 0)) + { + var guid128 = new WowGuid128(guid.Guid128.Low, guid.Guid128.High); + return guid128.ToString(); + } + else if (guid.KindCase == UniversalGuid.KindOneofCase.Guid64 && (guid.Guid64.High != 0 || guid.Guid64.Low != 0)) + { + var guid64 = new WowGuid64(guid.Guid64.Low); + return guid64.ToString(); + } + + return "Full: 0x0"; + } + + public static uint GetLow(this UniversalGuid guid) + { + if (guid.KindCase == UniversalGuid.KindOneofCase.Guid128) + return (uint)(guid.Guid128.Low & 0xFFFFFFFFFF); + else if (guid.KindCase == UniversalGuid.KindOneofCase.Guid64) + { + switch (guid.Type) + { + case UniversalHighGuid.Player: + case UniversalHighGuid.DynamicObject: + case UniversalHighGuid.RaidGroup: + case UniversalHighGuid.Item: + return (uint)(guid.Guid64.Low & 0x000FFFFFFFFFFFFF); + case UniversalHighGuid.GameObject: + case UniversalHighGuid.Transport: + //case HighGuidType.MOTransport: ?? + case UniversalHighGuid.Vehicle: + case UniversalHighGuid.Creature: + case UniversalHighGuid.Pet: + return (uint)(guid.Guid64.Low & 0x00000000FFFFFFFFul); + } + + return (uint)(guid.Guid64.Low & 0x00000000FFFFFFFFul); + } + + return 0; + } + + public static uint GetEntry(this UniversalGuid128 guid) + { + return (uint)((guid.High >> 6) & 0x7FFFFF); + } + + public static byte GetSubType(this UniversalGuid128 guid) => (byte)(guid.High & 0x3F); + + public static ushort GetRealmId(this UniversalGuid128 guid) => (ushort)((guid.High >> 42) & 0x1FFF); + + public static uint GetServerId(this UniversalGuid128 guid) => (uint)((guid.Low >> 40) & 0xFFFFFF); + + public static ushort GetMapId(this UniversalGuid128 guid) => (ushort)((guid.High >> 29) & 0x1FFF); + + public static bool HasEntry(this UniversalGuid guid) + { + switch (guid.Type) + { + case UniversalHighGuid.Creature: + case UniversalHighGuid.GameObject: + case UniversalHighGuid.Pet: + case UniversalHighGuid.Vehicle: + case UniversalHighGuid.AreaTrigger: + return true; + default: + return false; + } + } } } diff --git a/WowPacketParser/SQL/Builders/Movement.cs b/WowPacketParser/SQL/Builders/Movement.cs index 5e07cc6594..5fe9d6c445 100644 --- a/WowPacketParser/SQL/Builders/Movement.cs +++ b/WowPacketParser/SQL/Builders/Movement.cs @@ -1,115 +1,189 @@ -using System; -using WowPacketParser.Enums; +using WowPacketParser.Enums; using WowPacketParser.Misc; -using WowPacketParser.Store; -using WowPacketParser.SQL; -using System.Linq; +using System.Collections.Generic; +using System.Text; +using WowPacketParser.Parsing.Proto; +using WowPacketParser.Proto; +using WowPacketParser.PacketStructures; +using System.IO; +using Org.BouncyCastle.Crypto.Digests; namespace WowPacketParser.SQL.Builders { - [BuilderClass] - public static class Movement + [ProtoBuilderClass] + public class Movement : BaseProtoQueryBuilder { - [BuilderMethod] - public static string MovementData() + private struct Waypoint { - if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.creature_movement)) - return string.Empty; + public Vec3 Position { get; init; } + public float Orientation { get; init; } + public bool Point { get; init; } + } - string output = "SET @MOVID = 0;\n"; - int pathIdCounter = 0; - if (Settings.TargetedProject == TargetedProject.Cmangos) - { - string nodeSql = "INSERT INTO waypoint_path (PathId, Point, PositionX, PositionY, PositionZ, Orientation, WaitTime, ScriptId, Comment) VALUES\n"; - foreach (var data in Storage.CreatureMovement.ToList()) - { - var creatureMovement = data.Item1; - if (creatureMovement.Waypoints.Count == 0) - continue; + public enum PathType + { + None = 0, // pathfinding + ExactPath = 1, // sent fully + ExactPathFlying = 2, // sent fully + flying flag + ExactPathFlyingCyclic = 3, // sent fully + flying flag + cyclic flag + ExactPathAndJump = 4, // sent fully + parabolic movement at the end + Invalid = 100, + } - string creatureName = SQLUtil.EscapeString(StoreGetters.GetName(Utilities.ObjectTypeToStore(creatureMovement.GUID.GetObjectType()), (int)creatureMovement.GUID.GetEntry())); - output += "-- " + $"GUID: {creatureMovement.GUID} PathType: {creatureMovement.Type}" + "\n" + $"INSERT INTO waypoint_path_name(PathId, Name) VALUES(@MOVID + {pathIdCounter},'{creatureName}');\n" + nodeSql; + private class AggregatedPaths + { + public List Paths { get; set; } = new(); + public int PointCount { get; set; } = 0; + } - int pointIdCounter = 1; - int actualPoint = 1; - foreach (var node in creatureMovement.Waypoints) - { - bool finalP = creatureMovement.Destination == null && creatureMovement.Waypoints.Count == actualPoint; - ++actualPoint; - float ori = finalP ? (creatureMovement.FinalOrientation != null ? creatureMovement.FinalOrientation.Value : 100f) : 100f; - if (node.Point == false) - { - if (Settings.SkipIntermediatePoints == true) - continue; - output += "-- "; - } + private class Path + { + public List Waypoints { get; init; } + public PathType Type { get; init; } + } - output += $"(@MOVID + {pathIdCounter}, '{pointIdCounter}', '{node.Position.X}', '{node.Position.Y}', '{node.Position.Z}', '{ori}', '0', '0', NULL)"; - - if (!finalP) - output += ",\n"; - else - output += ";\n\n"; - - ++pointIdCounter; - } + private Dictionary pathsPerGuid = new(); - if (creatureMovement.Destination != null) - { - float ori = creatureMovement.FinalOrientation != null ? creatureMovement.FinalOrientation.Value : 100f; - output += $"(@MOVID + {pathIdCounter}, '{pointIdCounter}', '{creatureMovement.Destination.Position.X}', '{creatureMovement.Destination.Position.Y}', '{creatureMovement.Destination.Position.Z}', '{ori}', '0', '0', NULL);\n"; - } + public override bool IsEnabled() => Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.creature_movement) && + Settings.TargetedProject is TargetedProject.Cmangos or TargetedProject.TrinityCore; - ++pathIdCounter; - } + private PathType GetMovementType(PacketMonsterMove packet) + { + PathType flags = PathType.None; + if (packet.Flags.HasFlag(UniversalSplineFlag.EnterCycle) || packet.Flags.HasFlag(UniversalSplineFlag.Cyclic)) + flags = PathType.ExactPathFlyingCyclic; + else if (packet.Flags.HasFlag(UniversalSplineFlag.Flying)) + flags = PathType.ExactPathFlying; + else if (packet.Flags.HasFlag(UniversalSplineFlag.UncompressedPath)) + flags = PathType.ExactPath; + else if (packet.LookTarget != null) + flags = PathType.Invalid; + else if (packet.Jump != null && packet.Jump.StartTime > 0) + flags = PathType.ExactPathAndJump; + return flags; + } + + protected override VoidType Process(PacketBase basePacket, PacketMonsterMove packet) + { + if (packet.PackedPoints.Count == 0 && packet.Points.Count == 0) + return default; + + var movementType = GetMovementType(packet); + if (movementType == PathType.Invalid) + return default; + + Path path = new Path() + { + Waypoints = new List(), + Type = movementType + }; + + for (var index = 0; index < packet.PackedPoints.Count; index++) + { + var node = packet.PackedPoints[index]; + bool finalP = packet.Destination == null && packet.PackedPoints.Count - 1 != index; + path.Waypoints.Add(new Waypoint() + { + Position = node, + Orientation = 100, + Point = false + }); + } + + for (var index = 0; index < packet.Points.Count; index++) + { + var node = packet.Points[index]; + path.Waypoints.Add(new Waypoint() + { + Position = node, + Orientation = 100, + Point = true + }); } - else if (Settings.TargetedProject == TargetedProject.TrinityCore) + + bool dest = false; + if (packet.Destination != null && !(packet.Destination.X == 0 && packet.Destination.Y == 0 && packet.Destination.Z == 0)) { - string nodeSql = "INSERT INTO waypoint_path_node (PathId, NodeId, PositionX, PositionY, PositionZ, Orientation, Delay) VALUES\n"; - foreach (var data in Storage.CreatureMovement.ToList()) + float ori = packet.HasLookOrientation ? packet.LookOrientation : 100f; + path.Waypoints.Add(new Waypoint() { - var creatureMovement = data.Item1; - if (creatureMovement.Waypoints.Count == 0) - continue; + Position = packet.Destination, + Orientation = ori, + Point = true + }); + dest = true; + } - string commentInformation = $"GUID: {creatureMovement.GUID} PathType: {creatureMovement.Type}"; - output += "-- " + commentInformation + "\n"; - output += nodeSql; + if (!pathsPerGuid.TryGetValue(packet.Mover, out var pathList)) + { + pathList = new AggregatedPaths(); + pathsPerGuid.Add(packet.Mover, pathList); + } + pathList.Paths.Add(path); + if (Settings.SkipIntermediatePoints == true) + pathList.PointCount += packet.Points.Count + (dest ? 1 : 0); + else + pathList.PointCount += path.Waypoints.Count; - int pointIdCounter = 1; - int actualPoint = 1; - foreach (var node in creatureMovement.Waypoints) + return default; + } + + protected override string GenerateQuery() + { + StringBuilder output = new(); + output.AppendLine("SET @MOVID = 0;"); + int pathIdCounter = 0; + foreach (var (mover, paths) in pathsPerGuid) + { + string commentInformation = $"GUID: {mover.ToWowParserString()}"; + output.AppendLine("-- " + commentInformation); + if (Settings.TargetedProject == TargetedProject.Cmangos) + { + output.AppendLine($"INSERT INTO waypoint_path_name(PathId, Name) VALUES(@MOVID + {pathIdCounter},'{SQLUtil.EscapeString(StoreGetters.GetName(Utilities.ObjectTypeToStore(mover.Type.ToObjectType()), (int)mover.Entry))}');"); + output.AppendLine("INSERT INTO waypoint_path (PathId, Point, PositionX, PositionY, PositionZ, Orientation, WaitTime, ScriptId, Comment) VALUES"); + } + else if (Settings.TargetedProject == TargetedProject.TrinityCore) + { + output.AppendLine("INSERT INTO waypoint_path_node (PathId, NodeId, PositionX, PositionY, PositionZ, Orientation, Delay) VALUES"); + } + int pointIdCounter = 1; + foreach (var path in paths.Paths) + { + foreach (var node in path.Waypoints) { - bool finalP = creatureMovement.Destination == null && creatureMovement.Waypoints.Count == actualPoint; - ++actualPoint; - float ori = finalP ? (creatureMovement.FinalOrientation != null ? creatureMovement.FinalOrientation.Value : 100f) : 100f; if (node.Point == false) { if (Settings.SkipIntermediatePoints == true) continue; - output += "-- "; + output.Append("-- "); } - output += $"(@MOVID + {pathIdCounter}, '{pointIdCounter}', '{node.Position.X}', '{node.Position.Y}', '{node.Position.Z}', '{ori}')"; - if (!finalP) - output += ",\n"; + var isLast = pointIdCounter == paths.PointCount; + if (Settings.TargetedProject == TargetedProject.Cmangos) + output.Append($"(@MOVID + {pathIdCounter}, '{pointIdCounter}', '{node.Position.X}', '{node.Position.Y}', '{node.Position.Z}', '{node.Orientation}', '0', '0', NULL)"); + else if (Settings.TargetedProject == TargetedProject.TrinityCore) + output.Append($"(@MOVID + {pathIdCounter}, '{pointIdCounter}', '{node.Position.X}', '{node.Position.Y}', '{node.Position.Z}', '{node.Orientation}')"); + + if (!isLast) + output.Append(","); else - output += ";\n\n"; + output.Append(";"); - ++pointIdCounter; - } + if (pointIdCounter == 1) + output.Append($" -- PathType: {path.Type}"); - if (creatureMovement.Destination != null) - { - float ori = creatureMovement.FinalOrientation != null ? creatureMovement.FinalOrientation.Value : 100f; - output += $"(@MOVID + {pathIdCounter}, '{pointIdCounter}', '{creatureMovement.Destination.Position.X}', '{creatureMovement.Destination.Position.Y}', '{creatureMovement.Destination.Position.Z}', '{ori}', '0', '0', NULL);\n\n"; + if (isLast) + output.AppendLine(); + + ++pointIdCounter; } - ++pathIdCounter; + output.AppendLine(); } - } - return output; + ++pathIdCounter; + } + return output.ToString(); } } } diff --git a/WowPacketParserModule.V2_5_1_38707/Parsers/UpdateHandler.cs b/WowPacketParserModule.V2_5_1_38707/Parsers/UpdateHandler.cs index 4f2f703585..2004bcd285 100644 --- a/WowPacketParserModule.V2_5_1_38707/Parsers/UpdateHandler.cs +++ b/WowPacketParserModule.V2_5_1_38707/Parsers/UpdateHandler.cs @@ -8,6 +8,7 @@ using WowPacketParser.Store; using WowPacketParser.Store.Objects; using WowPacketParser.Store.Objects.UpdateFields; +using WowPacketParserModule.V7_0_3_22248.Enums; using CoreFields = WowPacketParser.Enums.Version; using CoreParsers = WowPacketParser.Parsing.Parsers; using MovementFlag = WowPacketParser.Enums.v4.MovementFlag; @@ -456,14 +457,7 @@ private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, packet.ResetBitReader(); var splineFlag = packet.ReadUInt32E("SplineFlags", index); - CreatureMovementFlags moveType = CreatureMovementFlags.NormalPathfinding; - - if (splineFlag.HasFlag(SplineFlag.EnterCycle) || splineFlag.HasFlag(SplineFlag.Cyclic)) - moveType = CreatureMovementFlags.ExactPathFlyingCyclic; - else if (splineFlag.HasFlag(SplineFlag.Flying)) - moveType = CreatureMovementFlags.ExactPathFlying; - else if (splineFlag.HasFlag(SplineFlag.UncompressedPath)) - moveType = CreatureMovementFlags.ExactPath; + monsterMove.Flags = splineFlag.ToUniversal(); packet.ReadInt32("Elapsed", index); packet.ReadUInt32("Duration", index); @@ -501,15 +495,15 @@ private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, switch (face) { case 1: - var faceSpot = packet.ReadVector3("FaceSpot", index); + var faceSpot = monsterMove.LookPosition = packet.ReadVector3("FaceSpot", index); orientation = GetAngle(moveInfo.Position.X, moveInfo.Position.Y, faceSpot.X, faceSpot.Y); break; case 2: - packet.ReadPackedGuid128("FaceGUID", index); - moveType = CreatureMovementFlags.CombatMovement; + SplineLookTarget lookTarget = monsterMove.LookTarget = new(); + lookTarget.Target = packet.ReadPackedGuid128("FaceGUID", index); break; case 3: - orientation = packet.ReadSingle("FaceDirection", index); + monsterMove.LookOrientation = orientation = packet.ReadSingle("FaceDirection", index); break; default: break; @@ -532,9 +526,7 @@ private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, if (hasJumpExtraData) { - var jumpData = V8_0_1_27101.Parsers.MovementHandler.ReadMonsterSplineJumpExtraData(packet, index); - if (jumpData.StartTime > 0) - moveType = CreatureMovementFlags.ExactPathAndJump; + monsterMove.Jump = V8_0_1_27101.Parsers.MovementHandler.ReadMonsterSplineJumpExtraData(packet, index); } if (hasAnimationTierTransition) @@ -555,8 +547,6 @@ private static MovementInfo ReadMovementUpdateBlock(Packet packet, WowGuid guid, packet.ReadInt32("Unknown4", index, "Unknown901", i); } } - - monsterMove.CreatureMovementFlags = moveType; } } } diff --git a/WowPacketParserModule.V3_4_0_45166/Parsers/MovementHandler.cs b/WowPacketParserModule.V3_4_0_45166/Parsers/MovementHandler.cs index fecea63ff8..abf627f0c7 100644 --- a/WowPacketParserModule.V3_4_0_45166/Parsers/MovementHandler.cs +++ b/WowPacketParserModule.V3_4_0_45166/Parsers/MovementHandler.cs @@ -58,15 +58,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ var splineFlag = packet.ReadUInt32E("Flags", indexes); monsterMove.Flags = splineFlag.ToUniversal(); - CreatureMovementFlags moveType = CreatureMovementFlags.NormalPathfinding; - - if (splineFlag.HasFlag(SplineFlag.EnterCicle) || splineFlag.HasFlag(SplineFlag.Cyclic)) - moveType = CreatureMovementFlags.ExactPathFlyingCyclic; - else if (splineFlag.HasFlag(SplineFlag.Flying)) - moveType = CreatureMovementFlags.ExactPathFlying; - else if (splineFlag.HasFlag(SplineFlag.UncompressedPath)) - moveType = CreatureMovementFlags.ExactPath; - if (ClientVersion.RemovedInVersion(ClientType.Shadowlands)) { packet.ReadByte("AnimTier", indexes); @@ -117,7 +108,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ SplineLookTarget lookTarget = monsterMove.LookTarget = new(); lookTarget.Orientation = packet.ReadSingle("FaceDirection", indexes); lookTarget.Target = packet.ReadPackedGuid128("FacingGUID", indexes); - moveType = CreatureMovementFlags.CombatMovement; break; case SplineFacingType.Angle: monsterMove.LookOrientation = packet.ReadSingle("FaceDirection", indexes); @@ -170,8 +160,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ if (hasJumpExtraData) { monsterMove.Jump = ReadMonsterSplineJumpExtraData(packet, indexes, "MonsterSplineJumpExtraData"); - if (monsterMove.Jump.StartTime > 0) - moveType = CreatureMovementFlags.ExactPathAndJump; } if (hasAnimTier) @@ -198,8 +186,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ packet.AddValue("Computed Distance", distance, indexes); packet.AddValue("Computed Speed", (distance / monsterMove.MoveTime) * 1000, indexes); } - - monsterMove.CreatureMovementFlags = moveType; } public static void ReadMovementMonsterSpline(Packet packet, Vector3 pos, params object[] indexes) diff --git a/WowPacketParserModule.V4_4_0_54481/Parsers/MovementHandler.cs b/WowPacketParserModule.V4_4_0_54481/Parsers/MovementHandler.cs index 856365d667..5a6628a24c 100644 --- a/WowPacketParserModule.V4_4_0_54481/Parsers/MovementHandler.cs +++ b/WowPacketParserModule.V4_4_0_54481/Parsers/MovementHandler.cs @@ -161,15 +161,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ var splineFlag = packet.ReadUInt32E("Flags", indexes); monsterMove.Flags = splineFlag.ToUniversal(); - CreatureMovementFlags moveType = CreatureMovementFlags.NormalPathfinding; - - if (splineFlag.HasFlag(SplineFlag.EnterCycle) || splineFlag.HasFlag(SplineFlag.Cyclic)) - moveType = CreatureMovementFlags.ExactPathFlyingCyclic; - else if (splineFlag.HasFlag(SplineFlag.Flying)) - moveType = CreatureMovementFlags.ExactPathFlying; - else if (splineFlag.HasFlag(SplineFlag.UncompressedPath)) - moveType = CreatureMovementFlags.ExactPath; - monsterMove.ElapsedTime = packet.ReadInt32("Elapsed", indexes); monsterMove.MoveTime = packet.ReadUInt32("MoveTime", indexes); packet.ReadUInt32("FadeObjectTime", indexes); @@ -202,7 +193,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ SplineLookTarget lookTarget = monsterMove.LookTarget = new(); lookTarget.Orientation = packet.ReadSingle("FaceDirection", indexes); lookTarget.Target = packet.ReadPackedGuid128("FacingGUID", indexes); - moveType = CreatureMovementFlags.CombatMovement; break; case SplineFacingType.Angle: monsterMove.LookOrientation = packet.ReadSingle("FaceDirection", indexes); @@ -255,8 +245,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ if (hasJumpExtraData) { monsterMove.Jump = ReadMonsterSplineJumpExtraData(packet, indexes, "MonsterSplineJumpExtraData"); - if (monsterMove.Jump.StartTime > 0) - moveType = CreatureMovementFlags.ExactPathAndJump; } if (hasAnimTier) @@ -272,8 +260,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ packet.AddValue("Computed Distance", distance, indexes); packet.AddValue("Computed Speed", (distance / monsterMove.MoveTime) * 1000, indexes); } - - monsterMove.CreatureMovementFlags = moveType; } public static void ReadMovementMonsterSpline(Packet packet, Vector3 pos, params object[] indexes) diff --git a/WowPacketParserModule.V8_0_1_27101/Parsers/MovementHandler.cs b/WowPacketParserModule.V8_0_1_27101/Parsers/MovementHandler.cs index 4773a3efd5..bffac31e76 100644 --- a/WowPacketParserModule.V8_0_1_27101/Parsers/MovementHandler.cs +++ b/WowPacketParserModule.V8_0_1_27101/Parsers/MovementHandler.cs @@ -59,15 +59,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ var splineFlag = packet.ReadUInt32E("Flags", indexes); monsterMove.Flags = splineFlag.ToUniversal(); - CreatureMovementFlags moveType = CreatureMovementFlags.NormalPathfinding; - - if (splineFlag.HasFlag(SplineFlag.EnterCycle) || splineFlag.HasFlag(SplineFlag.Cyclic)) - moveType = CreatureMovementFlags.ExactPathFlyingCyclic; - else if (splineFlag.HasFlag(SplineFlag.Flying)) - moveType = CreatureMovementFlags.ExactPathFlying; - else if (splineFlag.HasFlag(SplineFlag.UncompressedPath)) - moveType = CreatureMovementFlags.ExactPath; - if (ClientVersion.RemovedInVersion(ClientType.Shadowlands)) { packet.ReadByte("AnimTier", indexes); @@ -118,7 +109,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ SplineLookTarget lookTarget = monsterMove.LookTarget = new(); lookTarget.Orientation = packet.ReadSingle("FaceDirection", indexes); lookTarget.Target = packet.ReadPackedGuid128("FacingGUID", indexes); - moveType = CreatureMovementFlags.CombatMovement; break; case SplineFacingType.Angle: monsterMove.LookOrientation = packet.ReadSingle("FaceDirection", indexes); @@ -171,8 +161,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ if (hasJumpExtraData) { monsterMove.Jump = ReadMonsterSplineJumpExtraData(packet, indexes, "MonsterSplineJumpExtraData"); - if (monsterMove.Jump.StartTime > 0) - moveType = CreatureMovementFlags.ExactPathAndJump; } if (hasAnimTier) @@ -199,8 +187,6 @@ public static void ReadMovementSpline(Packet packet, Vector3 pos, params object[ packet.AddValue("Computed Distance", distance, indexes); packet.AddValue("Computed Speed", (distance / monsterMove.MoveTime) * 1000, indexes); } - - monsterMove.CreatureMovementFlags = moveType; } public static void ReadMovementMonsterSpline(Packet packet, Vector3 pos, WowGuid guid, params object[] indexes)