From fc84983e2e86501d2404bd1b9887549c839ef006 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sun, 28 Apr 2024 09:13:22 -0400 Subject: [PATCH] [F] Fix disable reboot patch --- UX/DisableReboot.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/UX/DisableReboot.cs b/UX/DisableReboot.cs index 6fcbc903..ace7e2ca 100644 --- a/UX/DisableReboot.cs +++ b/UX/DisableReboot.cs @@ -24,8 +24,9 @@ namespace AquaMai.UX } // RemainingMinutes + // Original: private int RemainingMinutes => (this._secServerMaintenance + 59) / 60; [HarmonyPrefix] - [HarmonyPatch(typeof(MaintenanceTimer), "RemainingMinutes")] + [HarmonyPatch(typeof(MaintenanceTimer), "RemainingMinutes", MethodType.Getter)] public static bool RemainingMinutes(ref int __result) { __result = 600; @@ -53,11 +54,17 @@ namespace AquaMai.UX // Execute [HarmonyPrefix] [HarmonyPatch(typeof(MaintenanceTimer), "Execute")] - public static bool Execute(MaintenanceTimer __instance) => false; + public static bool Execute(MaintenanceTimer __instance) + { + return false; + } // UpdateTimes [HarmonyPrefix] [HarmonyPatch(typeof(MaintenanceTimer), "UpdateTimes")] - public static bool UpdateTimes(MaintenanceTimer __instance) => false; + public static bool UpdateTimes(MaintenanceTimer __instance) + { + return false; + } } } \ No newline at end of file