fix: Removed StunRequest and DisarmRequest EventSinks (#1781)
This commit is contained in:
parent
f2a33706ab
commit
1cb798d807
5 changed files with 8 additions and 15 deletions
|
|
@ -36,12 +36,6 @@ public static partial class EventSink
|
|||
public static event Action<Mobile> HelpRequest;
|
||||
public static void InvokeHelpRequest(Mobile m) => HelpRequest?.Invoke(m);
|
||||
|
||||
public static event Action<Mobile> DisarmRequest;
|
||||
public static void InvokeDisarmRequest(Mobile m) => DisarmRequest?.Invoke(m);
|
||||
|
||||
public static event Action<Mobile> StunRequest;
|
||||
public static void InvokeStunRequest(Mobile m) => StunRequest?.Invoke(m);
|
||||
|
||||
public static event Action<Mobile, int> OpenSpellbookRequest;
|
||||
public static void InvokeOpenSpellbookRequest(Mobile m, int type) => OpenSpellbookRequest?.Invoke(m, type);
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue