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

@ -9,16 +9,13 @@ namespace Server.Mobiles
public override string CorpseName => "a demon knight corpse";
public override bool IgnoreYoungProtection => Core.ML;
public static Type[] ArtifactRarity10 => m_ArtifactRarity10;
public static Type[] ArtifactRarity11 => m_ArtifactRarity11;
private static Type[] m_ArtifactRarity10 =
public static Type[] ArtifactRarity10 { get; } =
{
typeof( LegacyOfTheDreadLord ),
typeof( TheTaskmaster )
};
private static Type[] m_ArtifactRarity11 =
public static Type[] ArtifactRarity11 { get; } =
{
typeof( TheDragonSlayer ),
typeof( ArmorOfFortune ),
@ -58,18 +55,18 @@ namespace Server.Mobiles
if ( !Core.AOS )
return null;
int count = ( m_ArtifactRarity10.Length * 5 ) + ( m_ArtifactRarity11.Length * 4 );
int count = ( ArtifactRarity10.Length * 5 ) + ( ArtifactRarity11.Length * 4 );
int random = Utility.Random( count );
Type type;
if ( random < ( m_ArtifactRarity10.Length * 5 ) )
if ( random < ( ArtifactRarity10.Length * 5 ) )
{
type = m_ArtifactRarity10[random / 5];
type = ArtifactRarity10[random / 5];
}
else
{
random -= m_ArtifactRarity10.Length * 5;
type = m_ArtifactRarity11[random / 4];
random -= ArtifactRarity10.Length * 5;
type = ArtifactRarity11[random / 4];
}
return Loot.Construct( type );