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
|
|
@ -7,22 +7,12 @@ namespace Server.Mobiles
|
|||
public class PlagueSpawn : BaseCreature
|
||||
{
|
||||
public override string CorpseName => "a plague spawn corpse";
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_ExpireTime;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Owner
|
||||
{
|
||||
get => m_Owner;
|
||||
set => m_Owner = value;
|
||||
}
|
||||
public Mobile Owner { get; set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime ExpireTime
|
||||
{
|
||||
get => m_ExpireTime;
|
||||
set => m_ExpireTime = value;
|
||||
}
|
||||
public DateTime ExpireTime { get; set; }
|
||||
|
||||
[Constructible]
|
||||
public PlagueSpawn() : this( null )
|
||||
|
|
@ -48,7 +38,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override void OnThink()
|
||||
{
|
||||
if ( m_Owner != null && ( DateTime.UtcNow >= m_ExpireTime || m_Owner.Deleted || Map != m_Owner.Map || !InRange( m_Owner, 16 ) ) )
|
||||
if ( Owner != null && ( DateTime.UtcNow >= ExpireTime || Owner.Deleted || Map != Owner.Map || !InRange( Owner, 16 ) ) )
|
||||
{
|
||||
PlaySound( GetIdleSound() );
|
||||
Delete();
|
||||
|
|
@ -63,8 +53,8 @@ namespace Server.Mobiles
|
|||
|
||||
public PlagueSpawn( Mobile owner ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
m_Owner = owner;
|
||||
m_ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes( 1.0 );
|
||||
Owner = owner;
|
||||
ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes( 1.0 );
|
||||
|
||||
Hue = Utility.Random( 0x11, 15 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue