25 files changed, 40 insertions(+), 454 deletions(-)
M NosSmooth.sln
D Remote/NosSmooth.Cryptography/IDecryptor.cs
D Remote/NosSmooth.Cryptography/IEncryptor.cs
D Remote/NosSmooth.Cryptography/NosSmooth.Cryptography.csproj
D Remote/NosSmooth.Cryptography/WorldDecryptor.cs
D Remote/NosSmooth.Cryptography/WorldEncryptor.cs
D Remote/NosSmooth.RemoteClient/NosSmooth.RemoteClient.csproj
D Remote/NosSmooth.RemoteClient/Properties/AssemblyInfo.cs
D Samples/DamageCounter/App.xaml
D Samples/DamageCounter/App.xaml.cs
D Samples/DamageCounter/AssemblyInfo.cs
D Samples/DamageCounter/DamageCounter.csproj
D Samples/DamageCounter/MainWindow.xaml
D Samples/DamageCounter/MainWindow.xaml.cs
D Samples/PacketInterceptor/DummyNostaleClient.cs
D Samples/PacketInterceptor/PacketInterceptor.csproj
D Samples/PacketInterceptor/Program.cs
D Samples/PacketInterceptor/TestResponder.cs
D Samples/PacketLogger/App.xaml
D Samples/PacketLogger/App.xaml.cs
D Samples/PacketLogger/AssemblyInfo.cs
D Samples/PacketLogger/MainWindow.xaml
D Samples/PacketLogger/MainWindow.xaml.cs
D Samples/PacketLogger/PacketLogger.csproj
D Samples/PacketLogger/Packets/PacketLoggerResponder.cs
M NosSmooth.sln => NosSmooth.sln +40 -10
@@ 30,25 30,29 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".metadata", ".metadata", "{
Directory.build.props = Directory.build.props
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleChat", "Samples\SimpleChat\SimpleChat.csproj", "{4017A4F4-5E59-48AA-A7D0-A8518148933A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleChat", "Samples\SimpleChat\SimpleChat.csproj", "{4017A4F4-5E59-48AA-A7D0-A8518148933A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{C6A8760D-92CB-4307-88A7-36CCAEBA4AD1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosCore.Packets.Tests", "libs\NosCore.Packets\test\NosCore.Packets.Tests\NosCore.Packets.Tests.csproj", "{726188BA-F0EA-4ECA-ACF4-CCC066464FF0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InterceptNameChanger", "Samples\InterceptNameChanger\InterceptNameChanger.csproj", "{F96F3AA0-131E-4B6B-AB21-BBE2DEBCEF3A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InterceptNameChanger", "Samples\InterceptNameChanger\InterceptNameChanger.csproj", "{F96F3AA0-131E-4B6B-AB21-BBE2DEBCEF3A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LowLevel", "LowLevel", "{9025731C-084E-4E82-8CD4-0F52D3AA1F54}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WalkCommands", "Samples\WalkCommands\WalkCommands.csproj", "{18A62EF6-ADDA-4224-90AB-2D5DCFC95D3E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WalkCommands", "Samples\WalkCommands\WalkCommands.csproj", "{18A62EF6-ADDA-4224-90AB-2D5DCFC95D3E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Core.Tests", "Tests\NosSmooth.Core.Tests\NosSmooth.Core.Tests.csproj", "{1A10C624-48E5-425D-938E-31A4CC7AC687}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Core.Tests", "Tests\NosSmooth.Core.Tests\NosSmooth.Core.Tests.csproj", "{1A10C624-48E5-425D-938E-31A4CC7AC687}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Packets", "Core\NosSmooth.Packets\NosSmooth.Packets.csproj", "{C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Packets", "Core\NosSmooth.Packets\NosSmooth.Packets.csproj", "{C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.PacketSerializersGenerator", "Core\NosSmooth.PacketSerializersGenerator\NosSmooth.PacketSerializersGenerator.csproj", "{C61EBDB6-053C-48C3-B896-58642639C93F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.PacketSerializersGenerator", "Core\NosSmooth.PacketSerializersGenerator\NosSmooth.PacketSerializersGenerator.csproj", "{C61EBDB6-053C-48C3-B896-58642639C93F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Packets.Tests", "Tests\NosSmooth.Packets.Tests\NosSmooth.Packets.Tests.csproj", "{9BC56B40-64E3-4A8F-AD49-C52857A35026}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Packets.Tests", "Tests\NosSmooth.Packets.Tests\NosSmooth.Packets.Tests.csproj", "{9BC56B40-64E3-4A8F-AD49-C52857A35026}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NativeExecutor", "NativeExecutor\NativeExecutor.vcxproj", "{1BA17328-38FE-4830-9F26-F24585D4CAAB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ 238,6 242,30 @@ Global
{9BC56B40-64E3-4A8F-AD49-C52857A35026}.Release|x64.Build.0 = Release|Any CPU
{9BC56B40-64E3-4A8F-AD49-C52857A35026}.Release|x86.ActiveCfg = Release|Any CPU
{9BC56B40-64E3-4A8F-AD49-C52857A35026}.Release|x86.Build.0 = Release|Any CPU
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Debug|Any CPU.Build.0 = Debug|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Debug|x64.ActiveCfg = Debug|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Debug|x64.Build.0 = Debug|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Debug|x86.ActiveCfg = Debug|Win32
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Debug|x86.Build.0 = Debug|Win32
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Release|Any CPU.ActiveCfg = Release|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Release|Any CPU.Build.0 = Release|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Release|x64.ActiveCfg = Release|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Release|x64.Build.0 = Release|x64
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Release|x86.ActiveCfg = Release|Win32
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB}.Release|x86.Build.0 = Release|Win32
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Debug|x64.Build.0 = Debug|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Debug|x86.Build.0 = Debug|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Release|x64.ActiveCfg = Release|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Release|x64.Build.0 = Release|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Release|x86.ActiveCfg = Release|Any CPU
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ 249,15 277,17 @@ Global
{05E3039D-EDF6-4CDC-B062-CB67760ACB5F} = {F9EFA63C-0A88-45EB-B36F-C4A9D63BDFD1}
{06F03B1F-F68A-4C5B-B7FE-128A7CE1A1D7} = {01B5E872-271F-4D30-A1AA-AD48D81840C5}
{63E97FF3-7E40-44DE-9E91-F5DEE79AF95F} = {6078AE6E-7CD0-48E4-84E0-EB164D8881DA}
+ {4017A4F4-5E59-48AA-A7D0-A8518148933A} = {9025731C-084E-4E82-8CD4-0F52D3AA1F54}
{726188BA-F0EA-4ECA-ACF4-CCC066464FF0} = {C6A8760D-92CB-4307-88A7-36CCAEBA4AD1}
- {9025731C-084E-4E82-8CD4-0F52D3AA1F54} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33}
{F96F3AA0-131E-4B6B-AB21-BBE2DEBCEF3A} = {9025731C-084E-4E82-8CD4-0F52D3AA1F54}
- {4017A4F4-5E59-48AA-A7D0-A8518148933A} = {9025731C-084E-4E82-8CD4-0F52D3AA1F54}
+ {9025731C-084E-4E82-8CD4-0F52D3AA1F54} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33}
+ {18A62EF6-ADDA-4224-90AB-2D5DCFC95D3E} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33}
{1A10C624-48E5-425D-938E-31A4CC7AC687} = {C6A8760D-92CB-4307-88A7-36CCAEBA4AD1}
{C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C} = {01B5E872-271F-4D30-A1AA-AD48D81840C5}
{C61EBDB6-053C-48C3-B896-58642639C93F} = {01B5E872-271F-4D30-A1AA-AD48D81840C5}
{9BC56B40-64E3-4A8F-AD49-C52857A35026} = {C6A8760D-92CB-4307-88A7-36CCAEBA4AD1}
- {18A62EF6-ADDA-4224-90AB-2D5DCFC95D3E} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33}
+ {1BA17328-38FE-4830-9F26-F24585D4CAAB} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33}
+ {4F7B9EBB-B2F4-4170-ABDA-504D19D807AA} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C5F46653-4DEC-429B-8580-4ED18ED9B4CA}
D Remote/NosSmooth.Cryptography/IDecryptor.cs => Remote/NosSmooth.Cryptography/IDecryptor.cs +0 -6
@@ 1,6 0,0 @@
-namespace NosSmooth.Cryptography;
-
-public interface IDecryptor
-{
-
-}>
\ No newline at end of file
D Remote/NosSmooth.Cryptography/IEncryptor.cs => Remote/NosSmooth.Cryptography/IEncryptor.cs +0 -6
@@ 1,6 0,0 @@
-namespace NosSmooth.Cryptography;
-
-public interface IEncryptor
-{
-
-}>
\ No newline at end of file
D Remote/NosSmooth.Cryptography/NosSmooth.Cryptography.csproj => Remote/NosSmooth.Cryptography/NosSmooth.Cryptography.csproj +0 -9
@@ 1,9 0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- </PropertyGroup>
-
-</Project>
D Remote/NosSmooth.Cryptography/WorldDecryptor.cs => Remote/NosSmooth.Cryptography/WorldDecryptor.cs +0 -6
@@ 1,6 0,0 @@
-namespace NosSmooth.Cryptography;
-
-public class WorldDecryptor
-{
-
-}>
\ No newline at end of file
D Remote/NosSmooth.Cryptography/WorldEncryptor.cs => Remote/NosSmooth.Cryptography/WorldEncryptor.cs +0 -6
@@ 1,6 0,0 @@
-namespace NosSmooth.Cryptography;
-
-public class WorldEncryptor
-{
-
-}>
\ No newline at end of file
D Remote/NosSmooth.RemoteClient/NosSmooth.RemoteClient.csproj => Remote/NosSmooth.RemoteClient/NosSmooth.RemoteClient.csproj +0 -52
@@ 1,52 0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{2A3EA9A8-5948-47FD-AD13-6E19540BDDFB}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>NosSmooth.RemoteClient</RootNamespace>
- <AssemblyName>NosSmooth.RemoteClient</AssemblyName>
- <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-
-</Project>
D Remote/NosSmooth.RemoteClient/Properties/AssemblyInfo.cs => Remote/NosSmooth.RemoteClient/Properties/AssemblyInfo.cs +0 -35
@@ 1,35 0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("NosSmooth.RemoteClient")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("NosSmooth.RemoteClient")]
-[assembly: AssemblyCopyright("Copyright © 2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("2A3EA9A8-5948-47FD-AD13-6E19540BDDFB")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]>
\ No newline at end of file
D Samples/DamageCounter/App.xaml => Samples/DamageCounter/App.xaml +0 -9
@@ 1,9 0,0 @@
-<Application x:Class="DamageCounter.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:DamageCounter"
- StartupUri="MainWindow.xaml">
- <Application.Resources>
-
- </Application.Resources>
-</Application>
D Samples/DamageCounter/App.xaml.cs => Samples/DamageCounter/App.xaml.cs +0 -17
@@ 1,17 0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace DamageCounter
-{
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : Application
- {
- }
-}>
\ No newline at end of file
D Samples/DamageCounter/AssemblyInfo.cs => Samples/DamageCounter/AssemblyInfo.cs +0 -10
@@ 1,10 0,0 @@
-using System.Windows;
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]>
\ No newline at end of file
D Samples/DamageCounter/DamageCounter.csproj => Samples/DamageCounter/DamageCounter.csproj +0 -10
@@ 1,10 0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>WinExe</OutputType>
- <TargetFramework>net5.0-windows</TargetFramework>
- <Nullable>enable</Nullable>
- <UseWPF>true</UseWPF>
- </PropertyGroup>
-
-</Project>
D Samples/DamageCounter/MainWindow.xaml => Samples/DamageCounter/MainWindow.xaml +0 -12
@@ 1,12 0,0 @@
-<Window x:Class="DamageCounter.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:DamageCounter"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="800">
- <Grid>
-
- </Grid>
-</Window>
D Samples/DamageCounter/MainWindow.xaml.cs => Samples/DamageCounter/MainWindow.xaml.cs +0 -28
@@ 1,28 0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace DamageCounter
-{
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- }
-}>
\ No newline at end of file
D Samples/PacketInterceptor/DummyNostaleClient.cs => Samples/PacketInterceptor/DummyNostaleClient.cs +0 -38
@@ 1,38 0,0 @@
-using NosCore.Packets;
-using NosCore.Packets.ServerPackets.MiniMap;
-using NosSmooth.Core.Client;
-using NosSmooth.Core.Commands;
-using NosSmooth.Core.Packets;
-using Remora.Results;
-
-namespace PacketInterceptor;
-
-public class DummyNostaleClient : BaseNostaleClient
-{
- private readonly IPacketHandler _packetHandler;
-
- public DummyNostaleClient(CommandProcessor commandProcessor, IPacketSerializer packetSerializer,
- IPacketHandler packetHandler) : base(commandProcessor, packetSerializer)
- {
- _packetHandler = packetHandler;
- }
-
- public override async Task<Result> RunAsync(CancellationToken stopRequested = default)
- {
- await _packetHandler.HandleSentPacketAsync(new CMapPacket()
- { Header = "t", Id = 2, IsValid = true, KeepAliveId = 123, MapType = true, Type = 0 }, stopRequested);
- return Result.FromSuccess();
- }
-
- public override Task<Result> SendPacketAsync(string packetString, CancellationToken ct = default)
- {
- Console.WriteLine($"Sending packet {packetString}");
- return Task.FromResult(Result.FromSuccess());
- }
-
- public override Task<Result> ReceivePacketAsync(string packetString, CancellationToken ct = default)
- {
- Console.WriteLine($"Receiving packet {packetString}");
- return Task.FromResult(Result.FromSuccess());
- }
-}>
\ No newline at end of file
D Samples/PacketInterceptor/PacketInterceptor.csproj => Samples/PacketInterceptor/PacketInterceptor.csproj +0 -15
@@ 1,15 0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <LangVersion>10</LangVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\NosSmooth.Core\NosSmooth.Core.csproj" />
- </ItemGroup>
-
-</Project>
D Samples/PacketInterceptor/Program.cs => Samples/PacketInterceptor/Program.cs +0 -42
@@ 1,42 0,0 @@
-using Microsoft.Extensions.DependencyInjection;
-using NosCore.Packets;
-using NosSmooth.Core.Client;
-using NosSmooth.Core.Extensions;
-using NosSmooth.Core.Packets;
-using PacketInterceptor;
-
-class Program
-{
- public static async Task Main()
- {
- var provider = new ServiceCollection()
- .AddNostaleCore()
- .AddSingleton<INostaleClient, DummyNostaleClient>()
- .AddPacketResponder<TestResponder>()
- .BuildServiceProvider();
-
- var deserializerProvider = provider.GetRequiredService<PacketSerializerProvider>();
-
- foreach (var line in File.ReadAllLines("packet.log"))
- {
- var packetString = string.Join("",line.Skip(8+10));
- try
- {
- var result = deserializerProvider.GetServerSerializer().Deserialize(packetString);
-
- if (!result.IsSuccess)
- {
- Console.WriteLine($"Could not deserialize packet {packetString}");
- }
- }
- catch (Exception e)
- {
- }
- }
-
- var packet = deserializerProvider.GetServerSerializer().Deserialize("sayitemt 1 441092 17 1 4964 TrozZes {%s} e_info 0 4964 7 9 0 25 797 889 528 12 210 0 100 1200000 -1 0 441092 9 1.17.100 1.15.4 2.26.11 2.20.71 3.25.190 3.13.16 4.2.17 12.34.25 11.43.38 8 0 6 33.1.1600.0.2 44.1.-4.0.1 104.3.8.0.2 4.0.80.0.1 3.0.80.0.1 105.2.4.7640.1");
-
- var client = provider.GetRequiredService<INostaleClient>();
- await client.RunAsync();
- }
-}>
\ No newline at end of file
D Samples/PacketInterceptor/TestResponder.cs => Samples/PacketInterceptor/TestResponder.cs +0 -22
@@ 1,22 0,0 @@
-using NosCore.Packets.Interfaces;
-using NosCore.Packets.ServerPackets.MiniMap;
-using NosSmooth.Core.Client;
-using NosSmooth.Core.Packets;
-using Remora.Results;
-
-namespace PacketInterceptor;
-
-public class TestResponder : IEveryPacketResponder
-{
- private readonly INostaleClient _client;
-
- public TestResponder(INostaleClient client)
- {
- _client = client;
- }
-
- public async Task<Result> Respond<TPacket>(TPacket packet, CancellationToken ct = default) where TPacket : IPacket
- {
- return await _client.SendPacketAsync("test");
- }
-}>
\ No newline at end of file
D Samples/PacketLogger/App.xaml => Samples/PacketLogger/App.xaml +0 -9
@@ 1,9 0,0 @@
-<Application x:Class="PacketLogger.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:PacketLogger"
- StartupUri="MainWindow.xaml">
- <Application.Resources>
-
- </Application.Resources>
-</Application>
D Samples/PacketLogger/App.xaml.cs => Samples/PacketLogger/App.xaml.cs +0 -17
@@ 1,17 0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace PacketLogger
-{
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : Application
- {
- }
-}>
\ No newline at end of file
D Samples/PacketLogger/AssemblyInfo.cs => Samples/PacketLogger/AssemblyInfo.cs +0 -10
@@ 1,10 0,0 @@
-using System.Windows;
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]>
\ No newline at end of file
D Samples/PacketLogger/MainWindow.xaml => Samples/PacketLogger/MainWindow.xaml +0 -12
@@ 1,12 0,0 @@
-<Window x:Class="PacketLogger.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:PacketLogger"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="800">
- <Grid>
-
- </Grid>
-</Window>
D Samples/PacketLogger/MainWindow.xaml.cs => Samples/PacketLogger/MainWindow.xaml.cs +0 -28
@@ 1,28 0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace PacketLogger
-{
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- }
-}>
\ No newline at end of file
D Samples/PacketLogger/PacketLogger.csproj => Samples/PacketLogger/PacketLogger.csproj +0 -18
@@ 1,18 0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows</TargetFramework>
- <Nullable>enable</Nullable>
- <UseWPF>true</UseWPF>
- <LangVersion>10</LangVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Remora.Results" Version="7.1.0" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\NosSmooth.Core\NosSmooth.Core.csproj" />
- </ItemGroup>
-
-</Project>
D Samples/PacketLogger/Packets/PacketLoggerResponder.cs => Samples/PacketLogger/Packets/PacketLoggerResponder.cs +0 -27
@@ 1,27 0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.Extensions.Logging;
-using NosCore.Packets;
-using NosCore.Packets.Interfaces;
-using NosSmooth.Core.Packets;
-using Remora.Results;
-
-namespace PacketLogger.Packets;
-
-public class PacketLoggerResponder : IEveryPacketResponder
-{
- private readonly ILogger<PacketLoggerResponder> _logger;
- private readonly Serializer _serializer;
-
- public PacketLoggerResponder(ILogger<PacketLoggerResponder> logger, Serializer serializer)
- {
- _logger = logger;
- _serializer = serializer;
- }
-
- public Task<Result> Respond<TPacket>(TPacket packet, CancellationToken ct = default) where TPacket : IPacket
- {
- _logger.LogInformation(_serializer.Serialize(packet));
- return Task.FromResult(Result.FromSuccess());
- }
-}>
\ No newline at end of file