fix: Moves many EventSinks out of core. (#1783)
This commit is contained in:
parent
1cb798d807
commit
00908d030f
45 changed files with 133 additions and 276 deletions
|
|
@ -22,12 +22,10 @@ public class ChampionTitleSystem : GenericPersistence
|
|||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.PlayerDeleted += OnPlayerDeleted;
|
||||
|
||||
_championTitleTimer.Start();
|
||||
}
|
||||
|
||||
private static void OnPlayerDeleted(Mobile m)
|
||||
public static void OnPlayerDeleted(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile pm)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1234,7 +1234,6 @@ namespace Server.Engines.ConPVP
|
|||
public static void Configure()
|
||||
{
|
||||
EventSink.Speech += EventSink_Speech;
|
||||
EventSink.Login += EventSink_Login;
|
||||
|
||||
CommandSystem.Register("vli", AccessLevel.GameMaster, vli_oc);
|
||||
}
|
||||
|
|
@ -1288,7 +1287,7 @@ namespace Server.Engines.ConPVP
|
|||
return false;
|
||||
}
|
||||
|
||||
private static void EventSink_Login(Mobile m)
|
||||
public static void OnLogin(Mobile m)
|
||||
{
|
||||
if (m is not PlayerMobile pm)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,11 +14,6 @@ namespace Server.Engines.Doom
|
|||
Register();
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.Login += OnLogin;
|
||||
}
|
||||
|
||||
public static void OnLogin(Mobile m)
|
||||
{
|
||||
var rect = LeverPuzzleController.lr_Rect;
|
||||
|
|
|
|||
|
|
@ -641,7 +641,6 @@ namespace Server.Factions
|
|||
|
||||
public static void Configure()
|
||||
{
|
||||
EventSink.Login += EventSink_Login;
|
||||
EventSink.Logout += EventSink_Logout;
|
||||
|
||||
CommandSystem.Register("FactionElection", AccessLevel.GameMaster, FactionElection_OnCommand);
|
||||
|
|
@ -1278,7 +1277,7 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
private static void EventSink_Login(Mobile m) => CheckLeaveTimer(m);
|
||||
public static void OnLogin(Mobile m) => CheckLeaveTimer(m);
|
||||
|
||||
public static void WriteReference(IGenericWriter writer, Faction fact)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -286,12 +286,7 @@ namespace Server.Engines.Help
|
|||
AddHtmlLocalized(180, 390, 335, 40, 1001015); // NO - I meant to ask for help with another matter.
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.HelpRequest += EventSink_HelpRequest;
|
||||
}
|
||||
|
||||
private static void EventSink_HelpRequest(Mobile m)
|
||||
public static void HelpRequest(Mobile m)
|
||||
{
|
||||
foreach (var gump in m.NetState.Gumps)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -151,8 +151,6 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
TargetCommands.Register(new ViewQuestsCommand());
|
||||
TargetCommands.Register(new ViewContextCommand());
|
||||
|
||||
EventSink.QuestGumpRequest += EventSink_QuestGumpRequest;
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
|
|
@ -649,7 +647,7 @@ namespace Server.Engines.MLQuests
|
|||
}
|
||||
}
|
||||
|
||||
public static void EventSink_QuestGumpRequest(Mobile m)
|
||||
public static void QuestGumpRequest(Mobile m)
|
||||
{
|
||||
if (!Enabled || m is not PlayerMobile pm)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ namespace Server.Engines.PartySystem
|
|||
public static void Configure()
|
||||
{
|
||||
EventSink.Logout += EventSink_Logout;
|
||||
EventSink.Login += EventSink_Login;
|
||||
EventSink.PlayerDeath += EventSink_PlayerDeath;
|
||||
|
||||
CommandSystem.Register("ListenToParty", AccessLevel.GameMaster, ListenToParty_OnCommand);
|
||||
|
|
@ -159,7 +158,7 @@ namespace Server.Engines.PartySystem
|
|||
}
|
||||
}
|
||||
|
||||
public static void EventSink_Login(Mobile from)
|
||||
public static void OnLogin(Mobile from)
|
||||
{
|
||||
var p = Get(from);
|
||||
|
||||
|
|
|
|||
|
|
@ -397,11 +397,9 @@ namespace Server.Engines.Plants
|
|||
{
|
||||
EventSink.WorldSave += EventSink_WorldSave;
|
||||
}
|
||||
|
||||
EventSink.Login += EventSink_Login;
|
||||
}
|
||||
|
||||
private static void EventSink_Login(Mobile from)
|
||||
public static void OnLogin(Mobile from)
|
||||
{
|
||||
Container cont = from.Backpack;
|
||||
if (cont != null)
|
||||
|
|
|
|||
|
|
@ -39,11 +39,9 @@ public class PlayerMurderSystem : GenericPersistence
|
|||
public static void Initialize()
|
||||
{
|
||||
EventSink.Disconnected += OnDisconnected;
|
||||
EventSink.Login += OnLogin;
|
||||
EventSink.PlayerDeleted += OnPlayerDeleted;
|
||||
}
|
||||
|
||||
private static void OnPlayerDeleted(Mobile m)
|
||||
public static void OnPlayerDeleted(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile pm && _murderContexts.Remove(pm, out var context))
|
||||
{
|
||||
|
|
@ -80,7 +78,7 @@ public class PlayerMurderSystem : GenericPersistence
|
|||
UpdateMurderContext(context);
|
||||
}
|
||||
|
||||
private static void OnLogin(Mobile m)
|
||||
public static void OnLogin(Mobile m)
|
||||
{
|
||||
if (m is not PlayerMobile pm || !GetMurderContext(pm, out var context))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -561,16 +561,13 @@ namespace Server.Engines.VeteranRewards
|
|||
RewardInterval = ServerConfiguration.GetOrUpdateSetting("vetRewards.rewardInterval", TimeSpan.FromDays(30.0));
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
public static void OnLogin(Mobile m)
|
||||
{
|
||||
if (Enabled)
|
||||
if (!Enabled)
|
||||
{
|
||||
EventSink.Login += EventSink_Login;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static void EventSink_Login(Mobile m)
|
||||
{
|
||||
if (!m.Alive)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -82,10 +82,9 @@ public class JusticeVirtue
|
|||
public static void Initialize()
|
||||
{
|
||||
VirtueGump.Register(109, OnVirtueUsed);
|
||||
EventSink.PlayerDeleted += OnPlayerDeleted;
|
||||
}
|
||||
|
||||
private static void OnPlayerDeleted(Mobile m)
|
||||
public static void OnPlayerDeleted(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile pm)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue