feat: Adds delegate events for Help system (#2054)

This commit is contained in:
Guyute 2025-01-10 15:34:02 -05:00 • committed by GitHub
parent cc61c1d6d2
commit 1da5a49baf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 49 additions and 8 deletions

View file

@ -0,0 +1,27 @@
using System;
using System.Runtime.CompilerServices;
namespace Server.Engines.Help;
public static class HelpEvents
{
public static event Action<PageEntry> PageEnqueued;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InvokePageEnqueued(PageEntry e) => PageEnqueued?.Invoke(e);
public static event Action<PageEntry> PageRemoved;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InvokePageRemoved(PageEntry e) => PageRemoved?.Invoke(e);
public static event Action<Mobile, Mobile, PageEntry> PageHandlerChanged;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InvokePageHandlerChanged(Mobile old, Mobile value, PageEntry e) => PageHandlerChanged?.Invoke(old, value, e);
public static event Action<PageEntry> PageWaiting;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InvokePageWaiting(PageEntry e) => PageWaiting?.Invoke(e);
public static event Action<Mobile> StuckMenu;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InvokeStuckMenu(Mobile m) => StuckMenu?.Invoke(m);
}