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
|
|
@ -732,7 +732,6 @@ namespace Server.Accounting
|
|||
{
|
||||
EventSink.Connected += EventSink_Connected;
|
||||
EventSink.Disconnected += EventSink_Disconnected;
|
||||
EventSink.Login += EventSink_Login;
|
||||
}
|
||||
|
||||
private static void EventSink_Connected(Mobile m)
|
||||
|
|
@ -770,7 +769,7 @@ namespace Server.Accounting
|
|||
acc.TotalGameTime += Core.Now - pm.SessionStart;
|
||||
}
|
||||
|
||||
private static void EventSink_Login(Mobile m)
|
||||
public static void OnLogin(Mobile m)
|
||||
{
|
||||
if (m is not PlayerMobile pm)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Server.Accounting;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Engines.Help;
|
||||
using Server.Engines.PlayerMurderSystem;
|
||||
using Server.Engines.Virtues;
|
||||
using Server.Logging;
|
||||
using Server.Network;
|
||||
using Server.Regions;
|
||||
|
|
@ -64,7 +67,6 @@ public static class AccountHandler
|
|||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.DeleteRequest += EventSink_DeleteRequest;
|
||||
EventSink.AccountLogin += EventSink_AccountLogin;
|
||||
EventSink.GameLogin += EventSink_GameLogin;
|
||||
}
|
||||
|
|
@ -182,7 +184,7 @@ public static class AccountHandler
|
|||
}
|
||||
}
|
||||
|
||||
private static void EventSink_DeleteRequest(NetState state, int index)
|
||||
public static void DeleteRequest(NetState state, int index)
|
||||
{
|
||||
if (state.Account is not Account acct)
|
||||
{
|
||||
|
|
@ -228,7 +230,11 @@ public static class AccountHandler
|
|||
|
||||
m.Delete();
|
||||
|
||||
EventSink.InvokePlayerDeleted(m);
|
||||
StaminaSystem.OnPlayerDeleted(m);
|
||||
JusticeVirtue.OnPlayerDeleted(m);
|
||||
PlayerMurderSystem.OnPlayerDeleted(m);
|
||||
ChampionTitleSystem.OnPlayerDeleted(m);
|
||||
|
||||
state.SendCharacterListUpdate(acct);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue