Fixes body expression style.

This commit is contained in:
Kamron Batman 2018-09-14 08:46:14 -07:00
parent 3f0a72a62f
commit 33f5e77a24
957 changed files with 7424 additions and 15973 deletions

View file

@ -20,15 +20,16 @@ namespace Server.Factions
private ElectionState m_State;
private DateTime m_LastStateTime;
public Faction Faction{ get{ return m_Faction; } }
public Faction Faction => m_Faction;
public List<Candidate> Candidates => m_Candidates;
public ElectionState State{ get{ return m_State; } set{ m_State = value; m_LastStateTime = DateTime.UtcNow; } }
public DateTime LastStateTime{ get{ return m_LastStateTime; } }
public ElectionState State{ get => m_State;
set{ m_State = value; m_LastStateTime = DateTime.UtcNow; } }
public DateTime LastStateTime => m_LastStateTime;
[CommandProperty( AccessLevel.GameMaster )]
public ElectionState CurrentState{ get{ return m_State; } }
public ElectionState CurrentState => m_State;
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
public TimeSpan NextStateTime
@ -383,25 +384,13 @@ namespace Server.Factions
private IPAddress m_Address;
private DateTime m_Time;
public Mobile From
{
get{ return m_From; }
}
public Mobile From => m_From;
public Mobile Candidate
{
get{ return m_Candidate; }
}
public Mobile Candidate => m_Candidate;
public IPAddress Address
{
get{ return m_Address; }
}
public IPAddress Address => m_Address;
public DateTime Time
{
get{ return m_Time; }
}
public DateTime Time => m_Time;
public object[] AcquireFields()
{
@ -480,10 +469,10 @@ namespace Server.Factions
private Mobile m_Mobile;
private List<Voter> m_Voters;
public Mobile Mobile{ get{ return m_Mobile; } }
public Mobile Mobile => m_Mobile;
public List<Voter> Voters => m_Voters;
public int Votes{ get{ return m_Voters.Count; } }
public int Votes => m_Voters.Count;
public void CleanMuleVotes()
{

View file

@ -23,13 +23,13 @@ namespace Server.Factions
public StrongholdRegion StrongholdRegion
{
get{ return m_StrongholdRegion; }
set{ m_StrongholdRegion = value; }
get => m_StrongholdRegion;
set => m_StrongholdRegion = value;
}
public FactionDefinition Definition
{
get{ return m_Definition; }
get => m_Definition;
set
{
m_Definition = value;
@ -39,46 +39,43 @@ namespace Server.Factions
public FactionState State
{
get{ return m_State; }
set{ m_State = value; }
get => m_State;
set => m_State = value;
}
public Election Election
{
get{ return m_State.Election; }
set{ m_State.Election = value; }
get => m_State.Election;
set => m_State.Election = value;
}
public Mobile Commander
{
get{ return m_State.Commander; }
set{ m_State.Commander = value; }
get => m_State.Commander;
set => m_State.Commander = value;
}
public int Tithe
{
get{ return m_State.Tithe; }
set{ m_State.Tithe = value; }
get => m_State.Tithe;
set => m_State.Tithe = value;
}
public int Silver
{
get{ return m_State.Silver; }
set{ m_State.Silver = value; }
get => m_State.Silver;
set => m_State.Silver = value;
}
public List<PlayerState> Members
{
get{ return m_State.Members; }
set{ m_State.Members = value; }
get => m_State.Members;
set => m_State.Members = value;
}
public static readonly TimeSpan LeavePeriod = TimeSpan.FromDays( 3.0 );
public bool FactionMessageReady
{
get{ return m_State.FactionMessageReady; }
}
public bool FactionMessageReady => m_State.FactionMessageReady;
public void Broadcast( string text )
{
@ -948,12 +945,12 @@ namespace Server.Factions
return silver;
}
public virtual int MaximumTraps{ get{ return 15; } }
public virtual int MaximumTraps => 15;
public List<BaseFactionTrap> Traps
{
get{ return m_State.Traps; }
set{ m_State.Traps = value; }
get => m_State.Traps;
set => m_State.Traps = value;
}
public const int StabilityFactor = 300; // 300% greater (3 times) than smallest faction
@ -1219,7 +1216,7 @@ namespace Server.Factions
writer.WriteEncodedInt( (int) (idx + 1) );
}
public static List<Faction> Factions{ get{ return Reflector.Factions; } }
public static List<Faction> Factions => Reflector.Factions;
public static Faction ReadReference( GenericReader reader )
{

View file

@ -15,9 +15,9 @@ namespace Server.Factions
private Faction m_Faction;
private DateTime m_Expiration;
public Item Item{ get{ return m_Item; } }
public Faction Faction{ get{ return m_Faction; } }
public DateTime Expiration{ get{ return m_Expiration; } }
public Item Item => m_Item;
public Faction Faction => m_Faction;
public DateTime Expiration => m_Expiration;
public bool HasExpired
{

View file

@ -20,7 +20,9 @@ namespace Server.Factions
private DateTime[] m_LastBroadcasts = new DateTime[BroadcastsPerPeriod];
public DateTime LastAtrophy{ get{ return m_LastAtrophy; } set{ m_LastAtrophy = value; } }
public DateTime LastAtrophy{ get => m_LastAtrophy;
set => m_LastAtrophy = value;
}
public bool FactionMessageReady
{
@ -36,7 +38,7 @@ namespace Server.Factions
}
}
public bool IsAtrophyReady{ get{ return DateTime.UtcNow >= (m_LastAtrophy + TimeSpan.FromHours( 47.0 )); } }
public bool IsAtrophyReady => DateTime.UtcNow >= (m_LastAtrophy + TimeSpan.FromHours( 47.0 ));
public int CheckAtrophy()
{
@ -82,25 +84,25 @@ namespace Server.Factions
public List<FactionItem> FactionItems
{
get{ return m_FactionItems; }
set{ m_FactionItems = value; }
get => m_FactionItems;
set => m_FactionItems = value;
}
public List<BaseFactionTrap> Traps
{
get{ return m_FactionTraps; }
set{ m_FactionTraps = value; }
get => m_FactionTraps;
set => m_FactionTraps = value;
}
public Election Election
{
get{ return m_Election; }
set{ m_Election = value; }
get => m_Election;
set => m_Election = value;
}
public Mobile Commander
{
get{ return m_Commander; }
get => m_Commander;
set
{
if ( m_Commander != null )
@ -127,20 +129,20 @@ namespace Server.Factions
public int Tithe
{
get{ return m_Tithe; }
set{ m_Tithe = value; }
get => m_Tithe;
set => m_Tithe = value;
}
public int Silver
{
get{ return m_Silver; }
set{ m_Silver = value; }
get => m_Silver;
set => m_Silver = value;
}
public List<PlayerState> Members
{
get{ return m_Members; }
set{ m_Members = value; }
get => m_Members;
set => m_Members = value;
}
public FactionState( Faction faction )

View file

@ -8,8 +8,8 @@ namespace Server.Factions
private GuardDefinition m_Definition;
private List<BaseFactionGuard> m_Guards;
public GuardDefinition Definition{ get{ return m_Definition; } }
public List<BaseFactionGuard> Guards{ get{ return m_Guards; } }
public GuardDefinition Definition => m_Definition;
public List<BaseFactionGuard> Guards => m_Guards;
public BaseFactionGuard Construct()
{

View file

@ -18,11 +18,11 @@ namespace Server.Factions
private TextDefinition m_Label;
private TextDefinition m_Assigned;
public SkillName Skill{ get{ return m_Skill; } }
public double Requirement{ get{ return m_Requirement; } }
public TextDefinition Title{ get{ return m_Title; } }
public TextDefinition Label{ get{ return m_Label; } }
public TextDefinition Assigned{ get{ return m_Assigned; } }
public SkillName Skill => m_Skill;
public double Requirement => m_Requirement;
public TextDefinition Title => m_Title;
public TextDefinition Label => m_Label;
public TextDefinition Assigned => m_Assigned;
public MerchantTitleInfo( SkillName skill, double requirement, TextDefinition title, TextDefinition label, TextDefinition assigned )
{
@ -46,7 +46,7 @@ namespace Server.Factions
new MerchantTitleInfo( SkillName.Tailoring, 90.0, new TextDefinition( 1022982, "Tailor" ), new TextDefinition( 1018300, "TAILOR" ), new TextDefinition( 1042162, "You now have the faction title of Tailor" ) ),
};
public static MerchantTitleInfo[] Info{ get{ return m_Info; } }
public static MerchantTitleInfo[] Info => m_Info;
public static MerchantTitleInfo GetInfo( MerchantTitle title )
{

View file

@ -6,12 +6,9 @@ namespace Server.Factions
{
private static FactionPersistance m_Instance;
public static FactionPersistance Instance{ get{ return m_Instance; } }
public static FactionPersistance Instance => m_Instance;
public override string DefaultName
{
get { return "Faction Persistance - Internal"; }
}
public override string DefaultName => "Faction Persistance - Internal";
public FactionPersistance() : base( 1 )
{

View file

@ -21,16 +21,19 @@ namespace Server.Factions
private DateTime m_LastHonorTime;
public Mobile Mobile{ get{ return m_Mobile; } }
public Faction Faction{ get{ return m_Faction; } }
public Mobile Mobile => m_Mobile;
public Faction Faction => m_Faction;
public List<PlayerState> Owner => m_Owner;
public MerchantTitle MerchantTitle{ get{ return m_MerchantTitle; } set{ m_MerchantTitle = value; Invalidate(); } }
public Town Sheriff{ get{ return m_Sheriff; } set{ m_Sheriff = value; Invalidate(); } }
public Town Finance{ get{ return m_Finance; } set{ m_Finance = value; Invalidate(); } }
public MerchantTitle MerchantTitle{ get => m_MerchantTitle;
set{ m_MerchantTitle = value; Invalidate(); } }
public Town Sheriff{ get => m_Sheriff;
set{ m_Sheriff = value; Invalidate(); } }
public Town Finance{ get => m_Finance;
set{ m_Finance = value; Invalidate(); } }
public List<SilverGivenEntry> SilverGiven => m_SilverGiven;
public int KillPoints {
get { return m_KillPoints; }
get => m_KillPoints;
set {
if ( m_KillPoints != value ) {
if ( value > m_KillPoints ) {
@ -102,7 +105,8 @@ namespace Server.Factions
private bool m_InvalidateRank = true;
private int m_RankIndex = -1;
public int RankIndex { get { return m_RankIndex; } set { if ( m_RankIndex != value ) { m_RankIndex = value; m_InvalidateRank = true; } } }
public int RankIndex { get => m_RankIndex;
set { if ( m_RankIndex != value ) { m_RankIndex = value; m_InvalidateRank = true; } } }
public RankDefinition Rank {
get {
@ -134,11 +138,17 @@ namespace Server.Factions
}
}
public DateTime LastHonorTime{ get{ return m_LastHonorTime; } set{ m_LastHonorTime = value; } }
public DateTime Leaving{ get{ return m_Leaving; } set{ m_Leaving = value; } }
public bool IsLeaving{ get{ return ( m_Leaving > DateTime.MinValue ); } }
public DateTime LastHonorTime{ get => m_LastHonorTime;
set => m_LastHonorTime = value;
}
public DateTime Leaving{ get => m_Leaving;
set => m_Leaving = value;
}
public bool IsLeaving => ( m_Leaving > DateTime.MinValue );
public bool IsActive{ get{ return m_IsActive; } set{ m_IsActive = value; } }
public bool IsActive{ get => m_IsActive;
set => m_IsActive = value;
}
public bool CanGiveSilverTo( Mobile mob )
{

View file

@ -9,10 +9,10 @@ namespace Server.Factions
private Mobile m_GivenTo;
private DateTime m_TimeOfGift;
public Mobile GivenTo{ get{ return m_GivenTo; } }
public DateTime TimeOfGift{ get{ return m_TimeOfGift; } }
public Mobile GivenTo => m_GivenTo;
public DateTime TimeOfGift => m_TimeOfGift;
public bool IsExpired{ get{ return ( m_TimeOfGift + ExpirePeriod ) < DateTime.UtcNow; } }
public bool IsExpired => ( m_TimeOfGift + ExpirePeriod ) < DateTime.UtcNow;
public SilverGivenEntry( Mobile givenTo )
{

View file

@ -9,8 +9,8 @@ namespace Server.Factions
public Faction Faction
{
get{ return m_Faction; }
set{ m_Faction = value; }
get => m_Faction;
set => m_Faction = value;
}
public StrongholdRegion( Faction faction ) : base( faction.Definition.FriendlyName, Faction.Facet, Region.DefaultPriority, faction.Definition.Stronghold.Area )

View file

@ -14,59 +14,56 @@ namespace Server.Factions
public TownDefinition Definition
{
get{ return m_Definition; }
set{ m_Definition = value; }
get => m_Definition;
set => m_Definition = value;
}
public TownState State
{
get{ return m_State; }
get => m_State;
set{ m_State = value; ConstructGuardLists(); }
}
public int Silver
{
get{ return m_State.Silver; }
set{ m_State.Silver = value; }
get => m_State.Silver;
set => m_State.Silver = value;
}
public Faction Owner
{
get{ return m_State.Owner; }
set{ Capture( value ); }
get => m_State.Owner;
set => Capture( value );
}
public Mobile Sheriff
{
get{ return m_State.Sheriff; }
set{ m_State.Sheriff = value; }
get => m_State.Sheriff;
set => m_State.Sheriff = value;
}
public Mobile Finance
{
get{ return m_State.Finance; }
set{ m_State.Finance = value; }
get => m_State.Finance;
set => m_State.Finance = value;
}
public int Tax
{
get{ return m_State.Tax; }
set{ m_State.Tax = value; }
get => m_State.Tax;
set => m_State.Tax = value;
}
public DateTime LastTaxChange
{
get{ return m_State.LastTaxChange; }
set{ m_State.LastTaxChange = value; }
get => m_State.LastTaxChange;
set => m_State.LastTaxChange = value;
}
public static readonly TimeSpan TaxChangePeriod = TimeSpan.FromHours( 12.0 );
public static readonly TimeSpan IncomePeriod = TimeSpan.FromDays( 1.0 );
public bool TaxChangeReady
{
get{ return ( m_State.LastTaxChange + TaxChangePeriod ) < DateTime.UtcNow; }
}
public bool TaxChangeReady => ( m_State.LastTaxChange + TaxChangePeriod ) < DateTime.UtcNow;
public static Town FromRegion( Region reg )
{
@ -114,15 +111,9 @@ namespace Server.Factions
}
}
public int DailyIncome
{
get{ return (10000 * (100 + m_State.Tax)) / 100; }
}
public int DailyIncome => (10000 * (100 + m_State.Tax)) / 100;
public int NetCashFlow
{
get{ return DailyIncome - FinanceUpkeep - SheriffUpkeep; }
}
public int NetCashFlow => DailyIncome - FinanceUpkeep - SheriffUpkeep;
public TownMonolith Monolith
{
@ -142,8 +133,8 @@ namespace Server.Factions
public DateTime LastIncome
{
get{ return m_State.LastIncome; }
set{ m_State.LastIncome = value; }
get => m_State.LastIncome;
set => m_State.LastIncome = value;
}
public void BeginOrderFiring( Mobile from )
@ -258,14 +249,14 @@ namespace Server.Factions
public List<VendorList> VendorLists
{
get{ return m_VendorLists; }
set{ m_VendorLists = value; }
get => m_VendorLists;
set => m_VendorLists = value;
}
public List<GuardList> GuardLists
{
get{ return m_GuardLists; }
set{ m_GuardLists = value; }
get => m_GuardLists;
set => m_GuardLists = value;
}
public void ConstructGuardLists()

View file

@ -18,19 +18,19 @@ namespace Server.Factions
public Town Town
{
get{ return m_Town; }
set{ m_Town = value; }
get => m_Town;
set => m_Town = value;
}
public Faction Owner
{
get{ return m_Owner; }
set{ m_Owner = value; }
get => m_Owner;
set => m_Owner = value;
}
public Mobile Sheriff
{
get{ return m_Sheriff; }
get => m_Sheriff;
set
{
if ( m_Sheriff != null )
@ -55,7 +55,7 @@ namespace Server.Factions
public Mobile Finance
{
get{ return m_Finance; }
get => m_Finance;
set
{
if ( m_Finance != null )
@ -80,26 +80,26 @@ namespace Server.Factions
public int Silver
{
get{ return m_Silver; }
set{ m_Silver = value; }
get => m_Silver;
set => m_Silver = value;
}
public int Tax
{
get{ return m_Tax; }
set{ m_Tax = value; }
get => m_Tax;
set => m_Tax = value;
}
public DateTime LastTaxChange
{
get{ return m_LastTaxChange; }
set{ m_LastTaxChange = value; }
get => m_LastTaxChange;
set => m_LastTaxChange = value;
}
public DateTime LastIncome
{
get{ return m_LastIncome; }
set{ m_LastIncome = value; }
get => m_LastIncome;
set => m_LastIncome = value;
}
public TownState( Town town )

View file

@ -8,7 +8,7 @@ namespace Server.Factions
private VendorDefinition m_Definition;
private List<BaseFactionVendor> m_Vendors;
public VendorDefinition Definition{ get{ return m_Definition; } }
public VendorDefinition Definition => m_Definition;
public List<BaseFactionVendor> Vendors => m_Vendors;
public BaseFactionVendor Construct( Town town, Faction faction )