Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndysc committed Oct 5, 2023
2 parents b1edcf1 + c9bce79 commit b2f1881
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 41 deletions.
2 changes: 1 addition & 1 deletion LoaderAvalonia/LoaderAvalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net7.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<ApplicationIcon>../WowDatabaseEditorCore.Avalonia/Icon.ico</ApplicationIcon>
<ApplicationIcon>../WoWDatabaseEditorCore.Avalonia/Icon.ico</ApplicationIcon>
<AssemblyName>WoWDatabaseEditorCore.Avalonia</AssemblyName>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public class PacketParserLocator : IPacketParserLocator
return new[]
{
#if DEBUG
@"..\..\..\WowPacketParser\WowPacketParser\bin\Debug\WowPacketParser.exe",
@"../../../WowPacketParser/WowPacketParser/bin/Debug/WowPacketParser.dll",
@"..\..\..\WoWPacketParser\WowPacketParser\bin\Debug\WowPacketParser.exe",
@"../../../WoWPacketParser/WowPacketParser/bin/Debug/WowPacketParser.dll",
#endif
@"..\..\..\WowPacketParser\WowPacketParser\bin\Release\WowPacketParser.exe",
@"../../../WowPacketParser/WowPacketParser/bin/Release/WowPacketParser.dll",
@"..\..\..\WoWPacketParser\WowPacketParser\bin\Release\WowPacketParser.exe",
@"../../../WoWPacketParser/WowPacketParser/bin/Release/WowPacketParser.dll",

@"WoWPacketParser\WowPacketParser.exe",
@"WoWPacketParser/WowPacketParser.dll",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WDE.Module.Attributes;
using WDE.SqlQueryGenerator;
using WowPacketParser.Proto;

namespace WDE.PacketViewer.Processing.Processors.Paths;

[AutoRegister]
[RequiresCore("CMaNGOS-Classic", "CMaNGOS-TBC", "CMaNGOS-WoTLK")]
public class CmangosPathSniffWaypointsExporter : ISniffWaypointsExporter
{
public string Id => "cmangos_script_waypoints";

public string Name => "CMaNGOS Script Waypoints (`waypoints`)";

public override string ToString() => Name;

public async Task Export(StringBuilder sb, int basePathNum, UniversalGuid guid, IWaypointProcessor.UnitMovementState state, float randomness)
{
var q = Queries.BeginTransaction();
List<object> toInsert = new();

uint pathEntry = guid.Entry;

if (basePathNum > 0)
pathEntry = (uint)(guid.Entry * 100 + (basePathNum - 1));

foreach (var path in state.Paths)
{
bool outOfRange = pathEntry > guid.Entry * 100 + 99;

if (outOfRange)
q.StartBlockComment("Those paths are out of range, because a single entry can have up to 100 paths");

int pointid = 1;
q.Table("waypoint_path").Where(row => row.Column<uint>("PathId") == pathEntry).Delete();
toInsert.Clear();
foreach (var segment in path.Segments)
{
for (var index = 0; index < segment.Waypoints.Count; index++)
{
var isFirst = index == 0;
var isLast = index == segment.Waypoints.Count - 1;

var waypoint = segment.Waypoints[index];
toInsert.Add(new
{
PathId = pathEntry,
Point = pointid++,
PositionX = waypoint.X,
PositionY = waypoint.Y,
PositionZ = waypoint.Z,
Orientation = isLast ? segment.FinalOrientation : null,
WaitTime = isFirst ? (int)(segment.Wait?.TotalMilliseconds ?? 0) : 0
});
}
}

if (toInsert.Count > 0)
q.Table("waypoint_path").BulkInsert(toInsert);

if (outOfRange)
q.EndBlockComment();

if (pathEntry == guid.Entry)
pathEntry = guid.Entry * 100;
else
pathEntry++;

q.BlankLine();
}

sb.AppendLine(q.Close().QueryString);
}
}
2 changes: 1 addition & 1 deletion WDE.PacketViewer/WDE.PacketViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<ProjectReference Include="..\Rendering\TheMaths\TheMaths.csproj" />
<ProjectReference Include="..\WDE.MVVM\WDE.MVVM.csproj" />
<ProjectReference Include="..\WoWDatabaseEditor.Common\WDE.Common\WDE.Common.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParser.Proto\WowPacketParser.Proto.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParser.Proto\WowPacketParser.Proto.csproj" />
</ItemGroup>
<ItemGroup>
<Antlr4 Include="Filtering\Antlr\Syntax.g4">
Expand Down
38 changes: 19 additions & 19 deletions WoWDatabaseEditor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -126,43 +126,43 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RenderingTester", "Renderin
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WoWPacketParser", "WoWPacketParser", "{5B4101BE-5A22-4B88-9E94-FFC484E04BDE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParser", "WowPacketParser\WowPacketParser\WowPacketParser.csproj", "{4EBDE3AD-9831-4F44-9EFB-5DEE51EE6390}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParser", "WoWPacketParser\WowPacketParser\WowPacketParser.csproj", "{4EBDE3AD-9831-4F44-9EFB-5DEE51EE6390}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParser.Tests", "WowPacketParser\WowPacketParser.Tests\WowPacketParser.Tests.csproj", "{A53E4EF2-5349-4149-AE71-AA7A800E637C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParser.Tests", "WoWPacketParser\WowPacketParser.Tests\WowPacketParser.Tests.csproj", "{A53E4EF2-5349-4149-AE71-AA7A800E637C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.BattleNet.V37165", "WowPacketParser\WowPacketParserModule.BattleNet.V37165\WowPacketParserModule.BattleNet.V37165.csproj", "{9C185B8A-052F-4240-9EC3-729496124402}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.BattleNet.V37165", "WoWPacketParser\WowPacketParserModule.BattleNet.V37165\WowPacketParserModule.BattleNet.V37165.csproj", "{9C185B8A-052F-4240-9EC3-729496124402}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.Substructures", "WowPacketParser\WowPacketParserModule.Substructures\WowPacketParserModule.Substructures.csproj", "{A0CD6DDC-E2B3-400E-ACB7-E2339B74FCF9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.Substructures", "WoWPacketParser\WowPacketParserModule.Substructures\WowPacketParserModule.Substructures.csproj", "{A0CD6DDC-E2B3-400E-ACB7-E2339B74FCF9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V1_13_2_31446", "WowPacketParser\WowPacketParserModule.V1_13_2_31446\WowPacketParserModule.V1_13_2_31446.csproj", "{733875B9-E2B9-4EF5-8B5C-B8E98AF25975}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V1_13_2_31446", "WoWPacketParser\WowPacketParserModule.V1_13_2_31446\WowPacketParserModule.V1_13_2_31446.csproj", "{733875B9-E2B9-4EF5-8B5C-B8E98AF25975}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V2_4_3_8606", "WowPacketParser\WowPacketParserModule.V2_4_3_8606\WowPacketParserModule.V2_4_3_8606.csproj", "{A072A641-D60D-4765-B8BD-F00F727B4F89}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V2_4_3_8606", "WoWPacketParser\WowPacketParserModule.V2_4_3_8606\WowPacketParserModule.V2_4_3_8606.csproj", "{A072A641-D60D-4765-B8BD-F00F727B4F89}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V2_5_1_38707", "WowPacketParser\WowPacketParserModule.V2_5_1_38707\WowPacketParserModule.V2_5_1_38707.csproj", "{69F8EF91-D0BF-4131-AD7F-5ED4DCEBB4B9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V2_5_1_38707", "WoWPacketParser\WowPacketParserModule.V2_5_1_38707\WowPacketParserModule.V2_5_1_38707.csproj", "{69F8EF91-D0BF-4131-AD7F-5ED4DCEBB4B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V4_3_4_15595", "WowPacketParser\WowPacketParserModule.V4_3_4_15595\WowPacketParserModule.V4_3_4_15595.csproj", "{0330F689-A57E-4609-8F95-E766C0B8FFEC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V4_3_4_15595", "WoWPacketParser\WowPacketParserModule.V4_3_4_15595\WowPacketParserModule.V4_3_4_15595.csproj", "{0330F689-A57E-4609-8F95-E766C0B8FFEC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_3_0_16981", "WowPacketParser\WowPacketParserModule.V5_3_0_16981\WowPacketParserModule.V5_3_0_16981.csproj", "{AA0F45A4-467B-41AF-AA00-843D013E0156}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_3_0_16981", "WoWPacketParser\WowPacketParserModule.V5_3_0_16981\WowPacketParserModule.V5_3_0_16981.csproj", "{AA0F45A4-467B-41AF-AA00-843D013E0156}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_0_17359", "WowPacketParser\WowPacketParserModule.V5_4_0_17359\WowPacketParserModule.V5_4_0_17359.csproj", "{8C9313FD-A37C-45A2-9003-E84747E36188}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_0_17359", "WoWPacketParser\WowPacketParserModule.V5_4_0_17359\WowPacketParserModule.V5_4_0_17359.csproj", "{8C9313FD-A37C-45A2-9003-E84747E36188}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_1_17538", "WowPacketParser\WowPacketParserModule.V5_4_1_17538\WowPacketParserModule.V5_4_1_17538.csproj", "{F12A19FD-BCA3-426D-A4DA-7DE75EB9E39E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_1_17538", "WoWPacketParser\WowPacketParserModule.V5_4_1_17538\WowPacketParserModule.V5_4_1_17538.csproj", "{F12A19FD-BCA3-426D-A4DA-7DE75EB9E39E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_2_17658", "WowPacketParser\WowPacketParserModule.V5_4_2_17658\WowPacketParserModule.V5_4_2_17658.csproj", "{34CB52B4-2CB9-4E44-AF77-9F12C546775F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_2_17658", "WoWPacketParser\WowPacketParserModule.V5_4_2_17658\WowPacketParserModule.V5_4_2_17658.csproj", "{34CB52B4-2CB9-4E44-AF77-9F12C546775F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_7_17898", "WowPacketParser\WowPacketParserModule.V5_4_7_17898\WowPacketParserModule.V5_4_7_17898.csproj", "{39A20758-BC18-4925-B22C-C16CF8943131}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_7_17898", "WoWPacketParser\WowPacketParserModule.V5_4_7_17898\WowPacketParserModule.V5_4_7_17898.csproj", "{39A20758-BC18-4925-B22C-C16CF8943131}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_8_18291", "WowPacketParser\WowPacketParserModule.V5_4_8_18291\WowPacketParserModule.V5_4_8_18291.csproj", "{FB301202-68DD-4048-8734-C82E6FF42302}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V5_4_8_18291", "WoWPacketParser\WowPacketParserModule.V5_4_8_18291\WowPacketParserModule.V5_4_8_18291.csproj", "{FB301202-68DD-4048-8734-C82E6FF42302}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V6_0_2_19033", "WowPacketParser\WowPacketParserModule.V6_0_2_19033\WowPacketParserModule.V6_0_2_19033.csproj", "{24D556A8-025D-4031-AB19-B87815750190}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V6_0_2_19033", "WoWPacketParser\WowPacketParserModule.V6_0_2_19033\WowPacketParserModule.V6_0_2_19033.csproj", "{24D556A8-025D-4031-AB19-B87815750190}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V7_0_3_22248", "WowPacketParser\WowPacketParserModule.V7_0_3_22248\WowPacketParserModule.V7_0_3_22248.csproj", "{315B1ACB-A34C-4541-A547-E6701688874A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V7_0_3_22248", "WoWPacketParser\WowPacketParserModule.V7_0_3_22248\WowPacketParserModule.V7_0_3_22248.csproj", "{315B1ACB-A34C-4541-A547-E6701688874A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V8_0_1_27101", "WowPacketParser\WowPacketParserModule.V8_0_1_27101\WowPacketParserModule.V8_0_1_27101.csproj", "{2FD96AE7-74EA-4608-8071-CAFE6948FB6D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V8_0_1_27101", "WoWPacketParser\WowPacketParserModule.V8_0_1_27101\WowPacketParserModule.V8_0_1_27101.csproj", "{2FD96AE7-74EA-4608-8071-CAFE6948FB6D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V9_0_1_36216", "WowPacketParser\WowPacketParserModule.V9_0_1_36216\WowPacketParserModule.V9_0_1_36216.csproj", "{0A932EF2-830E-4409-AE4F-78A9C110E21F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParserModule.V9_0_1_36216", "WoWPacketParser\WowPacketParserModule.V9_0_1_36216\WowPacketParserModule.V9_0_1_36216.csproj", "{0A932EF2-830E-4409-AE4F-78A9C110E21F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParser.Proto", "WowPacketParser\WowPacketParser.Proto\WowPacketParser.Proto.csproj", "{0643A92F-D13C-493C-AE87-37EE67B17EF6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WowPacketParser.Proto", "WoWPacketParser\WowPacketParser.Proto\WowPacketParser.Proto.csproj", "{0643A92F-D13C-493C-AE87-37EE67B17EF6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.SqlQueryGenerator", "WDE.SqlQueryGenerator\WDE.SqlQueryGenerator.csproj", "{C5F652DC-2998-4767-9E68-008BA51B097E}"
EndProject
Expand Down
32 changes: 16 additions & 16 deletions WoWPacketParserLoader/WoWPacketParserLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.BattleNet.V37165\WowPacketParserModule.BattleNet.V37165.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.Substructures\WowPacketParserModule.Substructures.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.BattleNet.V37165\WowPacketParserModule.BattleNet.V37165.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.Substructures\WowPacketParserModule.Substructures.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V10_0_0_46181\WowPacketParserModule.V10_0_0_46181.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V1_13_2_31446\WowPacketParserModule.V1_13_2_31446.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V2_4_3_8606\WowPacketParserModule.V2_4_3_8606.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V1_13_2_31446\WowPacketParserModule.V1_13_2_31446.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V2_4_3_8606\WowPacketParserModule.V2_4_3_8606.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V3_4_0_45166\WowPacketParserModule.V3_4_0_45166.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V4_3_4_15595\WowPacketParserModule.V4_3_4_15595.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V5_3_0_16981\WowPacketParserModule.V5_3_0_16981.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V5_4_0_17359\WowPacketParserModule.V5_4_0_17359.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V5_4_1_17538\WowPacketParserModule.V5_4_1_17538.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V5_4_2_17658\WowPacketParserModule.V5_4_2_17658.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V5_4_7_17898\WowPacketParserModule.V5_4_7_17898.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V5_4_8_18291\WowPacketParserModule.V5_4_8_18291.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V6_0_2_19033\WowPacketParserModule.V6_0_2_19033.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V7_0_3_22248\WowPacketParserModule.V7_0_3_22248.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V8_0_1_27101\WowPacketParserModule.V8_0_1_27101.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParserModule.V9_0_1_36216\WowPacketParserModule.V9_0_1_36216.csproj" />
<ProjectReference Include="..\WowPacketParser\WowPacketParser\WowPacketParser.csproj" SkipGetTargetFrameworkProperties="true" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V4_3_4_15595\WowPacketParserModule.V4_3_4_15595.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V5_3_0_16981\WowPacketParserModule.V5_3_0_16981.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V5_4_0_17359\WowPacketParserModule.V5_4_0_17359.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V5_4_1_17538\WowPacketParserModule.V5_4_1_17538.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V5_4_2_17658\WowPacketParserModule.V5_4_2_17658.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V5_4_7_17898\WowPacketParserModule.V5_4_7_17898.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V5_4_8_18291\WowPacketParserModule.V5_4_8_18291.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V6_0_2_19033\WowPacketParserModule.V6_0_2_19033.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V7_0_3_22248\WowPacketParserModule.V7_0_3_22248.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V8_0_1_27101\WowPacketParserModule.V8_0_1_27101.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParserModule.V9_0_1_36216\WowPacketParserModule.V9_0_1_36216.csproj" />
<ProjectReference Include="..\WoWPacketParser\WowPacketParser\WowPacketParser.csproj" SkipGetTargetFrameworkProperties="true" />
</ItemGroup>
</Project>

0 comments on commit b2f1881

Please sign in to comment.