Adds BufferReader and BufferWriter. Updates UOP handling. (#101)
This commit is contained in:
parent
2c0d97cd36
commit
038c3be258
98 changed files with 2458 additions and 2185 deletions
|
|
@ -427,9 +427,9 @@ namespace Server.Accounting
|
|||
EventSink.Login += EventSink_Login;
|
||||
}
|
||||
|
||||
private static void EventSink_Connected( ConnectedEventArgs e )
|
||||
private static void EventSink_Connected(Mobile m)
|
||||
{
|
||||
if ( !(e.Mobile.Account is Account acc) )
|
||||
if ( !(m.Account is Account acc) )
|
||||
return;
|
||||
|
||||
if ( acc.Young && acc.m_YoungTimer == null )
|
||||
|
|
@ -439,9 +439,9 @@ namespace Server.Accounting
|
|||
}
|
||||
}
|
||||
|
||||
private static void EventSink_Disconnected( DisconnectedEventArgs e )
|
||||
private static void EventSink_Disconnected(Mobile m)
|
||||
{
|
||||
if ( !(e.Mobile.Account is Account acc) )
|
||||
if ( !(m.Account is Account acc) )
|
||||
return;
|
||||
|
||||
if ( acc.m_YoungTimer != null )
|
||||
|
|
@ -450,21 +450,21 @@ namespace Server.Accounting
|
|||
acc.m_YoungTimer = null;
|
||||
}
|
||||
|
||||
if ( !(e.Mobile is PlayerMobile m) )
|
||||
if ( !(m is PlayerMobile pm) )
|
||||
return;
|
||||
|
||||
acc.m_TotalGameTime += DateTime.UtcNow - m.SessionStart;
|
||||
acc.m_TotalGameTime += DateTime.UtcNow - pm.SessionStart;
|
||||
}
|
||||
|
||||
private static void EventSink_Login( LoginEventArgs e )
|
||||
private static void EventSink_Login(Mobile m)
|
||||
{
|
||||
if ( !(e.Mobile is PlayerMobile m) )
|
||||
if ( !(m is PlayerMobile pm) )
|
||||
return;
|
||||
|
||||
if ( !(m.Account is Account acc) )
|
||||
return;
|
||||
|
||||
if ( m.Young && acc.Young )
|
||||
if ( pm.Young && acc.Young )
|
||||
{
|
||||
TimeSpan ts = YoungDuration - acc.TotalGameTime;
|
||||
int hours = Math.Max( (int) ts.TotalHours, 0 );
|
||||
|
|
|
|||
|
|
@ -191,11 +191,8 @@ namespace Server.Misc
|
|||
}
|
||||
}
|
||||
|
||||
private static void EventSink_DeleteRequest(DeleteRequestEventArgs e)
|
||||
private static void EventSink_DeleteRequest(NetState state, int index)
|
||||
{
|
||||
NetState state = e.State;
|
||||
int index = e.Index;
|
||||
|
||||
if (!(state.Account is Account acct))
|
||||
{
|
||||
state.Dispose();
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace Server.Accounting
|
|||
}
|
||||
}
|
||||
|
||||
public static void Save(WorldSaveEventArgs e)
|
||||
public static void Save(bool message)
|
||||
{
|
||||
if (!Directory.Exists("Saves/Accounts"))
|
||||
Directory.CreateDirectory("Saves/Accounts");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue