[+] Splash+ support

This commit is contained in:
Clansty
2024-10-24 01:15:55 +08:00
parent 1b47bfa2f1
commit e844164cf6
8 changed files with 114 additions and 95 deletions

View File

@@ -48,14 +48,6 @@ public class BasicFix
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameManager), "CalcSpecialNum")]
private static bool CalcSpecialNum(ref int __result)
{
__result = 1024;
return false;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(NetHttpClient), MethodType.Constructor)]
private static void OnNetHttpClientConstructor(NetHttpClient __instance)
@@ -75,4 +67,21 @@ public class BasicFix
// Unset the certificate validation callback (SSL pinning) to restore the default behavior
ServicePointManager.ServerCertificateValidationCallback = null;
}
public static void DoCustomPatch(HarmonyLib.Harmony h)
{
if (typeof(GameManager).GetMethod("CalcSpecialNum") is null) return;
h.PatchAll(typeof(CalcSpecialNumPatch));
}
private class CalcSpecialNumPatch
{
[HarmonyPrefix]
[HarmonyPatch(typeof(GameManager), "CalcSpecialNum")]
private static bool CalcSpecialNum(ref int __result)
{
__result = 1024;
return false;
}
}
}