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
|
|
@ -5,24 +5,13 @@ namespace Server.Items
|
|||
[Flippable( 0x1070, 0x1074 )]
|
||||
public class TrainingDummy : AddonComponent
|
||||
{
|
||||
private double m_MinSkill;
|
||||
private double m_MaxSkill;
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MinSkill
|
||||
{
|
||||
get => m_MinSkill;
|
||||
set => m_MinSkill = value;
|
||||
}
|
||||
public double MinSkill { get; set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MaxSkill
|
||||
{
|
||||
get => m_MaxSkill;
|
||||
set => m_MaxSkill = value;
|
||||
}
|
||||
public double MaxSkill { get; set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Swinging => ( m_Timer != null );
|
||||
|
|
@ -35,8 +24,8 @@ namespace Server.Items
|
|||
[Constructible]
|
||||
public TrainingDummy( int itemID ) : base( itemID )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
MinSkill = -25.0;
|
||||
MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
public void UpdateItemID()
|
||||
|
|
@ -76,7 +65,7 @@ namespace Server.Items
|
|||
from.Direction = from.GetDirectionTo( GetWorldLocation() );
|
||||
weapon.PlaySwingAnimation( from );
|
||||
|
||||
from.CheckSkill( weapon.Skill, m_MinSkill, m_MaxSkill );
|
||||
from.CheckSkill( weapon.Skill, MinSkill, MaxSkill );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
|
|
@ -89,7 +78,7 @@ namespace Server.Items
|
|||
SendLocalizedMessageTo( from, 501816 ); // You are too far away to do that.
|
||||
else if ( Swinging )
|
||||
SendLocalizedMessageTo( from, 501815 ); // You have to wait until it stops swinging.
|
||||
else if ( from.Skills[weapon.Skill].Base >= m_MaxSkill )
|
||||
else if ( from.Skills[weapon.Skill].Base >= MaxSkill )
|
||||
SendLocalizedMessageTo( from, 501828 ); // Your skill cannot improve any further by simply practicing with a dummy.
|
||||
else if ( from.Mounted )
|
||||
SendLocalizedMessageTo( from, 501829 ); // You can't practice on this while on a mount.
|
||||
|
|
@ -107,8 +96,8 @@ namespace Server.Items
|
|||
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
writer.Write( m_MinSkill );
|
||||
writer.Write( m_MaxSkill );
|
||||
writer.Write( MinSkill );
|
||||
writer.Write( MaxSkill );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -121,13 +110,13 @@ namespace Server.Items
|
|||
{
|
||||
case 0:
|
||||
{
|
||||
m_MinSkill = reader.ReadDouble();
|
||||
m_MaxSkill = reader.ReadDouble();
|
||||
MinSkill = reader.ReadDouble();
|
||||
MaxSkill = reader.ReadDouble();
|
||||
|
||||
if ( m_MinSkill == 0.0 && m_MaxSkill == 30.0 )
|
||||
if ( MinSkill == 0.0 && MaxSkill == 30.0 )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
MinSkill = -25.0;
|
||||
MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue