fix: Moves many EventSinks out of core. (#1783)

This commit is contained in:
Marcelo Paez Sequeira 2024-05-21 14:02:30 -03:00 • committed by GitHub
parent 1cb798d807
commit 00908d030f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 133 additions and 276 deletions

View file

@ -215,10 +215,6 @@ public partial class Spellbook : Item, ICraftable, ISlayer, IAosItem
public static void Configure()
{
EventSink.OpenSpellbookRequest += EventSink_OpenSpellbookRequest;
EventSink.CastSpellRequest += EventSink_CastSpellRequest;
EventSink.TargetedSpell += EventSink_TargetedSpell;
CommandSystem.Register("AllSpells", AccessLevel.GameMaster, AllSpells_OnCommand);
}
@ -249,7 +245,7 @@ public partial class Spellbook : Item, ICraftable, ISlayer, IAosItem
}
}
private static void EventSink_OpenSpellbookRequest(Mobile from, int typeID)
public static void OpenSpellbookRequest(Mobile from, int typeID)
{
if (!DesignContext.Check(from))
{
@ -273,7 +269,7 @@ public partial class Spellbook : Item, ICraftable, ISlayer, IAosItem
book?.DisplayTo(from);
}
private static void EventSink_TargetedSpell(Mobile from, IEntity target, int spellId)
public static void TargetedSpell(Mobile from, IEntity target, int spellId)
{
if (!DesignContext.Check(from))
{
@ -300,7 +296,7 @@ public partial class Spellbook : Item, ICraftable, ISlayer, IAosItem
}
}
private static void EventSink_CastSpellRequest(Mobile from, int spellID, Item item)
public static void CastSpellRequest(Mobile from, int spellID, Item item)
{
if (!DesignContext.Check(from))
{

View file

@ -35,11 +35,6 @@ public partial class Bandage : Item, IDyable
return true;
}
public static void Initialize()
{
EventSink.BandageTargetRequest += EventSink_BandageTargetRequest;
}
public override void OnDoubleClick(Mobile from)
{
if (from.InRange(GetWorldLocation(), Range))
@ -56,7 +51,7 @@ public partial class Bandage : Item, IDyable
}
}
private static void EventSink_BandageTargetRequest(Mobile from, Item item, Mobile target)
public static void BandageTargetRequest(Mobile from, Item item, Mobile target)
{
if (item is not Bandage b || b.Deleted)
{