From 96580d48159e65c178163ff481376324b12491b8 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sun, 1 Jan 2023 19:09:37 +0100 Subject: [PATCH] feat(samples): add shared NosSmooth into samples --- src/Samples/HighLevel/SimplePiiBot/DllMain.cs | 3 +++ src/Samples/HighLevel/SimplePiiBot/SimplePiiBot.csproj | 1 + .../LowLevel/InterceptNameChanger/InterceptNameChanger.csproj | 3 +++ src/Samples/LowLevel/InterceptNameChanger/NameChanger.cs | 2 ++ src/Samples/LowLevel/SimpleChat/SimpleChat.cs | 2 ++ src/Samples/LowLevel/SimpleChat/SimpleChat.csproj | 1 + src/Samples/LowLevel/WalkCommands/Startup.cs | 2 ++ src/Samples/LowLevel/WalkCommands/WalkCommands.csproj | 1 + 8 files changed, 15 insertions(+) diff --git a/src/Samples/HighLevel/SimplePiiBot/DllMain.cs b/src/Samples/HighLevel/SimplePiiBot/DllMain.cs index 2d40a97..b92f790 100644 --- a/src/Samples/HighLevel/SimplePiiBot/DllMain.cs +++ b/src/Samples/HighLevel/SimplePiiBot/DllMain.cs @@ -13,6 +13,7 @@ using NosSmooth.Core.Extensions; using NosSmooth.Data.NOSFiles.Extensions; using NosSmooth.Extensions.Combat.Extensions; using NosSmooth.Extensions.Pathfinding.Extensions; +using NosSmooth.Extensions.SharedBinding.Extensions; using NosSmooth.Game.Extensions; using NosSmooth.LocalClient.Extensions; using Remora.Commands.Extensions; @@ -80,7 +81,9 @@ public class DllMain s.AddNostaleCore() .AddNostaleGame() .AddLocalClient() + .ShareNosSmooth() .AddNostaleDataFiles() + .ShareNosSmooth() .AddNostaleCombat() .AddNostalePathfinding() .AddSingleton() diff --git a/src/Samples/HighLevel/SimplePiiBot/SimplePiiBot.csproj b/src/Samples/HighLevel/SimplePiiBot/SimplePiiBot.csproj index 69249e9..9f7c518 100644 --- a/src/Samples/HighLevel/SimplePiiBot/SimplePiiBot.csproj +++ b/src/Samples/HighLevel/SimplePiiBot/SimplePiiBot.csproj @@ -30,6 +30,7 @@ + diff --git a/src/Samples/LowLevel/InterceptNameChanger/InterceptNameChanger.csproj b/src/Samples/LowLevel/InterceptNameChanger/InterceptNameChanger.csproj index e793ee7..3c8c788 100644 --- a/src/Samples/LowLevel/InterceptNameChanger/InterceptNameChanger.csproj +++ b/src/Samples/LowLevel/InterceptNameChanger/InterceptNameChanger.csproj @@ -4,6 +4,7 @@ enable 10 true + true @@ -18,8 +19,10 @@ + + \ No newline at end of file diff --git a/src/Samples/LowLevel/InterceptNameChanger/NameChanger.cs b/src/Samples/LowLevel/InterceptNameChanger/NameChanger.cs index d9223cf..78dd453 100644 --- a/src/Samples/LowLevel/InterceptNameChanger/NameChanger.cs +++ b/src/Samples/LowLevel/InterceptNameChanger/NameChanger.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NosSmooth.Core.Client; using NosSmooth.Core.Extensions; +using NosSmooth.Extensions.SharedBinding.Extensions; using NosSmooth.LocalBinding; using NosSmooth.LocalClient; using NosSmooth.LocalClient.Extensions; @@ -33,6 +34,7 @@ namespace InterceptNameChanger { var provider = new ServiceCollection() .AddLocalClient() + .ShareNosSmooth() // .AddPacketResponder() .AddLogging diff --git a/src/Samples/LowLevel/SimpleChat/SimpleChat.cs b/src/Samples/LowLevel/SimpleChat/SimpleChat.cs index b54af04..ae48141 100644 --- a/src/Samples/LowLevel/SimpleChat/SimpleChat.cs +++ b/src/Samples/LowLevel/SimpleChat/SimpleChat.cs @@ -8,6 +8,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NosSmooth.Core.Client; using NosSmooth.Core.Extensions; +using NosSmooth.Extensions.SharedBinding.Extensions; using NosSmooth.LocalBinding; using NosSmooth.LocalClient.Extensions; using NosSmooth.Packets.Enums; @@ -31,6 +32,7 @@ public class SimpleChat { var provider = new ServiceCollection() .AddLocalClient() + .ShareNosSmooth() .AddPacketResponder() .AddLogging ( diff --git a/src/Samples/LowLevel/SimpleChat/SimpleChat.csproj b/src/Samples/LowLevel/SimpleChat/SimpleChat.csproj index b62ec85..d5e2683 100644 --- a/src/Samples/LowLevel/SimpleChat/SimpleChat.csproj +++ b/src/Samples/LowLevel/SimpleChat/SimpleChat.csproj @@ -21,6 +21,7 @@ + \ No newline at end of file diff --git a/src/Samples/LowLevel/WalkCommands/Startup.cs b/src/Samples/LowLevel/WalkCommands/Startup.cs index 6320332..8104ac8 100644 --- a/src/Samples/LowLevel/WalkCommands/Startup.cs +++ b/src/Samples/LowLevel/WalkCommands/Startup.cs @@ -12,6 +12,7 @@ using NosSmooth.Core.Extensions; using NosSmooth.Data.NOSFiles; using NosSmooth.Data.NOSFiles.Extensions; using NosSmooth.Extensions.Pathfinding.Extensions; +using NosSmooth.Extensions.SharedBinding.Extensions; using NosSmooth.LocalBinding; using NosSmooth.LocalBinding.Extensions; using NosSmooth.LocalClient; @@ -32,6 +33,7 @@ public class Startup { var collection = new ServiceCollection() .AddLocalClient() + .ShareNosSmooth() // hook pet and player walk to // recognize user action's and diff --git a/src/Samples/LowLevel/WalkCommands/WalkCommands.csproj b/src/Samples/LowLevel/WalkCommands/WalkCommands.csproj index 66bdce7..75d961b 100644 --- a/src/Samples/LowLevel/WalkCommands/WalkCommands.csproj +++ b/src/Samples/LowLevel/WalkCommands/WalkCommands.csproj @@ -44,6 +44,7 @@ + -- 2.49.0