add: infinite mirors in Manor

This commit is contained in:
2024-09-20 18:10:52 +02:00
parent f32e3b0eb7
commit 15d1a91806
3 changed files with 17 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using HarmonyLib;
using Il2Cpp;
namespace DevourClient.Hooks
{
@@ -116,5 +117,16 @@ namespace DevourClient.Hooks
return;
}
}
[HarmonyPatch(typeof(ManorMirrorController))]
[HarmonyPatch(nameof(ManorMirrorController.IsBroken))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
static class ManorMirrorController_IsBroken
{
static void Postfix(ref bool __result)
{
if (ClientMain.infinite_mirors)
__result = false;
}
}
}
}