Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

View file

@ -8,9 +8,7 @@ namespace Server.Engines.Events
{
public class HalloweenHauntings
{
public static Dictionary<PlayerMobile, ZombieSkeleton> ReAnimated { get => m_ReAnimated;
set => m_ReAnimated = value;
}
public static Dictionary<PlayerMobile, ZombieSkeleton> ReAnimated { get; set; }
private static Timer m_Timer;
private static Timer m_ClearTimer;
@ -20,8 +18,6 @@ namespace Server.Engines.Events
private static int m_QueueDelaySeconds;
private static int m_QueueClearIntervalSeconds;
private static Dictionary<PlayerMobile, ZombieSkeleton> m_ReAnimated;
private static List<PlayerMobile> m_DeathQueue;
private static Rectangle2D[] m_Cemetaries = {
@ -55,7 +51,7 @@ namespace Server.Engines.Events
TimeSpan tick = TimeSpan.FromSeconds( m_QueueDelaySeconds );
TimeSpan clear = TimeSpan.FromSeconds( m_QueueClearIntervalSeconds );
m_ReAnimated = new Dictionary<PlayerMobile, ZombieSkeleton>();
ReAnimated = new Dictionary<PlayerMobile, ZombieSkeleton>();
m_DeathQueue = new List<PlayerMobile>();
if ( today >= HolidaySettings.StartHalloween && today <= HolidaySettings.FinishHalloween )
@ -76,7 +72,7 @@ namespace Server.Engines.Events
private static void Clear_Callback()
{
m_ReAnimated.Clear();
ReAnimated.Clear();
m_DeathQueue.Clear();
@ -94,7 +90,7 @@ namespace Server.Engines.Events
{
for( int index = 0; m_DeathQueue.Count > 0 && index < m_DeathQueue.Count; index++ )
{
if ( !m_ReAnimated.ContainsKey( m_DeathQueue[ index ] ) )
if ( !ReAnimated.ContainsKey( m_DeathQueue[ index ] ) )
{
player = m_DeathQueue[ index ];
@ -102,7 +98,7 @@ namespace Server.Engines.Events
}
}
if ( player != null && !player.Deleted && m_ReAnimated.Count < m_TotalZombieLimit )
if ( player != null && !player.Deleted && ReAnimated.Count < m_TotalZombieLimit )
{
Map map = Utility.RandomBool() ? Map.Trammel : Map.Felucca;
@ -112,7 +108,7 @@ namespace Server.Engines.Events
{
ZombieSkeleton zombieskel = new ZombieSkeleton( player );
m_ReAnimated.Add( player, zombieskel );
ReAnimated.Add( player, zombieskel );
zombieskel.Home = home;
zombieskel.RangeHome = 10;

View file

@ -21,8 +21,6 @@ namespace Server.Items
private string m_Line2;
private string m_Line3;
private DateTime m_EditLimit;
[CommandProperty( AccessLevel.GameMaster )]
public string Owner
{
@ -52,15 +50,11 @@ namespace Server.Items
}
[CommandProperty( AccessLevel.GameMaster )]
public DateTime EditLimit
{
get => m_EditLimit;
set => m_EditLimit = value;
}
public DateTime EditLimit { get; set; }
public bool IsSigned => ( m_Line1 != null || m_Line2 != null || m_Line3 != null );
public bool CanSign => ( !IsSigned || DateTime.UtcNow <= m_EditLimit );
public bool CanSign => ( !IsSigned || DateTime.UtcNow <= EditLimit );
public StValentinesBear( int itemid, string name )
: base( itemid )