forked from zombieb/undead-universal-patch-il2cpp
haha forgot to push,,,
This commit is contained in:
28
Patches/Internals/Notifications.cs
Normal file
28
Patches/Internals/Notifications.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using HarmonyLib;
|
||||
using Il2CppInterop.Runtime;
|
||||
using RecNet;
|
||||
using System.Reflection;
|
||||
using undead_universal_patch_il2cpp.Core;
|
||||
using undead_universal_patch_il2cpp.Core.Content.CustomRecNet;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches.Internals
|
||||
{
|
||||
[HarmonyPatch]
|
||||
public class Notifications
|
||||
{
|
||||
static PatchTypesResult patchResult = Core.Util.PreparePatchTypes(
|
||||
"Event patch for notification availability",
|
||||
"RecNet.Notifications",
|
||||
"OnOpenInternal"
|
||||
);
|
||||
|
||||
static bool Prepare() => patchResult.Success;
|
||||
static MethodBase TargetMethod() => patchResult.Method;
|
||||
|
||||
static void Postfix(ref SignalRHubConnection hub)
|
||||
{
|
||||
UniversalPatchPlugin.Log.LogInfo("Running onNotificationsOpen actions");
|
||||
foreach (var action in RecNetInteractions.onNotificationsOpen) action();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user