feat: Adds delegate events for Help system (#2054)
This commit is contained in:
parent
cc61c1d6d2
commit
1da5a49baf
3 changed files with 49 additions and 8 deletions
27
Projects/UOContent/Engines/Help/HelpEvents.cs
Normal file
27
Projects/UOContent/Engines/Help/HelpEvents.cs
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue