From ccaaeb8565d9349ed5e01b8d630ba5331ddef35b Mon Sep 17 00:00:00 2001 From: Clansty Date: Mon, 12 May 2025 12:23:50 +0800 Subject: [PATCH] [+] forceNonReporting --- AquaMai.Mods/Fix/Common.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/AquaMai.Mods/Fix/Common.cs b/AquaMai.Mods/Fix/Common.cs index 2f06df74..f2ee93d0 100644 --- a/AquaMai.Mods/Fix/Common.cs +++ b/AquaMai.Mods/Fix/Common.cs @@ -105,6 +105,26 @@ public class Common return false; } + [ConfigEntry] private readonly static bool forceNonReporting = true; + + [EnableIf(nameof(forceNonReporting))] + [HarmonyPrefix] + [HarmonyPatch(typeof(AMDaemon.Allnet.Accounting), nameof(AMDaemon.Allnet.Accounting.IsReporting), MethodType.Getter)] + private static bool PreIsReporting(ref bool __result) + { + __result = false; + return false; + } + + [EnableIf(nameof(forceNonReporting))] + [HarmonyPrefix] + [HarmonyPatch(typeof(AMDaemon.EMoney), nameof(AMDaemon.EMoney.IsReporting), MethodType.Getter)] + private static bool PreEMoneyIsReporting(ref bool __result) + { + __result = false; + return false; + } + [ConfigEntry] private readonly static bool forceIgnoreError = true; [EnableIf(nameof(forceIgnoreError))]