C# 9 Cleanup (#325)

- [X] Removes EventArgs - not needed
- [X] Merges sequential checks
- [X] Removes redundant type declarations
This commit is contained in:
Kamron Batman 2020-11-27 00:29:21 -08:00 • committed by GitHub
parent 351611a23a
commit 3551d962f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
417 changed files with 2209 additions and 2213 deletions

View file

@ -206,7 +206,7 @@ namespace Server.Engines.BulkOrders
private static readonly ConstructCallback PowerScroll = CreatePowerScroll;
private static readonly ConstructCallback ColoredAnvil = CreateColoredAnvil;
private static readonly ConstructCallback AncientHammer = CreateAncientHammer;
public static readonly SmithRewardCalculator Instance = new SmithRewardCalculator();
public static readonly SmithRewardCalculator Instance = new();
private static readonly int[][][] m_GoldTable =
{
@ -299,9 +299,9 @@ namespace Server.Engines.BulkOrders
private readonly RewardType[] m_Types =
{
// Armors
new RewardType(200, typeof(RingmailGloves), typeof(RingmailChest), typeof(RingmailArms), typeof(RingmailLegs)),
new RewardType(300, typeof(ChainCoif), typeof(ChainLegs), typeof(ChainChest)),
new RewardType(
new(200, typeof(RingmailGloves), typeof(RingmailChest), typeof(RingmailArms), typeof(RingmailLegs)),
new(300, typeof(ChainCoif), typeof(ChainLegs), typeof(ChainChest)),
new(
400,
typeof(PlateArms),
typeof(PlateLegs),
@ -312,8 +312,8 @@ namespace Server.Engines.BulkOrders
),
// Weapons
new RewardType(200, typeof(Bardiche), typeof(Halberd)),
new RewardType(
new(200, typeof(Bardiche), typeof(Halberd)),
new(
300,
typeof(Dagger),
typeof(ShortSpear),
@ -321,7 +321,7 @@ namespace Server.Engines.BulkOrders
typeof(WarFork),
typeof(Kryss)
), // OSI put the dagger in there. Odd, ain't it.
new RewardType(
new(
350,
typeof(Axe),
typeof(BattleAxe),
@ -330,7 +330,7 @@ namespace Server.Engines.BulkOrders
typeof(LargeBattleAxe),
typeof(TwoHandedAxe)
),
new RewardType(
new(
350,
typeof(Broadsword),
typeof(Cutlass),
@ -339,7 +339,7 @@ namespace Server.Engines.BulkOrders
typeof(Scimitar), /*typeof( ThinLongsword ),*/
typeof(VikingSword)
),
new RewardType(
new(
350,
typeof(WarAxe),
typeof(HammerPick),
@ -564,7 +564,7 @@ namespace Server.Engines.BulkOrders
private static readonly ConstructCallback PowerScroll = CreatePowerScroll;
private static readonly ConstructCallback BearRug = CreateBearRug;
private static readonly ConstructCallback ClothingBlessDeed = CreateCBD;
public static readonly TailorRewardCalculator Instance = new TailorRewardCalculator();
public static readonly TailorRewardCalculator Instance = new();
private static readonly int[][][] m_AosGoldTable =
{

View file

@ -36,7 +36,7 @@ namespace Server.Engines.CannedEvil
public static ChampionSpawnInfo[] Table { get; } =
{
new ChampionSpawnInfo(
new(
"Abyss",
typeof(Semidar),
new[] { "Foe", "Assassin", "Conqueror" },
@ -49,7 +49,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(Daemon), typeof(Succubus) } // Level 4
}
),
new ChampionSpawnInfo(
new(
"Arachnid",
typeof(Mephitis),
new[] { "Bane", "Killer", "Vanquisher" },
@ -62,7 +62,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(PoisonElemental), typeof(TerathanAvenger) } // Level 4
}
),
new ChampionSpawnInfo(
new(
"Cold Blood",
typeof(Rikktor),
new[] { "Blight", "Slayer", "Destroyer" },
@ -75,7 +75,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(Dragon), typeof(OphidianKnight) } // Level 4
}
),
new ChampionSpawnInfo(
new(
"Forest Lord",
typeof(LordOaks),
new[] { "Enemy", "Curse", "Slaughterer" },
@ -88,7 +88,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(EtherealWarrior), typeof(SerpentineDragon) } // Level 4
}
),
new ChampionSpawnInfo(
new(
"Vermin Horde",
typeof(Barracoon),
new[] { "Adversary", "Subjugator", "Eradicator" },
@ -101,7 +101,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(RatmanArcher), typeof(SilverSerpent) } // Level 4
}
),
new ChampionSpawnInfo(
new(
"Unholy Terror",
typeof(Neira),
new[] { "Scourge", "Punisher", "Nemesis" },
@ -120,7 +120,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(LichLord), typeof(RottingCorpse) } // Level 4
}
),
new ChampionSpawnInfo(
new(
"Sleeping Dragon",
typeof(Serado),
new[] { "Rival", "Challenger", "Antagonist" },
@ -133,7 +133,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(Hiryu), typeof(Oni) }
}
),
new ChampionSpawnInfo(
new(
"Glade",
typeof(Twaulo),
new[] { "Banisher", "Enforcer", "Eradicator" },
@ -146,7 +146,7 @@ namespace Server.Engines.CannedEvil
new[] { typeof(FeralTreefellow), typeof(RagingGrizzlyBear) }
}
),
new ChampionSpawnInfo(
new(
"The Corrupt",
typeof(Ilhenir),
new[] { "Cleanser", "Expunger", "Depurator" },

View file

@ -64,7 +64,7 @@ namespace Server.Engines.Chat
public bool AlwaysAvailable { get; set; }
public static List<Channel> Channels { get; } = new List<Channel>();
public static List<Channel> Channels { get; } = new();
public bool Contains(ChatUser user) => m_Users.Contains(user);

View file

@ -8,8 +8,8 @@ namespace Server.Engines.Chat
public const char ModeratorColorCharacter = '1';
public const char VoicedColorCharacter = '2';
private static readonly List<ChatUser> m_Users = new List<ChatUser>();
private static readonly Dictionary<Mobile, ChatUser> m_Table = new Dictionary<Mobile, ChatUser>();
private static readonly List<ChatUser> m_Users = new();
private static readonly Dictionary<Mobile, ChatUser> m_Table = new();
public ChatUser(Mobile m, string username)
{

View file

@ -12,7 +12,7 @@ namespace Server.Engines.ConPVP
private const int BlackColor32 = 0x000008;
private static readonly Dictionary<Mobile, List<IgnoreEntry>> m_IgnoreLists =
new Dictionary<Mobile, List<IgnoreEntry>>();
new();
private readonly Mobile m_Challenged;
private readonly Mobile m_Challenger;

View file

@ -31,7 +31,7 @@ namespace Server.Engines.ConPVP
public override string DefaultName => "arena controller";
public static List<ArenaController> Instances { get; set; } = new List<ArenaController>();
public static List<ArenaController> Instances { get; set; } = new();
public override void OnDelete()
{
@ -184,16 +184,16 @@ namespace Server.Engines.ConPVP
* \/\/\
* \/\/
*/
new Point2D(0, 0),
new Point2D(0, -1),
new Point2D(0, +1),
new Point2D(1, 0),
new Point2D(1, -1),
new Point2D(1, +1),
new Point2D(2, 0),
new Point2D(2, -1),
new Point2D(2, +1),
new Point2D(3, 0)
new(0, 0),
new(0, -1),
new(0, +1),
new(1, 0),
new(1, -1),
new(1, +1),
new(2, 0),
new(2, -1),
new(2, +1),
new(3, 0)
};
// nw corner
@ -206,16 +206,16 @@ namespace Server.Engines.ConPVP
* /\/\/\/\
* \/\/\/\/
*/
new Point2D(0, 0),
new Point2D(0, 1),
new Point2D(1, 0),
new Point2D(1, 1),
new Point2D(0, 2),
new Point2D(2, 0),
new Point2D(2, 1),
new Point2D(1, 2),
new Point2D(0, 3),
new Point2D(3, 0)
new(0, 0),
new(0, 1),
new(1, 0),
new(1, 1),
new(0, 2),
new(2, 0),
new(2, 1),
new(1, 2),
new(0, 3),
new(3, 0)
};
private static readonly int[][,] m_Rotate =
@ -520,7 +520,7 @@ namespace Server.Engines.ConPVP
}
}
public static List<Arena> Arenas { get; } = new List<Arena>();
public static List<Arena> Arenas { get; } = new();
public int CompareTo(Arena c) => string.CompareOrdinal(m_Name, c?.m_Name);

View file

@ -29,7 +29,7 @@ namespace Server.Engines.ConPVP
private static readonly TimeSpan CombatDelay = TimeSpan.FromSeconds(30.0);
private static readonly TimeSpan AutoTieDelay = TimeSpan.FromMinutes(15.0);
private readonly List<Item> m_Walls = new List<Item>();
private readonly List<Item> m_Walls = new();
private Timer m_AutoTieTimer;

View file

@ -16,7 +16,7 @@ namespace Server.Engines.ConPVP
private readonly List<Mobile> m_Helpers;
private readonly Point3DList m_Path = new Point3DList();
private readonly Point3DList m_Path = new();
private readonly EffectTimer m_Timer;
private bool m_Flying;
private int m_PathIdx;
@ -449,7 +449,7 @@ namespace Server.Engines.ConPVP
MoveToWorld(m_Path[m_PathIdx - 1]);
}
Point3D pTop = new Point3D(GetWorldLocation()), pBottom = new Point3D(m_Path[pathCheckEnd - 1]);
Point3D pTop = new(GetWorldLocation()), pBottom = new(m_Path[pathCheckEnd - 1]);
Utility.FixPoints(ref pTop, ref pBottom);
for (var i = m_PathIdx; i < pathCheckEnd; i++)

View file

@ -164,7 +164,7 @@ namespace Server.Engines.ConPVP
}
}
public List<LadderEntry> Entries { get; } = new List<LadderEntry>();
public List<LadderEntry> Entries { get; } = new();
public static Ladder Instance { get; set; }

View file

@ -19,7 +19,7 @@ namespace Server.Engines.ConPVP
public Ruleset Base { get; private set; }
public List<Ruleset> Flavors { get; } = new List<Ruleset>();
public List<Ruleset> Flavors { get; } = new();
public bool Changed { get; set; }

View file

@ -66,7 +66,7 @@ namespace Server.Engines.ConPVP
var entries = new List<RulesetLayout>
{
new RulesetLayout(
new(
"Spells",
new[]
{

View file

@ -7,7 +7,7 @@ namespace Server.Engines.ConPVP
{
public class TournamentController : Item
{
private static readonly List<TournamentController> m_Instances = new List<TournamentController>();
private static readonly List<TournamentController> m_Instances = new();
[Constructible]
public TournamentController() : base(0x1B7A)

View file

@ -209,7 +209,7 @@ namespace Server.Engines.ConPVP
public class PyramidLevel
{
public List<TourneyMatch> Matches { get; set; } = new List<TourneyMatch>();
public List<TourneyMatch> Matches { get; set; } = new();
public TourneyParticipant FreeAdvance { get; set; }
}
}

View file

@ -41,8 +41,7 @@ namespace Server.Engines.ConPVP
var tourney = Tournament?.Tournament;
if (InRange(m, 4) && !InRange(oldLocation, 4) && tourney != null && tourney.Stage == TournamentStage.Signup &&
m.CanBeginAction(this))
if (InRange(m, 4) && !InRange(oldLocation, 4) && tourney?.Stage == TournamentStage.Signup && m.CanBeginAction(this))
{
var ladder = Ladder.Instance;

View file

@ -26,7 +26,7 @@ namespace Server.Engines.Craft
public class CraftItem
{
private static readonly Dictionary<Type, int> _itemIds = new Dictionary<Type, int>();
private static readonly Dictionary<Type, int> _itemIds = new();
private static readonly int[] m_HeatSources =
{

View file

@ -13,7 +13,7 @@ namespace Server.Engines.Craft
public abstract class CraftSystem
{
private readonly Dictionary<Mobile, CraftContext> m_ContextTable = new Dictionary<Mobile, CraftContext>();
private readonly Dictionary<Mobile, CraftContext> m_ContextTable = new();
private readonly List<int> m_RareRecipes;
private readonly List<int> m_Recipes;

View file

@ -24,7 +24,7 @@ namespace Server.Engines.Craft
LargestRecipeID = Math.Max(id, LargestRecipeID);
}
public static Dictionary<int, Recipe> Recipes { get; } = new Dictionary<int, Recipe>();
public static Dictionary<int, Recipe> Recipes { get; } = new();
public static int LargestRecipeID { get; private set; }

View file

@ -56,16 +56,16 @@ namespace Server.Engines.Doom
/* Exit & Enter locations for the lamp room */
public static Point3D lr_Exit = new Point3D(353, 172, -1);
public static Point3D lr_Enter = new Point3D(467, 96, -1);
public static Point3D lr_Exit = new(353, 172, -1);
public static Point3D lr_Enter = new(467, 96, -1);
/* "Center" location in puzzle */
public static Point3D lp_Center = new Point3D(324, 64, -1);
public static Point3D lp_Center = new(324, 64, -1);
/* Lamp Room Area */
public static Rectangle2D lr_Rect = new Rectangle2D(465, 92, 10, 10);
public static Rectangle2D lr_Rect = new(465, 92, 10, 10);
/* Lamp Room area Poison message data */
@ -465,7 +465,7 @@ namespace Server.Engines.Doom
RandomPointIn(rect.X, rect.Y, rect.Height, rect.Width, z);
public static Point3D RandomPointIn(int x, int y, int x2, int y2, int z) =>
new Point3D(Utility.Random(x, x2), Utility.Random(y, y2), z);
new(Utility.Random(x, x2), Utility.Random(y, y2), z);
public static void PlaySounds(Point3D location, int[] sounds)
{

View file

@ -37,14 +37,14 @@ namespace Server.Engines.Events
public class EventScheduler : Timer
{
private static EventScheduler _instance;
private readonly List<EventScheduleEntry> _schedule = new List<EventScheduleEntry>();
private readonly List<EventScheduleEntry> _schedule = new();
private EventScheduler() : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0))
{
}
public static EventScheduler Instance => _instance ??= new EventScheduler();
public static List<IEvent> AvailableEvents { get; } = new List<IEvent>();
public static List<IEvent> AvailableEvents { get; } = new();
public static void Initialize()
{

View file

@ -27,7 +27,7 @@ namespace Server.Factions
public static readonly TimeSpan SkillLossPeriod = TimeSpan.FromMinutes(20.0);
private static readonly Dictionary<Mobile, SkillLossContext>
m_SkillLoss = new Dictionary<Mobile, SkillLossContext>();
m_SkillLoss = new();
private FactionDefinition m_Definition;
public int ZeroRankOffset;
@ -573,7 +573,7 @@ namespace Server.Factions
}
}
public bool IsCommander(Mobile mob) => mob != null && mob.AccessLevel >= AccessLevel.GameMaster || mob == Commander;
public bool IsCommander(Mobile mob) => mob?.AccessLevel >= AccessLevel.GameMaster || mob == Commander;
public override string ToString() => m_Definition.FriendlyName;

View file

@ -39,42 +39,42 @@ namespace Server.Factions
{
public static MerchantTitleInfo[] Info { get; } =
{
new MerchantTitleInfo(
new(
SkillName.Inscribe,
90.0,
new TextDefinition(1060773, "Scribe"),
new TextDefinition(1011468, "SCRIBE"),
new TextDefinition(1010121, "You now have the faction title of scribe")
),
new MerchantTitleInfo(
new(
SkillName.Carpentry,
90.0,
new TextDefinition(1060774, "Carpenter"),
new TextDefinition(1011469, "CARPENTER"),
new TextDefinition(1010122, "You now have the faction title of carpenter")
),
new MerchantTitleInfo(
new(
SkillName.Tinkering,
90.0,
new TextDefinition(1022984, "Tinker"),
new TextDefinition(1011470, "TINKER"),
new TextDefinition(1010123, "You now have the faction title of tinker")
),
new MerchantTitleInfo(
new(
SkillName.Blacksmith,
90.0,
new TextDefinition(1023016, "Blacksmith"),
new TextDefinition(1011471, "BLACKSMITH"),
new TextDefinition(1010124, "You now have the faction title of blacksmith")
),
new MerchantTitleInfo(
new(
SkillName.Fletching,
90.0,
new TextDefinition(1023022, "Bowyer"),
new TextDefinition(1011472, "BOWYER"),
new TextDefinition(1010125, "You now have the faction title of Bowyer")
),
new MerchantTitleInfo(
new(
SkillName.Tailoring,
90.0,
new TextDefinition(1022982, "Tailor"),

View file

@ -6,12 +6,12 @@ namespace Server.Factions
{
public class FactionItemDefinition
{
private static readonly FactionItemDefinition m_MetalArmor = new FactionItemDefinition(1000, typeof(Blacksmith));
private static readonly FactionItemDefinition m_Weapon = new FactionItemDefinition(1000, typeof(Blacksmith));
private static readonly FactionItemDefinition m_RangedWeapon = new FactionItemDefinition(1000, typeof(Bowyer));
private static readonly FactionItemDefinition m_LeatherArmor = new FactionItemDefinition(750, typeof(Tailor));
private static readonly FactionItemDefinition m_Clothing = new FactionItemDefinition(200, typeof(Tailor));
private static readonly FactionItemDefinition m_Scroll = new FactionItemDefinition(500, typeof(Mage));
private static readonly FactionItemDefinition m_MetalArmor = new(1000, typeof(Blacksmith));
private static readonly FactionItemDefinition m_Weapon = new(1000, typeof(Blacksmith));
private static readonly FactionItemDefinition m_RangedWeapon = new(1000, typeof(Bowyer));
private static readonly FactionItemDefinition m_LeatherArmor = new(750, typeof(Tailor));
private static readonly FactionItemDefinition m_Clothing = new(200, typeof(Tailor));
private static readonly FactionItemDefinition m_Scroll = new(500, typeof(Mage));
public FactionItemDefinition(int silverCost, Type vendorType)
{

View file

@ -36,7 +36,7 @@ namespace Server.Factions
public static VendorDefinition[] Definitions { get; } =
{
new VendorDefinition(
new(
typeof(FactionBottleVendor),
0xF0E,
5000,
@ -45,7 +45,7 @@ namespace Server.Factions
new TextDefinition(1011549, "POTION BOTTLE VENDOR"),
new TextDefinition(1011544, "Buy Potion Bottle Vendor")
),
new VendorDefinition(
new(
typeof(FactionBoardVendor),
0x1BD7,
3000,
@ -54,7 +54,7 @@ namespace Server.Factions
new TextDefinition(1011552, "WOOD VENDOR"),
new TextDefinition(1011545, "Buy Wooden Board Vendor")
),
new VendorDefinition(
new(
typeof(FactionOreVendor),
0x19B8,
3000,
@ -63,7 +63,7 @@ namespace Server.Factions
new TextDefinition(1011553, "IRON ORE VENDOR"),
new TextDefinition(1011546, "Buy Iron Ore Vendor")
),
new VendorDefinition(
new(
typeof(FactionReagentVendor),
0xF86,
5000,
@ -72,7 +72,7 @@ namespace Server.Factions
new TextDefinition(1011554, "REAGENT VENDOR"),
new TextDefinition(1011547, "Buy Reagent Vendor")
),
new VendorDefinition(
new(
typeof(FactionHorseVendor),
0x20DD,
5000,

View file

@ -70,7 +70,7 @@ namespace Server.Factions
}
}
public static List<BaseMonolith> Monoliths { get; set; } = new List<BaseMonolith>();
public static List<BaseMonolith> Monoliths { get; set; } = new();
public override void OnLocationChange(Point3D oldLocation)
{

View file

@ -30,7 +30,7 @@ namespace Server.Factions
public virtual void AssignName(TextDefinition name)
{
if (name != null && name.Number > 0)
if (name?.Number > 0)
{
m_LabelNumber = name.Number;
Name = null;

View file

@ -11,11 +11,11 @@ namespace Server
{
private static readonly WeightedItem[] _items =
{
new WeightedItem(30, typeof(GemOfEmpowerment)),
new WeightedItem(25, typeof(BloodRose)),
new WeightedItem(20, typeof(ClarityPotion)),
new WeightedItem(15, typeof(UrnOfAscension)),
new WeightedItem(10, typeof(StormsEye))
new(30, typeof(GemOfEmpowerment)),
new(25, typeof(BloodRose)),
new(20, typeof(ClarityPotion)),
new(15, typeof(UrnOfAscension)),
new(10, typeof(StormsEye))
};
public PowerFactionItem(int itemId)

View file

@ -121,7 +121,7 @@ namespace Server.Factions
}
}
public static List<Sigil> Sigils { get; } = new List<Sigil>();
public static List<Sigil> Sigils { get; } = new();
public void Update()
{

View file

@ -188,7 +188,7 @@ namespace Server.Factions
_ => faction.Definition.GuardAttack // ReactionType.Attack
};
if (def != null && def.Number > 0)
if (def?.Number > 0)
{
Say(def.Number);
}

View file

@ -48,7 +48,7 @@ namespace Server.Factions
public class SpellCombo
{
public static readonly SpellCombo Simple = new SpellCombo(
public static readonly SpellCombo Simple = new(
50,
new ComboEntry(typeof(ParalyzeSpell), 20),
new ComboEntry(typeof(ExplosionSpell), 100, TimeSpan.FromSeconds(2.8)),
@ -56,7 +56,7 @@ namespace Server.Factions
new ComboEntry(typeof(EnergyBoltSpell))
);
public static readonly SpellCombo Strong = new SpellCombo(
public static readonly SpellCombo Strong = new(
90,
new ComboEntry(typeof(ParalyzeSpell), 20),
new ComboEntry(typeof(ExplosionSpell), 50, TimeSpan.FromSeconds(2.8)),

View file

@ -79,7 +79,7 @@ namespace Server.Engines.Harvest
public uint VeinWeights { get; private set; }
public Dictionary<Map, Dictionary<Point2D, HarvestBank>> Banks { get; }
= new Dictionary<Map, Dictionary<Point2D, HarvestBank>>();
= new();
public void SendMessageTo(Mobile from, TextDefinition message)
{

View file

@ -14,11 +14,11 @@ namespace Server.Engines.Harvest
private static readonly MutateEntry[] m_MutateTable =
{
new MutateEntry(80.0, 80.0, 4080.0, true, typeof(SpecialFishingNet)),
new MutateEntry(80.0, 80.0, 4080.0, true, typeof(BigFish)),
new MutateEntry(90.0, 80.0, 4080.0, true, typeof(TreasureMap)),
new MutateEntry(100.0, 80.0, 4080.0, true, typeof(MessageInABottle)),
new MutateEntry(
new(80.0, 80.0, 4080.0, true, typeof(SpecialFishingNet)),
new(80.0, 80.0, 4080.0, true, typeof(BigFish)),
new(90.0, 80.0, 4080.0, true, typeof(TreasureMap)),
new(100.0, 80.0, 4080.0, true, typeof(MessageInABottle)),
new(
0.0,
125.0,
-2375.0,
@ -28,8 +28,8 @@ namespace Server.Engines.Harvest
typeof(TrulyRareFish),
typeof(PeculiarFish)
),
new MutateEntry(0.0, 105.0, -420.0, false, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)),
new MutateEntry(0.0, 200.0, -200.0, false, new Type[] { null })
new(0.0, 105.0, -420.0, false, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)),
new(0.0, 200.0, -200.0, false, new Type[] { null })
};
private static readonly int[] m_WaterTiles =
@ -73,12 +73,12 @@ namespace Server.Engines.Harvest
HarvestResource[] res =
{
new HarvestResource(00.0, 00.0, 100.0, 1043297, typeof(Fish))
new(00.0, 00.0, 100.0, 1043297, typeof(Fish))
};
HarvestVein[] veins =
{
new HarvestVein(1000, 0.0, res[0], null)
new(1000, 0.0, res[0], null)
};
fish.Resources = res;

View file

@ -117,8 +117,8 @@ namespace Server.Engines.Harvest
HarvestResource[] res =
{
new HarvestResource(00.0, 00.0, 100.0, 1007072, typeof(IronOre), typeof(Granite)),
new HarvestResource(
new(00.0, 00.0, 100.0, 1007072, typeof(IronOre), typeof(Granite)),
new(
65.0,
25.0,
105.0,
@ -127,7 +127,7 @@ namespace Server.Engines.Harvest
typeof(DullCopperGranite),
typeof(DullCopperElemental)
),
new HarvestResource(
new(
70.0,
30.0,
110.0,
@ -136,7 +136,7 @@ namespace Server.Engines.Harvest
typeof(ShadowIronGranite),
typeof(ShadowIronElemental)
),
new HarvestResource(
new(
75.0,
35.0,
115.0,
@ -145,7 +145,7 @@ namespace Server.Engines.Harvest
typeof(CopperGranite),
typeof(CopperElemental)
),
new HarvestResource(
new(
80.0,
40.0,
120.0,
@ -154,7 +154,7 @@ namespace Server.Engines.Harvest
typeof(BronzeGranite),
typeof(BronzeElemental)
),
new HarvestResource(
new(
85.0,
45.0,
125.0,
@ -163,7 +163,7 @@ namespace Server.Engines.Harvest
typeof(GoldGranite),
typeof(GoldenElemental)
),
new HarvestResource(
new(
90.0,
50.0,
130.0,
@ -172,7 +172,7 @@ namespace Server.Engines.Harvest
typeof(AgapiteGranite),
typeof(AgapiteElemental)
),
new HarvestResource(
new(
95.0,
55.0,
135.0,
@ -181,7 +181,7 @@ namespace Server.Engines.Harvest
typeof(VeriteGranite),
typeof(VeriteElemental)
),
new HarvestResource(
new(
99.0,
59.0,
139.0,
@ -194,15 +194,15 @@ namespace Server.Engines.Harvest
HarvestVein[] veins =
{
new HarvestVein(496, 0.0, res[0], null), // Iron
new HarvestVein(112, 0.5, res[1], res[0]), // Dull Copper
new HarvestVein(098, 0.5, res[2], res[0]), // Shadow Iron
new HarvestVein(084, 0.5, res[3], res[0]), // Copper
new HarvestVein(070, 0.5, res[4], res[0]), // Bronze
new HarvestVein(056, 0.5, res[5], res[0]), // Gold
new HarvestVein(042, 0.5, res[6], res[0]), // Agapite
new HarvestVein(028, 0.5, res[7], res[0]), // Verite
new HarvestVein(014, 0.5, res[8], res[0]) // Valorite
new(496, 0.0, res[0], null), // Iron
new(112, 0.5, res[1], res[0]), // Dull Copper
new(098, 0.5, res[2], res[0]), // Shadow Iron
new(084, 0.5, res[3], res[0]), // Copper
new(070, 0.5, res[4], res[0]), // Bronze
new(056, 0.5, res[5], res[0]), // Gold
new(042, 0.5, res[6], res[0]), // Agapite
new(028, 0.5, res[7], res[0]), // Verite
new(014, 0.5, res[8], res[0]) // Valorite
};
OreAndStone.Resources = res;

View file

@ -116,10 +116,10 @@ namespace Server.Engines.Help
public static class PageQueue
{
private static readonly Dictionary<Mobile, PageEntry> m_KeyedByHandler = new Dictionary<Mobile, PageEntry>();
private static readonly Dictionary<Mobile, PageEntry> m_KeyedBySender = new Dictionary<Mobile, PageEntry>();
private static readonly Dictionary<Mobile, PageEntry> m_KeyedByHandler = new();
private static readonly Dictionary<Mobile, PageEntry> m_KeyedBySender = new();
public static List<PageEntry> List { get; } = new List<PageEntry>();
public static List<PageEntry> List { get; } = new();
public static void Initialize()
{

View file

@ -24,7 +24,7 @@ namespace Server.Menus.Questions
private static readonly StuckMenuEntry[] m_Entries =
{
// Britain
new StuckMenuEntry(
new(
1011028,
new[]
{
@ -37,7 +37,7 @@ namespace Server.Menus.Questions
),
// Trinsic
new StuckMenuEntry(
new(
1011029,
new[]
{
@ -50,7 +50,7 @@ namespace Server.Menus.Questions
),
// Vesper
new StuckMenuEntry(
new(
1011030,
new[]
{
@ -63,7 +63,7 @@ namespace Server.Menus.Questions
),
// Minoc
new StuckMenuEntry(
new(
1011031,
new[]
{
@ -76,7 +76,7 @@ namespace Server.Menus.Questions
),
// Yew
new StuckMenuEntry(
new(
1011032,
new[]
{
@ -89,7 +89,7 @@ namespace Server.Menus.Questions
),
// Cove
new StuckMenuEntry(
new(
1011033,
new[]
{
@ -105,7 +105,7 @@ namespace Server.Menus.Questions
private static readonly StuckMenuEntry[] m_T2AEntries =
{
// Papua
new StuckMenuEntry(
new(
1011057,
new[]
{
@ -118,7 +118,7 @@ namespace Server.Menus.Questions
),
// Delucia
new StuckMenuEntry(
new(
1011058,
new[]
{

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class GrimmochJournal1 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -85,7 +85,7 @@ namespace Server.Items
public class GrimmochJournal2 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -185,7 +185,7 @@ namespace Server.Items
public class GrimmochJournal3 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -282,7 +282,7 @@ namespace Server.Items
public class GrimmochJournal6 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -375,7 +375,7 @@ namespace Server.Items
public class GrimmochJournal7 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -457,7 +457,7 @@ namespace Server.Items
public class GrimmochJournal11 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -523,7 +523,7 @@ namespace Server.Items
public class GrimmochJournal14 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -605,7 +605,7 @@ namespace Server.Items
public class GrimmochJournal17 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(
@ -691,7 +691,7 @@ namespace Server.Items
public class GrimmochJournal23 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The daily journal of Grimmoch Drummel",
"Grimmoch",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class LysanderNotebook1 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Lysander's Notebook",
"L. Gathenwale",
new BookPageInfo(
@ -58,7 +58,7 @@ namespace Server.Items
public class LysanderNotebook2 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Lysander's Notebook",
"L. Gathenwale",
new BookPageInfo(
@ -147,7 +147,7 @@ namespace Server.Items
public class LysanderNotebook3 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Lysander's Notebook",
"L. Gathenwale",
new BookPageInfo(
@ -230,7 +230,7 @@ namespace Server.Items
public class LysanderNotebook7 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Lysander's Notebook",
"L. Gathenwale",
new BookPageInfo(
@ -328,7 +328,7 @@ namespace Server.Items
public class LysanderNotebook8 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Lysander's Notebook",
"L. Gathenwale",
new BookPageInfo(
@ -417,7 +417,7 @@ namespace Server.Items
public class LysanderNotebook11 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Lysander's Notebook",
"L. Gathenwale",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class TavarasJournal1 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -89,7 +89,7 @@ namespace Server.Items
public class TavarasJournal2 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -209,7 +209,7 @@ namespace Server.Items
public class TavarasJournal3 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -300,7 +300,7 @@ namespace Server.Items
public class TavarasJournal6 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -403,7 +403,7 @@ namespace Server.Items
public class TavarasJournal7 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -495,7 +495,7 @@ namespace Server.Items
public class TavarasJournal8 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -605,7 +605,7 @@ namespace Server.Items
public class TavarasJournal9 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -693,7 +693,7 @@ namespace Server.Items
public class TavarasJournal11 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -803,7 +803,7 @@ namespace Server.Items
public class TavarasJournal14 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -905,7 +905,7 @@ namespace Server.Items
public class TavarasJournal16 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -1018,7 +1018,7 @@ namespace Server.Items
public class TavarasJournal16b : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -1121,7 +1121,7 @@ namespace Server.Items
public class TavarasJournal17 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(
@ -1188,7 +1188,7 @@ namespace Server.Items
public class TavarasJournal19 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal: Discovery of the Tomb",
"Tavara Sewel",
new BookPageInfo(

View file

@ -203,7 +203,7 @@ namespace Server.Items
public readonly TimeSpan CleanupTime = TimeSpan.FromHours(1.0);
private readonly Dictionary<Mobile, PuzzleChestSolutionAndTime> m_Guesses =
new Dictionary<Mobile, PuzzleChestSolutionAndTime>();
new();
private PuzzleChestSolution m_Solution;

View file

@ -5,7 +5,7 @@ namespace Server.Engines.MLQuests.Items
{
public class BedlamTeleporter : Item
{
private static readonly Point3D PointDest = new Point3D(120, 1682, 0);
private static readonly Point3D PointDest = new(120, 1682, 0);
private static readonly Map MapDest = Map.Malas;
public BedlamTeleporter()

View file

@ -19,15 +19,15 @@ namespace Server.Engines.MLQuests
{
public static readonly TextDefinition
CompletionNoticeDefault =
new TextDefinition(1072273); // You've completed a quest! Don't forget to collect your reward.
new(1072273); // You've completed a quest! Don't forget to collect your reward.
public static readonly TextDefinition CompletionNoticeShort = new TextDefinition(1046258); // Your quest is complete.
public static readonly TextDefinition CompletionNoticeShort = new(1046258); // Your quest is complete.
public static readonly TextDefinition
CompletionNoticeShortReturn = new TextDefinition(1073775); // Your quest is complete. Return for your reward.
CompletionNoticeShortReturn = new(1073775); // Your quest is complete. Return for your reward.
public static readonly TextDefinition
CompletionNoticeCraft = new TextDefinition(1073967); // You obtained what you seek, now receive your reward.
CompletionNoticeCraft = new(1073967); // You obtained what you seek, now receive your reward.
public MLQuest()
{
@ -109,7 +109,7 @@ namespace Server.Engines.MLQuests
}
public MLQuestInstance CreateInstance(IQuestGiver quester, PlayerMobile pm) =>
new MLQuestInstance(this, quester, pm);
new(this, quester, pm);
public bool CanOffer(IQuestGiver quester, PlayerMobile pm, bool message) =>
CanOffer(quester, pm, MLQuestSystem.GetContext(pm), message);

View file

@ -563,7 +563,7 @@ namespace Server.Engines.MLQuests
BaseObjectiveInstance.Deserialize(
reader,
version,
instance != null && i < instance.Objectives.Length ? instance.Objectives[i] : null
i < instance?.Objectives.Length ? instance.Objectives[i] : null
);
}

View file

@ -21,8 +21,8 @@ namespace Server.Engines.MLQuests
public static readonly bool AutoGenerateNew = true;
public static readonly bool Debug = false;
public static readonly List<MLQuest> EmptyList = new List<MLQuest>();
private static readonly List<MLQuest> m_EligiblePool = new List<MLQuest>();
public static readonly List<MLQuest> EmptyList = new();
private static readonly List<MLQuest> m_EligiblePool = new();
static MLQuestSystem()
{

View file

@ -7,7 +7,7 @@ namespace Server.Engines.MLQuests
public class QuesterNameAttribute : Attribute
{
private static readonly Type m_Type = typeof(QuesterNameAttribute);
private static readonly Dictionary<Type, string> m_Cache = new Dictionary<Type, string>();
private static readonly Dictionary<Type, string> m_Cache = new();
public QuesterNameAttribute(string questerName) => QuesterName = questerName;

View file

@ -9,33 +9,33 @@ namespace Server.Engines.MLQuests.Rewards
public class ItemReward : BaseReward
{
public static readonly ItemReward
SmallBagOfTrinkets = new ItemReward(1072268, typeof(SmallBagOfTrinkets)); // A small bag of trinkets.
SmallBagOfTrinkets = new(1072268, typeof(SmallBagOfTrinkets)); // A small bag of trinkets.
public static readonly ItemReward
BagOfTrinkets = new ItemReward(1072341, typeof(BagOfTrinkets)); // A bag of trinkets.
BagOfTrinkets = new(1072341, typeof(BagOfTrinkets)); // A bag of trinkets.
public static readonly ItemReward
BagOfTreasure = new ItemReward(1072583, typeof(BagOfTreasure)); // A bag of treasure.
BagOfTreasure = new(1072583, typeof(BagOfTreasure)); // A bag of treasure.
public static readonly ItemReward
LargeBagOfTreasure = new ItemReward(1072706, typeof(LargeBagOfTreasure)); // A large bag of treasure.
LargeBagOfTreasure = new(1072706, typeof(LargeBagOfTreasure)); // A large bag of treasure.
public static readonly ItemReward Strongbox = new ItemReward(1072584, typeof(RewardStrongbox)); // A strongbox.
public static readonly ItemReward Strongbox = new(1072584, typeof(RewardStrongbox)); // A strongbox.
public static readonly ItemReward
TailorSatchel = new ItemReward(1074282, typeof(TailorSatchel)); // Craftsman's Satchel
TailorSatchel = new(1074282, typeof(TailorSatchel)); // Craftsman's Satchel
public static readonly ItemReward
BlacksmithSatchel = new ItemReward(1074282, typeof(BlacksmithSatchel)); // Craftsman's Satchel
BlacksmithSatchel = new(1074282, typeof(BlacksmithSatchel)); // Craftsman's Satchel
public static readonly ItemReward
FletchingSatchel = new ItemReward(1074282, typeof(FletchingSatchel)); // Craftsman's Satchel
FletchingSatchel = new(1074282, typeof(FletchingSatchel)); // Craftsman's Satchel
public static readonly ItemReward
CarpentrySatchel = new ItemReward(1074282, typeof(CarpentrySatchel)); // Craftsman's Satchel
CarpentrySatchel = new(1074282, typeof(CarpentrySatchel)); // Craftsman's Satchel
public static readonly ItemReward
TinkerSatchel = new ItemReward(1074282, typeof(TinkerSatchel)); // Craftsman's Satchel
TinkerSatchel = new(1074282, typeof(TinkerSatchel)); // Craftsman's Satchel
private readonly int m_Amount;

View file

@ -5,7 +5,7 @@ namespace Server.Engines.PartySystem
{
public class DeclineTimer : Timer
{
private static readonly Dictionary<Mobile, DeclineTimer> m_Table = new Dictionary<Mobile, DeclineTimer>();
private static readonly Dictionary<Mobile, DeclineTimer> m_Table = new();
private readonly Mobile m_Leader;
private readonly Mobile m_Mobile;

View file

@ -26,8 +26,8 @@ namespace Server.PathAlgorithms.FastAStar
private static readonly Direction[] m_Path = new Direction[AreaSize * AreaSize];
private static readonly PathNode[] m_Nodes = new PathNode[NodeCount];
private static readonly BitArray m_Touched = new BitArray(NodeCount);
private static readonly BitArray m_OnOpen = new BitArray(NodeCount);
private static readonly BitArray m_Touched = new(NodeCount);
private static readonly BitArray m_OnOpen = new(NodeCount);
private static readonly int[] m_Successors = new int[8];
private static int m_xOffset, m_yOffset;

View file

@ -635,8 +635,8 @@ namespace Server.Movement
private static class MovementPool
{
private static readonly object _MovePoolLock = new object();
private static readonly Queue<List<Item>> _MoveCachePool = new Queue<List<Item>>(0x400);
private static readonly object _MovePoolLock = new();
private static readonly Queue<List<Item>> _MoveCachePool = new(0x400);
public static void AcquireMoveCache(ref List<Item> cache, IEnumerable<Item> items)
{

View file

@ -14,11 +14,11 @@ namespace Server.Movement
private static Point3D m_Goal;
private readonly List<Mobile>[] m_MobPools = { new List<Mobile>(), new List<Mobile>(), new List<Mobile>() };
private readonly List<Mobile>[] m_MobPools = { new(), new(), new() };
private readonly List<Item>[] m_Pools = { new List<Item>(), new List<Item>(), new List<Item>(), new List<Item>() };
private readonly List<Item>[] m_Pools = { new(), new(), new(), new() };
private readonly List<Sector> m_Sectors = new List<Sector>();
private readonly List<Sector> m_Sectors = new();
private MovementImpl()
{

View file

@ -170,7 +170,7 @@ namespace Server.Items
{
private static readonly TilesAndEffect[] m_Table =
{
new TilesAndEffect(
new(
new[]
{
0x71, 0x7C,
@ -209,7 +209,7 @@ namespace Server.Items
typeof(DirtGreenThornsEffect)
),
new TilesAndEffect(
new(
new[]
{
0x9, 0x15,
@ -218,7 +218,7 @@ namespace Server.Items
typeof(FurrowsGreenThornsEffect)
),
new TilesAndEffect(
new(
new[]
{
0x9C4, 0x9EB,
@ -232,7 +232,7 @@ namespace Server.Items
typeof(SwampGreenThornsEffect)
),
new TilesAndEffect(
new(
new[]
{
0x10C, 0x10F,
@ -253,7 +253,7 @@ namespace Server.Items
typeof(SnowGreenThornsEffect)
),
new TilesAndEffect(
new(
new[]
{
0x16, 0x3A,
@ -746,7 +746,7 @@ namespace Server.Items
public class GreenThornsSHTeleporter : Item
{
public static readonly Point3D Destination = new Point3D(5738, 1856, 0);
public static readonly Point3D Destination = new(5738, 1856, 0);
private GreenThornsSHTeleporter() : base(0x913)
{

View file

@ -7,7 +7,7 @@ namespace Server.Items
public class OrangePetals : Item
{
private static readonly Dictionary<Mobile, OrangePetalsContext> m_Table =
new Dictionary<Mobile, OrangePetalsContext>();
new();
[Constructible]
public OrangePetals(int amount = 1) : base(0x1021)

View file

@ -44,25 +44,25 @@ namespace Server.Engines.Plants
static PlantHueInfo() =>
m_Table = new Dictionary<PlantHue, PlantHueInfo>
{
[PlantHue.Plain] = new PlantHueInfo(0, 1060813, PlantHue.Plain, 0x835),
[PlantHue.Red] = new PlantHueInfo(0x66D, 1060814, PlantHue.Red, 0x24),
[PlantHue.Blue] = new PlantHueInfo(0x53D, 1060815, PlantHue.Blue, 0x6),
[PlantHue.Yellow] = new PlantHueInfo(0x8A5, 1060818, PlantHue.Yellow, 0x38),
[PlantHue.BrightRed] = new PlantHueInfo(0x21, 1060814, PlantHue.BrightRed, 0x21),
[PlantHue.BrightBlue] = new PlantHueInfo(0x5, 1060815, PlantHue.BrightBlue, 0x6),
[PlantHue.BrightYellow] = new PlantHueInfo(0x38, 1060818, PlantHue.BrightYellow, 0x35),
[PlantHue.Purple] = new PlantHueInfo(0xD, 1060816, PlantHue.Purple, 0x10),
[PlantHue.Green] = new PlantHueInfo(0x59B, 1060819, PlantHue.Green, 0x42),
[PlantHue.Orange] = new PlantHueInfo(0x46F, 1060817, PlantHue.Orange, 0x2E),
[PlantHue.BrightPurple] = new PlantHueInfo(0x10, 1060816, PlantHue.BrightPurple, 0xD),
[PlantHue.BrightGreen] = new PlantHueInfo(0x42, 1060819, PlantHue.BrightGreen, 0x3F),
[PlantHue.BrightOrange] = new PlantHueInfo(0x2B, 1060817, PlantHue.BrightOrange, 0x2B),
[PlantHue.Black] = new PlantHueInfo(0x455, 1060820, PlantHue.Black, 0),
[PlantHue.White] = new PlantHueInfo(0x481, 1060821, PlantHue.White, 0x481),
[PlantHue.Pink] = new PlantHueInfo(0x48E, 1061854, PlantHue.Pink),
[PlantHue.Magenta] = new PlantHueInfo(0x486, 1061852, PlantHue.Magenta),
[PlantHue.Aqua] = new PlantHueInfo(0x495, 1061853, PlantHue.Aqua),
[PlantHue.FireRed] = new PlantHueInfo(0x489, 1061855, PlantHue.FireRed)
[PlantHue.Plain] = new(0, 1060813, PlantHue.Plain, 0x835),
[PlantHue.Red] = new(0x66D, 1060814, PlantHue.Red, 0x24),
[PlantHue.Blue] = new(0x53D, 1060815, PlantHue.Blue, 0x6),
[PlantHue.Yellow] = new(0x8A5, 1060818, PlantHue.Yellow, 0x38),
[PlantHue.BrightRed] = new(0x21, 1060814, PlantHue.BrightRed, 0x21),
[PlantHue.BrightBlue] = new(0x5, 1060815, PlantHue.BrightBlue, 0x6),
[PlantHue.BrightYellow] = new(0x38, 1060818, PlantHue.BrightYellow, 0x35),
[PlantHue.Purple] = new(0xD, 1060816, PlantHue.Purple, 0x10),
[PlantHue.Green] = new(0x59B, 1060819, PlantHue.Green, 0x42),
[PlantHue.Orange] = new(0x46F, 1060817, PlantHue.Orange, 0x2E),
[PlantHue.BrightPurple] = new(0x10, 1060816, PlantHue.BrightPurple, 0xD),
[PlantHue.BrightGreen] = new(0x42, 1060819, PlantHue.BrightGreen, 0x3F),
[PlantHue.BrightOrange] = new(0x2B, 1060817, PlantHue.BrightOrange, 0x2B),
[PlantHue.Black] = new(0x455, 1060820, PlantHue.Black, 0),
[PlantHue.White] = new(0x481, 1060821, PlantHue.White, 0x481),
[PlantHue.Pink] = new(0x48E, 1061854, PlantHue.Pink),
[PlantHue.Magenta] = new(0x486, 1061852, PlantHue.Magenta),
[PlantHue.Aqua] = new(0x495, 1061853, PlantHue.Aqua),
[PlantHue.FireRed] = new(0x489, 1061855, PlantHue.FireRed)
};
private PlantHueInfo(int hue, int name, PlantHue plantHue) : this(hue, name, plantHue, hue)

View file

@ -169,7 +169,7 @@ namespace Server.Engines.Plants
[CommandProperty(AccessLevel.GameMaster)]
public bool Reproduces => PlantHueInfo.CanReproduce(PlantHue) && PlantTypeInfo.CanReproduce(PlantType);
public static List<PlantItem> Plants { get; } = new List<PlantItem>();
public static List<PlantItem> Plants { get; } = new();
[CommandProperty(AccessLevel.GameMaster)]
public SecureLevel Level { get; set; }

View file

@ -8,15 +8,15 @@ namespace Server.Engines.Plants
{
private static readonly PlantResourceInfo[] m_ResourceList =
{
new PlantResourceInfo(PlantType.ElephantEarPlant, PlantHue.BrightRed, typeof(RedLeaves)),
new PlantResourceInfo(PlantType.PonytailPalm, PlantHue.BrightRed, typeof(RedLeaves)),
new PlantResourceInfo(PlantType.CenturyPlant, PlantHue.BrightRed, typeof(RedLeaves)),
new PlantResourceInfo(PlantType.Poppies, PlantHue.BrightOrange, typeof(OrangePetals)),
new PlantResourceInfo(PlantType.Bulrushes, PlantHue.BrightOrange, typeof(OrangePetals)),
new PlantResourceInfo(PlantType.PampasGrass, PlantHue.BrightOrange, typeof(OrangePetals)),
new PlantResourceInfo(PlantType.SnakePlant, PlantHue.BrightGreen, typeof(GreenThorns)),
new PlantResourceInfo(PlantType.BarrelCactus, PlantHue.BrightGreen, typeof(GreenThorns)),
new PlantResourceInfo(PlantType.CocoaTree, PlantHue.Plain, typeof(CocoaPulp))
new(PlantType.ElephantEarPlant, PlantHue.BrightRed, typeof(RedLeaves)),
new(PlantType.PonytailPalm, PlantHue.BrightRed, typeof(RedLeaves)),
new(PlantType.CenturyPlant, PlantHue.BrightRed, typeof(RedLeaves)),
new(PlantType.Poppies, PlantHue.BrightOrange, typeof(OrangePetals)),
new(PlantType.Bulrushes, PlantHue.BrightOrange, typeof(OrangePetals)),
new(PlantType.PampasGrass, PlantHue.BrightOrange, typeof(OrangePetals)),
new(PlantType.SnakePlant, PlantHue.BrightGreen, typeof(GreenThorns)),
new(PlantType.BarrelCactus, PlantHue.BrightGreen, typeof(GreenThorns)),
new(PlantType.CocoaTree, PlantHue.Plain, typeof(CocoaPulp))
};
private PlantResourceInfo(PlantType plantType, PlantHue plantHue, Type resourceType)

View file

@ -63,26 +63,26 @@ namespace Server.Engines.Plants
{
private static readonly PlantTypeInfo[] m_Table =
{
new PlantTypeInfo(0xC83, 0, 0, PlantType.CampionFlowers, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC86, 0, 0, PlantType.Poppies, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC88, 0, 10, PlantType.Snowdrops, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC94, -15, 0, PlantType.Bulrushes, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC8B, 0, 0, PlantType.Lilies, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xCA5, -8, 0, PlantType.PampasGrass, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xCA7, -10, 0, PlantType.Rushes, false, true, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC97, -20, 0, PlantType.ElephantEarPlant, true, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC9F, -20, 0, PlantType.Fern, false, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xCA6, -16, -5, PlantType.PonytailPalm, false, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xC9C, -5, -10, PlantType.SmallPalm, false, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xD31, 0, -27, PlantType.CenturyPlant, true, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xD04, 0, 10, PlantType.WaterPlant, true, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xCA9, 0, 0, PlantType.SnakePlant, true, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xD2C, 0, 10, PlantType.PricklyPearCactus, false, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xD26, 0, 10, PlantType.BarrelCactus, false, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0xD27, 0, 10, PlantType.TribarrelCactus, false, false, true, true, PlantCategory.Default),
new PlantTypeInfo(0x28DC, -5, 5, PlantType.CommonGreenBonsai, true, false, false, false, PlantCategory.Common),
new PlantTypeInfo(0x28DF, -5, 5, PlantType.CommonPinkBonsai, true, false, false, false, PlantCategory.Common),
new PlantTypeInfo(
new(0xC83, 0, 0, PlantType.CampionFlowers, false, true, true, true, PlantCategory.Default),
new(0xC86, 0, 0, PlantType.Poppies, false, true, true, true, PlantCategory.Default),
new(0xC88, 0, 10, PlantType.Snowdrops, false, true, true, true, PlantCategory.Default),
new(0xC94, -15, 0, PlantType.Bulrushes, false, true, true, true, PlantCategory.Default),
new(0xC8B, 0, 0, PlantType.Lilies, false, true, true, true, PlantCategory.Default),
new(0xCA5, -8, 0, PlantType.PampasGrass, false, true, true, true, PlantCategory.Default),
new(0xCA7, -10, 0, PlantType.Rushes, false, true, true, true, PlantCategory.Default),
new(0xC97, -20, 0, PlantType.ElephantEarPlant, true, false, true, true, PlantCategory.Default),
new(0xC9F, -20, 0, PlantType.Fern, false, false, true, true, PlantCategory.Default),
new(0xCA6, -16, -5, PlantType.PonytailPalm, false, false, true, true, PlantCategory.Default),
new(0xC9C, -5, -10, PlantType.SmallPalm, false, false, true, true, PlantCategory.Default),
new(0xD31, 0, -27, PlantType.CenturyPlant, true, false, true, true, PlantCategory.Default),
new(0xD04, 0, 10, PlantType.WaterPlant, true, false, true, true, PlantCategory.Default),
new(0xCA9, 0, 0, PlantType.SnakePlant, true, false, true, true, PlantCategory.Default),
new(0xD2C, 0, 10, PlantType.PricklyPearCactus, false, false, true, true, PlantCategory.Default),
new(0xD26, 0, 10, PlantType.BarrelCactus, false, false, true, true, PlantCategory.Default),
new(0xD27, 0, 10, PlantType.TribarrelCactus, false, false, true, true, PlantCategory.Default),
new(0x28DC, -5, 5, PlantType.CommonGreenBonsai, true, false, false, false, PlantCategory.Common),
new(0x28DF, -5, 5, PlantType.CommonPinkBonsai, true, false, false, false, PlantCategory.Common),
new(
0x28DD,
-5,
5,
@ -93,7 +93,7 @@ namespace Server.Engines.Plants
false,
PlantCategory.Uncommon
),
new PlantTypeInfo(
new(
0x28E0,
-5,
5,
@ -104,9 +104,9 @@ namespace Server.Engines.Plants
false,
PlantCategory.Uncommon
),
new PlantTypeInfo(0x28DE, -5, 5, PlantType.RareGreenBonsai, true, false, false, false, PlantCategory.Rare),
new PlantTypeInfo(0x28E1, -5, 5, PlantType.RarePinkBonsai, true, false, false, false, PlantCategory.Rare),
new PlantTypeInfo(
new(0x28DE, -5, 5, PlantType.RareGreenBonsai, true, false, false, false, PlantCategory.Rare),
new(0x28E1, -5, 5, PlantType.RarePinkBonsai, true, false, false, false, PlantCategory.Rare),
new(
0x28E2,
-5,
5,
@ -117,13 +117,13 @@ namespace Server.Engines.Plants
false,
PlantCategory.Exceptional
),
new PlantTypeInfo(0x28E3, -5, 5, PlantType.ExoticBonsai, true, false, false, false, PlantCategory.Exotic),
new PlantTypeInfo(0x0D25, 0, 0, PlantType.Cactus, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x1A9A, 5, 10, PlantType.FlaxFlowers, false, true, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0C84, 0, 0, PlantType.FoxgloveFlowers, false, true, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x1A9F, 5, -25, PlantType.HopsEast, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0CC1, 0, 0, PlantType.OrfluerFlowers, false, true, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(
new(0x28E3, -5, 5, PlantType.ExoticBonsai, true, false, false, false, PlantCategory.Exotic),
new(0x0D25, 0, 0, PlantType.Cactus, false, false, false, false, PlantCategory.Peculiar),
new(0x1A9A, 5, 10, PlantType.FlaxFlowers, false, true, false, false, PlantCategory.Peculiar),
new(0x0C84, 0, 0, PlantType.FoxgloveFlowers, false, true, false, false, PlantCategory.Peculiar),
new(0x1A9F, 5, -25, PlantType.HopsEast, false, false, false, false, PlantCategory.Peculiar),
new(0x0CC1, 0, 0, PlantType.OrfluerFlowers, false, true, false, false, PlantCategory.Peculiar),
new(
0x0CFE,
-45,
-30,
@ -134,14 +134,14 @@ namespace Server.Engines.Plants
false,
PlantCategory.Peculiar
),
new PlantTypeInfo(0x0C8F, 0, 0, PlantType.HedgeShort, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0CC8, 0, 0, PlantType.JuniperBush, true, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0C8E, -20, 0, PlantType.SnowdropPatch, false, true, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0CB7, 0, 0, PlantType.Cattails, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0CBE, -20, 0, PlantType.PoppyPatch, false, true, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0CC9, 0, 0, PlantType.SpiderTree, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x0DC1, -5, 15, PlantType.WaterLily, false, true, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(
new(0x0C8F, 0, 0, PlantType.HedgeShort, false, false, false, false, PlantCategory.Peculiar),
new(0x0CC8, 0, 0, PlantType.JuniperBush, true, false, false, false, PlantCategory.Peculiar),
new(0x0C8E, -20, 0, PlantType.SnowdropPatch, false, true, false, false, PlantCategory.Peculiar),
new(0x0CB7, 0, 0, PlantType.Cattails, false, false, false, false, PlantCategory.Peculiar),
new(0x0CBE, -20, 0, PlantType.PoppyPatch, false, true, false, false, PlantCategory.Peculiar),
new(0x0CC9, 0, 0, PlantType.SpiderTree, false, false, false, false, PlantCategory.Peculiar),
new(0x0DC1, -5, 15, PlantType.WaterLily, false, true, false, false, PlantCategory.Peculiar),
new(
0x0CFB,
-45,
-30,
@ -152,9 +152,9 @@ namespace Server.Engines.Plants
false,
PlantCategory.Peculiar
),
new PlantTypeInfo(0x0DB8, 0, -20, PlantType.HedgeTall, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(0x1AA1, 10, -25, PlantType.HopsSouth, false, false, false, false, PlantCategory.Peculiar),
new PlantTypeInfo(
new(0x0DB8, 0, -20, PlantType.HedgeTall, false, false, false, false, PlantCategory.Peculiar),
new(0x1AA1, 10, -25, PlantType.HopsSouth, false, false, false, false, PlantCategory.Peculiar),
new(
0x246C,
-25,
-20,
@ -171,7 +171,7 @@ namespace Server.Engines.Plants
1095221,
1113715
),
new PlantTypeInfo(
new(
0xC9E,
-40,
-30,

View file

@ -70,7 +70,7 @@ namespace Server.Engines.Plants
public static Seed RandomBonsaiSeed() => RandomBonsaiSeed(0.5);
public static Seed RandomBonsaiSeed(double increaseRatio) => new Seed(
public static Seed RandomBonsaiSeed(double increaseRatio) => new(
PlantTypeInfo.RandomBonsai(increaseRatio),
PlantHue.Plain
);

View file

@ -32,27 +32,27 @@ namespace Server.Engines.Quests.Collector
{
private static readonly ImageTypeInfo[] m_Table =
{
new ImageTypeInfo(9734, typeof(Betrayer), 75, 45),
new ImageTypeInfo(9735, typeof(Bogling), 75, 45),
new ImageTypeInfo(9736, typeof(BogThing), 60, 47),
new ImageTypeInfo(9615, typeof(Gazer), 75, 45),
new ImageTypeInfo(9743, typeof(Beetle), 60, 55),
new ImageTypeInfo(9667, typeof(GiantBlackWidow), 55, 52),
new ImageTypeInfo(9657, typeof(Scorpion), 65, 47),
new ImageTypeInfo(9758, typeof(JukaMage), 75, 45),
new ImageTypeInfo(9759, typeof(JukaWarrior), 75, 45),
new ImageTypeInfo(9636, typeof(Lich), 75, 45),
new ImageTypeInfo(9756, typeof(MeerMage), 75, 45),
new ImageTypeInfo(9757, typeof(MeerWarrior), 75, 45),
new ImageTypeInfo(9638, typeof(Mongbat), 70, 50),
new ImageTypeInfo(9639, typeof(Mummy), 75, 45),
new ImageTypeInfo(9654, typeof(Pixie), 75, 45),
new ImageTypeInfo(9747, typeof(PlagueBeast), 60, 45),
new ImageTypeInfo(9750, typeof(SandVortex), 60, 43),
new ImageTypeInfo(9614, typeof(StoneGargoyle), 75, 45),
new ImageTypeInfo(9753, typeof(SwampDragon), 50, 55),
new ImageTypeInfo(8448, typeof(Wisp), 75, 45),
new ImageTypeInfo(9746, typeof(Juggernaut), 55, 38)
new(9734, typeof(Betrayer), 75, 45),
new(9735, typeof(Bogling), 75, 45),
new(9736, typeof(BogThing), 60, 47),
new(9615, typeof(Gazer), 75, 45),
new(9743, typeof(Beetle), 60, 55),
new(9667, typeof(GiantBlackWidow), 55, 52),
new(9657, typeof(Scorpion), 65, 47),
new(9758, typeof(JukaMage), 75, 45),
new(9759, typeof(JukaWarrior), 75, 45),
new(9636, typeof(Lich), 75, 45),
new(9756, typeof(MeerMage), 75, 45),
new(9757, typeof(MeerWarrior), 75, 45),
new(9638, typeof(Mongbat), 70, 50),
new(9639, typeof(Mummy), 75, 45),
new(9654, typeof(Pixie), 75, 45),
new(9747, typeof(PlagueBeast), 60, 45),
new(9750, typeof(SandVortex), 60, 43),
new(9614, typeof(StoneGargoyle), 75, 45),
new(9753, typeof(SwampDragon), 50, 55),
new(8448, typeof(Wisp), 75, 45),
new(9746, typeof(Juggernaut), 55, 38)
};
public ImageTypeInfo(int figurine, Type type, int x, int y)

View file

@ -53,7 +53,7 @@ namespace Server.Engines.Quests.Collector
public class SitOnTheStoolObjective : QuestObjective
{
private static readonly Point3D m_StoolLocation = new Point3D(2899, 706, 0);
private static readonly Point3D m_StoolLocation = new(2899, 706, 0);
private static readonly Map m_StoolMap = Map.Trammel;
private DateTime m_Begin;

View file

@ -11,60 +11,60 @@ namespace Server.Items
// TODO: Trammel/Haven
private static readonly Point2D[] m_TrammelBanks =
{
new Point2D(652, 820),
new Point2D(1813, 2825),
new Point2D(3734, 2149),
new Point2D(2503, 552),
new Point2D(3764, 1317),
new Point2D(587, 2146),
new Point2D(1655, 1606),
new Point2D(1425, 1690),
new Point2D(4471, 1156),
new Point2D(1317, 3773),
new Point2D(2881, 684),
new Point2D(2731, 2192),
new Point2D(3620, 2617),
new Point2D(2880, 3472),
new Point2D(1897, 2684),
new Point2D(5346, 74),
new Point2D(5275, 3977),
new Point2D(5669, 3131)
new(652, 820),
new(1813, 2825),
new(3734, 2149),
new(2503, 552),
new(3764, 1317),
new(587, 2146),
new(1655, 1606),
new(1425, 1690),
new(4471, 1156),
new(1317, 3773),
new(2881, 684),
new(2731, 2192),
new(3620, 2617),
new(2880, 3472),
new(1897, 2684),
new(5346, 74),
new(5275, 3977),
new(5669, 3131)
};
private static readonly Point2D[] m_FeluccaBanks =
{
new Point2D(652, 820),
new Point2D(1813, 2825),
new Point2D(3734, 2149),
new Point2D(2503, 552),
new Point2D(3764, 1317),
new Point2D(3695, 2511),
new Point2D(587, 2146),
new Point2D(1655, 1606),
new Point2D(1425, 1690),
new Point2D(4471, 1156),
new Point2D(1317, 3773),
new Point2D(2881, 684),
new Point2D(2731, 2192),
new Point2D(2880, 3472),
new Point2D(1897, 2684),
new Point2D(5346, 74),
new Point2D(5275, 3977),
new Point2D(5669, 3131)
new(652, 820),
new(1813, 2825),
new(3734, 2149),
new(2503, 552),
new(3764, 1317),
new(3695, 2511),
new(587, 2146),
new(1655, 1606),
new(1425, 1690),
new(4471, 1156),
new(1317, 3773),
new(2881, 684),
new(2731, 2192),
new(2880, 3472),
new(1897, 2684),
new(5346, 74),
new(5275, 3977),
new(5669, 3131)
};
private static readonly Point2D[] m_IlshenarBanks =
{
new Point2D(854, 680),
new Point2D(855, 603),
new Point2D(1226, 554),
new Point2D(1610, 556)
new(854, 680),
new(855, 603),
new(1226, 554),
new(1610, 556)
};
private static readonly Point2D[] m_MalasBanks =
{
new Point2D(996, 519),
new Point2D(2048, 1345)
new(996, 519),
new(2048, 1345)
};
[Constructible]

View file

@ -20,9 +20,9 @@ namespace Server.Engines.Quests.Necro
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 6178), // teleporter
new QuestItemInfo(1049117, 4036), // Horn of Retreat
new QuestItemInfo(1048032, 3702) // a bag
new(1026153, 6178), // teleporter
new(1049117, 4036), // Horn of Retreat
new(1048032, 3702) // a bag
};
public override object Message => 1060099;
@ -39,7 +39,7 @@ namespace Server.Engines.Quests.Necro
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 6178) // teleporter
new(1026153, 6178) // teleporter
};
public override object Message => 1060103;
@ -76,7 +76,7 @@ namespace Server.Engines.Quests.Necro
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023643, 8787) // spellbook
new(1023643, 8787) // spellbook
};
public override object Message => 1060110;

View file

@ -6,7 +6,7 @@ namespace Server.Engines.Quests.Necro
{
public class KronusScroll : QuestItem
{
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D(2080, 1346, 10, 10);
private static readonly Rectangle2D m_WellOfTearsArea = new(2080, 1346, 10, 10);
private static readonly Map m_WellOfTearsMap = Map.Malas;
[Constructible]

View file

@ -8,7 +8,7 @@ namespace Server.Engines.Quests.Necro
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023643, 8787) // spellbook
new(1023643, 8787) // spellbook
};
public override object Message => 1060102;
@ -99,7 +99,7 @@ namespace Server.Engines.Quests.Necro
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023676, 3679) // glowing rune
new(1023676, 3679) // glowing rune
};
public override object Message => 1060109;
@ -169,7 +169,7 @@ namespace Server.Engines.Quests.Necro
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 6178) // teleporter
new(1026153, 6178) // teleporter
};
public override object Message => 1060115;
@ -269,7 +269,7 @@ namespace Server.Engines.Quests.Necro
public class FindWellOfTearsObjective : QuestObjective
{
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D(2080, 1346, 10, 10);
private static readonly Rectangle2D m_WellOfTearsArea = new(2080, 1346, 10, 10);
private bool m_Inside;

View file

@ -6,24 +6,24 @@ namespace Server.Engines.Quests.Naturalist
{
private static readonly NestArea[] m_Areas =
{
new NestArea(false, new Rectangle2D(5861, 1787, 26, 25)),
new(false, new Rectangle2D(5861, 1787, 26, 25)),
new NestArea(
new(
false,
new Rectangle2D(5734, 1788, 14, 50),
new Rectangle2D(5748, 1800, 3, 34),
new Rectangle2D(5751, 1808, 2, 20)
),
new NestArea(false, new Rectangle2D(5907, 1908, 19, 43)),
new(false, new Rectangle2D(5907, 1908, 19, 43)),
new NestArea(
new(
false,
new Rectangle2D(5721, 1926, 24, 29),
new Rectangle2D(5745, 1935, 7, 22)
),
new NestArea(
new(
true,
new Rectangle2D(5651, 1853, 21, 32),
new Rectangle2D(5672, 1857, 6, 20)

View file

@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Naturalist
{
public class StudyNestsObjective : QuestObjective
{
private readonly List<NestArea> m_StudiedNests = new List<NestArea>();
private readonly List<NestArea> m_StudiedNests = new();
private NestArea m_CurrentNest;
private DateTime m_StudyBegin;
private StudyState m_StudyState;

View file

@ -24,7 +24,7 @@ namespace Server.Engines.Quests.Haven
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023676, 0xE68) // glowing rune
new(1023676, 0xE68) // glowing rune
};
public override object Message
@ -80,8 +80,8 @@ namespace Server.Engines.Quests.Haven
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 0x1822), // teleporter
new QuestItemInfo(1048032, 0xE76) // a bag
new(1026153, 0x1822), // teleporter
new(1048032, 0xE76) // a bag
};
public override object Message
@ -135,7 +135,7 @@ namespace Server.Engines.Quests.Haven
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023637, 0xE34) // scroll
new(1023637, 0xE34) // scroll
};
public override object Message
@ -180,9 +180,9 @@ namespace Server.Engines.Quests.Haven
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1048030, 0x14EB), // a Treasure Map
new QuestItemInfo(1023969, 0xF81), // Fertile Dirt
new QuestItemInfo(1049117, 0xFC4) // Horn of Retreat
new(1048030, 0x14EB), // a Treasure Map
new(1023969, 0xF81), // Fertile Dirt
new(1049117, 0xFC4) // Horn of Retreat
};
public override object Message => 1049325;
@ -209,8 +209,8 @@ namespace Server.Engines.Quests.Haven
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023965, 0xF7D), // Daemon Blood
new QuestItemInfo(1022581, 0xA22) // lantern
new(1023965, 0xF7D), // Daemon Blood
new(1022581, 0xA22) // lantern
};
public override object Message
@ -258,13 +258,13 @@ namespace Server.Engines.Quests.Haven
{
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1017412, 0xF80) // Daemon Bone
new(1017412, 0xF80) // Daemon Bone
};
private static readonly QuestItemInfo[] m_InfoPaladin =
{
new QuestItemInfo(1017412, 0xF80), // Daemon Bone
new QuestItemInfo(1060577, 0x1F14) // Recall Rune
new(1017412, 0xF80), // Daemon Bone
new(1060577, 0x1F14) // Recall Rune
};
public override object Message

View file

@ -27,35 +27,35 @@ namespace Server.Engines.Quests.Hag
private static readonly IngredientInfo[] m_Table =
{
// sheep liver
new IngredientInfo(1055020, 5, typeof(Sheep)),
new(1055020, 5, typeof(Sheep)),
// rabbit's foot
new IngredientInfo(1055021, 5, typeof(Rabbit), typeof(JackRabbit)),
new(1055021, 5, typeof(Rabbit), typeof(JackRabbit)),
// mongbat wing
new IngredientInfo(1055022, 5, typeof(Mongbat), typeof(GreaterMongbat)),
new(1055022, 5, typeof(Mongbat), typeof(GreaterMongbat)),
// chicken gizzard
new IngredientInfo(1055023, 5, typeof(Chicken)),
new(1055023, 5, typeof(Chicken)),
// rat tail
new IngredientInfo(1055024, 5, typeof(Rat), typeof(GiantRat), typeof(SewerRat)),
new(1055024, 5, typeof(Rat), typeof(GiantRat), typeof(SewerRat)),
// frog's leg
new IngredientInfo(1055025, 5, typeof(BullFrog)),
new(1055025, 5, typeof(BullFrog)),
// deer heart
new IngredientInfo(1055026, 5, typeof(Hind), typeof(GreatHart)),
new(1055026, 5, typeof(Hind), typeof(GreatHart)),
// lizard tongue
new IngredientInfo(1055027, 5, typeof(LavaLizard), typeof(Lizardman)),
new(1055027, 5, typeof(LavaLizard), typeof(Lizardman)),
// slime ooze
new IngredientInfo(1055028, 5, typeof(Slime)),
new(1055028, 5, typeof(Slime)),
// spirit essence
new IngredientInfo(1055029, 5, typeof(Ghoul), typeof(Spectre), typeof(Shade), typeof(Wraith), typeof(Bogle)),
new(1055029, 5, typeof(Ghoul), typeof(Spectre), typeof(Shade), typeof(Wraith), typeof(Bogle)),
// Swamp Water
new IngredientInfo(1055030, 1),
new(1055030, 1),
// Freshly Cut Red Mushrooms
new IngredientInfo(1055031, 1),
new(1055031, 1),
// Bones Buried In Hallowed Ground
new IngredientInfo(1055032, 1),
new(1055032, 1),
// Star Chart
new IngredientInfo(1055033, 1),
new(1055033, 1),
// Captain Blackheart's Whiskey
new IngredientInfo(1055034, 1)
new(1055034, 1)
};
private IngredientInfo(int name, int quantity, params Type[] creatures)

View file

@ -37,7 +37,7 @@ namespace Server.Engines.Quests.Hag
return apprentice;
}
private static List<Item> GetEquipment() => new List<Item>();
private static List<Item> GetEquipment() => new();
public override void AddNameProperty(ObjectPropertyList list)
{

View file

@ -8,11 +8,11 @@ namespace Server.Engines.Quests.Hag
{
private static readonly Point3D[] m_CorpseLocations =
{
new Point3D(778, 1158, 0),
new Point3D(698, 1443, 0),
new Point3D(785, 1548, 0),
new Point3D(734, 1504, 0),
new Point3D(819, 1266, 0)
new(778, 1158, 0),
new(698, 1443, 0),
new(785, 1548, 0),
new(734, 1504, 0),
new(819, 1266, 0)
};
private Point3D m_CorpseLocation;

View file

@ -33,26 +33,26 @@ namespace Server.Engines.Quests.Hag
private static readonly Point3D[] m_ZeefzorpulLocations =
{
new Point3D(1226, 1573, 0),
new Point3D(1929, 1148, 0),
new Point3D(1366, 2723, 0),
new Point3D(1675, 2984, 0),
new Point3D(2177, 3367, 10),
new Point3D(1171, 3594, 0),
new Point3D(1010, 2667, 5),
new Point3D(1591, 2156, 5),
new Point3D(2592, 464, 60),
new Point3D(474, 1654, 0),
new Point3D(897, 2411, 0),
new Point3D(1471, 2505, 5),
new Point3D(1257, 872, 16),
new Point3D(2581, 1118, 0),
new Point3D(2513, 1102, 0),
new Point3D(1608, 3371, 0),
new Point3D(4687, 1179, 0),
new Point3D(3704, 2196, 20),
new Point3D(3346, 572, 0),
new Point3D(569, 1309, 0)
new(1226, 1573, 0),
new(1929, 1148, 0),
new(1366, 2723, 0),
new(1675, 2984, 0),
new(2177, 3367, 10),
new(1171, 3594, 0),
new(1010, 2667, 5),
new(1591, 2156, 5),
new(2592, 464, 60),
new(474, 1654, 0),
new(897, 2411, 0),
new(1471, 2505, 5),
new(1257, 872, 16),
new(2581, 1118, 0),
new(2513, 1102, 0),
new(1608, 3371, 0),
new(4687, 1179, 0),
new(3704, 2196, 20),
new(3346, 572, 0),
new(569, 1309, 0)
};
public WitchApprenticeQuest(PlayerMobile from) : base(from)

View file

@ -116,7 +116,7 @@ namespace Server.Items
{
base.GetProperties(list);
if (m_Label != null && m_Label > 0)
if (m_Label > 0)
{
TextDefinition.AddTo(list, m_Label);
}

View file

@ -12,7 +12,7 @@ namespace Server.Gumps
public class RewardOptionGump : Gump
{
private readonly IRewardOption m_Option;
private readonly RewardOptionList m_Options = new RewardOptionList();
private readonly RewardOptionList m_Options = new();
public RewardOptionGump(IRewardOption option, int title = 0) : base(60, 36)
{

View file

@ -8,7 +8,7 @@ namespace Server
public class VirtueGump : Gump
{
private static readonly Dictionary<int, OnVirtueUsed> m_Callbacks = new Dictionary<int, OnVirtueUsed>();
private static readonly Dictionary<int, OnVirtueUsed> m_Callbacks = new();
private static readonly int[] m_Table =
{