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
|
|
@ -16,16 +16,10 @@ namespace Server.Items
|
|||
private DateTime m_NextSpawnTime;
|
||||
private SpawnTimer m_SpawnTimer;
|
||||
|
||||
private SecureLevel m_Level;
|
||||
|
||||
public override int LabelNumber => 1062913; // Rose of Trinsic
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get => m_Level;
|
||||
set => m_Level = value;
|
||||
}
|
||||
public SecureLevel Level { get; set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Petals
|
||||
|
|
@ -142,7 +136,7 @@ namespace Server.Items
|
|||
|
||||
writer.WriteEncodedInt( (int) m_Petals );
|
||||
writer.WriteDeltaTime( (DateTime) m_NextSpawnTime );
|
||||
writer.WriteEncodedInt( (int) m_Level );
|
||||
writer.WriteEncodedInt( (int) Level );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
|
|
@ -153,7 +147,7 @@ namespace Server.Items
|
|||
|
||||
m_Petals = reader.ReadEncodedInt();
|
||||
m_NextSpawnTime = reader.ReadDeltaTime();
|
||||
m_Level = (SecureLevel) reader.ReadEncodedInt();
|
||||
Level = (SecureLevel) reader.ReadEncodedInt();
|
||||
|
||||
if ( m_Petals < 10 )
|
||||
StartSpawnTimer( m_NextSpawnTime - DateTime.UtcNow );
|
||||
|
|
|
|||
|
|
@ -9,16 +9,10 @@ namespace Server.Items
|
|||
[FlippableAttribute( 0x234E, 0x234F )]
|
||||
public class TapestryOfSosaria : Item, ISecurable
|
||||
{
|
||||
private SecureLevel m_Level;
|
||||
|
||||
public override int LabelNumber => 1062917; // The Tapestry of Sosaria
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get => m_Level;
|
||||
set => m_Level = value;
|
||||
}
|
||||
public SecureLevel Level { get; set; }
|
||||
|
||||
[Constructible]
|
||||
public TapestryOfSosaria() : base( 0x234E )
|
||||
|
|
@ -65,7 +59,7 @@ namespace Server.Items
|
|||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) m_Level );
|
||||
writer.WriteEncodedInt( (int) Level );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
|
|
@ -74,7 +68,7 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Level = (SecureLevel) reader.ReadEncodedInt();
|
||||
Level = (SecureLevel) reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue