From 1499c7b40ecf8d817c7934233251110cc1c973d1 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 3 Jan 2023 17:01:01 +0100 Subject: [PATCH] feat(client): disable all hooks after nostale client stopped --- src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs b/src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs index 205f3a44fd7ef4c30a7edfe0b431a13da7b1a613..bbbcaad890e12ef2ef96ba438b15610dccad0c4e 100644 --- a/src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs +++ b/src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs @@ -114,6 +114,9 @@ public class NostaleLocalClient : BaseNostaleClient _hookManager.PlayerWalk.Called -= Walk; _hookManager.PetWalk.Called -= PetWalk; + // the hooks are not needed anymore. + _hookManager.DisableAll(); + return Result.FromSuccess(); }