[F] Encrypt and Decrypt hook run without enabled in config

pull/50/head
Clansty 2024-08-04 12:26:48 +08:00
parent 9a6e9c4660
commit 6ad980d471
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
2 changed files with 22 additions and 5 deletions

View File

@ -29,6 +29,13 @@
<DebugSymbols>false</DebugSymbols>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'SDGA145|AnyCPU' ">
<OutputPath>Output\</OutputPath>
<DefineConstants>SDGA145</DefineConstants>
<Optimize>true</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>Libs\0Harmony.dll</HintPath>
@ -301,7 +308,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="AquaMai.toml" />
<None Include="AquaMai.toml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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;
}
}
}