From 6ad980d4714f02acc3b4470ba385f2cabf332ae8 Mon Sep 17 00:00:00 2001 From: Clansty Date: Sun, 4 Aug 2024 12:26:48 +0800 Subject: [PATCH] [F] Encrypt and Decrypt hook run without enabled in config --- AquaMai/AquaMai.csproj | 9 ++++++++- AquaMai/Fix/RemoveEncryption.cs | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/AquaMai/AquaMai.csproj b/AquaMai/AquaMai.csproj index eb83fb62..b3b0fbbc 100644 --- a/AquaMai/AquaMai.csproj +++ b/AquaMai/AquaMai.csproj @@ -29,6 +29,13 @@ false x64 + + Output\ + SDGA145 + true + true + x64 + Libs\0Harmony.dll @@ -301,7 +308,7 @@ - + diff --git a/AquaMai/Fix/RemoveEncryption.cs b/AquaMai/Fix/RemoveEncryption.cs index ab09736c..6e79ec4d 100644 --- a/AquaMai/Fix/RemoveEncryption.cs +++ b/AquaMai/Fix/RemoveEncryption.cs @@ -25,8 +25,13 @@ public class RemoveEncryption public static bool Prefix(byte[] data, ref byte[] __result) { - __result = data; - return false; + if (AquaMai.AppConfig.Fix.RemoveEncryption) + { + __result = data; + return false; + } + + return true; } } @@ -40,8 +45,13 @@ public class RemoveEncryption public static bool Prefix(byte[] encryptData, ref byte[] __result) { - __result = encryptData; - return false; + if (AquaMai.AppConfig.Fix.RemoveEncryption) + { + __result = encryptData; + return false; + } + + return true; } } }