Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -301,25 +301,25 @@ namespace Server.Items
|
|||
public static void CreateTimer( Mobile m, TimeSpan delay )
|
||||
{
|
||||
if ( m != null )
|
||||
if ( !m_Timers.ContainsKey( m ) )
|
||||
m_Timers[m] = new InternalTimer( m, delay );
|
||||
if ( !Timers.ContainsKey( m ) )
|
||||
Timers[m] = new InternalTimer( m, delay );
|
||||
}
|
||||
|
||||
public static void StartTimer( Mobile m )
|
||||
{
|
||||
m_Timers.TryGetValue( m, out Timer t );
|
||||
Timers.TryGetValue( m, out Timer t );
|
||||
|
||||
t?.Start();
|
||||
}
|
||||
|
||||
public static bool IsDisguised( Mobile m )
|
||||
{
|
||||
return m_Timers.ContainsKey( m );
|
||||
return Timers.ContainsKey( m );
|
||||
}
|
||||
|
||||
public static bool StopTimer( Mobile m )
|
||||
{
|
||||
m_Timers.TryGetValue( m, out Timer t );
|
||||
Timers.TryGetValue( m, out Timer t );
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
|
|
@ -336,12 +336,12 @@ namespace Server.Items
|
|||
|
||||
public static bool RemoveTimer( Mobile m )
|
||||
{
|
||||
m_Timers.TryGetValue( m, out Timer t );
|
||||
Timers.TryGetValue( m, out Timer t );
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
t.Stop();
|
||||
m_Timers.Remove( m );
|
||||
Timers.Remove( m );
|
||||
}
|
||||
|
||||
return ( t != null );
|
||||
|
|
@ -349,7 +349,7 @@ namespace Server.Items
|
|||
|
||||
public static TimeSpan TimeRemaining( Mobile m )
|
||||
{
|
||||
m_Timers.TryGetValue( m, out Timer t );
|
||||
Timers.TryGetValue( m, out Timer t );
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
|
|
@ -359,8 +359,6 @@ namespace Server.Items
|
|||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
private static Dictionary<Mobile, Timer> m_Timers = new Dictionary<Mobile, Timer>();
|
||||
|
||||
public static Dictionary<Mobile, Timer> Timers => m_Timers;
|
||||
public static Dictionary<Mobile, Timer> Timers { get; } = new Dictionary<Mobile, Timer>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue