Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -3,34 +3,33 @@ using System.Collections;
namespace Server.Engines.PartySystem
{
public class DeclineTimer : Timer
{
private Mobile m_Mobile, m_Leader;
public class DeclineTimer : Timer
{
private static Hashtable m_Table = new Hashtable();
private Mobile m_Mobile, m_Leader;
private static Hashtable m_Table = new Hashtable();
private DeclineTimer(Mobile m, Mobile leader) : base(TimeSpan.FromSeconds(30.0))
{
m_Mobile = m;
m_Leader = leader;
}
public static void Start( Mobile m, Mobile leader )
{
DeclineTimer t = (DeclineTimer)m_Table[m];
public static void Start(Mobile m, Mobile leader)
{
DeclineTimer t = (DeclineTimer)m_Table[m];
t?.Stop();
t?.Stop();
m_Table[m] = t = new DeclineTimer( m, leader );
t.Start();
}
m_Table[m] = t = new DeclineTimer(m, leader);
t.Start();
}
private DeclineTimer( Mobile m, Mobile leader ) : base( TimeSpan.FromSeconds( 30.0 ) )
{
m_Mobile = m;
m_Leader = leader;
}
protected override void OnTick()
{
m_Table.Remove(m_Mobile);
protected override void OnTick()
{
m_Table.Remove( m_Mobile );
if ( m_Mobile.Party == m_Leader && PartyCommands.Handler != null )
PartyCommands.Handler.OnDecline( m_Mobile, m_Leader );
}
}
if (m_Mobile.Party == m_Leader && PartyCommands.Handler != null)
PartyCommands.Handler.OnDecline(m_Mobile, m_Leader);
}
}
}