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

@ -110,7 +110,7 @@ namespace Server.Items
{
private static readonly LightEntry[] m_Entries =
{
new LightEntry(
new(
LightType.WestSmall,
1122,
1123,
@ -135,7 +135,7 @@ namespace Server.Items
2391,
2392
),
new LightEntry(
new(
LightType.NorthSmall,
1131,
1133,
@ -160,8 +160,8 @@ namespace Server.Items
2405,
2406
),
new LightEntry(LightType.Circle300, 6526, 6538, 6571),
new LightEntry(LightType.Circle150, 5703, 6587)
new(LightType.Circle300, 6526, 6538, 6571),
new(LightType.Circle150, 5703, 6587)
};
[Constructible]

View file

@ -38,7 +38,7 @@ namespace Server.Items
public override bool ShareHue => false;
private static AddonComponent GetComponent(int itemID, int hue) =>
new AddonComponent(itemID)
new(itemID)
{
Hue = hue,
Name = "jack-o-lantern"

View file

@ -49,7 +49,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public Point3D TelePoint
{
get => new Point3D(Location.X + TeleOffset.X, Location.Y + TeleOffset.Y, Location.Z + TeleOffset.Z);
get => new(Location.X + TeleOffset.X, Location.Y + TeleOffset.Y, Location.Z + TeleOffset.Z);
set => TeleOffset = new Point3D(value.X - Location.X, value.Y - Location.Y, value.Z - Location.Z);
}

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class BlackthornWelcomeBook : RedBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"A Welcome",
"Lord Blackthorn",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class DrakovsJournal : BlueBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Drakov's Journal",
"Drakov",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class FropozJournal : RedBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal",
"Fropoz",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class KaburJournal : RedBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Journal",
"Kabur",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class GrammarOfOrcish : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"A Grammar of Orcish",
"Yorick of Yew",
new BookPageInfo(
@ -265,7 +265,7 @@ namespace Server.Items
public class CallToAnarchy : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"A Politic Call to Anarchy",
"Lord Blackthorn",
new BookPageInfo(
@ -443,7 +443,7 @@ namespace Server.Items
public class ArmsAndWeaponsPrimer : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"A Primer on Arms and Weapons",
"Martin",
new BookPageInfo(
@ -631,7 +631,7 @@ namespace Server.Items
public class SongOfSamlethe : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"A Song of Samlethe",
"Sandra",
new BookPageInfo(
@ -717,7 +717,7 @@ namespace Server.Items
public class TaleOfThreeTribes : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"A Tale of Three Tribes",
"Janet, Scribe",
new BookPageInfo(
@ -846,7 +846,7 @@ namespace Server.Items
public class GuideToGuilds : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Beltran's Guide to Guilds",
"Beltran",
new BookPageInfo(
@ -1051,7 +1051,7 @@ namespace Server.Items
public class BirdsOfBritannia : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Birds of Britannia",
"Thom the Heathen",
new BookPageInfo(
@ -1358,7 +1358,7 @@ namespace Server.Items
public class BritannianFlora : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Britannian Flora: A Casual Guide",
"Herbert the Lost",
new BookPageInfo(
@ -1570,7 +1570,7 @@ namespace Server.Items
public class ChildrenTalesVol2 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Classic Children's Tales, Volume 2",
"Guilhem, Editor",
new BookPageInfo(
@ -1694,7 +1694,7 @@ namespace Server.Items
public class TalesOfVesperVol1 : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Classic Tales of Vesper, Volume 1",
"Clarke's Printery",
new BookPageInfo(
@ -1932,7 +1932,7 @@ namespace Server.Items
public class DeceitDungeonOfHorror : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Deceit: A Dungeon of Horrors",
"Mercenary Justin",
new BookPageInfo(
@ -2081,7 +2081,7 @@ namespace Server.Items
public class DimensionalTravel : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Dimensional Travel, a Monograph",
"Dryus Doost, Mage",
new BookPageInfo(
@ -2294,7 +2294,7 @@ namespace Server.Items
public class EthicalHedonism : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Ethical Hedonism: An Introduction",
"Richard Garriott",
new BookPageInfo(
@ -2572,7 +2572,7 @@ namespace Server.Items
public class MyStory : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"My Story",
"Sherry the Mouse",
new BookPageInfo(
@ -3091,7 +3091,7 @@ namespace Server.Items
public class DiversityOfOurLand : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"On the Diversity of Our Land",
"Lord Blackthorn",
new BookPageInfo(
@ -3271,7 +3271,7 @@ namespace Server.Items
public class QuestOfVirtues : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Quest of the Virtues",
"Autenil",
new BookPageInfo(
@ -3681,7 +3681,7 @@ namespace Server.Items
public class RegardingLlamas : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Regarding Llamas",
"Simon",
new BookPageInfo(
@ -3752,7 +3752,7 @@ namespace Server.Items
public class TalkingToWisps : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Talking to Wisps",
"Yorick ofMoonglow",
new BookPageInfo(
@ -3869,7 +3869,7 @@ namespace Server.Items
public class TamingDragons : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Taming Dragons",
"Wyrd Beastmaster",
new BookPageInfo(
@ -3976,7 +3976,7 @@ namespace Server.Items
public class BoldStranger : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Bold Stranger",
"Old Fabio the Poor",
new BookPageInfo(
@ -4146,7 +4146,7 @@ namespace Server.Items
public class BurningOfTrinsic : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Burning of Trinsic",
"Japheth of Trinsic",
new BookPageInfo(
@ -4407,7 +4407,7 @@ namespace Server.Items
public class TheFight : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Fight",
"M. de la Garza",
new BookPageInfo(
@ -4566,7 +4566,7 @@ namespace Server.Items
public class LifeOfATravellingMinstrel : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Life of a Travelling Minstrel",
"Sarah of Yew",
new BookPageInfo(
@ -4772,7 +4772,7 @@ namespace Server.Items
public class MajorTradeAssociation : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Major Trade Associations",
"Pieter of Vesper",
new BookPageInfo(
@ -4979,7 +4979,7 @@ namespace Server.Items
public class RankingsOfTrades : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Rankings of Trades",
"Lord Higginbotham",
new BookPageInfo(
@ -5097,7 +5097,7 @@ namespace Server.Items
public class WildGirlOfTheForest : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"The Wild Girl of the Forest",
"Horace the Trader",
new BookPageInfo(
@ -5288,7 +5288,7 @@ namespace Server.Items
public class TreatiseOnAlchemy : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Treatise on Alchemy",
"Felicia Hierophant",
new BookPageInfo(
@ -5434,7 +5434,7 @@ namespace Server.Items
public class VirtueBook : BaseBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Virtue",
"Lord British",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class NewAquariumBook : BlueBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Your New Aquarium",
"Les Bilgewater",
new BookPageInfo(

View file

@ -2,7 +2,7 @@ namespace Server.Items
{
public class TranslatedGargoyleJournal : BlueBook
{
public static readonly BookContent Content = new BookContent(
public static readonly BookContent Content = new(
"Translated Journal",
"Velis",
new BookPageInfo(

View file

@ -9,19 +9,19 @@ namespace Server.Items
{
private static readonly Point3D[] m_Offsets =
{
new Point3D(-1, 1, 0),
new Point3D(1, 1, 0),
new Point3D(-1, 0, 0),
new Point3D(1, -1, 0),
new Point3D(1, 1, 0),
new Point3D(1, -1, 0),
new Point3D(0, 0, 0),
new Point3D(0, -1, 0),
new(-1, 1, 0),
new(1, 1, 0),
new(-1, 0, 0),
new(1, -1, 0),
new(1, 1, 0),
new(1, -1, 0),
new(0, 0, 0),
new(0, -1, 0),
new Point3D(0, 0, 0),
new Point3D(0, 0, 0),
new Point3D(0, 0, 0),
new Point3D(0, 0, 0)
new(0, 0, 0),
new(0, 0, 0),
new(0, 0, 0),
new(0, 0, 0)
};
private BaseDoor m_Link;

View file

@ -751,7 +751,7 @@ namespace Server.Items
public class FillableContent
{
public static FillableContent Alchemist = new FillableContent(
public static FillableContent Alchemist = new(
1,
new[]
{
@ -771,7 +771,7 @@ namespace Server.Items
}
);
public static FillableContent Armorer = new FillableContent(
public static FillableContent Armorer = new(
2,
new[]
{
@ -790,7 +790,7 @@ namespace Server.Items
}
);
public static FillableContent ArtisanGuild = new FillableContent(
public static FillableContent ArtisanGuild = new(
1,
Array.Empty<Type>(),
new[]
@ -818,7 +818,7 @@ namespace Server.Items
}
);
public static FillableContent Baker = new FillableContent(
public static FillableContent Baker = new(
1,
new[]
{
@ -833,7 +833,7 @@ namespace Server.Items
}
);
public static FillableContent Bard = new FillableContent(
public static FillableContent Bard = new(
1,
new[]
{
@ -850,7 +850,7 @@ namespace Server.Items
}
);
public static FillableContent Blacksmith = new FillableContent(
public static FillableContent Blacksmith = new(
2,
new[]
{
@ -873,7 +873,7 @@ namespace Server.Items
}
);
public static FillableContent Bowyer = new FillableContent(
public static FillableContent Bowyer = new(
2,
new[]
{
@ -887,7 +887,7 @@ namespace Server.Items
}
);
public static FillableContent Butcher = new FillableContent(
public static FillableContent Butcher = new(
1,
new[]
{
@ -913,7 +913,7 @@ namespace Server.Items
}
);
public static FillableContent Carpenter = new FillableContent(
public static FillableContent Carpenter = new(
1,
new[]
{
@ -940,7 +940,7 @@ namespace Server.Items
}
);
public static FillableContent Clothier = new FillableContent(
public static FillableContent Clothier = new(
1,
new[]
{
@ -966,7 +966,7 @@ namespace Server.Items
}
);
public static FillableContent Cobbler = new FillableContent(
public static FillableContent Cobbler = new(
1,
new[]
{
@ -981,7 +981,7 @@ namespace Server.Items
}
);
public static FillableContent Docks = new FillableContent(
public static FillableContent Docks = new(
1,
new[]
{
@ -998,7 +998,7 @@ namespace Server.Items
}
);
public static FillableContent Farm = new FillableContent(
public static FillableContent Farm = new(
1,
new[]
{
@ -1028,7 +1028,7 @@ namespace Server.Items
}
);
public static FillableContent FighterGuild = new FillableContent(
public static FillableContent FighterGuild = new(
3,
new[]
{
@ -1043,7 +1043,7 @@ namespace Server.Items
}
);
public static FillableContent Guard = new FillableContent(
public static FillableContent Guard = new(
3,
Array.Empty<Type>(),
new[]
@ -1055,7 +1055,7 @@ namespace Server.Items
}
);
public static FillableContent Healer = new FillableContent(
public static FillableContent Healer = new(
1,
new[]
{
@ -1070,7 +1070,7 @@ namespace Server.Items
}
);
public static FillableContent Herbalist = new FillableContent(
public static FillableContent Herbalist = new(
1,
new[]
{
@ -1089,7 +1089,7 @@ namespace Server.Items
}
);
public static FillableContent Inn = new FillableContent(
public static FillableContent Inn = new(
1,
Array.Empty<Type>(),
new[]
@ -1100,7 +1100,7 @@ namespace Server.Items
}
);
public static FillableContent Jeweler = new FillableContent(
public static FillableContent Jeweler = new(
2,
new[]
{
@ -1119,7 +1119,7 @@ namespace Server.Items
}
);
public static FillableContent Library = new FillableContent(
public static FillableContent Library = new(
1,
new[]
{
@ -1133,7 +1133,7 @@ namespace Server.Items
}
);
public static FillableContent Mage = new FillableContent(
public static FillableContent Mage = new(
2,
new[]
{
@ -1156,7 +1156,7 @@ namespace Server.Items
}
);
public static FillableContent Merchant = new FillableContent(
public static FillableContent Merchant = new(
1,
new[]
{
@ -1215,7 +1215,7 @@ namespace Server.Items
}
);
public static FillableContent Mill = new FillableContent(
public static FillableContent Mill = new(
1,
Array.Empty<Type>(),
new[]
@ -1224,7 +1224,7 @@ namespace Server.Items
}
);
public static FillableContent Mine = new FillableContent(
public static FillableContent Mine = new(
1,
new[]
{
@ -1240,7 +1240,7 @@ namespace Server.Items
}
);
public static FillableContent Observatory = new FillableContent(
public static FillableContent Observatory = new(
1,
Array.Empty<Type>(),
new[]
@ -1251,7 +1251,7 @@ namespace Server.Items
}
);
public static FillableContent Painter = new FillableContent(
public static FillableContent Painter = new(
1,
Array.Empty<Type>(),
new[]
@ -1261,7 +1261,7 @@ namespace Server.Items
}
);
public static FillableContent Provisioner = new FillableContent(
public static FillableContent Provisioner = new(
1,
new[]
{
@ -1327,7 +1327,7 @@ namespace Server.Items
}
);
public static FillableContent Ranger = new FillableContent(
public static FillableContent Ranger = new(
2,
new[]
{
@ -1366,7 +1366,7 @@ namespace Server.Items
}
);
public static FillableContent Stables = new FillableContent(
public static FillableContent Stables = new(
1,
new[]
{
@ -1380,7 +1380,7 @@ namespace Server.Items
}
);
public static FillableContent Tanner = new FillableContent(
public static FillableContent Tanner = new(
2,
new[]
{
@ -1400,7 +1400,7 @@ namespace Server.Items
}
);
public static FillableContent Tavern = new FillableContent(
public static FillableContent Tavern = new(
1,
new[]
{
@ -1418,7 +1418,7 @@ namespace Server.Items
}
);
public static FillableContent ThiefGuild = new FillableContent(
public static FillableContent ThiefGuild = new(
1,
new[]
{
@ -1436,7 +1436,7 @@ namespace Server.Items
}
);
public static FillableContent Tinker = new FillableContent(
public static FillableContent Tinker = new(
1,
new[]
{
@ -1465,7 +1465,7 @@ namespace Server.Items
}
);
public static FillableContent Veterinarian = new FillableContent(
public static FillableContent Veterinarian = new(
1,
new[]
{
@ -1481,7 +1481,7 @@ namespace Server.Items
}
);
public static FillableContent Weaponsmith = new FillableContent(
public static FillableContent Weaponsmith = new(
2,
new[]
{

View file

@ -309,7 +309,7 @@ namespace Server.Items
public static class DynamicFurniture
{
private static readonly Dictionary<Container, Timer> m_Table = new Dictionary<Container, Timer>();
private static readonly Dictionary<Container, Timer> m_Table = new();
public static bool Open(Container c, Mobile m)
{

View file

@ -10,7 +10,7 @@ namespace Server.Items
{
public class TreasureMapChest : LockableContainer
{
private List<Item> m_Lifted = new List<Item>();
private List<Item> m_Lifted = new();
private Timer m_Timer;

View file

@ -32,109 +32,109 @@ namespace Server.Items
public static StealableEntry[] Entries { get; } =
{
// Doom - Artifact rarity 1
new StealableEntry(Map.Malas, new Point3D(317, 56, -1), 72, 108, typeof(RockArtifact)),
new StealableEntry(Map.Malas, new Point3D(360, 31, 8), 72, 108, typeof(SkullCandleArtifact)),
new StealableEntry(Map.Malas, new Point3D(369, 372, -1), 72, 108, typeof(BottleArtifact)),
new StealableEntry(Map.Malas, new Point3D(378, 372, 0), 72, 108, typeof(DamagedBooksArtifact)),
new(Map.Malas, new Point3D(317, 56, -1), 72, 108, typeof(RockArtifact)),
new(Map.Malas, new Point3D(360, 31, 8), 72, 108, typeof(SkullCandleArtifact)),
new(Map.Malas, new Point3D(369, 372, -1), 72, 108, typeof(BottleArtifact)),
new(Map.Malas, new Point3D(378, 372, 0), 72, 108, typeof(DamagedBooksArtifact)),
// Doom - Artifact rarity 2
new StealableEntry(Map.Malas, new Point3D(432, 16, -1), 144, 216, typeof(StretchedHideArtifact)),
new StealableEntry(Map.Malas, new Point3D(489, 9, 0), 144, 216, typeof(BrazierArtifact)),
new(Map.Malas, new Point3D(432, 16, -1), 144, 216, typeof(StretchedHideArtifact)),
new(Map.Malas, new Point3D(489, 9, 0), 144, 216, typeof(BrazierArtifact)),
// Doom - Artifact rarity 3
new StealableEntry(Map.Malas, new Point3D(471, 96, -1), 288, 432, typeof(LampPostArtifact), GetLampPostHue()),
new StealableEntry(Map.Malas, new Point3D(421, 198, 2), 288, 432, typeof(BooksNorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(431, 189, -1), 288, 432, typeof(BooksWestArtifact)),
new StealableEntry(Map.Malas, new Point3D(435, 196, -1), 288, 432, typeof(BooksFaceDownArtifact)),
new(Map.Malas, new Point3D(471, 96, -1), 288, 432, typeof(LampPostArtifact), GetLampPostHue()),
new(Map.Malas, new Point3D(421, 198, 2), 288, 432, typeof(BooksNorthArtifact)),
new(Map.Malas, new Point3D(431, 189, -1), 288, 432, typeof(BooksWestArtifact)),
new(Map.Malas, new Point3D(435, 196, -1), 288, 432, typeof(BooksFaceDownArtifact)),
// Doom - Artifact rarity 5
new StealableEntry(Map.Malas, new Point3D(447, 9, 8), 1152, 1728, typeof(StuddedLeggingsArtifact)),
new StealableEntry(Map.Malas, new Point3D(423, 28, 0), 1152, 1728, typeof(EggCaseArtifact)),
new StealableEntry(Map.Malas, new Point3D(347, 44, 4), 1152, 1728, typeof(SkinnedGoatArtifact)),
new StealableEntry(Map.Malas, new Point3D(497, 57, -1), 1152, 1728, typeof(GruesomeStandardArtifact)),
new StealableEntry(Map.Malas, new Point3D(381, 375, 11), 1152, 1728, typeof(BloodyWaterArtifact)),
new StealableEntry(Map.Malas, new Point3D(489, 369, 2), 1152, 1728, typeof(TarotCardsArtifact)),
new StealableEntry(Map.Malas, new Point3D(497, 369, 5), 1152, 1728, typeof(BackpackArtifact)),
new(Map.Malas, new Point3D(447, 9, 8), 1152, 1728, typeof(StuddedLeggingsArtifact)),
new(Map.Malas, new Point3D(423, 28, 0), 1152, 1728, typeof(EggCaseArtifact)),
new(Map.Malas, new Point3D(347, 44, 4), 1152, 1728, typeof(SkinnedGoatArtifact)),
new(Map.Malas, new Point3D(497, 57, -1), 1152, 1728, typeof(GruesomeStandardArtifact)),
new(Map.Malas, new Point3D(381, 375, 11), 1152, 1728, typeof(BloodyWaterArtifact)),
new(Map.Malas, new Point3D(489, 369, 2), 1152, 1728, typeof(TarotCardsArtifact)),
new(Map.Malas, new Point3D(497, 369, 5), 1152, 1728, typeof(BackpackArtifact)),
// Doom - Artifact rarity 7
new StealableEntry(Map.Malas, new Point3D(475, 23, 4), 4608, 6912, typeof(StuddedTunicArtifact)),
new StealableEntry(Map.Malas, new Point3D(423, 28, 0), 4608, 6912, typeof(CocoonArtifact)),
new(Map.Malas, new Point3D(475, 23, 4), 4608, 6912, typeof(StuddedTunicArtifact)),
new(Map.Malas, new Point3D(423, 28, 0), 4608, 6912, typeof(CocoonArtifact)),
// Doom - Artifact rarity 8
new StealableEntry(Map.Malas, new Point3D(354, 36, -1), 9216, 13824, typeof(SkinnedDeerArtifact)),
new(Map.Malas, new Point3D(354, 36, -1), 9216, 13824, typeof(SkinnedDeerArtifact)),
// Doom - Artifact rarity 9
new StealableEntry(Map.Malas, new Point3D(433, 11, -1), 18432, 27648, typeof(SaddleArtifact)),
new StealableEntry(Map.Malas, new Point3D(403, 31, 4), 18432, 27648, typeof(LeatherTunicArtifact)),
new(Map.Malas, new Point3D(433, 11, -1), 18432, 27648, typeof(SaddleArtifact)),
new(Map.Malas, new Point3D(403, 31, 4), 18432, 27648, typeof(LeatherTunicArtifact)),
// Doom - Artifact rarity 10
new StealableEntry(Map.Malas, new Point3D(257, 70, -2), 36864, 55296, typeof(ZyronicClaw)),
new StealableEntry(Map.Malas, new Point3D(354, 176, 7), 36864, 55296, typeof(TitansHammer)),
new StealableEntry(Map.Malas, new Point3D(369, 389, -1), 36864, 55296, typeof(BladeOfTheRighteous)),
new StealableEntry(Map.Malas, new Point3D(467, 92, 4), 36864, 55296, typeof(InquisitorsResolution)),
new(Map.Malas, new Point3D(257, 70, -2), 36864, 55296, typeof(ZyronicClaw)),
new(Map.Malas, new Point3D(354, 176, 7), 36864, 55296, typeof(TitansHammer)),
new(Map.Malas, new Point3D(369, 389, -1), 36864, 55296, typeof(BladeOfTheRighteous)),
new(Map.Malas, new Point3D(467, 92, 4), 36864, 55296, typeof(InquisitorsResolution)),
// Doom - Artifact rarity 12
new StealableEntry(Map.Malas, new Point3D(487, 364, -1), 147456, 221184, typeof(RuinedPaintingArtifact)),
new(Map.Malas, new Point3D(487, 364, -1), 147456, 221184, typeof(RuinedPaintingArtifact)),
// Yomotsu Mines - Artifact rarity 1
new StealableEntry(Map.Malas, new Point3D(18, 110, -1), 72, 108, typeof(Basket1Artifact)),
new StealableEntry(Map.Malas, new Point3D(66, 114, -1), 72, 108, typeof(Basket2Artifact)),
new(Map.Malas, new Point3D(18, 110, -1), 72, 108, typeof(Basket1Artifact)),
new(Map.Malas, new Point3D(66, 114, -1), 72, 108, typeof(Basket2Artifact)),
// Yomotsu Mines - Artifact rarity 2
new StealableEntry(Map.Malas, new Point3D(63, 12, 11), 144, 216, typeof(Basket4Artifact)),
new StealableEntry(Map.Malas, new Point3D(5, 29, -1), 144, 216, typeof(Basket5NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(30, 81, 3), 144, 216, typeof(Basket5WestArtifact)),
new(Map.Malas, new Point3D(63, 12, 11), 144, 216, typeof(Basket4Artifact)),
new(Map.Malas, new Point3D(5, 29, -1), 144, 216, typeof(Basket5NorthArtifact)),
new(Map.Malas, new Point3D(30, 81, 3), 144, 216, typeof(Basket5WestArtifact)),
// Yomotsu Mines - Artifact rarity 3
new StealableEntry(Map.Malas, new Point3D(115, 7, -1), 288, 432, typeof(Urn1Artifact)),
new StealableEntry(Map.Malas, new Point3D(85, 13, -1), 288, 432, typeof(Urn2Artifact)),
new StealableEntry(Map.Malas, new Point3D(110, 53, -1), 288, 432, typeof(Sculpture1Artifact)),
new StealableEntry(Map.Malas, new Point3D(108, 37, -1), 288, 432, typeof(Sculpture2Artifact)),
new StealableEntry(Map.Malas, new Point3D(121, 14, -1), 288, 432, typeof(TeapotNorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(121, 115, -1), 288, 432, typeof(TeapotWestArtifact)),
new StealableEntry(Map.Malas, new Point3D(84, 40, -1), 288, 432, typeof(TowerLanternArtifact)),
new(Map.Malas, new Point3D(115, 7, -1), 288, 432, typeof(Urn1Artifact)),
new(Map.Malas, new Point3D(85, 13, -1), 288, 432, typeof(Urn2Artifact)),
new(Map.Malas, new Point3D(110, 53, -1), 288, 432, typeof(Sculpture1Artifact)),
new(Map.Malas, new Point3D(108, 37, -1), 288, 432, typeof(Sculpture2Artifact)),
new(Map.Malas, new Point3D(121, 14, -1), 288, 432, typeof(TeapotNorthArtifact)),
new(Map.Malas, new Point3D(121, 115, -1), 288, 432, typeof(TeapotWestArtifact)),
new(Map.Malas, new Point3D(84, 40, -1), 288, 432, typeof(TowerLanternArtifact)),
// Yomotsu Mines - Artifact rarity 9
new StealableEntry(Map.Malas, new Point3D(94, 7, -1), 18432, 27648, typeof(ManStatuetteSouthArtifact)),
new(Map.Malas, new Point3D(94, 7, -1), 18432, 27648, typeof(ManStatuetteSouthArtifact)),
// Fan Dancer's Dojo - Artifact rarity 1
new StealableEntry(Map.Malas, new Point3D(113, 640, -2), 72, 108, typeof(Basket3NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(102, 355, -1), 72, 108, typeof(Basket3WestArtifact)),
new(Map.Malas, new Point3D(113, 640, -2), 72, 108, typeof(Basket3NorthArtifact)),
new(Map.Malas, new Point3D(102, 355, -1), 72, 108, typeof(Basket3WestArtifact)),
// Fan Dancer's Dojo - Artifact rarity 2
new StealableEntry(Map.Malas, new Point3D(99, 370, -1), 144, 216, typeof(Basket6Artifact)),
new StealableEntry(Map.Malas, new Point3D(100, 357, -1), 144, 216, typeof(ZenRock1Artifact)),
new(Map.Malas, new Point3D(99, 370, -1), 144, 216, typeof(Basket6Artifact)),
new(Map.Malas, new Point3D(100, 357, -1), 144, 216, typeof(ZenRock1Artifact)),
// Fan Dancer's Dojo - Artifact rarity 3
new StealableEntry(Map.Malas, new Point3D(73, 473, -1), 288, 432, typeof(FanNorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(99, 372, -1), 288, 432, typeof(FanWestArtifact)),
new StealableEntry(Map.Malas, new Point3D(92, 326, -1), 288, 432, typeof(BowlsVerticalArtifact)),
new StealableEntry(Map.Malas, new Point3D(97, 470, -1), 288, 432, typeof(ZenRock2Artifact)),
new StealableEntry(Map.Malas, new Point3D(103, 691, -1), 288, 432, typeof(ZenRock3Artifact)),
new(Map.Malas, new Point3D(73, 473, -1), 288, 432, typeof(FanNorthArtifact)),
new(Map.Malas, new Point3D(99, 372, -1), 288, 432, typeof(FanWestArtifact)),
new(Map.Malas, new Point3D(92, 326, -1), 288, 432, typeof(BowlsVerticalArtifact)),
new(Map.Malas, new Point3D(97, 470, -1), 288, 432, typeof(ZenRock2Artifact)),
new(Map.Malas, new Point3D(103, 691, -1), 288, 432, typeof(ZenRock3Artifact)),
// Fan Dancer's Dojo - Artifact rarity 4
new StealableEntry(Map.Malas, new Point3D(103, 336, 4), 576, 864, typeof(Painting1NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(59, 381, 4), 576, 864, typeof(Painting1WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(84, 401, 2), 576, 864, typeof(Painting2NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(59, 392, 2), 576, 864, typeof(Painting2WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(107, 483, -1), 576, 864, typeof(TripleFanNorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(50, 475, -1), 576, 864, typeof(TripleFanWestArtifact)),
new StealableEntry(Map.Malas, new Point3D(107, 460, -1), 576, 864, typeof(BowlArtifact)),
new StealableEntry(Map.Malas, new Point3D(90, 502, -1), 576, 864, typeof(CupsArtifact)),
new StealableEntry(Map.Malas, new Point3D(107, 688, -1), 576, 864, typeof(BowlsHorizontalArtifact)),
new StealableEntry(Map.Malas, new Point3D(112, 676, -1), 576, 864, typeof(SakeArtifact)),
new(Map.Malas, new Point3D(103, 336, 4), 576, 864, typeof(Painting1NorthArtifact)),
new(Map.Malas, new Point3D(59, 381, 4), 576, 864, typeof(Painting1WestArtifact)),
new(Map.Malas, new Point3D(84, 401, 2), 576, 864, typeof(Painting2NorthArtifact)),
new(Map.Malas, new Point3D(59, 392, 2), 576, 864, typeof(Painting2WestArtifact)),
new(Map.Malas, new Point3D(107, 483, -1), 576, 864, typeof(TripleFanNorthArtifact)),
new(Map.Malas, new Point3D(50, 475, -1), 576, 864, typeof(TripleFanWestArtifact)),
new(Map.Malas, new Point3D(107, 460, -1), 576, 864, typeof(BowlArtifact)),
new(Map.Malas, new Point3D(90, 502, -1), 576, 864, typeof(CupsArtifact)),
new(Map.Malas, new Point3D(107, 688, -1), 576, 864, typeof(BowlsHorizontalArtifact)),
new(Map.Malas, new Point3D(112, 676, -1), 576, 864, typeof(SakeArtifact)),
// Fan Dancer's Dojo - Artifact rarity 5
new StealableEntry(Map.Malas, new Point3D(135, 614, -1), 1152, 1728, typeof(SwordDisplay1NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(50, 482, -1), 1152, 1728, typeof(SwordDisplay1WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(119, 672, -1), 1152, 1728, typeof(Painting3Artifact)),
new(Map.Malas, new Point3D(135, 614, -1), 1152, 1728, typeof(SwordDisplay1NorthArtifact)),
new(Map.Malas, new Point3D(50, 482, -1), 1152, 1728, typeof(SwordDisplay1WestArtifact)),
new(Map.Malas, new Point3D(119, 672, -1), 1152, 1728, typeof(Painting3Artifact)),
// Fan Dancer's Dojo - Artifact rarity 6
new StealableEntry(Map.Malas, new Point3D(90, 326, -1), 2304, 3456, typeof(Painting4NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(99, 354, -1), 2304, 3456, typeof(Painting4WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(179, 652, -1), 2304, 3456, typeof(SwordDisplay2NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(118, 627, -1), 2304, 3456, typeof(SwordDisplay2WestArtifact)),
new(Map.Malas, new Point3D(90, 326, -1), 2304, 3456, typeof(Painting4NorthArtifact)),
new(Map.Malas, new Point3D(99, 354, -1), 2304, 3456, typeof(Painting4WestArtifact)),
new(Map.Malas, new Point3D(179, 652, -1), 2304, 3456, typeof(SwordDisplay2NorthArtifact)),
new(Map.Malas, new Point3D(118, 627, -1), 2304, 3456, typeof(SwordDisplay2WestArtifact)),
// Fan Dancer's Dojo - Artifact rarity 7
new StealableEntry(Map.Malas, new Point3D(90, 483, -1), 4608, 6912, typeof(FlowersArtifact)),
new(Map.Malas, new Point3D(90, 483, -1), 4608, 6912, typeof(FlowersArtifact)),
// Fan Dancer's Dojo - Artifact rarity 8
new StealableEntry(Map.Malas, new Point3D(71, 562, -1), 9216, 13824, typeof(DolphinLeftArtifact)),
new StealableEntry(Map.Malas, new Point3D(102, 677, -1), 9216, 13824, typeof(DolphinRightArtifact)),
new StealableEntry(Map.Malas, new Point3D(61, 499, 0), 9216, 13824, typeof(SwordDisplay3SouthArtifact)),
new StealableEntry(Map.Malas, new Point3D(182, 669, -1), 9216, 13824, typeof(SwordDisplay3EastArtifact)),
new StealableEntry(Map.Malas, new Point3D(162, 647, -1), 9216, 13824, typeof(SwordDisplay4WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(124, 624, 0), 9216, 13824, typeof(Painting5NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(146, 649, 2), 9216, 13824, typeof(Painting5WestArtifact)),
new(Map.Malas, new Point3D(71, 562, -1), 9216, 13824, typeof(DolphinLeftArtifact)),
new(Map.Malas, new Point3D(102, 677, -1), 9216, 13824, typeof(DolphinRightArtifact)),
new(Map.Malas, new Point3D(61, 499, 0), 9216, 13824, typeof(SwordDisplay3SouthArtifact)),
new(Map.Malas, new Point3D(182, 669, -1), 9216, 13824, typeof(SwordDisplay3EastArtifact)),
new(Map.Malas, new Point3D(162, 647, -1), 9216, 13824, typeof(SwordDisplay4WestArtifact)),
new(Map.Malas, new Point3D(124, 624, 0), 9216, 13824, typeof(Painting5NorthArtifact)),
new(Map.Malas, new Point3D(146, 649, 2), 9216, 13824, typeof(Painting5WestArtifact)),
// Fan Dancer's Dojo - Artifact rarity 9
new StealableEntry(Map.Malas, new Point3D(100, 488, -1), 18432, 27648, typeof(SwordDisplay4NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(175, 606, 0), 18432, 27648, typeof(SwordDisplay5NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(157, 608, -1), 18432, 27648, typeof(SwordDisplay5WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(187, 643, 1), 18432, 27648, typeof(Painting6NorthArtifact)),
new StealableEntry(Map.Malas, new Point3D(146, 623, 1), 18432, 27648, typeof(Painting6WestArtifact)),
new StealableEntry(Map.Malas, new Point3D(178, 629, -1), 18432, 27648, typeof(ManStatuetteEastArtifact))
new(Map.Malas, new Point3D(100, 488, -1), 18432, 27648, typeof(SwordDisplay4NorthArtifact)),
new(Map.Malas, new Point3D(175, 606, 0), 18432, 27648, typeof(SwordDisplay5NorthArtifact)),
new(Map.Malas, new Point3D(157, 608, -1), 18432, 27648, typeof(SwordDisplay5WestArtifact)),
new(Map.Malas, new Point3D(187, 643, 1), 18432, 27648, typeof(Painting6NorthArtifact)),
new(Map.Malas, new Point3D(146, 623, 1), 18432, 27648, typeof(Painting6WestArtifact)),
new(Map.Malas, new Point3D(178, 629, -1), 18432, 27648, typeof(ManStatuetteEastArtifact))
};
public static Type[] TypesOfEntires

View file

@ -572,7 +572,7 @@ namespace Server.Items
0x3FFC, 0x3FFE
};
private static readonly Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
private static readonly Dictionary<Mobile, Timer> m_Table = new();
private BeverageType m_Content;
private int m_Quantity;

View file

@ -23,7 +23,7 @@ namespace Server.Engines.Mahjong
public MahjongPieceDim Dimensions => GetDimensions(Position);
public static MahjongPieceDim GetDimensions(Point2D position) => new MahjongPieceDim(position, 20, 20);
public static MahjongPieceDim GetDimensions(Point2D position) => new(position, 20, 20);
public void Move(Point2D position)
{

View file

@ -40,7 +40,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public Map Facet { get; set; }
public List<Point2D> Pins { get; } = new List<Point2D>();
public List<Point2D> Pins { get; } = new();
public int OnCraft(
int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool,

View file

@ -82,34 +82,34 @@ namespace Server.Items
public static PresetMapEntry[] Table { get; } =
{
new PresetMapEntry(1041189, 200, 200, 1092, 1396, 1736, 1924), // map of Britain
new PresetMapEntry(1041203, 200, 200, 0256, 1792, 1736, 2560), // map of Britain to Skara Brae
new PresetMapEntry(1041192, 200, 200, 1024, 1280, 2304, 3072), // map of Britain to Trinsic
new PresetMapEntry(1041183, 200, 200, 2500, 1900, 3000, 2400), // map of Buccaneer's Den
new PresetMapEntry(1041198, 200, 200, 2560, 1792, 3840, 2560), // map of Buccaneer's Den to Magincia
new PresetMapEntry(1041194, 200, 200, 2560, 1792, 3840, 3072), // map of Buccaneer's Den to Ocllo
new PresetMapEntry(1041181, 200, 200, 1088, 3572, 1528, 4056), // map of Jhelom
new PresetMapEntry(1041186, 200, 200, 3530, 2022, 3818, 2298), // map of Magincia
new PresetMapEntry(1041199, 200, 200, 3328, 1792, 3840, 2304), // map of Magincia to Ocllo
new PresetMapEntry(1041182, 200, 200, 2360, 0356, 2706, 0702), // map of Minoc
new PresetMapEntry(1041190, 200, 200, 0000, 0256, 2304, 3072), // map of Minoc to Yew
new PresetMapEntry(1041191, 200, 200, 2467, 0572, 2878, 0746), // map of Minoc to Vesper
new PresetMapEntry(1041188, 200, 200, 4156, 0808, 4732, 1528), // map of Moonglow
new PresetMapEntry(1041201, 200, 200, 3328, 0768, 4864, 1536), // map of Moonglow to Nujelm
new PresetMapEntry(1041185, 200, 200, 3446, 1030, 3832, 1424), // map of Nujelm
new PresetMapEntry(1041197, 200, 200, 3328, 1024, 3840, 2304), // map of Nujelm to Magincia
new PresetMapEntry(1041187, 200, 200, 3582, 2456, 3770, 2742), // map of Ocllo
new PresetMapEntry(1041184, 200, 200, 2714, 3329, 3100, 3639), // map of Serpent's Hold
new PresetMapEntry(1041200, 200, 200, 2560, 2560, 3840, 3840), // map of Serpent's Hold to Ocllo
new PresetMapEntry(1041180, 200, 200, 0524, 2064, 0960, 2452), // map of Skara Brae
new PresetMapEntry(1041204, 200, 200, 0000, 0000, 5199, 4095), // map of The World
new PresetMapEntry(1041177, 200, 200, 1792, 2630, 2118, 2952), // map of Trinsic
new PresetMapEntry(1041193, 200, 200, 1792, 1792, 3072, 3072), // map of Trinsic to Buccaneer's Den
new PresetMapEntry(1041195, 200, 200, 0256, 1792, 2304, 4095), // map of Trinsic to Jhelom
new PresetMapEntry(1041178, 200, 200, 2636, 0592, 3064, 1012), // map of Vesper
new PresetMapEntry(1041196, 200, 200, 2636, 0592, 3840, 1536), // map of Vesper to Nujelm
new PresetMapEntry(1041179, 200, 200, 0236, 0741, 0766, 1269), // map of Yew
new PresetMapEntry(1041202, 200, 200, 0000, 0512, 1792, 2048) // map of Yew to Britain
new(1041189, 200, 200, 1092, 1396, 1736, 1924), // map of Britain
new(1041203, 200, 200, 0256, 1792, 1736, 2560), // map of Britain to Skara Brae
new(1041192, 200, 200, 1024, 1280, 2304, 3072), // map of Britain to Trinsic
new(1041183, 200, 200, 2500, 1900, 3000, 2400), // map of Buccaneer's Den
new(1041198, 200, 200, 2560, 1792, 3840, 2560), // map of Buccaneer's Den to Magincia
new(1041194, 200, 200, 2560, 1792, 3840, 3072), // map of Buccaneer's Den to Ocllo
new(1041181, 200, 200, 1088, 3572, 1528, 4056), // map of Jhelom
new(1041186, 200, 200, 3530, 2022, 3818, 2298), // map of Magincia
new(1041199, 200, 200, 3328, 1792, 3840, 2304), // map of Magincia to Ocllo
new(1041182, 200, 200, 2360, 0356, 2706, 0702), // map of Minoc
new(1041190, 200, 200, 0000, 0256, 2304, 3072), // map of Minoc to Yew
new(1041191, 200, 200, 2467, 0572, 2878, 0746), // map of Minoc to Vesper
new(1041188, 200, 200, 4156, 0808, 4732, 1528), // map of Moonglow
new(1041201, 200, 200, 3328, 0768, 4864, 1536), // map of Moonglow to Nujelm
new(1041185, 200, 200, 3446, 1030, 3832, 1424), // map of Nujelm
new(1041197, 200, 200, 3328, 1024, 3840, 2304), // map of Nujelm to Magincia
new(1041187, 200, 200, 3582, 2456, 3770, 2742), // map of Ocllo
new(1041184, 200, 200, 2714, 3329, 3100, 3639), // map of Serpent's Hold
new(1041200, 200, 200, 2560, 2560, 3840, 3840), // map of Serpent's Hold to Ocllo
new(1041180, 200, 200, 0524, 2064, 0960, 2452), // map of Skara Brae
new(1041204, 200, 200, 0000, 0000, 5199, 4095), // map of The World
new(1041177, 200, 200, 1792, 2630, 2118, 2952), // map of Trinsic
new(1041193, 200, 200, 1792, 1792, 3072, 3072), // map of Trinsic to Buccaneer's Den
new(1041195, 200, 200, 0256, 1792, 2304, 4095), // map of Trinsic to Jhelom
new(1041178, 200, 200, 2636, 0592, 3064, 1012), // map of Vesper
new(1041196, 200, 200, 2636, 0592, 3840, 1536), // map of Vesper to Nujelm
new(1041179, 200, 200, 0236, 0741, 0766, 1269), // map of Yew
new(1041202, 200, 200, 0000, 0512, 1792, 2048) // map of Yew to Britain
};
}

View file

@ -9,14 +9,14 @@ namespace Server.Items
{
public static readonly CrystalRechargeInfo[] Table =
{
new CrystalRechargeInfo(typeof(Citrine), 500),
new CrystalRechargeInfo(typeof(Amber), 500),
new CrystalRechargeInfo(typeof(Tourmaline), 750),
new CrystalRechargeInfo(typeof(Emerald), 1000),
new CrystalRechargeInfo(typeof(Sapphire), 1000),
new CrystalRechargeInfo(typeof(Amethyst), 1000),
new CrystalRechargeInfo(typeof(StarSapphire), 1250),
new CrystalRechargeInfo(typeof(Diamond), 2000)
new(typeof(Citrine), 500),
new(typeof(Amber), 500),
new(typeof(Tourmaline), 750),
new(typeof(Emerald), 1000),
new(typeof(Sapphire), 1000),
new(typeof(Amethyst), 1000),
new(typeof(StarSapphire), 1250),
new(typeof(Diamond), 2000)
};
private CrystalRechargeInfo(Type type, int amount)

View file

@ -64,7 +64,7 @@ namespace Server.Network
count++;
}
if (beheld.FacialHair != null && beheld.FacialHair.ItemID > 0)
if (beheld.FacialHair?.ItemID > 0)
{
count++;
}
@ -110,7 +110,7 @@ namespace Server.Network
++written;
}
if (beheld.FacialHair != null && beheld.FacialHair.ItemID > 0)
if (beheld.FacialHair?.ItemID > 0)
{
Stream.Write(FacialHairInfo.FakeSerial(beheld.Owner) - 2);
Stream.Write((ushort)beheld.FacialHair.ItemID);

View file

@ -5,7 +5,7 @@ namespace Server.Items
{
public class EffectItem : Item
{
private static readonly List<EffectItem> m_Free = new List<EffectItem>(); // List of available EffectItems
private static readonly List<EffectItem> m_Free = new(); // List of available EffectItems
public static readonly TimeSpan DefaultDuration = TimeSpan.FromSeconds(5.0);

View file

@ -46,18 +46,18 @@ namespace Server.Items
{
private static readonly HairDyeEntry[] m_Entries =
{
new HairDyeEntry("*****", 1602, 26),
new HairDyeEntry("*****", 1628, 27),
new HairDyeEntry("*****", 1502, 32),
new HairDyeEntry("*****", 1302, 32),
new HairDyeEntry("*****", 1402, 32),
new HairDyeEntry("*****", 1202, 24),
new HairDyeEntry("*****", 2402, 29),
new HairDyeEntry("*****", 2213, 6),
new HairDyeEntry("*****", 1102, 8),
new HairDyeEntry("*****", 1110, 8),
new HairDyeEntry("*****", 1118, 16),
new HairDyeEntry("*****", 1134, 16)
new("*****", 1602, 26),
new("*****", 1628, 27),
new("*****", 1502, 32),
new("*****", 1302, 32),
new("*****", 1402, 32),
new("*****", 1202, 24),
new("*****", 2402, 29),
new("*****", 2213, 6),
new("*****", 1102, 8),
new("*****", 1110, 8),
new("*****", 1118, 16),
new("*****", 1134, 16)
};
private readonly HairDye m_HairDye;

View file

@ -57,7 +57,7 @@ namespace Server.Items
{
private static readonly TimeSpan m_UseTimeout = TimeSpan.FromMinutes(2.0);
private readonly HashSet<Mobile> m_DamageTable = new HashSet<Mobile>();
private readonly HashSet<Mobile> m_DamageTable = new();
private DateTime m_LastUse;
private int m_SideLength;

View file

@ -187,7 +187,7 @@ namespace Server.Items
public class PMList
{
public static readonly PMList Trammel =
new PMList(
new(
1012000,
1012012,
Map.Trammel,
@ -207,7 +207,7 @@ namespace Server.Items
);
public static readonly PMList Felucca =
new PMList(
new(
1012001,
1012013,
Map.Felucca,
@ -227,7 +227,7 @@ namespace Server.Items
);
public static readonly PMList Ilshenar =
new PMList(
new(
1012002,
1012014,
Map.Ilshenar,
@ -246,7 +246,7 @@ namespace Server.Items
);
public static readonly PMList Malas =
new PMList(
new(
1060643,
1062039,
Map.Malas,
@ -258,7 +258,7 @@ namespace Server.Items
);
public static readonly PMList Tokuno =
new PMList(
new(
1063258,
1063415,
Map.Tokuno,

View file

@ -50,14 +50,14 @@ namespace Server.Items
{
private static readonly SpecialBeardDyeEntry[] m_Entries =
{
new SpecialBeardDyeEntry("*****", 12, 10),
new SpecialBeardDyeEntry("*****", 32, 5),
new SpecialBeardDyeEntry("*****", 38, 8),
new SpecialBeardDyeEntry("*****", 54, 3),
new SpecialBeardDyeEntry("*****", 62, 10),
new SpecialBeardDyeEntry("*****", 81, 2),
new SpecialBeardDyeEntry("*****", 89, 2),
new SpecialBeardDyeEntry("*****", 1153, 2)
new("*****", 12, 10),
new("*****", 32, 5),
new("*****", 38, 8),
new("*****", 54, 3),
new("*****", 62, 10),
new("*****", 81, 2),
new("*****", 89, 2),
new("*****", 1153, 2)
};
private readonly SpecialBeardDye m_SpecialBeardDye;

View file

@ -50,14 +50,14 @@ namespace Server.Items
{
private static readonly SpecialHairDyeEntry[] m_Entries =
{
new SpecialHairDyeEntry("*****", 12, 10),
new SpecialHairDyeEntry("*****", 32, 5),
new SpecialHairDyeEntry("*****", 38, 8),
new SpecialHairDyeEntry("*****", 54, 3),
new SpecialHairDyeEntry("*****", 62, 10),
new SpecialHairDyeEntry("*****", 81, 2),
new SpecialHairDyeEntry("*****", 89, 2),
new SpecialHairDyeEntry("*****", 1153, 2)
new("*****", 12, 10),
new("*****", 32, 5),
new("*****", 38, 8),
new("*****", 54, 3),
new("*****", 62, 10),
new("*****", 81, 2),
new("*****", 89, 2),
new("*****", 1153, 2)
};
private readonly SpecialHairDye m_SpecialHairDye;

View file

@ -16,7 +16,7 @@ namespace Server.Items
{
public static readonly int SecureRange = 7;
private static readonly Dictionary<Mobile, CampfireEntry> m_Table = new Dictionary<Mobile, CampfireEntry>();
private static readonly Dictionary<Mobile, CampfireEntry> m_Table = new();
private readonly List<CampfireEntry> m_Entries;

View file

@ -10,13 +10,13 @@ namespace Server.Items
{
private static readonly TrophyInfo[] m_Table =
{
new TrophyInfo(typeof(BrownBear), 0x1E60, 1041093, 1041107),
new TrophyInfo(typeof(GreatHart), 0x1E61, 1041095, 1041109),
new TrophyInfo(typeof(BigFish), 0x1E62, 1041096, 1041110),
new TrophyInfo(typeof(Gorilla), 0x1E63, 1041091, 1041105),
new TrophyInfo(typeof(Orc), 0x1E64, 1041090, 1041104),
new TrophyInfo(typeof(PolarBear), 0x1E65, 1041094, 1041108),
new TrophyInfo(typeof(Troll), 0x1E66, 1041092, 1041106)
new(typeof(BrownBear), 0x1E60, 1041093, 1041107),
new(typeof(GreatHart), 0x1E61, 1041095, 1041109),
new(typeof(BigFish), 0x1E62, 1041096, 1041110),
new(typeof(Gorilla), 0x1E63, 1041091, 1041105),
new(typeof(Orc), 0x1E64, 1041090, 1041104),
new(typeof(PolarBear), 0x1E65, 1041094, 1041108),
new(typeof(Troll), 0x1E66, 1041092, 1041106)
};
[Constructible]

View file

@ -12,12 +12,12 @@ namespace Server.Items
0x0136, 0x0137
};
private static readonly Rectangle2D[] m_BritRegions = { new Rectangle2D(0, 0, 5120, 4096) };
private static readonly Rectangle2D[] m_BritRegions = { new(0, 0, 5120, 4096) };
private static readonly Rectangle2D[] m_IlshRegions =
{ new Rectangle2D(1472, 272, 304, 240), new Rectangle2D(1240, 1000, 312, 160) };
{ new(1472, 272, 304, 240), new(1240, 1000, 312, 160) };
private static readonly Rectangle2D[] m_MalasRegions = { new Rectangle2D(1376, 1520, 464, 280) };
private static readonly Rectangle2D[] m_MalasRegions = { new(1376, 1520, 464, 280) };
private int m_Level;
@ -331,62 +331,62 @@ namespace Server.Items
public static MessageEntry[] Entries { get; } =
{
new MessageEntry(
new(
280,
180,
"...Ar! {0} and a fair wind! No chance... storms, though--ar! Is that a sea serp...<br><br>uh oh."
),
new MessageEntry(
new(
280,
215,
"...been inside this whale for three days now. I've run out of food I can pick out of his teeth. I took a sextant reading through the blowhole: {0}. I'll never see my treasure again..."
),
new MessageEntry(
new(
280,
285,
"...grand adventure! Captain Quacklebush had me swab down the decks daily...<br> ...pirates came, I was in the rigging practicing with my sextant. {0} if I am not mistaken...<br> ....scuttled the ship, and our precious cargo went with her and the screaming pirates, down to the bottom of the sea..."
),
new MessageEntry(
new(
280,
180,
"Help! Ship going dow...n heavy storms...precious cargo...st reach dest...current coordinates {0}...ve any survivors... ease!"
),
new MessageEntry(
new(
280,
215,
"...know that the wreck is near {0} but have not found it. Could the message passed down in my family for generations be wrong? No... I swear on the soul of my grandfather, I will find..."
),
new MessageEntry(
new(
280,
195,
"...never expected an iceberg...silly woman on bow crushed instantly...send help to {0}...ey'll never forget the tragedy of the sinking of the Miniscule..."
),
new MessageEntry(
new(
280,
265,
"...nobody knew I was a girl. They just assumed I was another sailor...then we met the undine. {0}. It was demanded sacrifice...I was youngset, they figured...<br> ...grabbed the captain's treasure, screamed, 'It'll go down with me!'<br> ...they took me up on it."
),
new MessageEntry(
new(
280,
230,
"...so I threw the treasure overboard, before the curse could get me too. But I was too late. Now I am doomed to wander these seas, a ghost forever. Join me: seek ye at {0} if thou wishest my company..."
),
new MessageEntry(
new(
280,
285,
"...then the ship exploded. A dragon swooped by. The slime swallowed Bertie whole--he screamed, it was amazing. The sky glowed orange. A sextant reading put us at {0}. Norma was chattering about sailing over the edge of the world. I looked at my hands and saw through them..."
),
new MessageEntry(
new(
280,
285,
"...trapped on a deserted island, with a magic fountain supplying wood, fresh water springs, gorgeous scenery, and my lovely young wife. I know the ship with all our life's earnings sank at {0} but I don't know what our coordinates are... someone has GOT to rescue me before Sunday's finals game or I'll go mad..."
),
new MessageEntry(
new(
280,
160,
"WANTED: divers exp...d in shipwre...overy. Must have own vess...pply at {0}<br>...good benefits, flexible hours..."
),
new MessageEntry(
new(
280,
250,
"...was a cad and a boor, no matter what momma s...rew him overboard! Oh, Anna, 'twas so exciting!<br> Unfort...y he grabbe...est, and all his riches went with him!<br> ...sked the captain, and he says we're at {0}<br>...so maybe..."

View file

@ -7,8 +7,8 @@ namespace Server.Items
{
public abstract class BaseConflagrationPotion : BasePotion
{
private static readonly Dictionary<Mobile, Timer> m_Delay = new Dictionary<Mobile, Timer>();
private readonly List<Mobile> m_Users = new List<Mobile>();
private static readonly Dictionary<Mobile, Timer> m_Delay = new();
private readonly List<Mobile> m_Users = new();
public BaseConflagrationPotion(PotionEffect effect) : base(0xF06, effect) => Hue = 0x489;

View file

@ -9,8 +9,8 @@ namespace Server.Items
{
public abstract class BaseConfusionBlastPotion : BasePotion
{
private static readonly Dictionary<Mobile, Timer> m_Delay = new Dictionary<Mobile, Timer>();
private readonly List<Mobile> m_Users = new List<Mobile>();
private static readonly Dictionary<Mobile, Timer> m_Delay = new();
private readonly List<Mobile> m_Users = new();
public BaseConfusionBlastPotion(PotionEffect effect) : base(0xF06, effect) => Hue = 0x48D;

View file

@ -4,19 +4,19 @@ namespace Server.Items
{
private static readonly CureLevelInfo[] m_OldLevelInfo =
{
new CureLevelInfo(Poison.Lesser, 1.00), // 100% chance to cure lesser poison
new CureLevelInfo(Poison.Regular, 0.75), // 75% chance to cure regular poison
new CureLevelInfo(Poison.Greater, 0.50), // 50% chance to cure greater poison
new CureLevelInfo(Poison.Deadly, 0.15) // 15% chance to cure deadly poison
new(Poison.Lesser, 1.00), // 100% chance to cure lesser poison
new(Poison.Regular, 0.75), // 75% chance to cure regular poison
new(Poison.Greater, 0.50), // 50% chance to cure greater poison
new(Poison.Deadly, 0.15) // 15% chance to cure deadly poison
};
private static readonly CureLevelInfo[] m_AosLevelInfo =
{
new CureLevelInfo(Poison.Lesser, 1.00),
new CureLevelInfo(Poison.Regular, 0.95),
new CureLevelInfo(Poison.Greater, 0.75),
new CureLevelInfo(Poison.Deadly, 0.50),
new CureLevelInfo(Poison.Lethal, 0.25)
new(Poison.Lesser, 1.00),
new(Poison.Regular, 0.95),
new(Poison.Greater, 0.75),
new(Poison.Deadly, 0.50),
new(Poison.Lethal, 0.25)
};
[Constructible]

View file

@ -4,20 +4,20 @@ namespace Server.Items
{
private static readonly CureLevelInfo[] m_OldLevelInfo =
{
new CureLevelInfo(Poison.Lesser, 1.00), // 100% chance to cure lesser poison
new CureLevelInfo(Poison.Regular, 1.00), // 100% chance to cure regular poison
new CureLevelInfo(Poison.Greater, 1.00), // 100% chance to cure greater poison
new CureLevelInfo(Poison.Deadly, 0.75), // 75% chance to cure deadly poison
new CureLevelInfo(Poison.Lethal, 0.25) // 25% chance to cure lethal poison
new(Poison.Lesser, 1.00), // 100% chance to cure lesser poison
new(Poison.Regular, 1.00), // 100% chance to cure regular poison
new(Poison.Greater, 1.00), // 100% chance to cure greater poison
new(Poison.Deadly, 0.75), // 75% chance to cure deadly poison
new(Poison.Lethal, 0.25) // 25% chance to cure lethal poison
};
private static readonly CureLevelInfo[] m_AosLevelInfo =
{
new CureLevelInfo(Poison.Lesser, 1.00),
new CureLevelInfo(Poison.Regular, 1.00),
new CureLevelInfo(Poison.Greater, 1.00),
new CureLevelInfo(Poison.Deadly, 0.95),
new CureLevelInfo(Poison.Lethal, 0.75)
new(Poison.Lesser, 1.00),
new(Poison.Regular, 1.00),
new(Poison.Greater, 1.00),
new(Poison.Deadly, 0.95),
new(Poison.Lethal, 0.75)
};
[Constructible]

View file

@ -4,16 +4,16 @@ namespace Server.Items
{
private static readonly CureLevelInfo[] m_OldLevelInfo =
{
new CureLevelInfo(Poison.Lesser, 0.75), // 75% chance to cure lesser poison
new CureLevelInfo(Poison.Regular, 0.50), // 50% chance to cure regular poison
new CureLevelInfo(Poison.Greater, 0.15) // 15% chance to cure greater poison
new(Poison.Lesser, 0.75), // 75% chance to cure lesser poison
new(Poison.Regular, 0.50), // 50% chance to cure regular poison
new(Poison.Greater, 0.15) // 15% chance to cure greater poison
};
private static readonly CureLevelInfo[] m_AosLevelInfo =
{
new CureLevelInfo(Poison.Lesser, 0.75),
new CureLevelInfo(Poison.Regular, 0.50),
new CureLevelInfo(Poison.Greater, 0.25)
new(Poison.Lesser, 0.75),
new(Poison.Regular, 0.50),
new(Poison.Greater, 0.25)
};
[Constructible]

View file

@ -191,7 +191,7 @@ namespace Server.Items
Consume();
for (var i = 0; Users != null && i < Users.Count; ++i)
for (var i = 0; i < Users?.Count; ++i)
{
var m = Users[i];

View file

@ -5,7 +5,7 @@ namespace Server.Items
{
public class InvisibilityPotion : BasePotion
{
private static readonly Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
private static readonly Dictionary<Mobile, Timer> m_Table = new();
[Constructible]
public InvisibilityPotion() : base(0xF0A, PotionEffect.Invisibility) => Hue = 0x48D;

View file

@ -87,7 +87,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public int MaxCharges { get; set; }
public List<Mobile> Openers { get; set; } = new List<Mobile>();
public List<Mobile> Openers { get; set; } = new();
public override int LabelNumber => 1041267; // runebook

View file

@ -30,7 +30,7 @@ namespace Server.Items
public class Spellbook : Item, ICraftable, ISlayer
{
private static readonly Dictionary<Mobile, List<Spellbook>> m_Table = new Dictionary<Mobile, List<Spellbook>>();
private static readonly Dictionary<Mobile, List<Spellbook>> m_Table = new();
private static readonly int[] m_LegendPropertyCounts =
{

View file

@ -157,7 +157,7 @@ namespace Server.Items
public class BandageContext
{
private static readonly Dictionary<Mobile, BandageContext> m_Table = new Dictionary<Mobile, BandageContext>();
private static readonly Dictionary<Mobile, BandageContext> m_Table = new();
public BandageContext(Mobile healer, Mobile patient, TimeSpan delay)
{
@ -295,7 +295,7 @@ namespace Server.Items
var friends = petPatient.Friends;
for (var i = 0; friends != null && i < friends.Count; ++i)
for (var i = 0; i < friends?.Count; ++i)
{
var friend = friends[i];

View file

@ -253,11 +253,11 @@ namespace Server.Items
public static RepairSkillInfo[] Table { get; } =
{
new RepairSkillInfo(DefBlacksmithy.CraftSystem, typeof(Blacksmith), 1047013, 1023015),
new RepairSkillInfo(DefTailoring.CraftSystem, typeof(Tailor), 1061132, 1022981),
new RepairSkillInfo(DefTinkering.CraftSystem, typeof(Tinker), 1061166, 1022983),
new RepairSkillInfo(DefCarpentry.CraftSystem, typeof(Carpenter), 1061135, 1060774),
new RepairSkillInfo(DefBowFletching.CraftSystem, typeof(Bowyer), 1061134, 1023005)
new(DefBlacksmithy.CraftSystem, typeof(Blacksmith), 1047013, 1023015),
new(DefTailoring.CraftSystem, typeof(Tailor), 1061132, 1022981),
new(DefTinkering.CraftSystem, typeof(Tinker), 1061166, 1022983),
new(DefCarpentry.CraftSystem, typeof(Carpenter), 1061135, 1060774),
new(DefBowFletching.CraftSystem, typeof(Bowyer), 1061134, 1023005)
};
public static RepairSkillInfo GetInfo(RepairSkillType type)

View file

@ -18,7 +18,7 @@ namespace Server.Items
public abstract class BaseInstrument : Item, ICraftable, ISlayer
{
private static readonly Dictionary<Mobile, BaseInstrument> m_Instruments = new Dictionary<Mobile, BaseInstrument>();
private static readonly Dictionary<Mobile, BaseInstrument> m_Instruments = new();
private Mobile m_Crafter;
private DateTime m_LastReplenished;

View file

@ -26,7 +26,7 @@ namespace Server.Items
public class CustomHuePicker
{
public static readonly CustomHuePicker SpecialDyeTub = new CustomHuePicker(
public static readonly CustomHuePicker SpecialDyeTub = new(
new[]
{
/* Violet */
@ -50,7 +50,7 @@ namespace Server.Items
1018344
);
public static readonly CustomHuePicker LeatherDyeTub = new CustomHuePicker(
public static readonly CustomHuePicker LeatherDyeTub = new(
new[]
{
/* Dull Copper */

View file

@ -44,7 +44,7 @@ namespace Server.Items
{
from.SendLocalizedMessage(1042001);
}
else if (pm == null || pm.NpcGuild != NpcGuild.ThievesGuild)
else if (pm?.NpcGuild != NpcGuild.ThievesGuild)
{
from.SendLocalizedMessage(501702);
}
@ -93,28 +93,28 @@ namespace Server.Items
{
private static readonly DisguiseEntry[] m_HairEntries =
{
new DisguiseEntry(8251, 50700, 0, 5, 1011052), // Short
new DisguiseEntry(8261, 60710, 0, 3, 1011047), // Pageboy
new DisguiseEntry(8252, 60708, 0, -5, 1011053), // Long
new DisguiseEntry(8264, 60901, 0, 5, 1011048), // Receding
new DisguiseEntry(8253, 60702, 0, -5, 1011054), // Ponytail
new DisguiseEntry(8265, 60707, 0, -5, 1011049), // 2-tails
new DisguiseEntry(8260, 50703, 0, 5, 1011055), // Mohawk
new DisguiseEntry(8266, 60713, 0, 10, 1011050), // Topknot
new(8251, 50700, 0, 5, 1011052), // Short
new(8261, 60710, 0, 3, 1011047), // Pageboy
new(8252, 60708, 0, -5, 1011053), // Long
new(8264, 60901, 0, 5, 1011048), // Receding
new(8253, 60702, 0, -5, 1011054), // Ponytail
new(8265, 60707, 0, -5, 1011049), // 2-tails
new(8260, 50703, 0, 5, 1011055), // Mohawk
new(8266, 60713, 0, 10, 1011050), // Topknot
null,
new DisguiseEntry(0, 0, 0, 0, 1011051) // None
new(0, 0, 0, 0, 1011051) // None
};
private static readonly DisguiseEntry[] m_BeardEntries =
{
new DisguiseEntry(8269, 50906, 0, 0, 1011401), // Vandyke
new DisguiseEntry(8257, 50808, 0, -2, 1011062), // Mustache
new DisguiseEntry(8255, 50802, 0, 0, 1011060), // Short beard
new DisguiseEntry(8268, 50905, 0, -10, 1011061), // Long beard
new DisguiseEntry(8267, 50904, 0, 0, 1011060), // Short beard
new DisguiseEntry(8254, 50801, 0, -10, 1011061), // Long beard
new(8269, 50906, 0, 0, 1011401), // Vandyke
new(8257, 50808, 0, -2, 1011062), // Mustache
new(8255, 50802, 0, 0, 1011060), // Short beard
new(8268, 50905, 0, -10, 1011061), // Long beard
new(8267, 50904, 0, 0, 1011060), // Short beard
new(8254, 50801, 0, -10, 1011061), // Long beard
null,
new DisguiseEntry(0, 0, 0, 0, 1011051) // None
new(0, 0, 0, 0, 1011051) // None
};
private readonly Mobile m_From;
@ -285,7 +285,7 @@ namespace Server.Items
public static class DisguiseTimers
{
public static Dictionary<Mobile, Timer> Timers { get; } = new Dictionary<Mobile, Timer>();
public static Dictionary<Mobile, Timer> Timers { get; } = new();
public static void Initialize()
{

View file

@ -20,7 +20,7 @@ namespace Server.Items
public const double SecondsPerUOMinute = 5.0;
public const double MinutesPerUODay = SecondsPerUOMinute * 24;
private static readonly DateTime WorldStart = new DateTime(1997, 9, 1);
private static readonly DateTime WorldStart = new(1997, 9, 1);
[Constructible]
public Clock(int itemID = 0x104B) : base(itemID) => Weight = 3.0;

View file

@ -51,7 +51,7 @@ namespace Server.Items
SkillName.MagicResist
};
private static readonly BitArray m_Props = new BitArray(MaxProperties);
private static readonly BitArray m_Props = new(MaxProperties);
private static readonly int[] m_Possible = new int[MaxProperties];
private CraftResource m_Resource;

View file

@ -22,12 +22,12 @@ namespace Server.Items
{
}
public static DawnsMusicGear RandomCommon => new DawnsMusicGear(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common));
public static DawnsMusicGear RandomCommon => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common));
public static DawnsMusicGear RandomUncommon =>
new DawnsMusicGear(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Uncommon));
new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Uncommon));
public static DawnsMusicGear RandomRare => new DawnsMusicGear(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Rare));
public static DawnsMusicGear RandomRare => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Rare));
[CommandProperty(AccessLevel.GameMaster)]
public MusicName Music { get; set; }

View file

@ -5,7 +5,7 @@ namespace Server.Items
{
public class CandyCane : Food
{
private static readonly Dictionary<Mobile, CandyCaneTimer> m_ToothAches = new Dictionary<Mobile, CandyCaneTimer>();
private static readonly Dictionary<Mobile, CandyCaneTimer> m_ToothAches = new();
[Constructible]
public CandyCane()

View file

@ -77,7 +77,7 @@ namespace Server.Items
public static readonly TimeSpan DefaultDuration = TimeSpan.FromDays(7.0);
public static readonly TimeSpan ExpirationTime = TimeSpan.FromDays(30.0);
private static readonly List<HouseRaffleStone> m_AllStones = new List<HouseRaffleStone>();
private static readonly List<HouseRaffleStone> m_AllStones = new();
private Rectangle2D m_Bounds;
private TimeSpan m_Duration;
private Map m_Facet;

View file

@ -183,19 +183,19 @@ namespace Server.Items
{
private static readonly MiniHouseInfo[] m_Info =
{
/* Stone and plaster house */ new MiniHouseInfo(0x22C4, 1, 1011303),
/* Field stone house */ new MiniHouseInfo(0x22DE, 1, 1011304),
/* Small brick house */ new MiniHouseInfo(0x22DF, 1, 1011305),
/* Wooden house */ new MiniHouseInfo(0x22C9, 1, 1011306),
/* Wood and plaster house */ new MiniHouseInfo(0x22E0, 1, 1011307),
/* Thatched-roof cottage */ new MiniHouseInfo(0x22E1, 1, 1011308),
/* Brick house */ new MiniHouseInfo(1011309, 0x22CD, 0x22CB, 0x22CC, 0x22CA),
/* Two-story wood and plaster house */ new MiniHouseInfo(1011310, 0x2301, 0x2302, 0x2304, 0x2303),
/* Two-story stone and plaster house */ new MiniHouseInfo(1011311, 0x22FC, 0x22FD, 0x22FF, 0x22FE),
/* Tower */ new MiniHouseInfo(1011312, 0x22F7, 0x22F8, 0x22FA, 0x22F9),
/* Small stone keep */ new MiniHouseInfo(0x22E6, 9, 1011313),
/* Stone and plaster house */ new(0x22C4, 1, 1011303),
/* Field stone house */ new(0x22DE, 1, 1011304),
/* Small brick house */ new(0x22DF, 1, 1011305),
/* Wooden house */ new(0x22C9, 1, 1011306),
/* Wood and plaster house */ new(0x22E0, 1, 1011307),
/* Thatched-roof cottage */ new(0x22E1, 1, 1011308),
/* Brick house */ new(1011309, 0x22CD, 0x22CB, 0x22CC, 0x22CA),
/* Two-story wood and plaster house */ new(1011310, 0x2301, 0x2302, 0x2304, 0x2303),
/* Two-story stone and plaster house */ new(1011311, 0x22FC, 0x22FD, 0x22FF, 0x22FE),
/* Tower */ new(1011312, 0x22F7, 0x22F8, 0x22FA, 0x22F9),
/* Small stone keep */ new(0x22E6, 9, 1011313),
/* Castle */
new MiniHouseInfo(
new(
1011314,
0x22CE,
0x22D0,
@ -214,16 +214,16 @@ namespace Server.Items
0x22DC,
0x22DD
),
/* Large house with patio */ new MiniHouseInfo(0x22E2, 4, 1011315),
/* Marble house with patio */ new MiniHouseInfo(0x22EF, 4, 1011316),
/* Small stone tower */ new MiniHouseInfo(0x22F5, 1, 1011317),
/* Two-story log cabin */ new MiniHouseInfo(0x22FB, 1, 1011318),
/* Two-story villa */ new MiniHouseInfo(0x2300, 1, 1011319),
/* Sandstone house with patio */ new MiniHouseInfo(0x22F3, 1, 1011320),
/* Small stone workshop */ new MiniHouseInfo(0x22F6, 1, 1011321),
/* Small marble workshop */ new MiniHouseInfo(0x22F4, 1, 1011322),
/* Malas Mountain Pass */ new MiniHouseInfo(1062692, 0x2316, 0x2315, 0x2314, 0x2313),
/* Church At Night */ new MiniHouseInfo(1072215, 0x2318, 0x2317, 0x2319, 0x1)
/* Large house with patio */ new(0x22E2, 4, 1011315),
/* Marble house with patio */ new(0x22EF, 4, 1011316),
/* Small stone tower */ new(0x22F5, 1, 1011317),
/* Two-story log cabin */ new(0x22FB, 1, 1011318),
/* Two-story villa */ new(0x2300, 1, 1011319),
/* Sandstone house with patio */ new(0x22F3, 1, 1011320),
/* Small stone workshop */ new(0x22F6, 1, 1011321),
/* Small marble workshop */ new(0x22F4, 1, 1011322),
/* Malas Mountain Pass */ new(1062692, 0x2316, 0x2315, 0x2314, 0x2313),
/* Church At Night */ new(1072215, 0x2318, 0x2317, 0x2319, 0x1)
};
public MiniHouseInfo(int start, int count, int labelNumber)

View file

@ -54,46 +54,46 @@ namespace Server.Items
{
private static readonly MonsterStatuetteInfo[] m_Table =
{
/* Crocodile */ new MonsterStatuetteInfo(1041249, 0x20DA, 660),
/* Daemon */ new MonsterStatuetteInfo(1041250, 0x20D3, 357),
/* Dragon */ new MonsterStatuetteInfo(1041251, 0x20D6, 362),
/* EarthElemental */ new MonsterStatuetteInfo(1041252, 0x20D7, 268),
/* Ettin */ new MonsterStatuetteInfo(1041253, 0x20D8, 367),
/* Gargoyle */ new MonsterStatuetteInfo(1041254, 0x20D9, 372),
/* Gorilla */ new MonsterStatuetteInfo(1041255, 0x20F5, 158),
/* Lich */ new MonsterStatuetteInfo(1041256, 0x20F8, 1001),
/* Lizardman */ new MonsterStatuetteInfo(1041257, 0x20DE, 417),
/* Ogre */ new MonsterStatuetteInfo(1041258, 0x20DF, 427),
/* Orc */ new MonsterStatuetteInfo(1041259, 0x20E0, 1114),
/* Ratman */ new MonsterStatuetteInfo(1041260, 0x20E3, 437),
/* Skeleton */ new MonsterStatuetteInfo(1041261, 0x20E7, 1165),
/* Troll */ new MonsterStatuetteInfo(1041262, 0x20E9, 461),
/* Cow */ new MonsterStatuetteInfo(1041263, 0x2103, 120),
/* Zombie */ new MonsterStatuetteInfo(1041264, 0x20EC, 471),
/* Llama */ new MonsterStatuetteInfo(1041265, 0x20F6, 1011),
/* Ophidian */ new MonsterStatuetteInfo(1049742, 0x2133, 634),
/* Reaper */ new MonsterStatuetteInfo(1049743, 0x20FA, 442),
/* Mongbat */ new MonsterStatuetteInfo(1049744, 0x20F9, 422),
/* Gazer */ new MonsterStatuetteInfo(1049768, 0x20F4, 377),
/* FireElemental */ new MonsterStatuetteInfo(1049769, 0x20F3, 838),
/* Wolf */ new MonsterStatuetteInfo(1049770, 0x2122, 229),
/* Phillip's Steed */ new MonsterStatuetteInfo(1063488, 0x3FFE, 168),
/* Seahorse */ new MonsterStatuetteInfo(1070819, 0x25BA, 138),
/* Harrower */ new MonsterStatuetteInfo(1080520, 0x25BB, new[] { 0x289, 0x28A, 0x28B }),
/* Efreet */ new MonsterStatuetteInfo(1080521, 0x2590, 0x300),
/* Slime */ new MonsterStatuetteInfo(1015246, 0x20E8, 456),
/* PlagueBeast */ new MonsterStatuetteInfo(1029747, 0x2613, 0x1BF),
/* RedDeath */ new MonsterStatuetteInfo(1094932, 0x2617, Array.Empty<int>()),
/* Spider */ new MonsterStatuetteInfo(1029668, 0x25C4, 1170),
/* OphidianArchMage */ new MonsterStatuetteInfo(1029641, 0x25A9, 639),
/* OphidianWarrior */ new MonsterStatuetteInfo(1029645, 0x25AD, 634),
/* OphidianKnight */ new MonsterStatuetteInfo(1029642, 0x25aa, 634),
/* OphidianMage */ new MonsterStatuetteInfo(1029643, 0x25ab, 639),
/* DreadHorn */ new MonsterStatuetteInfo(1031651, 0x2D83, 0xA8),
/* Minotaur */ new MonsterStatuetteInfo(1031657, 0x2D89, 0x596),
/* Black Cat */ new MonsterStatuetteInfo(1096928, 0x4688, 0x69),
/* HalloweenGhoul */ new MonsterStatuetteInfo(1076782, 0x2109, 0x482),
/* Santa */ new MonsterStatuetteInfo(1097968, 0x4A98, 0x669)
/* Crocodile */ new(1041249, 0x20DA, 660),
/* Daemon */ new(1041250, 0x20D3, 357),
/* Dragon */ new(1041251, 0x20D6, 362),
/* EarthElemental */ new(1041252, 0x20D7, 268),
/* Ettin */ new(1041253, 0x20D8, 367),
/* Gargoyle */ new(1041254, 0x20D9, 372),
/* Gorilla */ new(1041255, 0x20F5, 158),
/* Lich */ new(1041256, 0x20F8, 1001),
/* Lizardman */ new(1041257, 0x20DE, 417),
/* Ogre */ new(1041258, 0x20DF, 427),
/* Orc */ new(1041259, 0x20E0, 1114),
/* Ratman */ new(1041260, 0x20E3, 437),
/* Skeleton */ new(1041261, 0x20E7, 1165),
/* Troll */ new(1041262, 0x20E9, 461),
/* Cow */ new(1041263, 0x2103, 120),
/* Zombie */ new(1041264, 0x20EC, 471),
/* Llama */ new(1041265, 0x20F6, 1011),
/* Ophidian */ new(1049742, 0x2133, 634),
/* Reaper */ new(1049743, 0x20FA, 442),
/* Mongbat */ new(1049744, 0x20F9, 422),
/* Gazer */ new(1049768, 0x20F4, 377),
/* FireElemental */ new(1049769, 0x20F3, 838),
/* Wolf */ new(1049770, 0x2122, 229),
/* Phillip's Steed */ new(1063488, 0x3FFE, 168),
/* Seahorse */ new(1070819, 0x25BA, 138),
/* Harrower */ new(1080520, 0x25BB, new[] { 0x289, 0x28A, 0x28B }),
/* Efreet */ new(1080521, 0x2590, 0x300),
/* Slime */ new(1015246, 0x20E8, 456),
/* PlagueBeast */ new(1029747, 0x2613, 0x1BF),
/* RedDeath */ new(1094932, 0x2617, Array.Empty<int>()),
/* Spider */ new(1029668, 0x25C4, 1170),
/* OphidianArchMage */ new(1029641, 0x25A9, 639),
/* OphidianWarrior */ new(1029645, 0x25AD, 634),
/* OphidianKnight */ new(1029642, 0x25aa, 634),
/* OphidianMage */ new(1029643, 0x25ab, 639),
/* DreadHorn */ new(1031651, 0x2D83, 0xA8),
/* Minotaur */ new(1031657, 0x2D89, 0x596),
/* Black Cat */ new(1096928, 0x4688, 0x69),
/* HalloweenGhoul */ new(1076782, 0x2109, 0x482),
/* Santa */ new(1097968, 0x4A98, 0x669)
};
public MonsterStatuetteInfo(int labelNumber, int itemID, int baseSoundID)

View file

@ -460,7 +460,7 @@ namespace Server.Items
private class PetSummoningSpell : Spell
{
private static readonly SpellInfo m_Info = new SpellInfo("Ball Of Summoning", "", 230);
private static readonly SpellInfo m_Info = new("Ball Of Summoning", "", 230);
private readonly BallOfSummoning m_Ball;
private readonly Mobile m_Caster;

View file

@ -65,7 +65,7 @@ namespace Server.Items
};
*/
private static readonly List<SkillName> _Skills = new List<SkillName>();
private static readonly List<SkillName> _Skills = new();
[Constructible]
public PowerScroll(SkillName skill = SkillName.Alchemy, double value = 0.0) : base(skill, value)

View file

@ -31,7 +31,7 @@ namespace Server.Items
$"<basefont color=#FFFFFF>Scroll of Transcendence ({Value} Skill):</basefont>";
public static ScrollofTranscendence CreateRandom(int min, int max) =>
new ScrollofTranscendence(Utility.RandomSkill(), Utility.RandomMinMax(min, max) * 0.1);
new(Utility.RandomSkill(), Utility.RandomMinMax(min, max) * 0.1);
public override void GetProperties(ObjectPropertyList list)
{

View file

@ -89,7 +89,7 @@ namespace Server.Items
{
if (!Deleted)
{
if (targeted != null && targeted is Mobile to)
if (targeted is Mobile to)
{
if (to is PlayerMobile)
{

View file

@ -84,7 +84,7 @@ namespace Server.Items
public override int DefaultDropSound => 0x42;
public override Rectangle2D Bounds => new Rectangle2D(18, 105, 144, 73);
public override Rectangle2D Bounds => new(18, 105, 144, 73);
private void SetChestAppearance()
{

View file

@ -82,7 +82,7 @@ namespace Server.Items
public override int DefaultDropSound => 0x42;
public override Rectangle2D Bounds => new Rectangle2D(18, 105, 144, 73);
public override Rectangle2D Bounds => new(18, 105, 144, 73);
private void SetChestAppearance()
{

View file

@ -127,7 +127,7 @@ namespace Server.Items
public override int DefaultDropSound => 0x42;
public override Rectangle2D Bounds => new Rectangle2D(18, 105, 144, 73);
public override Rectangle2D Bounds => new(18, 105, 144, 73);
private void SetChestAppearance()
{

View file

@ -130,7 +130,7 @@ namespace Server.Items
public override int DefaultDropSound => 0x42;
public override Rectangle2D Bounds => new Rectangle2D(18, 105, 144, 73);
public override Rectangle2D Bounds => new(18, 105, 144, 73);
private void SetChestAppearance()
{

View file

@ -14,7 +14,7 @@ namespace Server.Items
/// </summary>
public class BleedAttack : WeaponAbility
{
private static readonly Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
private static readonly Dictionary<Mobile, Timer> m_Table = new();
public override int BaseMana => 30;

View file

@ -8,7 +8,7 @@ namespace Server.Items
/// </summary>
public class Block : WeaponAbility
{
private static readonly Dictionary<Mobile, BlockInfo> m_Table = new Dictionary<Mobile, BlockInfo>();
private static readonly Dictionary<Mobile, BlockInfo> m_Table = new();
public override int BaseMana => 30;

View file

@ -10,7 +10,7 @@ namespace Server.Items
public class DefenseMastery : WeaponAbility
{
private static readonly Dictionary<Mobile, DefenseMasteryInfo>
m_Table = new Dictionary<Mobile, DefenseMasteryInfo>();
m_Table = new();
public override int BaseMana => 30;

View file

@ -8,7 +8,7 @@ namespace Server.Items
/// </summary>
public class DualWield : WeaponAbility
{
public static Dictionary<Mobile, DualWieldTimer> Registry { get; } = new Dictionary<Mobile, DualWieldTimer>();
public static Dictionary<Mobile, DualWieldTimer> Registry { get; } = new();
public override int BaseMana => 30;

View file

@ -8,7 +8,7 @@ namespace Server.Items
/// </summary>
public class Feint : WeaponAbility
{
public static Dictionary<Mobile, FeintTimer> Registry { get; } = new Dictionary<Mobile, FeintTimer>();
public static Dictionary<Mobile, FeintTimer> Registry { get; } = new();
public override int BaseMana => 30;

View file

@ -13,7 +13,7 @@ namespace Server.Items
public override int BaseMana => 30;
public static Dictionary<Mobile, FrenziedWirlwindTimer> Registry { get; } =
new Dictionary<Mobile, FrenziedWirlwindTimer>();
new();
public override bool CheckSkills(Mobile from)
{

View file

@ -13,7 +13,7 @@ namespace Server.Items
public static readonly TimeSpan PlayerDuration = TimeSpan.FromSeconds(6.0);
public static readonly TimeSpan NPCDuration = TimeSpan.FromSeconds(12.0);
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new();
public override int BaseMana => 30;

View file

@ -13,7 +13,7 @@ namespace Server.Items
public static readonly TimeSpan FreezeDelayDuration = TimeSpan.FromSeconds(8.0);
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new();
public override int BaseMana => 30;

View file

@ -8,7 +8,7 @@ namespace Server.Items
/// </summary>
public class TalonStrike : WeaponAbility
{
private static readonly HashSet<Mobile> m_Table = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_Table = new();
public override int BaseMana => 30;
public override double DamageScalar => 1.2;

View file

@ -83,7 +83,7 @@ namespace Server.Items
public static readonly WeaponAbility Disrobe = Abilities[30];
private static readonly Dictionary<Mobile, WeaponAbilityContext> m_PlayersTable =
new Dictionary<Mobile, WeaponAbilityContext>();
new();
public virtual int BaseMana => 0;
@ -92,7 +92,7 @@ namespace Server.Items
public virtual bool RequiresSE => false;
public static Dictionary<Mobile, WeaponAbility> Table { get; } = new Dictionary<Mobile, WeaponAbility>();
public static Dictionary<Mobile, WeaponAbility> Table { get; } = new();
public virtual bool ValidatesDuringHit => true;

View file

@ -8,8 +8,8 @@ namespace Server.Items
public static readonly TimeSpan AttackEffectDuration = TimeSpan.FromSeconds(10.0);
public static readonly TimeSpan DefenseEffectDuration = TimeSpan.FromSeconds(8.0);
private static readonly HashSet<Mobile> m_AttackTable = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_DefenseTable = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_AttackTable = new();
private static readonly HashSet<Mobile> m_DefenseTable = new();
public static bool IsUnderAttackEffect(Mobile m) => m_AttackTable.Contains(m);