forked from zombieb/undead-universal-patch-il2cpp
- SignalR handshake fix
- Self-hosted PhotonSocketServer support - Split photon and hile event patch - Deprecated amplitude redirect patch
This commit is contained in:
@@ -1,11 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using Il2CppSystem;
|
||||
using UnityEngine;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches
|
||||
{
|
||||
[HarmonyPatch]
|
||||
public class ConnectToRecNetPatchEvent
|
||||
{
|
||||
static readonly string TargetTypeName = "RecNet.Core";
|
||||
static readonly string TargetMethodName = "ConnectToRecNet";
|
||||
static readonly string Description = "Hile Patch event method"; // It's convenient. Could patch at a different time. But this part was easy.
|
||||
static readonly MethodInfo connectMethod = AccessTools.Method(AccessTools.TypeByName(TargetTypeName), TargetMethodName);
|
||||
|
||||
static bool Prepare()
|
||||
{
|
||||
if (connectMethod == null)
|
||||
{
|
||||
Plugin.Log.LogWarning($"'{Description}' disabled. The method for this patch was not found.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Plugin.Log.LogInfo($"'{Description}' succeeded validation.");
|
||||
return true;
|
||||
}
|
||||
static MethodBase TargetMethod() => connectMethod;
|
||||
static void Prefix()
|
||||
{
|
||||
if (GenericConfig.HilePatch.Value) HilePatch.Patch();
|
||||
}
|
||||
}
|
||||
public static class HilePatch
|
||||
{
|
||||
public static void Patch()
|
||||
|
||||
Reference in New Issue
Block a user