forked from zombieb/undead-universal-patch-il2cpp
30 lines
803 B
C#
30 lines
803 B
C#
using HarmonyLib;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using undead_universal_patch_il2cpp.Core;
|
|
using undead_universal_patch_il2cpp.Core.Content.CustomRecNet;
|
|
|
|
namespace undead_universal_patch_il2cpp.Patches.Internals;
|
|
|
|
[HarmonyPatch]
|
|
public class LogoutEvent
|
|
{
|
|
static PatchTypesResult typesResult = Util.PreparePatchTypes(
|
|
"RecNet logout event patch",
|
|
"RecNet.Login",
|
|
"OnLogout"
|
|
);
|
|
|
|
static MethodBase TargetMethod() => typesResult.Method;
|
|
static bool Prepare() => typesResult.Success;
|
|
|
|
static void Postfix()
|
|
{
|
|
Util.ConditionalDebug("Running onLogout actions");
|
|
foreach (var action in RecNetInteractions.onLogout) action();
|
|
}
|
|
} |