Fixes implicit array initializers

This commit is contained in:
Kamron Batman 2018-09-14 13:14:20 -07:00
parent 7d3a0ca265
commit fee83ce560
189 changed files with 440 additions and 808 deletions

View file

@ -295,8 +295,7 @@ namespace Server.Mobiles
return (from.Alive && from.InRange(m_Mobile.Location, 3) && m_Mobile.IsHumanInTown());
}
private static SkillName[] m_KeywordTable = new[]
{
private static SkillName[] m_KeywordTable = {
SkillName.Parry,
SkillName.Healing,
SkillName.Hiding,

View file

@ -10,10 +10,10 @@ namespace Server.Mobiles
private static NeedDelegate m_Cure = new NeedDelegate( NeedCure );
private static NeedDelegate m_GHeal = new NeedDelegate( NeedGHeal );
private static NeedDelegate m_LHeal = new NeedDelegate( NeedLHeal );
private static NeedDelegate[] m_ACure = new[] { m_Cure };
private static NeedDelegate[] m_AGHeal = new[] { m_GHeal };
private static NeedDelegate[] m_ALHeal = new[] { m_LHeal };
private static NeedDelegate[] m_All = new[] { m_Cure, m_GHeal, m_LHeal };
private static NeedDelegate[] m_ACure = { m_Cure };
private static NeedDelegate[] m_AGHeal = { m_GHeal };
private static NeedDelegate[] m_ALHeal = { m_LHeal };
private static NeedDelegate[] m_All = { m_Cure, m_GHeal, m_LHeal };
public HealerAI( BaseCreature m ) : base( m )
{

View file

@ -917,8 +917,7 @@ namespace Server.Mobiles
return ( m is BaseCreature creature && creature.Summoned && m_Mobile.CanBeHarmful( creature, false ) && !creature.IsAnimatedDead );
}
private static int[] m_Offsets = new[]
{
private static int[] m_Offsets = {
-1, -1,
-1, 0,
-1, 1,

View file

@ -87,8 +87,7 @@ namespace Server
private static Dictionary<Type, SpeedInfo> m_Table;
private static SpeedInfo[] m_Speeds = new[]
{
private static SpeedInfo[] m_Speeds = {
/* Slow */
new SpeedInfo( 0.3, 0.6, new[]
{

View file

@ -4,8 +4,7 @@ namespace Server.Mobiles
public class Horse : BaseMount
{
public override string CorpseName => "a horse corpse";
private static int[] m_IDs = new[]
{
private static int[] m_IDs = {
0xC8, 0x3E9F,
0xE2, 0x3EA0,
0xE4, 0x3EA1,

View file

@ -1107,8 +1107,7 @@ namespace Server.Mobiles
return ( (double)chance / 1000 );
}
private static Type[] m_AnimateDeadTypes = new[]
{
private static Type[] m_AnimateDeadTypes = {
typeof( MoundOfMaggots ), typeof( HellSteed ), typeof( SkeletalMount ),
typeof( WailingBanshee ), typeof( Wraith ), typeof( SkeletalDragon ),
typeof( LichLord ), typeof( FleshGolem ), typeof( Lich ),
@ -1810,13 +1809,11 @@ namespace Server.Mobiles
writer.Write( m_HomeMap );
}
private static double[] m_StandardActiveSpeeds = new[]
{
private static double[] m_StandardActiveSpeeds = {
0.175, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.8
};
private static double[] m_StandardPassiveSpeeds = new[]
{
private static double[] m_StandardPassiveSpeeds = {
0.350, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.6, 2.0
};
@ -2100,23 +2097,19 @@ namespace Server.Mobiles
public override bool ShouldCheckStatTimers => false;
#region Food
private static Type[] m_Eggs = new[]
{
private static Type[] m_Eggs = {
typeof( FriedEggs ), typeof( Eggs )
};
private static Type[] m_Fish = new[]
{
private static Type[] m_Fish = {
typeof( FishSteak ), typeof( RawFishSteak )
};
private static Type[] m_GrainsAndHay = new[]
{
private static Type[] m_GrainsAndHay = {
typeof( BreadLoaf ), typeof( FrenchBread ), typeof( SheafOfHay )
};
private static Type[] m_Meat = new[]
{
private static Type[] m_Meat = {
/* Cooked */
typeof( Bacon ), typeof( CookedBird ), typeof( Sausage ),
typeof( Ham ), typeof( Ribs ), typeof( LambLeg ),
@ -2131,8 +2124,7 @@ namespace Server.Mobiles
typeof( Torso ), typeof( RightArm ), typeof( RightLeg )
};
private static Type[] m_FruitsAndVegies = new[]
{
private static Type[] m_FruitsAndVegies = {
typeof( HoneydewMelon ), typeof( YellowGourd ), typeof( GreenGourd ),
typeof( Banana ), typeof( Bananas ), typeof( Lemon ), typeof( Lime ),
typeof( Dates ), typeof( Grapes ), typeof( Peach ), typeof( Pear ),
@ -2141,8 +2133,7 @@ namespace Server.Mobiles
typeof( Onion ), typeof( Lettuce ), typeof( Pumpkin )
};
private static Type[] m_Gold = new[]
{
private static Type[] m_Gold = {
// white wyrms eat gold..
typeof( Gold )
};

View file

@ -68,8 +68,7 @@ namespace Server.Mobiles
{
if ( from != null && !willKill && amount > 5 && from.Player && 5 > Utility.Random( 100 ) )
{
string[] toSay = new[]
{
string[] toSay = {
"{0}!! You will have to do better than that!",
"{0}!! Prepare to meet your doom!",
"{0}!! My armies will crush you!",

View file

@ -126,7 +126,7 @@ namespace Server.Mobiles
DoBeneficial( toBuff );
object[] state = new object[]{ toBuff, toBuff.HitsMaxSeed, toBuff.RawStr, toBuff.RawDex };
object[] state = { toBuff, toBuff.HitsMaxSeed, toBuff.RawStr, toBuff.RawDex };
SpellHelper.Turn( this, toBuff );

View file

@ -53,8 +53,7 @@ namespace Server.Mobiles
Talk( ferret );
}
private static string[] m_Vocabulary = new[]
{
private static string[] m_Vocabulary = {
"dook",
"dook dook",
"dook dook dook!"

View file

@ -112,8 +112,7 @@ namespace Server.Mobiles
public static Type[] Artifacts => m_Artifacts;
private static Type[] m_Artifacts = new[]
{
private static Type[] m_Artifacts = {
// Decorations
typeof( CandelabraOfSouls ),
typeof( GhostShipAnchor ),

View file

@ -4,8 +4,7 @@ namespace Server.Mobiles
public class OphidianArchmage : BaseCreature
{
public override string CorpseName => "an ophidian corpse";
private static string[] m_Names = new[]
{
private static string[] m_Names = {
"an ophidian justicar",
"an ophidian zealot"
};

View file

@ -4,8 +4,7 @@ namespace Server.Mobiles
public class OphidianMage : BaseCreature
{
public override string CorpseName => "an ophidian corpse";
private static string[] m_Names = new[]
{
private static string[] m_Names = {
"an ophidian apprentice mage",
"an ophidian shaman"
};

View file

@ -6,8 +6,7 @@ namespace Server.Mobiles
public class OphidianKnight : BaseCreature
{
public override string CorpseName => "an ophidian corpse";
private static string[] m_Names = new[]
{
private static string[] m_Names = {
"an ophidian knight-errant",
"an ophidian avenger"
};

View file

@ -3,8 +3,7 @@ namespace Server.Mobiles
public class OphidianWarrior : BaseCreature
{
public override string CorpseName => "an ophidian corpse";
private static string[] m_Names = new[]
{
private static string[] m_Names = {
"an ophidian warrior",
"an ophidian enforcer"
};

View file

@ -1501,8 +1501,7 @@ namespace Server.Mobiles
public SkillName[] AnimalFormRestrictedSkills => m_AnimalFormRestrictedSkills;
private SkillName[] m_AnimalFormRestrictedSkills = new[]
{
private SkillName[] m_AnimalFormRestrictedSkills = {
SkillName.ArmsLore, SkillName.Begging, SkillName.Discordance, SkillName.Forensics,
SkillName.Inscribe, SkillName.ItemID, SkillName.Meditation, SkillName.Peacemaking,
SkillName.Provocation, SkillName.RemoveTrap, SkillName.SpiritSpeak, SkillName.Stealing,
@ -4418,8 +4417,7 @@ namespace Server.Mobiles
return false;
}
private static Point3D[] m_TrammelDeathDestinations = new[]
{
private static Point3D[] m_TrammelDeathDestinations = {
new Point3D( 1481, 1612, 20 ),
new Point3D( 2708, 2153, 0 ),
new Point3D( 2249, 1230, 0 ),
@ -4437,8 +4435,7 @@ namespace Server.Mobiles
new Point3D( 3665, 2587, 0 )
};
private static Point3D[] m_IlshenarDeathDestinations = new[]
{
private static Point3D[] m_IlshenarDeathDestinations = {
new Point3D( 1216, 468, -13 ),
new Point3D( 723, 1367, -60 ),
new Point3D( 745, 725, -28 ),
@ -4450,14 +4447,12 @@ namespace Server.Mobiles
new Point3D( 1722, 219, 96 )
};
private static Point3D[] m_MalasDeathDestinations = new[]
{
private static Point3D[] m_MalasDeathDestinations = {
new Point3D( 2079, 1376, -70 ),
new Point3D( 944, 519, -71 )
};
private static Point3D[] m_TokunoDeathDestinations = new[]
{
private static Point3D[] m_TokunoDeathDestinations = {
new Point3D( 1166, 801, 27 ),
new Point3D( 782, 1228, 25 ),
new Point3D( 268, 624, 15 )

View file

@ -28,8 +28,7 @@ namespace Server.Mobiles
}
}
private static SpawnEntry[] m_Entries = new[]
{
private static SpawnEntry[] m_Entries = {
new SpawnEntry( new Point3D( 5242, 945, -40 ), new Point3D( 1176, 2638, 0 ) ), // Destard
new SpawnEntry( new Point3D( 5225, 798, 0 ), new Point3D( 1176, 2638, 0 ) ), // Destard
new SpawnEntry( new Point3D( 5556, 886, 30 ), new Point3D( 1298, 1080, 0 ) ), // Despise
@ -118,8 +117,7 @@ namespace Server.Mobiles
public override bool Unprovokable => true;
public override Poison PoisonImmune => Poison.Lethal;
private static readonly double[] m_Offsets = new[]
{
private static readonly double[] m_Offsets = {
Math.Cos( 000.0 / 180.0 * Math.PI ), Math.Sin( 000.0 / 180.0 * Math.PI ),
Math.Cos( 040.0 / 180.0 * Math.PI ), Math.Sin( 040.0 / 180.0 * Math.PI ),
Math.Cos( 080.0 / 180.0 * Math.PI ), Math.Sin( 080.0 / 180.0 * Math.PI ),
@ -502,8 +500,7 @@ namespace Server.Mobiles
{
private Mobile m_Owner;
private static int[] m_Offsets = new[]
{
private static int[] m_Offsets = {
-1, -1,
-1, 0,
-1, 1,

View file

@ -7,8 +7,7 @@ namespace Server.Mobiles
{
public static double ChestChance = .10; // Chance that a paragon will carry a paragon chest
public static double ChocolateIngredientChance = .20; // Chance that a paragon will drop a chocolatiering ingredient
public static Map[] Maps = new[] // Maps that paragons will spawn on
{
public static Map[] Maps = {
Map.Ilshenar
};
@ -42,8 +41,7 @@ namespace Server.Mobiles
}
}
public static Type[] Artifacts = new[]
{
public static Type[] Artifacts = {
typeof( GoldBricks ), typeof( PhillipsWoodenSteed ),
typeof( AlchemistsBauble ), typeof( ArcticDeathDealer ),
typeof( BlazeOfDeath ), typeof( BowOfTheJukaKing ),

View file

@ -111,8 +111,7 @@ namespace Server.Mobiles
// Classic list
// Used when: !MLQuestSystem.Enabled && !Core.ML
private static string[] m_TownNames = new[]
{
private static string[] m_TownNames = {
"Cove", "Britain", "Jhelom",
"Minoc", "Ocllo", "Trinsic",
"Vesper", "Yew", "Skara Brae",
@ -121,8 +120,7 @@ namespace Server.Mobiles
// ML list, pre-ML quest system
// Used when: !MLQuestSystem.Enabled && Core.ML
private static string[] m_MLTownNames = new[]
{
private static string[] m_MLTownNames = {
"Cove", "Serpent's Hold", "Jhelom",
"Nujel'm"
};

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SeekerOfAdventure : BaseEscortable
{
private static string[] m_Dungeons = new[]
{
private static string[] m_Dungeons = {
"Covetous", "Deceit", "Despise",
"Destard", "Hythloth", "Shame", // Old Code for Pre-ML shards.
"Wrong"
};
private static string[] m_MLDestinations = new[]
{
private static string[] m_MLDestinations = {
"Cove", "Serpent's Hold", "Jhelom", // ML List
"Nujel'm"
};

View file

@ -24,8 +24,7 @@ namespace Server.Mobiles
public static readonly object Vendor = new object();
public static readonly object Price = new object();
private static HairstylistBuyInfo[] m_SellList = new[]
{
private static HairstylistBuyInfo[] m_SellList = {
new HairstylistBuyInfo( 1018357, 50000, false, typeof( ChangeHairstyleGump ), new[]
{ From, Vendor, Price, false, ChangeHairstyleEntry.HairEntries } ),
new HairstylistBuyInfo( 1018358, 50000, true, typeof( ChangeHairstyleGump ), new[]
@ -252,8 +251,7 @@ namespace Server.Mobiles
m_Hues[i] = start + i;
}
public static readonly ChangeHairHueEntry[] BrightEntries = new[]
{
public static readonly ChangeHairHueEntry[] BrightEntries = {
new ChangeHairHueEntry( "*****", 12, 10 ),
new ChangeHairHueEntry( "*****", 32, 5 ),
new ChangeHairHueEntry( "*****", 38, 8 ),
@ -264,8 +262,7 @@ namespace Server.Mobiles
new ChangeHairHueEntry( "*****", 1153, 2 )
};
public static readonly ChangeHairHueEntry[] RegularEntries = new[]
{
public static readonly ChangeHairHueEntry[] RegularEntries = {
new ChangeHairHueEntry( "*****", 1602, 26 ),
new ChangeHairHueEntry( "*****", 1628, 27 ),
new ChangeHairHueEntry( "*****", 1502, 32 ),
@ -406,8 +403,7 @@ namespace Server.Mobiles
m_ItemID = itemID;
}
public static readonly ChangeHairstyleEntry[] HairEntries = new[]
{
public static readonly ChangeHairstyleEntry[] HairEntries = {
new ChangeHairstyleEntry( 50700, 70 - 137, 20 - 60, 0x203B ),
new ChangeHairstyleEntry( 60710, 193 - 260, 18 - 60, 0x2045 ),
new ChangeHairstyleEntry( 50703, 316 - 383, 25 - 60, 0x2044 ),
@ -420,8 +416,7 @@ namespace Server.Mobiles
new ChangeHairstyleEntry( 0, 0, 0, 0 )
};
public static readonly ChangeHairstyleEntry[] BeardEntries = new[]
{
public static readonly ChangeHairstyleEntry[] BeardEntries = {
new ChangeHairstyleEntry( 50800, 120 - 187, 30 - 80, 0x2040 ),
new ChangeHairstyleEntry( 50904, 243 - 310, 33 - 80, 0x204B ),
new ChangeHairstyleEntry( 50906, 120 - 187, 100 - 150, 0x204D ),

View file

@ -595,8 +595,7 @@ namespace Server.Mobiles
}
}
private static Entry[] m_Entries = new[]
{
private static Entry[] m_Entries = {
new Entry( "Alchemist" ),
new Entry( "Animal Tamer" ),
new Entry( "Apothecary" ),

View file

@ -10,8 +10,7 @@ namespace Server.Mobiles
{
public class VendorRentalDuration
{
public static readonly VendorRentalDuration[] Instances = new[]
{
public static readonly VendorRentalDuration[] Instances = {
new VendorRentalDuration( TimeSpan.FromDays( 7.0 ), 1062361 ), // 1 Week
new VendorRentalDuration( TimeSpan.FromDays( 14.0 ), 1062362 ), // 2 Weeks
new VendorRentalDuration( TimeSpan.FromDays( 21.0 ), 1062363 ), // 3 Weeks