diff --git a/Projects/Server/Events/EventSink.cs b/Projects/Server/Events/EventSink.cs index 5cd423ab9..77274a91b 100644 --- a/Projects/Server/Events/EventSink.cs +++ b/Projects/Server/Events/EventSink.cs @@ -36,12 +36,6 @@ public static partial class EventSink public static event Action HelpRequest; public static void InvokeHelpRequest(Mobile m) => HelpRequest?.Invoke(m); - public static event Action DisarmRequest; - public static void InvokeDisarmRequest(Mobile m) => DisarmRequest?.Invoke(m); - - public static event Action StunRequest; - public static void InvokeStunRequest(Mobile m) => StunRequest?.Invoke(m); - public static event Action OpenSpellbookRequest; public static void InvokeOpenSpellbookRequest(Mobile m, int type) => OpenSpellbookRequest?.Invoke(m, type); diff --git a/Projects/UOContent/Items/Weapons/Fists.cs b/Projects/UOContent/Items/Weapons/Fists.cs index 4de4e7d14..69f265356 100644 --- a/Projects/UOContent/Items/Weapons/Fists.cs +++ b/Projects/UOContent/Items/Weapons/Fists.cs @@ -38,9 +38,6 @@ namespace Server.Items public static void Initialize() { Mobile.DefaultWeapon = new Fists(); - - EventSink.DisarmRequest += EventSink_DisarmRequest; - EventSink.StunRequest += EventSink_StunRequest; } public override double GetDefendSkillValue(Mobile attacker, Mobile defender) @@ -195,7 +192,7 @@ namespace Server.Items return item is null or Spellbook && m.FindItemOnLayer(Layer.TwoHanded) == null; } - private static void EventSink_DisarmRequest(Mobile m) + public static void DisarmRequest(Mobile m) { if (Core.AOS) { @@ -228,7 +225,7 @@ namespace Server.Items } } - private static void EventSink_StunRequest(Mobile m) + public static void StunRequest(Mobile m) { if (Core.AOS || !DuelContext.AllowSpecialAbility(m, "Stun", true)) { diff --git a/Projects/UOContent/Mobiles/AI/MageAI.cs b/Projects/UOContent/Mobiles/AI/MageAI.cs index f1c8eb496..65b2df2b7 100644 --- a/Projects/UOContent/Mobiles/AI/MageAI.cs +++ b/Projects/UOContent/Mobiles/AI/MageAI.cs @@ -1,4 +1,5 @@ using System; +using Server.Items; using Server.Spells; using Server.Spells.Fifth; using Server.Spells.First; @@ -720,7 +721,7 @@ public class MageAI : BaseAI if (!Core.AOS && SmartAI && !m_Mobile.StunReady && m_Mobile.Skills.Wrestling.Value >= 80.0 && m_Mobile.Skills.Anatomy.Value >= 80.0) { - EventSink.InvokeStunRequest(m_Mobile); + Fists.StunRequest(m_Mobile); } if (!m_Mobile.InRange(c, m_Mobile.RangePerception)) diff --git a/Projects/UOContent/Mobiles/AI/ThiefAI.cs b/Projects/UOContent/Mobiles/AI/ThiefAI.cs index bd4052967..c81e5be6e 100644 --- a/Projects/UOContent/Mobiles/AI/ThiefAI.cs +++ b/Projects/UOContent/Mobiles/AI/ThiefAI.cs @@ -69,7 +69,7 @@ public class ThiefAI : BaseAI if (!Core.AOS && !m_Mobile.DisarmReady && m_Mobile.Skills.Wrestling.Value >= 80.0 && m_Mobile.Skills.ArmsLore.Value >= 80.0 && m_toDisarm != null) { - EventSink.InvokeDisarmRequest(m_Mobile); + Fists.DisarmRequest(m_Mobile); } if (m_toDisarm?.IsChildOf(combatant.Backpack) == true && diff --git a/Projects/UOContent/Network/Packets/IncomingExtendedCommandPackets.cs b/Projects/UOContent/Network/Packets/IncomingExtendedCommandPackets.cs index 9702dde9a..43537e33c 100644 --- a/Projects/UOContent/Network/Packets/IncomingExtendedCommandPackets.cs +++ b/Projects/UOContent/Network/Packets/IncomingExtendedCommandPackets.cs @@ -15,6 +15,7 @@ using System.Buffers; using Server.ContextMenus; +using Server.Items; namespace Server.Network; @@ -267,7 +268,7 @@ public static class IncomingExtendedCommandPackets return; } - EventSink.InvokeStunRequest(from); + Fists.StunRequest(from); } public static void DisarmRequest(NetState state, SpanReader reader) @@ -279,7 +280,7 @@ public static class IncomingExtendedCommandPackets return; } - EventSink.InvokeDisarmRequest(from); + Fists.DisarmRequest(from); } public static void StatLockChange(NetState state, SpanReader reader)