mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-07 04:57:27 +08:00
[+] Splash+ support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user