From 3551d962f7bdfd08bbad461655dde36808617eaa Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 27 Nov 2020 00:29:21 -0800 Subject: [PATCH] C# 9 Cleanup (#325) - [X] Removes EventArgs - not needed - [X] Merges sequential checks - [X] Removes redundant type declarations --- .../Packets/BenchmarkPacketConstruction.cs | 60 ++-- .../Packets/Outgoing/VendorBuyPacketTests.cs | 18 +- .../Packets/Outgoing/VendorSellPacketTests.cs | 6 +- .../Packets/Utilities/PacketTestUtilities.cs | 2 +- Projects/Server/AssemblyHandler.cs | 4 +- Projects/Server/Collections/ArraySet.cs | 2 +- Projects/Server/Commands.cs | 4 +- .../Configuration/ServerConfiguration.cs | 6 +- Projects/Server/Diagnostics/GumpProfile.cs | 2 +- Projects/Server/Diagnostics/PacketProfile.cs | 4 +- Projects/Server/Diagnostics/TargetProfile.cs | 2 +- Projects/Server/Diagnostics/TimerProfile.cs | 2 +- Projects/Server/Events/AccountLoginEvent.cs | 2 +- .../Server/Events/AggressiveActionEvent.cs | 2 +- .../Server/Events/CharacterCreatedEvent.cs | 2 +- Projects/Server/Events/GameLoginEvent.cs | 2 +- Projects/Server/Events/MovementEvent.cs | 2 +- Projects/Server/Events/ServerCrashedEvent.cs | 2 +- Projects/Server/Events/ServerListEvent.cs | 2 +- .../Server/Events/SocketConnectionEvent.cs | 2 +- Projects/Server/Events/SpeechEvent.cs | 2 +- Projects/Server/Geometry/Point2D.cs | 4 +- Projects/Server/Geometry/Point3D.cs | 4 +- Projects/Server/Geometry/WorldLocation.cs | 2 +- Projects/Server/Items/Container.cs | 4 +- Projects/Server/Items/Item.cs | 6 +- Projects/Server/Main.cs | 6 +- Projects/Server/Map.cs | 14 +- Projects/Server/Mobiles/AggressorInfo.cs | 2 +- Projects/Server/Mobiles/Body.cs | 2 +- Projects/Server/Mobiles/Mobile.cs | 2 +- Projects/Server/MultiData.cs | 4 +- .../NetState/NetState.ClientVersion.cs | 32 +- Projects/Server/Network/NetState/NetState.cs | 2 +- Projects/Server/Network/NetworkState.cs | 4 +- Projects/Server/Network/Packet.cs | 2 +- Projects/Server/Network/PacketWriter.cs | 2 +- .../Network/Packets/IncomingAccountPackets.cs | 2 +- .../Packets/IncomingExtendedCommandPackets.cs | 2 +- .../Network/Packets/IncomingMessagePackets.cs | 2 +- .../Server/Network/Packets/IncomingPackets.cs | 2 +- .../Network/Packets/IncomingPlayerPackets.cs | 4 +- .../Server/Network/Packets/MobilePackets.cs | 12 +- Projects/Server/Network/Pipe.cs | 4 +- .../Server/Network/StaticPacketHandlers.cs | 10 +- Projects/Server/Network/TcpServer.cs | 4 +- Projects/Server/Poison.cs | 2 +- Projects/Server/Race.cs | 2 +- Projects/Server/Regions/Region.cs | 6 +- Projects/Server/Sector.cs | 10 +- Projects/Server/Serial.cs | 6 +- Projects/Server/Serialization/BufferReader.cs | 18 +- Projects/Server/Skills.cs | 118 +++---- Projects/Server/TileMatrix.cs | 6 +- Projects/Server/Timer/Timer.cs | 24 +- Projects/Server/Utilities/RefPool.cs | 2 +- Projects/Server/Utilities/Utility.cs | 2 +- Projects/Server/World/World.cs | 14 +- .../Accounting/AccountAttackLimiter.cs | 2 +- .../UOContent/Accounting/AccountHandler.cs | 18 +- Projects/UOContent/Accounting/Accounts.cs | 2 +- .../Security/Argon2PasswordProtection.cs | 2 +- .../Security/MD5PasswordProtection.cs | 2 +- .../Security/SHA1PasswordProtection.cs | 2 +- .../Security/SHA2PasswordProtection.cs | 2 +- Projects/UOContent/Commands/Batch.cs | 2 +- Projects/UOContent/Commands/Docs.cs | 4 +- .../Commands/Generic/Commands/BaseCommand.cs | 4 +- .../Commands/Generic/Commands/Commands.cs | 2 +- .../Generic/Extensions/BaseExtension.cs | 2 +- .../Compilers/ConditionalCompiler.cs | 2 +- .../Generic/Extensions/DistinctExtension.cs | 2 +- .../Generic/Extensions/LimitExtension.cs | 2 +- .../Generic/Extensions/SortExtension.cs | 2 +- .../Generic/Extensions/WhereExtension.cs | 2 +- .../Generic/Implementors/ObjectConditional.cs | 2 +- Projects/UOContent/Commands/HelpInfo.cs | 4 +- .../UOContent/Commands/LocationCommand.cs | 2 +- .../Commands/Object Creation/Decorate.cs | 2 +- .../Commands/Object Creation/DecorateMag.cs | 2 +- Projects/UOContent/Commands/SignParser.cs | 2 +- Projects/UOContent/Commands/Statics.cs | 2 +- .../UOContent/Engines/BulkOrders/Rewards.cs | 20 +- .../Engines/CannedEvil/ChampionSpawnType.cs | 18 +- Projects/UOContent/Engines/Chat/Channel.cs | 2 +- Projects/UOContent/Engines/Chat/ChatUser.cs | 4 +- .../Engines/ConPVP/AcceptDuelGump.cs | 2 +- Projects/UOContent/Engines/ConPVP/Arena.cs | 44 +-- .../UOContent/Engines/ConPVP/DuelContext.cs | 2 +- .../Engines/ConPVP/Games/BombingRun.cs | 4 +- Projects/UOContent/Engines/ConPVP/Ladder.cs | 2 +- Projects/UOContent/Engines/ConPVP/Ruleset.cs | 2 +- .../UOContent/Engines/ConPVP/RulesetLayout.cs | 2 +- .../Engines/ConPVP/TournamentController.cs | 2 +- .../Engines/ConPVP/TournamentPyramid.cs | 2 +- .../Engines/ConPVP/TournamentRegistrar.cs | 3 +- .../UOContent/Engines/Craft/Core/CraftItem.cs | 2 +- .../Engines/Craft/Core/CraftSystem.cs | 2 +- .../UOContent/Engines/Craft/Core/Recipes.cs | 2 +- .../Doom/LeverPuzzle/LeverPuzzleController.cs | 10 +- .../Engines/Events/EventScheduler.cs | 4 +- .../Engines/Factions/Core/Faction.cs | 4 +- .../Engines/Factions/Core/MerchantTitles.cs | 12 +- .../Definitions/FactionItemDefinition.cs | 12 +- .../Factions/Definitions/VendorDefinition.cs | 10 +- .../Engines/Factions/Items/BaseMonolith.cs | 2 +- .../Factions/Items/BaseSystemController.cs | 2 +- .../Power Faction Items/PowerFactionItem.cs | 10 +- .../UOContent/Engines/Factions/Items/Sigil.cs | 2 +- .../Mobiles/Guards/BaseFactionGuard.cs | 2 +- .../Factions/Mobiles/Guards/GuardAI.cs | 4 +- .../Engines/Harvest/Core/HarvestDefinition.cs | 2 +- Projects/UOContent/Engines/Harvest/Fishing.cs | 18 +- Projects/UOContent/Engines/Harvest/Mining.cs | 36 +- Projects/UOContent/Engines/Help/PageQueue.cs | 6 +- Projects/UOContent/Engines/Help/StuckMenu.cs | 16 +- .../Engines/Khaldun/Books/GrimmochJournal.cs | 18 +- .../Engines/Khaldun/Books/LysanderNotebook.cs | 12 +- .../Engines/Khaldun/Books/TavarasJournal.cs | 26 +- .../UOContent/Engines/Khaldun/PuzzleChest.cs | 2 +- .../MLQuests/Items/BedlamTeleporter.cs | 2 +- .../UOContent/Engines/MLQuests/MLQuest.cs | 10 +- .../Engines/MLQuests/MLQuestEntry.cs | 2 +- .../Engines/MLQuests/MLQuestSystem.cs | 4 +- .../Engines/MLQuests/QuesterNameAttribute.cs | 2 +- .../Engines/MLQuests/Rewards/ItemReward.cs | 20 +- .../UOContent/Engines/Party/DeclineTimer.cs | 2 +- .../Engines/Pathing/FastAStarAlgorithm.cs | 4 +- .../UOContent/Engines/Pathing/FastMovement.cs | 4 +- .../UOContent/Engines/Pathing/Movement.cs | 6 +- .../Engines/Plants/MiscItems/GreenThorns.cs | 12 +- .../Engines/Plants/MiscItems/OrangePetals.cs | 2 +- Projects/UOContent/Engines/Plants/PlantHue.cs | 38 +-- .../UOContent/Engines/Plants/PlantItem.cs | 2 +- .../Engines/Plants/PlantResources.cs | 18 +- .../UOContent/Engines/Plants/PlantType.cs | 86 ++--- Projects/UOContent/Engines/Plants/Seed.cs | 2 +- .../Quests/Collector/Items/ImageTypeInfo.cs | 42 +-- .../Engines/Quests/Collector/Objectives.cs | 2 +- .../Quests/Core/Items/EnchantedSextant.cs | 84 ++--- .../Quests/Dark Tides/Conversations.cs | 10 +- .../Quests/Dark Tides/Items/KronusScroll.cs | 2 +- .../Engines/Quests/Dark Tides/Objectives.cs | 8 +- .../Study of the Solen Hive/NestArea.cs | 10 +- .../Study of the Solen Hive/Objectives.cs | 2 +- .../Quests/Uzeraan Turmoil/Conversations.cs | 24 +- .../Quests/Witch Apprentice/Ingredient.cs | 30 +- .../Items/HagApprenticeCorpse.cs | 2 +- .../Quests/Witch Apprentice/Objectives.cs | 10 +- .../Witch Apprentice/WitchApprenticeQuest.cs | 40 +-- .../BasePigmentsOfTokuno.cs | 2 +- .../VeteranRewards/RewardOptionGump.cs | 2 +- .../UOContent/Engines/Virtues/VirtueGump.cs | 2 +- Projects/UOContent/Gumps/AddDoorGump.cs | 10 +- Projects/UOContent/Gumps/AdminGump.cs | 8 +- Projects/UOContent/Gumps/BaseGridGump.cs | 4 +- .../New Guild System/GuildRosterGump.cs | 8 +- Projects/UOContent/Gumps/HouseGumpAOS.cs | 2 +- Projects/UOContent/Gumps/PlayerVendorGumps.cs | 54 +-- Projects/UOContent/Gumps/PolymorphGump.cs | 40 +-- Projects/UOContent/Gumps/Props/PropsGump.cs | 2 +- Projects/UOContent/Gumps/SkillsGump.cs | 14 +- .../Halloween/2009/Engines/PumpkinPatch.cs | 16 +- .../Halloween/2012/Engines/PlayerZombies.cs | 32 +- .../Halloween/HolidaySettings.cs | 4 +- .../UOContent/Items/Addons/AddonComponent.cs | 8 +- .../UOContent/Items/Addons/JackOLantern.cs | 2 +- .../UOContent/Items/Addons/SHTeleporter.cs | 2 +- .../Books/Defined/BlackthornWelcomeBook.cs | 2 +- .../Items/Books/Defined/DrakovsJournal.cs | 2 +- .../Items/Books/Defined/FropozJournal.cs | 2 +- .../Items/Books/Defined/KaburJournal.cs | 2 +- .../Items/Books/Defined/LibraryBooks.cs | 56 +-- .../Items/Books/Defined/NewAquariumBook.cs | 2 +- .../Defined/TranslatedGargoyleJournal.cs | 2 +- .../Items/Construction/Doors/BaseDoor.cs | 24 +- .../Items/Containers/FillableContainers.cs | 70 ++-- .../Items/Containers/FurnitureContainer.cs | 2 +- .../Items/Containers/TreasureMapChest.cs | 2 +- .../StealableArtifactsSpawner.cs | 160 ++++----- Projects/UOContent/Items/Food/Beverage.cs | 2 +- .../Mahjong/MahjongWallBreakIndicator.cs | 2 +- Projects/UOContent/Items/Maps/MapItem.cs | 2 +- Projects/UOContent/Items/Maps/PresetMap.cs | 56 +-- .../Items/Misc/CommunicationCrystals.cs | 16 +- .../UOContent/Items/Misc/Corpses/Packets.cs | 4 +- Projects/UOContent/Items/Misc/EffectItem.cs | 2 +- Projects/UOContent/Items/Misc/HairDye.cs | 24 +- .../UOContent/Items/Misc/PowerGenerator.cs | 2 +- .../UOContent/Items/Misc/PublicMoongate.cs | 10 +- .../UOContent/Items/Misc/SpecialBeardDye.cs | 16 +- .../UOContent/Items/Misc/SpecialHairDye.cs | 16 +- .../Items/Skill Items/Camping/Campfire.cs | 2 +- .../Carpenter Items/TaxidermyKit.cs | 14 +- .../Items/Skill Items/Fishing/Misc/SOS.cs | 30 +- .../BaseConflagrationPotion.cs | 4 +- .../BaseConfusionBlastPotion.cs | 4 +- .../Potions/Cure Potions/CurePotion.cs | 18 +- .../Potions/Cure Potions/GreaterCurePotion.cs | 20 +- .../Potions/Cure Potions/LesserCurePotion.cs | 12 +- .../Explosion Potions/BaseExplosionPotion.cs | 2 +- .../Magical/Potions/InvisibilityPotion.cs | 2 +- .../Items/Skill Items/Magical/Runebook.cs | 2 +- .../Items/Skill Items/Magical/Spellbook.cs | 2 +- .../Items/Skill Items/Misc/Bandage.cs | 4 +- .../Items/Skill Items/Misc/RepairDeed.cs | 10 +- .../Musical Instruments/BaseInstrument.cs | 2 +- .../Tailor Items/Dyetubs/CustomHuePicker.cs | 4 +- .../Items/Skill Items/Thief/DisguiseKit.cs | 36 +- .../Items/Skill Items/Tinkering/Clocks.cs | 2 +- .../Items/Skill Items/Tools/BaseRunicTool.cs | 2 +- .../Dawn's Music Box/DawnsMusicGear.cs | 6 +- .../Items/Special/Holiday/HolidayFoods.cs | 2 +- .../Special/House Raffle/HouseRaffleStone.cs | 2 +- .../UOContent/Items/Special/MiniHouses.cs | 44 +-- .../Items/Special/MonsterStatuette.cs | 80 ++--- .../Special/Solen Items/BallOfSummoning.cs | 2 +- .../Special/Special Scrolls/PowerScroll.cs | 2 +- .../Special Scrolls/ScrollofTranscendence.cs | 2 +- .../Special/Valentines/2007/ValentinesCard.cs | 2 +- .../TreasureChests/TreasureChestLevel1.cs | 2 +- .../TreasureChests/TreasureChestLevel2.cs | 2 +- .../TreasureChests/TreasureChestLevel3.cs | 2 +- .../TreasureChests/TreasureChestLevel4.cs | 2 +- .../Items/Weapons/Abilities/BleedAttack.cs | 2 +- .../Items/Weapons/Abilities/Block.cs | 2 +- .../Items/Weapons/Abilities/DefenseMastery.cs | 2 +- .../Items/Weapons/Abilities/DualWield.cs | 2 +- .../Items/Weapons/Abilities/Feint.cs | 2 +- .../Weapons/Abilities/FrenziedWhirlwind.cs | 2 +- .../Items/Weapons/Abilities/MortalStrike.cs | 2 +- .../Items/Weapons/Abilities/ParalyzingBlow.cs | 2 +- .../Items/Weapons/Abilities/TalonStrike.cs | 2 +- .../Items/Weapons/Abilities/WeaponAbility.cs | 4 +- Projects/UOContent/Items/Weapons/HitLower.cs | 4 +- Projects/UOContent/Misc/CharacterCreation.cs | 2 +- Projects/UOContent/Misc/DoorGenerator.cs | 36 +- .../Misc/Gifts/Winter2004/Winter2004.cs | 4 +- Projects/UOContent/Misc/Guild.cs | 16 +- Projects/UOContent/Misc/LanguageStatistics.cs | 274 +++++++-------- Projects/UOContent/Misc/LootPack.cs | 188 +++++----- Projects/UOContent/Misc/NameList.cs | 2 +- Projects/UOContent/Misc/Notoriety.cs | 2 +- Projects/UOContent/Misc/RegenRates.cs | 2 +- Projects/UOContent/Misc/ResourceInfo.cs | 78 ++--- Projects/UOContent/Misc/ShardPoller.cs | 4 +- Projects/UOContent/Misc/TextDefinition.cs | 4 +- Projects/UOContent/Misc/Titles.cs | 10 +- Projects/UOContent/Misc/VendorGenerator.cs | 34 +- Projects/UOContent/Misc/Weather.cs | 2 +- Projects/UOContent/Misc/WebStatus.cs | 2 +- Projects/UOContent/Mobiles/AI/BaseAI.cs | 5 +- .../UOContent/Mobiles/AI/OppositionGroup.cs | 6 +- Projects/UOContent/Mobiles/AI/SpeedInfo.cs | 8 +- .../Mobiles/Animals/Mounts/Ethereals.cs | 2 +- .../UOContent/Mobiles/Townfolk/TownCrier.cs | 2 +- .../UOContent/Mobiles/Vendors/BaseVendor.cs | 4 +- .../UOContent/Mobiles/Vendors/GenericSell.cs | 2 +- .../Mobiles/Vendors/NPC/CustomHairstylist.cs | 82 ++--- .../Mobiles/Vendors/PlayerBarkeeper.cs | 120 +++---- .../UOContent/Mobiles/Vendors/PlayerVendor.cs | 2 +- .../UOContent/Mobiles/Vendors/RentedVendor.cs | 8 +- .../Mobiles/Vendors/SBInfo/SBInfo.cs | 2 +- Projects/UOContent/Multis/BaseHouse.cs | 20 +- Projects/UOContent/Multis/Boats/BaseBoat.cs | 10 +- Projects/UOContent/Multis/Boats/LargeBoat.cs | 6 +- .../UOContent/Multis/Boats/LargeDragonBoat.cs | 6 +- Projects/UOContent/Multis/Boats/MediumBoat.cs | 6 +- .../Multis/Boats/MediumDragonBoat.cs | 6 +- Projects/UOContent/Multis/Boats/SmallBoat.cs | 6 +- .../UOContent/Multis/Boats/SmallDragonBoat.cs | 6 +- .../UOContent/Multis/Boats/Strandedness.cs | 124 +++---- Projects/UOContent/Multis/ContestHouses.cs | 46 +-- Projects/UOContent/Multis/HouseFoundation.cs | 8 +- Projects/UOContent/Multis/HousePlacement.cs | 2 +- .../UOContent/Multis/HousePlacementTool.cs | 320 +++++++++--------- Projects/UOContent/Multis/Houses.cs | 60 ++-- Projects/UOContent/Multis/MovingCrate.cs | 2 +- Projects/UOContent/Regions/BaseRegion.cs | 4 +- Projects/UOContent/Regions/GuardedRegion.cs | 2 +- Projects/UOContent/Skills/AnimalTaming.cs | 2 +- Projects/UOContent/Skills/Discordance.cs | 2 +- Projects/UOContent/Skills/Inscribe.cs | 2 +- Projects/UOContent/Skills/SpiritSpeak.cs | 2 +- Projects/UOContent/Skills/Stealing.cs | 2 +- .../UOContent/Skills/Tracking/Tracking.cs | 2 +- .../SpecialSystems/Engines/GiftGiving.cs | 2 +- .../SpecialSystems/Engines/PreventInaccess.cs | 8 +- Projects/UOContent/Spells/Base/SpecialMove.cs | 4 +- Projects/UOContent/Spells/Base/Spell.cs | 4 +- Projects/UOContent/Spells/Base/SpellHelper.cs | 2 +- .../UOContent/Spells/Base/SpellRegistry.cs | 4 +- .../UOContent/Spells/Bushido/Confidence.cs | 6 +- .../UOContent/Spells/Bushido/CounterAttack.cs | 4 +- Projects/UOContent/Spells/Bushido/Evasion.cs | 4 +- .../Spells/Bushido/HonorableExecution.cs | 4 +- .../Spells/Bushido/LightningStrike.cs | 2 +- .../Spells/Bushido/MomentumStrike.cs | 2 +- .../Spells/Chivalry/CleanseByFire.cs | 2 +- .../UOContent/Spells/Chivalry/CloseWounds.cs | 2 +- .../Spells/Chivalry/ConsecrateWeapon.cs | 4 +- .../UOContent/Spells/Chivalry/DispelEvil.cs | 2 +- .../UOContent/Spells/Chivalry/DivineFury.cs | 4 +- .../UOContent/Spells/Chivalry/EnemyOfOne.cs | 4 +- .../UOContent/Spells/Chivalry/HolyLight.cs | 2 +- .../Spells/Chivalry/NobleSacrifice.cs | 2 +- .../UOContent/Spells/Chivalry/RemoveCurse.cs | 2 +- .../Spells/Chivalry/SacredJourney.cs | 4 +- .../UOContent/Spells/Eighth/AirElemental.cs | 2 +- .../UOContent/Spells/Eighth/EarthElemental.cs | 2 +- .../UOContent/Spells/Eighth/Earthquake.cs | 2 +- .../UOContent/Spells/Eighth/EnergyVortex.cs | 2 +- .../UOContent/Spells/Eighth/FireElemental.cs | 2 +- .../UOContent/Spells/Eighth/Resurrection.cs | 2 +- .../UOContent/Spells/Eighth/SummonDaemon.cs | 2 +- .../UOContent/Spells/Eighth/WaterElemental.cs | 2 +- .../UOContent/Spells/Fifth/BladeSpirits.cs | 2 +- .../UOContent/Spells/Fifth/DispelField.cs | 2 +- Projects/UOContent/Spells/Fifth/Incognito.cs | 4 +- .../UOContent/Spells/Fifth/MagicReflect.cs | 4 +- Projects/UOContent/Spells/Fifth/MindBlast.cs | 2 +- Projects/UOContent/Spells/Fifth/Paralyze.cs | 2 +- .../UOContent/Spells/Fifth/PoisonField.cs | 4 +- .../UOContent/Spells/Fifth/SummonCreature.cs | 2 +- Projects/UOContent/Spells/First/Clumsy.cs | 2 +- Projects/UOContent/Spells/First/CreateFood.cs | 22 +- Projects/UOContent/Spells/First/Feeblemind.cs | 2 +- Projects/UOContent/Spells/First/Heal.cs | 2 +- Projects/UOContent/Spells/First/MagicArrow.cs | 2 +- Projects/UOContent/Spells/First/NightSight.cs | 2 +- .../UOContent/Spells/First/ReactiveArmor.cs | 4 +- Projects/UOContent/Spells/First/Weaken.cs | 2 +- Projects/UOContent/Spells/Fourth/ArchCure.cs | 2 +- .../UOContent/Spells/Fourth/ArchProtection.cs | 4 +- Projects/UOContent/Spells/Fourth/Curse.cs | 4 +- Projects/UOContent/Spells/Fourth/FireField.cs | 4 +- .../UOContent/Spells/Fourth/GreaterHeal.cs | 2 +- Projects/UOContent/Spells/Fourth/Lightning.cs | 2 +- Projects/UOContent/Spells/Fourth/ManaDrain.cs | 4 +- Projects/UOContent/Spells/Fourth/Recall.cs | 4 +- .../Gargoyle/SpellDefinitions/FlySpell.cs | 2 +- .../Spells/Mysticism/AnimatedWeaponSpell.cs | 2 +- .../Spells/Mysticism/EagleStrikeSpell.cs | 2 +- .../Spells/Mysticism/HailStormSpell.cs | 2 +- .../Spells/Mysticism/NetherCycloneSpell.cs | 2 +- .../Spells/Mysticism/SpellPlagueSpell.cs | 4 +- .../Spells/Mysticism/StoneFormSpell.cs | 4 +- .../Spells/Necromancy/AnimateDeadSpell.cs | 18 +- .../Spells/Necromancy/BloodOathSpell.cs | 6 +- .../UOContent/Spells/Necromancy/CorpseSkin.cs | 4 +- .../Spells/Necromancy/CurseWeapon.cs | 4 +- .../UOContent/Spells/Necromancy/EvilOmen.cs | 4 +- .../UOContent/Spells/Necromancy/Exorcism.cs | 42 +-- .../Spells/Necromancy/HorrificBeast.cs | 2 +- .../UOContent/Spells/Necromancy/LichForm.cs | 2 +- .../UOContent/Spells/Necromancy/MindRot.cs | 4 +- .../UOContent/Spells/Necromancy/PainSpike.cs | 4 +- .../Spells/Necromancy/PoisonStrike.cs | 2 +- .../UOContent/Spells/Necromancy/Strangle.cs | 4 +- .../Spells/Necromancy/SummonFamiliar.cs | 14 +- .../Spells/Necromancy/VampiricEmbrace.cs | 2 +- .../Spells/Necromancy/VengefulSpirit.cs | 2 +- .../UOContent/Spells/Necromancy/Wither.cs | 2 +- .../UOContent/Spells/Necromancy/WraithForm.cs | 2 +- .../UOContent/Spells/Ninjitsu/AnimalForm.cs | 38 +-- .../UOContent/Spells/Ninjitsu/Backstab.cs | 2 +- .../UOContent/Spells/Ninjitsu/DeathStrike.cs | 4 +- .../UOContent/Spells/Ninjitsu/FocusAttack.cs | 2 +- .../UOContent/Spells/Ninjitsu/KiAttack.cs | 4 +- .../UOContent/Spells/Ninjitsu/MirrorImage.cs | 4 +- .../UOContent/Spells/Ninjitsu/ShadowJump.cs | 2 +- .../Spells/Ninjitsu/SurpriseAttack.cs | 4 +- Projects/UOContent/Spells/Second/Agility.cs | 2 +- Projects/UOContent/Spells/Second/Cunning.cs | 2 +- Projects/UOContent/Spells/Second/Cure.cs | 2 +- Projects/UOContent/Spells/Second/Harm.cs | 2 +- Projects/UOContent/Spells/Second/MagicTrap.cs | 2 +- .../UOContent/Spells/Second/Protection.cs | 6 +- .../UOContent/Spells/Second/RemoveTrap.cs | 2 +- Projects/UOContent/Spells/Second/Strength.cs | 2 +- .../Spells/Seventh/ChainLightning.cs | 2 +- .../UOContent/Spells/Seventh/EnergyField.cs | 2 +- .../UOContent/Spells/Seventh/FlameStrike.cs | 2 +- .../UOContent/Spells/Seventh/GateTravel.cs | 2 +- .../UOContent/Spells/Seventh/ManaVampire.cs | 2 +- .../UOContent/Spells/Seventh/MassDispel.cs | 2 +- .../UOContent/Spells/Seventh/MeteorSwarm.cs | 2 +- .../UOContent/Spells/Seventh/Polymorph.cs | 4 +- Projects/UOContent/Spells/Sixth/Dispel.cs | 2 +- Projects/UOContent/Spells/Sixth/EnergyBolt.cs | 2 +- Projects/UOContent/Spells/Sixth/Explosion.cs | 2 +- .../UOContent/Spells/Sixth/Invisibility.cs | 4 +- Projects/UOContent/Spells/Sixth/Mark.cs | 2 +- Projects/UOContent/Spells/Sixth/MassCurse.cs | 2 +- .../UOContent/Spells/Sixth/ParalyzeField.cs | 2 +- Projects/UOContent/Spells/Sixth/Reveal.cs | 2 +- .../Spells/Spellweaving/ArcaneCircle.cs | 2 +- .../Spells/Spellweaving/AttuneWeapon.cs | 4 +- .../Spells/Spellweaving/EssenceOfWind.cs | 4 +- .../Spells/Spellweaving/EtherealVoyage.cs | 2 +- .../Spells/Spellweaving/GiftOfLife.cs | 6 +- .../Spells/Spellweaving/GiftOfRenewal.cs | 4 +- .../Spells/Spellweaving/ImmolatingWeapon.cs | 4 +- .../Spells/Spellweaving/NatureFury.cs | 2 +- .../Spells/Spellweaving/ReaperForm.cs | 2 +- .../Spells/Spellweaving/SummonFey.cs | 2 +- .../Spells/Spellweaving/SummonFiend.cs | 2 +- .../Spells/Spellweaving/Thunderstorm.cs | 4 +- .../Spells/Spellweaving/WordOfDeath.cs | 2 +- Projects/UOContent/Spells/Third/Bless.cs | 2 +- Projects/UOContent/Spells/Third/Fireball.cs | 2 +- Projects/UOContent/Spells/Third/MagicLock.cs | 2 +- Projects/UOContent/Spells/Third/Poison.cs | 2 +- .../UOContent/Spells/Third/Telekinesis.cs | 2 +- Projects/UOContent/Spells/Third/Teleport.cs | 2 +- Projects/UOContent/Spells/Third/Unlock.cs | 2 +- .../UOContent/Spells/Third/WallOfStone.cs | 2 +- 417 files changed, 2209 insertions(+), 2213 deletions(-) diff --git a/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs b/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs index 3809ed9a0..eaf2ec946 100644 --- a/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs +++ b/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs @@ -19,36 +19,36 @@ namespace Benchmarks { m_States = new List { - new BuyItemState("Name 1", 0x1000, 0x2000, 1000, 1, 10, 1024), - new BuyItemState("Name 2", 0x1001, 0x2001, 1001, 1, 10, 1024), - new BuyItemState("Name 3", 0x1002, 0x2002, 1002, 1, 10, 1024), - new BuyItemState("Name 4", 0x1003, 0x2003, 1003, 1, 10, 1024), - new BuyItemState("Name 5", 0x1004, 0x2004, 1004, 1, 10, 1024), - new BuyItemState("Name 6", 0x1005, 0x2005, 1005, 1, 10, 1024), - new BuyItemState("Name 7", 0x1006, 0x2006, 1006, 1, 10, 1024), - new BuyItemState("Name 8", 0x1007, 0x2007, 1007, 1, 10, 1024), - new BuyItemState("Name 9", 0x1008, 0x2008, 1008, 1, 10, 1024), - new BuyItemState("Name A", 0x1009, 0x2009, 1009, 1, 10, 1024), - new BuyItemState("Name 10", 0x1000, 0x2000, 1000, 1, 10, 1024), - new BuyItemState("Name 20", 0x1001, 0x2001, 1001, 1, 10, 1024), - new BuyItemState("Name 30", 0x1002, 0x2002, 1002, 1, 10, 1024), - new BuyItemState("Name 40", 0x1003, 0x2003, 1003, 1, 10, 1024), - new BuyItemState("Name 50", 0x1004, 0x2004, 1004, 1, 10, 1024), - new BuyItemState("Name 60", 0x1005, 0x2005, 1005, 1, 10, 1024), - new BuyItemState("Name 70", 0x1006, 0x2006, 1006, 1, 10, 1024), - new BuyItemState("Name 80", 0x1007, 0x2007, 1007, 1, 10, 1024), - new BuyItemState("Name 90", 0x1008, 0x2008, 1008, 1, 10, 1024), - new BuyItemState("Name A0", 0x1009, 0x2009, 1009, 1, 10, 1024), - new BuyItemState("Name 11", 0x1000, 0x2000, 1000, 1, 10, 1024), - new BuyItemState("Name 21", 0x1001, 0x2001, 1001, 1, 10, 1024), - new BuyItemState("Name 31", 0x1002, 0x2002, 1002, 1, 10, 1024), - new BuyItemState("Name 41", 0x1003, 0x2003, 1003, 1, 10, 1024), - new BuyItemState("Name 51", 0x1004, 0x2004, 1004, 1, 10, 1024), - new BuyItemState("Name 61", 0x1005, 0x2005, 1005, 1, 10, 1024), - new BuyItemState("Name 71", 0x1006, 0x2006, 1006, 1, 10, 1024), - new BuyItemState("Name 81", 0x1007, 0x2007, 1007, 1, 10, 1024), - new BuyItemState("Name 91", 0x1008, 0x2008, 1008, 1, 10, 1024), - new BuyItemState("Name A1", 0x1009, 0x2009, 1009, 1, 10, 1024) + new("Name 1", 0x1000, 0x2000, 1000, 1, 10, 1024), + new("Name 2", 0x1001, 0x2001, 1001, 1, 10, 1024), + new("Name 3", 0x1002, 0x2002, 1002, 1, 10, 1024), + new("Name 4", 0x1003, 0x2003, 1003, 1, 10, 1024), + new("Name 5", 0x1004, 0x2004, 1004, 1, 10, 1024), + new("Name 6", 0x1005, 0x2005, 1005, 1, 10, 1024), + new("Name 7", 0x1006, 0x2006, 1006, 1, 10, 1024), + new("Name 8", 0x1007, 0x2007, 1007, 1, 10, 1024), + new("Name 9", 0x1008, 0x2008, 1008, 1, 10, 1024), + new("Name A", 0x1009, 0x2009, 1009, 1, 10, 1024), + new("Name 10", 0x1000, 0x2000, 1000, 1, 10, 1024), + new("Name 20", 0x1001, 0x2001, 1001, 1, 10, 1024), + new("Name 30", 0x1002, 0x2002, 1002, 1, 10, 1024), + new("Name 40", 0x1003, 0x2003, 1003, 1, 10, 1024), + new("Name 50", 0x1004, 0x2004, 1004, 1, 10, 1024), + new("Name 60", 0x1005, 0x2005, 1005, 1, 10, 1024), + new("Name 70", 0x1006, 0x2006, 1006, 1, 10, 1024), + new("Name 80", 0x1007, 0x2007, 1007, 1, 10, 1024), + new("Name 90", 0x1008, 0x2008, 1008, 1, 10, 1024), + new("Name A0", 0x1009, 0x2009, 1009, 1, 10, 1024), + new("Name 11", 0x1000, 0x2000, 1000, 1, 10, 1024), + new("Name 21", 0x1001, 0x2001, 1001, 1, 10, 1024), + new("Name 31", 0x1002, 0x2002, 1002, 1, 10, 1024), + new("Name 41", 0x1003, 0x2003, 1003, 1, 10, 1024), + new("Name 51", 0x1004, 0x2004, 1004, 1, 10, 1024), + new("Name 61", 0x1005, 0x2005, 1005, 1, 10, 1024), + new("Name 71", 0x1006, 0x2006, 1006, 1, 10, 1024), + new("Name 81", 0x1007, 0x2007, 1007, 1, 10, 1024), + new("Name 91", 0x1008, 0x2008, 1008, 1, 10, 1024), + new("Name A1", 0x1009, 0x2009, 1009, 1, 10, 1024) }; } diff --git a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs index dbe45d157..8100bc60c 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs @@ -17,9 +17,9 @@ namespace Server.Tests.Network var buyStates = new List { - new BuyItemState("First Item", cont.Serial, World.NewItem, 10, 1, 0x01, 0), - new BuyItemState("Second Item", cont.Serial, World.NewItem, 20, 2, 0x0A, 0), - new BuyItemState("Third Item", cont.Serial, World.NewItem, 30, 10, 0x0F, 0) + new("First Item", cont.Serial, World.NewItem, 10, 1, 0x01, 0), + new("Second Item", cont.Serial, World.NewItem, 20, 2, 0x0A, 0), + new("Third Item", cont.Serial, World.NewItem, 30, 10, 0x0F, 0) }; var data = new VendorBuyContent(buyStates).Compile(); @@ -56,9 +56,9 @@ namespace Server.Tests.Network var buyStates = new List { - new BuyItemState("First Item", cont.Serial, World.NewItem, 10, 1, 0x01, 0), - new BuyItemState("Second Item", cont.Serial, World.NewItem, 20, 2, 0x0A, 0), - new BuyItemState("Third Item", cont.Serial, World.NewItem, 30, 10, 0x0F, 0) + new("First Item", cont.Serial, World.NewItem, 10, 1, 0x01, 0), + new("Second Item", cont.Serial, World.NewItem, 20, 2, 0x0A, 0), + new("Third Item", cont.Serial, World.NewItem, 30, 10, 0x0F, 0) }; var data = new VendorBuyContent6017(buyStates).Compile(); @@ -143,9 +143,9 @@ namespace Server.Tests.Network var buyStates = new List { - new BuyItemState("First Item", cont.Serial, World.NewItem, 10, 1, 0x01, 0), - new BuyItemState("Second Item", cont.Serial, World.NewItem, 20, 2, 0x0A, 0), - new BuyItemState("Third Item", cont.Serial, World.NewItem, 30, 10, 0x0F, 0) + new("First Item", cont.Serial, World.NewItem, 10, 1, 0x01, 0), + new("Second Item", cont.Serial, World.NewItem, 20, 2, 0x0A, 0), + new("Third Item", cont.Serial, World.NewItem, 30, 10, 0x0F, 0) }; var data = new VendorBuyList(vendor, buyStates).Compile(); diff --git a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs index 611ff1cdb..027f389f0 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs @@ -21,9 +21,9 @@ namespace Server.Tests.Network var sellStates = new List { - new SellItemState(item1, 100, "Item 1"), - new SellItemState(item2, 100000, "Item 2"), - new SellItemState(item3, 1, "Item 3") + new(item1, 100, "Item 1"), + new(item2, 100000, "Item 2"), + new(item3, 1, "Item 3") }; var data = new VendorSellList(vendor, sellStates).Compile(); diff --git a/Projects/Server.Tests/Tests/Network/Packets/Utilities/PacketTestUtilities.cs b/Projects/Server.Tests/Tests/Network/Packets/Utilities/PacketTestUtilities.cs index b02bdffb4..bfe4d48c1 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Utilities/PacketTestUtilities.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Utilities/PacketTestUtilities.cs @@ -9,6 +9,6 @@ namespace Server.Tests.Network p.Compile(false, out var length).AsSpan(0, length); public static NetState CreateTestNetState() => - new NetState(new MockSocket()); + new(new MockSocket()); } } diff --git a/Projects/Server/AssemblyHandler.cs b/Projects/Server/AssemblyHandler.cs index b7173dda5..47888693a 100644 --- a/Projects/Server/AssemblyHandler.cs +++ b/Projects/Server/AssemblyHandler.cs @@ -24,7 +24,7 @@ namespace Server { public static class AssemblyHandler { - private static readonly Dictionary m_TypeCaches = new Dictionary(); + private static readonly Dictionary m_TypeCaches = new(); private static TypeCache m_NullCache; public static Assembly[] Assemblies { get; set; } @@ -158,7 +158,7 @@ namespace Server public class TypeCache { - private readonly Dictionary m_NameMap = new Dictionary(); + private readonly Dictionary m_NameMap = new(); private readonly Type[] m_Types; public TypeCache(Assembly asm) diff --git a/Projects/Server/Collections/ArraySet.cs b/Projects/Server/Collections/ArraySet.cs index bf547781d..d0b03f9b0 100644 --- a/Projects/Server/Collections/ArraySet.cs +++ b/Projects/Server/Collections/ArraySet.cs @@ -21,7 +21,7 @@ namespace Server.Collections { public class ArraySet : IList { - private readonly List m_List = new List(); + private readonly List m_List = new(); public T this[int index] { diff --git a/Projects/Server/Commands.cs b/Projects/Server/Commands.cs index 6b08198ba..b0dbedb72 100644 --- a/Projects/Server/Commands.cs +++ b/Projects/Server/Commands.cs @@ -6,7 +6,7 @@ namespace Server { public delegate void CommandEventHandler(CommandEventArgs e); - public class CommandEventArgs : EventArgs + public class CommandEventArgs { public CommandEventArgs(Mobile mobile, string command, string argString, string[] arguments) { @@ -116,7 +116,7 @@ namespace Server public static string Prefix { get; set; } = "["; public static Dictionary Entries { get; } = - new Dictionary(StringComparer.OrdinalIgnoreCase); + new(StringComparer.OrdinalIgnoreCase); public static AccessLevel BadCommandIgnoreLevel { get; set; } = AccessLevel.Player; diff --git a/Projects/Server/Configuration/ServerConfiguration.cs b/Projects/Server/Configuration/ServerConfiguration.cs index c37c06fff..4f8463b93 100644 --- a/Projects/Server/Configuration/ServerConfiguration.cs +++ b/Projects/Server/Configuration/ServerConfiguration.cs @@ -303,13 +303,13 @@ namespace Server internal class ServerSettings { [JsonPropertyName("dataDirectories")] - public List dataDirectories { get; set; } = new List(); + public List dataDirectories { get; set; } = new(); [JsonPropertyName("listeners")] - public List listeners { get; set; } = new List(); + public List listeners { get; set; } = new(); [JsonPropertyName("settings")] - public SortedDictionary settings { get; set; } = new SortedDictionary(); + public SortedDictionary settings { get; set; } = new(); } } } diff --git a/Projects/Server/Diagnostics/GumpProfile.cs b/Projects/Server/Diagnostics/GumpProfile.cs index 7380e336f..f5c58fbf1 100644 --- a/Projects/Server/Diagnostics/GumpProfile.cs +++ b/Projects/Server/Diagnostics/GumpProfile.cs @@ -5,7 +5,7 @@ namespace Server.Diagnostics { public class GumpProfile : BaseProfile { - private static readonly Dictionary _profiles = new Dictionary(); + private static readonly Dictionary _profiles = new(); public GumpProfile(Type type) : base(type.FullName) { diff --git a/Projects/Server/Diagnostics/PacketProfile.cs b/Projects/Server/Diagnostics/PacketProfile.cs index 3aa880b90..a71869299 100644 --- a/Projects/Server/Diagnostics/PacketProfile.cs +++ b/Projects/Server/Diagnostics/PacketProfile.cs @@ -33,7 +33,7 @@ namespace Server.Diagnostics public class PacketSendProfile : BasePacketProfile { - private static readonly Dictionary _profiles = new Dictionary(); + private static readonly Dictionary _profiles = new(); private long _created; @@ -70,7 +70,7 @@ namespace Server.Diagnostics public class PacketReceiveProfile : BasePacketProfile { private static readonly Dictionary - _profiles = new Dictionary(); + _profiles = new(); public PacketReceiveProfile(int packetId) : base($"0x{packetId:X2}") diff --git a/Projects/Server/Diagnostics/TargetProfile.cs b/Projects/Server/Diagnostics/TargetProfile.cs index 0ac4b215a..27c85875f 100644 --- a/Projects/Server/Diagnostics/TargetProfile.cs +++ b/Projects/Server/Diagnostics/TargetProfile.cs @@ -5,7 +5,7 @@ namespace Server.Diagnostics { public class TargetProfile : BaseProfile { - private static readonly Dictionary _profiles = new Dictionary(); + private static readonly Dictionary _profiles = new(); public TargetProfile(Type type) : base(type.FullName) diff --git a/Projects/Server/Diagnostics/TimerProfile.cs b/Projects/Server/Diagnostics/TimerProfile.cs index a482cdbdc..bb843daeb 100644 --- a/Projects/Server/Diagnostics/TimerProfile.cs +++ b/Projects/Server/Diagnostics/TimerProfile.cs @@ -5,7 +5,7 @@ namespace Server.Diagnostics { public class TimerProfile : BaseProfile { - private static readonly Dictionary _profiles = new Dictionary(); + private static readonly Dictionary _profiles = new(); public TimerProfile(string name) : base(name) diff --git a/Projects/Server/Events/AccountLoginEvent.cs b/Projects/Server/Events/AccountLoginEvent.cs index 2fbcd3da1..7d2739cc3 100644 --- a/Projects/Server/Events/AccountLoginEvent.cs +++ b/Projects/Server/Events/AccountLoginEvent.cs @@ -18,7 +18,7 @@ using Server.Network; namespace Server { - public class AccountLoginEventArgs : EventArgs + public class AccountLoginEventArgs { public AccountLoginEventArgs(NetState state, string username, string password) { diff --git a/Projects/Server/Events/AggressiveActionEvent.cs b/Projects/Server/Events/AggressiveActionEvent.cs index b0f10beb3..8370c7100 100644 --- a/Projects/Server/Events/AggressiveActionEvent.cs +++ b/Projects/Server/Events/AggressiveActionEvent.cs @@ -20,7 +20,7 @@ namespace Server { public class AggressiveActionEventArgs : EventArgs { - private static readonly Queue m_Pool = new Queue(); + private static readonly Queue m_Pool = new(); private AggressiveActionEventArgs(Mobile aggressed, Mobile aggressor, bool criminal) { diff --git a/Projects/Server/Events/CharacterCreatedEvent.cs b/Projects/Server/Events/CharacterCreatedEvent.cs index e6e299a41..c11251dd1 100644 --- a/Projects/Server/Events/CharacterCreatedEvent.cs +++ b/Projects/Server/Events/CharacterCreatedEvent.cs @@ -19,7 +19,7 @@ using Server.Network; namespace Server { - public class CharacterCreatedEventArgs : EventArgs + public class CharacterCreatedEventArgs { public CharacterCreatedEventArgs( NetState state, IAccount a, string name, bool female, int hue, int str, int dex, diff --git a/Projects/Server/Events/GameLoginEvent.cs b/Projects/Server/Events/GameLoginEvent.cs index eb11f2c47..823c0f6e2 100644 --- a/Projects/Server/Events/GameLoginEvent.cs +++ b/Projects/Server/Events/GameLoginEvent.cs @@ -18,7 +18,7 @@ using Server.Network; namespace Server { - public class GameLoginEventArgs : EventArgs + public class GameLoginEventArgs { public GameLoginEventArgs(NetState state, string un, string pw) { diff --git a/Projects/Server/Events/MovementEvent.cs b/Projects/Server/Events/MovementEvent.cs index 9a7e0a92d..035488087 100644 --- a/Projects/Server/Events/MovementEvent.cs +++ b/Projects/Server/Events/MovementEvent.cs @@ -20,7 +20,7 @@ namespace Server { public class MovementEventArgs : EventArgs { - private static readonly Queue m_Pool = new Queue(); + private static readonly Queue m_Pool = new(); public MovementEventArgs(Mobile mobile, Direction dir) { diff --git a/Projects/Server/Events/ServerCrashedEvent.cs b/Projects/Server/Events/ServerCrashedEvent.cs index 08895df24..5667cdd8b 100644 --- a/Projects/Server/Events/ServerCrashedEvent.cs +++ b/Projects/Server/Events/ServerCrashedEvent.cs @@ -17,7 +17,7 @@ using System; namespace Server { - public class ServerCrashedEventArgs : EventArgs + public class ServerCrashedEventArgs { public ServerCrashedEventArgs(Exception e) => Exception = e; diff --git a/Projects/Server/Events/ServerListEvent.cs b/Projects/Server/Events/ServerListEvent.cs index 923adce2d..7bf5a7591 100644 --- a/Projects/Server/Events/ServerListEvent.cs +++ b/Projects/Server/Events/ServerListEvent.cs @@ -21,7 +21,7 @@ using Server.Network; namespace Server { - public class ServerListEventArgs : EventArgs + public class ServerListEventArgs { public ServerListEventArgs(NetState state, IAccount account) { diff --git a/Projects/Server/Events/SocketConnectionEvent.cs b/Projects/Server/Events/SocketConnectionEvent.cs index ce3ba08c5..365fd3ac8 100644 --- a/Projects/Server/Events/SocketConnectionEvent.cs +++ b/Projects/Server/Events/SocketConnectionEvent.cs @@ -18,7 +18,7 @@ using System.Net.Sockets; namespace Server { - public class SocketConnectEventArgs : EventArgs + public class SocketConnectEventArgs { public SocketConnectEventArgs(Socket c) { diff --git a/Projects/Server/Events/SpeechEvent.cs b/Projects/Server/Events/SpeechEvent.cs index d1e737d35..f309c6ead 100644 --- a/Projects/Server/Events/SpeechEvent.cs +++ b/Projects/Server/Events/SpeechEvent.cs @@ -18,7 +18,7 @@ using Server.Network; namespace Server { - public class SpeechEventArgs : EventArgs + public class SpeechEventArgs { public SpeechEventArgs(Mobile mobile, string speech, MessageType type, int hue, int[] keywords) { diff --git a/Projects/Server/Geometry/Point2D.cs b/Projects/Server/Geometry/Point2D.cs index 255168530..704bd6436 100644 --- a/Projects/Server/Geometry/Point2D.cs +++ b/Projects/Server/Geometry/Point2D.cs @@ -25,7 +25,7 @@ namespace Server internal int m_X; internal int m_Y; - public static readonly Point2D Zero = new Point2D(0, 0); + public static readonly Point2D Zero = new(0, 0); [CommandProperty(AccessLevel.Counselor)] public int X @@ -71,7 +71,7 @@ namespace Server public bool Equals(Point2D other) => m_X == other.m_X && m_Y == other.m_Y; public bool Equals(IPoint2D other) => - !ReferenceEquals(other, null) && m_X == other.X && m_Y == other.Y; + m_X == other?.X && m_Y == other.Y; public override bool Equals(object obj) => obj is Point2D other && Equals(other); diff --git a/Projects/Server/Geometry/Point3D.cs b/Projects/Server/Geometry/Point3D.cs index 3c2373597..45b1c6dd7 100644 --- a/Projects/Server/Geometry/Point3D.cs +++ b/Projects/Server/Geometry/Point3D.cs @@ -26,7 +26,7 @@ namespace Server internal int m_Y; internal int m_Z; - public static readonly Point3D Zero = new Point3D(0, 0, 0); + public static readonly Point3D Zero = new(0, 0, 0); [CommandProperty(AccessLevel.Counselor)] public int X @@ -69,7 +69,7 @@ namespace Server public bool Equals(Point3D other) => m_X == other.m_X && m_Y == other.m_Y && m_Z == other.m_Z; public bool Equals(IPoint3D other) => - !ReferenceEquals(other, null) && m_X == other.X && m_Y == other.Y && m_Z == other.Z; + m_X == other?.X && m_Y == other.Y && m_Z == other.Z; public override bool Equals(object obj) => obj is Point3D other && Equals(other); diff --git a/Projects/Server/Geometry/WorldLocation.cs b/Projects/Server/Geometry/WorldLocation.cs index 4208de8ec..1ebfb04cd 100644 --- a/Projects/Server/Geometry/WorldLocation.cs +++ b/Projects/Server/Geometry/WorldLocation.cs @@ -25,7 +25,7 @@ namespace Server internal Point3D m_Loc; internal Map m_Map; - public static readonly WorldLocation Zero = new WorldLocation(0, 0, 0, Map.Internal); + public static readonly WorldLocation Zero = new(0, 0, 0, Map.Internal); [CommandProperty(AccessLevel.Counselor)] public Point3D Location diff --git a/Projects/Server/Items/Container.cs b/Projects/Server/Items/Container.cs index 0af287bc0..d74afa9c3 100644 --- a/Projects/Server/Items/Container.cs +++ b/Projects/Server/Items/Container.cs @@ -16,8 +16,8 @@ namespace Server.Items public class Container : Item { - private static readonly QueuePool m_QueuePool = new QueuePool(QueueRef.Generate, 2, 5); - private static readonly List m_FindItemsList = new List(); + private static readonly QueuePool m_QueuePool = new(QueueRef.Generate, 2, 5); + private static readonly List m_FindItemsList = new(); private ContainerData m_ContainerData; diff --git a/Projects/Server/Items/Item.cs b/Projects/Server/Items/Item.cs index 66f02ca66..05240b2f6 100644 --- a/Projects/Server/Items/Item.cs +++ b/Projects/Server/Items/Item.cs @@ -194,9 +194,9 @@ namespace Server public class Item : IHued, IComparable, ISpawnable, IPropertyListObject { public const int QuestItemHue = 0x4EA; // Hmmmm... "for EA"? - public static readonly List EmptyItems = new List(); + public static readonly List EmptyItems = new(); - private static readonly List m_DeltaQueue = new List(); + private static readonly List m_DeltaQueue = new(); private static bool _processing; @@ -923,7 +923,7 @@ namespace Server flags |= SaveFlag.Parent; } - if (items != null && items.Count > 0) + if (items?.Count > 0) { flags |= SaveFlag.Items; } diff --git a/Projects/Server/Main.cs b/Projects/Server/Main.cs index c6b95bd24..b38cd3557 100644 --- a/Projects/Server/Main.cs +++ b/Projects/Server/Main.cs @@ -95,9 +95,7 @@ namespace Server public static Assembly Assembly { get; set; } // Assembly file version - public static Version Version => Version.Parse( - FileVersionInfo.GetVersionInfo(Assembly.Location).FileVersion - ); + public static Version Version => new(ThisAssembly.AssemblyFileVersion); public static Process Process { get; private set; } @@ -135,7 +133,7 @@ namespace Server } } - public static CancellationTokenSource ClosingTokenSource { get; } = new CancellationTokenSource(); + public static CancellationTokenSource ClosingTokenSource { get; } = new(); public static bool Closing => ClosingTokenSource.IsCancellationRequested; diff --git a/Projects/Server/Map.cs b/Projects/Server/Map.cs index 0281086f8..07135c5a8 100644 --- a/Projects/Server/Map.cs +++ b/Projects/Server/Map.cs @@ -270,9 +270,9 @@ namespace Server public const int SectorShift = 4; public static readonly int SectorActiveRange = 2; - private static readonly Queue> m_FixPool = new Queue>(128); + private static readonly Queue> m_FixPool = new(128); - private static readonly List m_EmptyFixItems = new List(); + private static readonly List m_EmptyFixItems = new(); private readonly int m_FileIndex; private readonly Sector[][] m_Sectors; @@ -280,7 +280,7 @@ namespace Server private readonly int m_SectorsWidth; - private readonly object tileLock = new object(); + private readonly object tileLock = new(); private Region m_DefaultRegion; private string m_Name; @@ -314,7 +314,7 @@ namespace Server public static Map TerMur => Maps[5]; public static Map Internal => Maps[0x7F]; - public static List AllMaps { get; } = new List(); + public static List AllMaps { get; } = new(); public int Season { get; set; } @@ -1546,7 +1546,7 @@ namespace Server public class NullEnumerable : IPooledEnumerable { - public static readonly NullEnumerable Instance = new NullEnumerable(); + public static readonly NullEnumerable Instance = new(); private readonly IEnumerable m_Empty; @@ -1563,11 +1563,11 @@ namespace Server public sealed class PooledEnumerable : IPooledEnumerable, IDisposable { - private static readonly Queue> _Buffer = new Queue>(0x400); + private static readonly Queue> _Buffer = new(0x400); private bool m_IsDisposed; - private List m_Pool = new List(0x40); + private List m_Pool = new(0x40); public PooledEnumerable(IEnumerable pool) { diff --git a/Projects/Server/Mobiles/AggressorInfo.cs b/Projects/Server/Mobiles/AggressorInfo.cs index 26afe9050..5cef50d3d 100644 --- a/Projects/Server/Mobiles/AggressorInfo.cs +++ b/Projects/Server/Mobiles/AggressorInfo.cs @@ -7,7 +7,7 @@ namespace Server { public class AggressorInfo { - private static readonly Queue m_Pool = new Queue(); + private static readonly Queue m_Pool = new(); private Mobile m_Attacker, m_Defender; private bool m_CanReportMurder; private bool m_CriminalAggression; diff --git a/Projects/Server/Mobiles/Body.cs b/Projects/Server/Mobiles/Body.cs index 4f22cf766..bc0582491 100644 --- a/Projects/Server/Mobiles/Body.cs +++ b/Projects/Server/Mobiles/Body.cs @@ -126,7 +126,7 @@ namespace Server public static implicit operator int(Body a) => a.BodyID; - public static implicit operator Body(int a) => new Body(a); + public static implicit operator Body(int a) => new(a); public override string ToString() => $"0x{BodyID:X}"; diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index bd08e202d..22d9c4ab4 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -3611,7 +3611,7 @@ namespace Server Resistances[3] += BasePoisonResistance; Resistances[4] += BaseEnergyResistance; - for (var i = 0; ResistanceMods != null && i < ResistanceMods.Count; ++i) + for (var i = 0; i < ResistanceMods?.Count; ++i) { var mod = ResistanceMods[i]; var v = (int)mod.Type; diff --git a/Projects/Server/MultiData.cs b/Projects/Server/MultiData.cs index 66ebfda12..563126fab 100644 --- a/Projects/Server/MultiData.cs +++ b/Projects/Server/MultiData.cs @@ -66,7 +66,7 @@ namespace Server bin.Close(); } - public static Dictionary Components { get; } = new Dictionary(); + public static Dictionary Components { get; } = new(); public static MultiComponentList GetComponents(int multiID) { @@ -251,7 +251,7 @@ namespace Server public sealed class MultiComponentList { - public static readonly MultiComponentList Empty = new MultiComponentList(); + public static readonly MultiComponentList Empty = new(); private Point2D m_Min, m_Max; diff --git a/Projects/Server/Network/NetState/NetState.ClientVersion.cs b/Projects/Server/Network/NetState/NetState.ClientVersion.cs index d6cdffa73..b53f924a7 100644 --- a/Projects/Server/Network/NetState/NetState.ClientVersion.cs +++ b/Projects/Server/Network/NetState/NetState.ClientVersion.cs @@ -19,22 +19,22 @@ namespace Server.Network { public partial class NetState { - private static readonly ClientVersion m_Version400a = new ClientVersion("4.0.0a"); - private static readonly ClientVersion m_Version407a = new ClientVersion("4.0.7a"); - private static readonly ClientVersion m_Version500a = new ClientVersion("5.0.0a"); - private static readonly ClientVersion m_Version502b = new ClientVersion("5.0.2b"); - private static readonly ClientVersion m_Version6000 = new ClientVersion("6.0.0.0"); - private static readonly ClientVersion m_Version6017 = new ClientVersion("6.0.1.7"); - private static readonly ClientVersion m_Version60142 = new ClientVersion("6.0.14.2"); - private static readonly ClientVersion m_Version7000 = new ClientVersion("7.0.0.0"); - private static readonly ClientVersion m_Version7090 = new ClientVersion("7.0.9.0"); - private static readonly ClientVersion m_Version70130 = new ClientVersion("7.0.13.0"); - private static readonly ClientVersion m_Version70160 = new ClientVersion("7.0.16.0"); - private static readonly ClientVersion m_Version70300 = new ClientVersion("7.0.30.0"); - private static readonly ClientVersion m_Version70331 = new ClientVersion("7.0.33.1"); - private static readonly ClientVersion m_Version704565 = new ClientVersion("7.0.45.65"); - private static readonly ClientVersion m_Version70500 = new ClientVersion("7.0.50.0"); - private static readonly ClientVersion m_Version70610 = new ClientVersion("7.0.61.0"); + private static readonly ClientVersion m_Version400a = new("4.0.0a"); + private static readonly ClientVersion m_Version407a = new("4.0.7a"); + private static readonly ClientVersion m_Version500a = new("5.0.0a"); + private static readonly ClientVersion m_Version502b = new("5.0.2b"); + private static readonly ClientVersion m_Version6000 = new("6.0.0.0"); + private static readonly ClientVersion m_Version6017 = new("6.0.1.7"); + private static readonly ClientVersion m_Version60142 = new("6.0.14.2"); + private static readonly ClientVersion m_Version7000 = new("7.0.0.0"); + private static readonly ClientVersion m_Version7090 = new("7.0.9.0"); + private static readonly ClientVersion m_Version70130 = new("7.0.13.0"); + private static readonly ClientVersion m_Version70160 = new("7.0.16.0"); + private static readonly ClientVersion m_Version70300 = new("7.0.30.0"); + private static readonly ClientVersion m_Version70331 = new("7.0.33.1"); + private static readonly ClientVersion m_Version704565 = new("7.0.45.65"); + private static readonly ClientVersion m_Version70500 = new("7.0.50.0"); + private static readonly ClientVersion m_Version70610 = new("7.0.61.0"); public ProtocolChanges ProtocolChanges { get; set; } public ClientFlags Flags { get; set; } diff --git a/Projects/Server/Network/NetState/NetState.cs b/Projects/Server/Network/NetState/NetState.cs index 7684de8c8..59e5989a1 100644 --- a/Projects/Server/Network/NetState/NetState.cs +++ b/Projects/Server/Network/NetState/NetState.cs @@ -42,7 +42,7 @@ namespace Server.Network private static int HuePickerCap = 512; private static int MenuCap = 512; - private static readonly ConcurrentQueue m_Disposed = new ConcurrentQueue(); + private static readonly ConcurrentQueue m_Disposed = new(); private static NetworkState m_NetworkState = NetworkState.ResumeState; public static NetStateCreatedCallback CreatedCallback { get; set; } diff --git a/Projects/Server/Network/NetworkState.cs b/Projects/Server/Network/NetworkState.cs index 359289f75..13acbb05c 100644 --- a/Projects/Server/Network/NetworkState.cs +++ b/Projects/Server/Network/NetworkState.cs @@ -20,8 +20,8 @@ namespace Server.Network { public class NetworkState { - public static readonly NetworkState PauseState = new NetworkState(true); - public static readonly NetworkState ResumeState = new NetworkState(false); + public static readonly NetworkState PauseState = new(true); + public static readonly NetworkState ResumeState = new(false); public bool Paused { get; } diff --git a/Projects/Server/Network/Packet.cs b/Projects/Server/Network/Packet.cs index 83890f77e..198ed3af1 100644 --- a/Projects/Server/Network/Packet.cs +++ b/Projects/Server/Network/Packet.cs @@ -119,7 +119,7 @@ namespace Server.Network } } - private readonly object _object = new object(); + private readonly object _object = new(); public byte[] Compile(bool compress, out int length) { diff --git a/Projects/Server/Network/PacketWriter.cs b/Projects/Server/Network/PacketWriter.cs index 307ed18f8..bd85aa27c 100644 --- a/Projects/Server/Network/PacketWriter.cs +++ b/Projects/Server/Network/PacketWriter.cs @@ -10,7 +10,7 @@ namespace Server.Network /// public class PacketWriter { - private static readonly ConcurrentQueue m_Pool = new ConcurrentQueue(); + private static readonly ConcurrentQueue m_Pool = new(); /// /// Internal format buffer. diff --git a/Projects/Server/Network/Packets/IncomingAccountPackets.cs b/Projects/Server/Network/Packets/IncomingAccountPackets.cs index 0819dcafd..7f1725660 100644 --- a/Projects/Server/Network/Packets/IncomingAccountPackets.cs +++ b/Projects/Server/Network/Packets/IncomingAccountPackets.cs @@ -24,7 +24,7 @@ namespace Server.Network { private const int m_AuthIDWindowSize = 128; private static readonly Dictionary m_AuthIDWindow = - new Dictionary(m_AuthIDWindowSize); + new(m_AuthIDWindowSize); internal struct AuthIDPersistence { diff --git a/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs b/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs index 6c503e4cf..a74d7f49a 100644 --- a/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs +++ b/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs @@ -21,7 +21,7 @@ namespace Server.Network public static class IncomingExtendedCommandPackets { private static readonly PacketHandler[] m_ExtendedHandlersLow = new PacketHandler[0x100]; - private static readonly Dictionary m_ExtendedHandlersHigh = new Dictionary(); + private static readonly Dictionary m_ExtendedHandlersHigh = new(); // TODO: Change to outside configuration public static int[] ValidAnimations { get; set; } = diff --git a/Projects/Server/Network/Packets/IncomingMessagePackets.cs b/Projects/Server/Network/Packets/IncomingMessagePackets.cs index 2421a17a2..7933cf106 100644 --- a/Projects/Server/Network/Packets/IncomingMessagePackets.cs +++ b/Projects/Server/Network/Packets/IncomingMessagePackets.cs @@ -38,7 +38,7 @@ namespace Server.Network public static class IncomingMessagePackets { - private static readonly KeywordList m_KeywordList = new KeywordList(); + private static readonly KeywordList m_KeywordList = new(); public static void Configure() { diff --git a/Projects/Server/Network/Packets/IncomingPackets.cs b/Projects/Server/Network/Packets/IncomingPackets.cs index e25906dd8..0082c5e7e 100644 --- a/Projects/Server/Network/Packets/IncomingPackets.cs +++ b/Projects/Server/Network/Packets/IncomingPackets.cs @@ -25,7 +25,7 @@ namespace Server.Network private static readonly EncodedPacketHandler[] m_EncodedHandlersLow = new EncodedPacketHandler[0x100]; private static readonly Dictionary m_EncodedHandlersHigh = - new Dictionary(); + new(); public static PacketHandler[] Handlers { get; } = new PacketHandler[0x100]; diff --git a/Projects/Server/Network/Packets/IncomingPlayerPackets.cs b/Projects/Server/Network/Packets/IncomingPlayerPackets.cs index 4cebd2176..33b0fc35d 100644 --- a/Projects/Server/Network/Packets/IncomingPlayerPackets.cs +++ b/Projects/Server/Network/Packets/IncomingPlayerPackets.cs @@ -230,7 +230,7 @@ namespace Server.Network var p = from.Prompt; - if (p != null && p.Serial == serial && p.Serial == prompt) + if (p?.Serial == serial && p.Serial == prompt) { from.Prompt = null; @@ -267,7 +267,7 @@ namespace Server.Network var p = from.Prompt; - if (p != null && p.Serial == serial && p.Serial == prompt) + if (p?.Serial == serial && p.Serial == prompt) { from.Prompt = null; diff --git a/Projects/Server/Network/Packets/MobilePackets.cs b/Projects/Server/Network/Packets/MobilePackets.cs index 0798da260..ddd953021 100644 --- a/Projects/Server/Network/Packets/MobilePackets.cs +++ b/Projects/Server/Network/Packets/MobilePackets.cs @@ -541,8 +541,8 @@ namespace Server.Network public sealed class MobileIncoming : Packet { - private static readonly ThreadLocal m_DupedLayersTL = new ThreadLocal(() => new int[256]); - private static readonly ThreadLocal m_VersionTL = new ThreadLocal(); + private static readonly ThreadLocal m_DupedLayersTL = new(() => new int[256]); + private static readonly ThreadLocal m_VersionTL = new(); public MobileIncoming(Mobile beholder, Mobile beheld) : base(0x78) { @@ -673,8 +673,8 @@ namespace Server.Network public sealed class MobileIncomingSA : Packet { - private static readonly ThreadLocal m_DupedLayersTL = new ThreadLocal(() => new int[256]); - private static readonly ThreadLocal m_VersionTL = new ThreadLocal(); + private static readonly ThreadLocal m_DupedLayersTL = new(() => new int[256]); + private static readonly ThreadLocal m_VersionTL = new(); public MobileIncomingSA(Mobile beholder, Mobile beheld) : base(0x78) { @@ -820,8 +820,8 @@ namespace Server.Network // Pre-7.0.0.0 Mobile Incoming public sealed class MobileIncomingOld : Packet { - private static readonly ThreadLocal m_DupedLayersTL = new ThreadLocal(() => new int[256]); - private static readonly ThreadLocal m_VersionTL = new ThreadLocal(); + private static readonly ThreadLocal m_DupedLayersTL = new(() => new int[256]); + private static readonly ThreadLocal m_VersionTL = new(); public MobileIncomingOld(Mobile beholder, Mobile beheld) : base(0x78) { diff --git a/Projects/Server/Network/Pipe.cs b/Projects/Server/Network/Pipe.cs index 478853fd4..ec4753f0a 100644 --- a/Projects/Server/Network/Pipe.cs +++ b/Projects/Server/Network/Pipe.cs @@ -88,7 +88,7 @@ namespace Server.Network { private readonly Pipe _pipe; - private Result _result = new Result(2); + private Result _result = new(2); internal PipeWriter(Pipe pipe) => _pipe = pipe; @@ -273,7 +273,7 @@ namespace Server.Network { private readonly Pipe _pipe; - private Result _result = new Result(2); + private Result _result = new(2); internal PipeReader(Pipe pipe) => _pipe = pipe; diff --git a/Projects/Server/Network/StaticPacketHandlers.cs b/Projects/Server/Network/StaticPacketHandlers.cs index 73b5b147a..09b2302c1 100644 --- a/Projects/Server/Network/StaticPacketHandlers.cs +++ b/Projects/Server/Network/StaticPacketHandlers.cs @@ -20,19 +20,19 @@ namespace Server.Network public static class StaticPacketHandlers { private static readonly ConcurrentDictionary OPLInfoPackets = - new ConcurrentDictionary(); + new(); private static readonly ConcurrentDictionary RemoveEntityPackets = - new ConcurrentDictionary(); + new(); private static readonly ConcurrentDictionary WorldItemPackets = - new ConcurrentDictionary(); + new(); private static readonly ConcurrentDictionary WorldItemSAPackets = - new ConcurrentDictionary(); + new(); private static readonly ConcurrentDictionary WorldItemHSPackets = - new ConcurrentDictionary(); + new(); public static OPLInfo GetOPLInfoPacket(IPropertyListObject obj) { diff --git a/Projects/Server/Network/TcpServer.cs b/Projects/Server/Network/TcpServer.cs index 57e9596fe..5a527631b 100644 --- a/Projects/Server/Network/TcpServer.cs +++ b/Projects/Server/Network/TcpServer.cs @@ -39,9 +39,9 @@ namespace Server.Network public static IPEndPoint[] ListeningAddresses { get; private set; } public static TcpListener[] Listeners { get; private set; } - public static HashSet Instances { get; } = new HashSet(128); + public static HashSet Instances { get; } = new(128); - public static ConcurrentQueue m_ConnectedQueue = new ConcurrentQueue(); + public static ConcurrentQueue m_ConnectedQueue = new(); public static void Configure() { diff --git a/Projects/Server/Poison.cs b/Projects/Server/Poison.cs index 24ab4e6f2..e9ddee248 100644 --- a/Projects/Server/Poison.cs +++ b/Projects/Server/Poison.cs @@ -17,7 +17,7 @@ namespace Server public static Poison Deadly => GetPoison("Deadly"); public static Poison Lethal => GetPoison("Lethal"); - public static List Poisons { get; } = new List(); + public static List Poisons { get; } = new(); public abstract Timer ConstructTimer(Mobile m); /*public abstract void OnDamage( Mobile m, ref object state );*/ diff --git a/Projects/Server/Race.cs b/Projects/Server/Race.cs index 92877cf87..b397b659f 100644 --- a/Projects/Server/Race.cs +++ b/Projects/Server/Race.cs @@ -36,7 +36,7 @@ namespace Server public static Race Elf => Races[1]; public static Race Gargoyle => Races[2]; - public static List AllRaces { get; } = new List(); + public static List AllRaces { get; } = new(); public Expansion RequiredExpansion { get; } diff --git a/Projects/Server/Regions/Region.cs b/Projects/Server/Regions/Region.cs index aed457b33..eedfa3380 100644 --- a/Projects/Server/Regions/Region.cs +++ b/Projects/Server/Regions/Region.cs @@ -176,7 +176,7 @@ namespace Server Music = json.GetEnumProperty("music", options, out MusicName music) ? music : DefaultMusic; } - public static List Regions { get; } = new List(); + public static List Regions { get; } = new(); public static Type DefaultRegionType { get; set; } = typeof(Region); @@ -190,7 +190,7 @@ namespace Server public Region Parent { get; } - public List Children { get; } = new List(); + public List Children { get; } = new(); public Rectangle3D[] Area { get; } @@ -297,7 +297,7 @@ namespace Server } public static Rectangle3D ConvertTo3D(Rectangle2D rect) => - new Rectangle3D(new Point3D(rect.Start, MinZ), new Point3D(rect.End, MaxZ)); + new(new Point3D(rect.Start, MinZ), new Point3D(rect.End, MaxZ)); public static Rectangle3D[] ConvertTo3D(Rectangle2D[] rects) { diff --git a/Projects/Server/Sector.cs b/Projects/Server/Sector.cs index 63dee12b7..cb6faa499 100644 --- a/Projects/Server/Sector.cs +++ b/Projects/Server/Sector.cs @@ -27,11 +27,11 @@ namespace Server public class Sector { // TODO: Can we avoid this? - private static readonly List m_DefaultMobileList = new List(); - private static readonly List m_DefaultItemList = new List(); - private static readonly List m_DefaultClientList = new List(); - private static readonly List m_DefaultMultiList = new List(); - private static readonly List m_DefaultRectList = new List(); + private static readonly List m_DefaultMobileList = new(); + private static readonly List m_DefaultItemList = new(); + private static readonly List m_DefaultClientList = new(); + private static readonly List m_DefaultMultiList = new(); + private static readonly List m_DefaultRectList = new(); private bool m_Active; private List m_Clients; private List m_Items; diff --git a/Projects/Server/Serial.cs b/Projects/Server/Serial.cs index 5decdb46c..484cd71cd 100644 --- a/Projects/Server/Serial.cs +++ b/Projects/Server/Serial.cs @@ -4,8 +4,8 @@ namespace Server { public readonly struct Serial : IComparable, IComparable, IEquatable { - public static readonly Serial MinusOne = new Serial(0xFFFFFFFF); - public static readonly Serial Zero = new Serial(0); + public static readonly Serial MinusOne = new(0xFFFFFFFF); + public static readonly Serial Zero = new(0); private Serial(uint serial) => Value = serial; @@ -54,7 +54,7 @@ namespace Server public static implicit operator uint(Serial a) => a.Value; - public static implicit operator Serial(uint a) => new Serial(a); + public static implicit operator Serial(uint a) => new(a); public bool Equals(Serial other) => Value == other.Value; diff --git a/Projects/Server/Serialization/BufferReader.cs b/Projects/Server/Serialization/BufferReader.cs index e4b35756b..f0f72fbd7 100644 --- a/Projects/Server/Serialization/BufferReader.cs +++ b/Projects/Server/Serialization/BufferReader.cs @@ -48,11 +48,11 @@ namespace Server return s; } - public DateTime ReadDateTime() => new DateTime(ReadLong()); + public DateTime ReadDateTime() => new(ReadLong()); - public DateTimeOffset ReadDateTimeOffset() => new DateTimeOffset(ReadLong(), ReadTimeSpan()); + public DateTimeOffset ReadDateTimeOffset() => new(ReadLong(), ReadTimeSpan()); - public TimeSpan ReadTimeSpan() => new TimeSpan(ReadLong()); + public TimeSpan ReadTimeSpan() => new(ReadLong()); public DateTime ReadDeltaTime() { @@ -79,7 +79,7 @@ namespace Server } } - public decimal ReadDecimal() => new decimal(new[] { ReadInt(), ReadInt(), ReadInt(), ReadInt() }); + public decimal ReadDecimal() => new(new[] { ReadInt(), ReadInt(), ReadInt(), ReadInt() }); public long ReadLong() { @@ -158,15 +158,15 @@ namespace Server return v; } - public IPAddress ReadIPAddress() => new IPAddress(ReadLong()); + public IPAddress ReadIPAddress() => new(ReadLong()); - public Point3D ReadPoint3D() => new Point3D(ReadInt(), ReadInt(), ReadInt()); + public Point3D ReadPoint3D() => new(ReadInt(), ReadInt(), ReadInt()); - public Point2D ReadPoint2D() => new Point2D(ReadInt(), ReadInt()); + public Point2D ReadPoint2D() => new(ReadInt(), ReadInt()); - public Rectangle2D ReadRect2D() => new Rectangle2D(ReadPoint2D(), ReadPoint2D()); + public Rectangle2D ReadRect2D() => new(ReadPoint2D(), ReadPoint2D()); - public Rectangle3D ReadRect3D() => new Rectangle3D(ReadPoint3D(), ReadPoint3D()); + public Rectangle3D ReadRect3D() => new(ReadPoint3D(), ReadPoint3D()); public Map ReadMap() => Map.Maps[ReadByte()]; diff --git a/Projects/Server/Skills.cs b/Projects/Server/Skills.cs index fe6974d9f..0bf9cdcac 100644 --- a/Projects/Server/Skills.cs +++ b/Projects/Server/Skills.cs @@ -430,64 +430,64 @@ namespace Server public static SkillInfo[] Table { get; set; } = { - new SkillInfo(0, "Alchemy", 0.0, 5.0, 5.0, "Alchemist", null, 0.0, 0.5, 0.5, 1.0), - new SkillInfo(1, "Anatomy", 0.0, 0.0, 0.0, "Biologist", null, 0.15, 0.15, 0.7, 1.0), - new SkillInfo(2, "Animal Lore", 0.0, 0.0, 0.0, "Naturalist", null, 0.0, 0.0, 1.0, 1.0), - new SkillInfo(3, "Item Identification", 0.0, 0.0, 0.0, "Merchant", null, 0.0, 0.0, 1.0, 1.0), - new SkillInfo(4, "Arms Lore", 0.0, 0.0, 0.0, "Weapon Master", null, 0.75, 0.15, 0.1, 1.0), - new SkillInfo(5, "Parrying", 7.5, 2.5, 0.0, "Duelist", null, 0.75, 0.25, 0.0, 1.0), - new SkillInfo(6, "Begging", 0.0, 0.0, 0.0, "Beggar", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(7, "Blacksmithy", 10.0, 0.0, 0.0, "Blacksmith", null, 1.0, 0.0, 0.0, 1.0), - new SkillInfo(8, "Bowcraft/Fletching", 6.0, 16.0, 0.0, "Bowyer", null, 0.6, 1.6, 0.0, 1.0), - new SkillInfo(9, "Peacemaking", 0.0, 0.0, 0.0, "Pacifier", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(10, "Camping", 20.0, 15.0, 15.0, "Explorer", null, 2.0, 1.5, 1.5, 1.0), - new SkillInfo(11, "Carpentry", 20.0, 5.0, 0.0, "Carpenter", null, 2.0, 0.5, 0.0, 1.0), - new SkillInfo(12, "Cartography", 0.0, 7.5, 7.5, "Cartographer", null, 0.0, 0.75, 0.75, 1.0), - new SkillInfo(13, "Cooking", 0.0, 20.0, 30.0, "Chef", null, 0.0, 2.0, 3.0, 1.0), - new SkillInfo(14, "Detecting Hidden", 0.0, 0.0, 0.0, "Scout", null, 0.0, 0.4, 0.6, 1.0), - new SkillInfo(15, "Discordance", 0.0, 2.5, 2.5, "Demoralizer", null, 0.0, 0.25, 0.25, 1.0), - new SkillInfo(16, "Evaluating Intelligence", 0.0, 0.0, 0.0, "Scholar", null, 0.0, 0.0, 1.0, 1.0), - new SkillInfo(17, "Healing", 6.0, 6.0, 8.0, "Healer", null, 0.6, 0.6, 0.8, 1.0), - new SkillInfo(18, "Fishing", 0.0, 0.0, 0.0, "Fisherman", null, 0.5, 0.5, 0.0, 1.0), - new SkillInfo(19, "Forensic Evaluation", 0.0, 0.0, 0.0, "Detective", null, 0.0, 0.2, 0.8, 1.0), - new SkillInfo(20, "Herding", 16.25, 6.25, 2.5, "Shepherd", null, 1.625, 0.625, 0.25, 1.0), - new SkillInfo(21, "Hiding", 0.0, 0.0, 0.0, "Shade", null, 0.0, 0.8, 0.2, 1.0), - new SkillInfo(22, "Provocation", 0.0, 4.5, 0.5, "Rouser", null, 0.0, 0.45, 0.05, 1.0), - new SkillInfo(23, "Inscription", 0.0, 2.0, 8.0, "Scribe", null, 0.0, 0.2, 0.8, 1.0), - new SkillInfo(24, "Lockpicking", 0.0, 25.0, 0.0, "Infiltrator", null, 0.0, 2.0, 0.0, 1.0), - new SkillInfo(25, "Magery", 0.0, 0.0, 15.0, "Mage", null, 0.0, 0.0, 1.5, 1.0), - new SkillInfo(26, "Resisting Spells", 0.0, 0.0, 0.0, "Warder", null, 0.25, 0.25, 0.5, 1.0), - new SkillInfo(27, "Tactics", 0.0, 0.0, 0.0, "Tactician", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(28, "Snooping", 0.0, 25.0, 0.0, "Spy", null, 0.0, 2.5, 0.0, 1.0), - new SkillInfo(29, "Musicianship", 0.0, 0.0, 0.0, "Bard", null, 0.0, 0.8, 0.2, 1.0), - new SkillInfo(30, "Poisoning", 0.0, 4.0, 16.0, "Assassin", null, 0.0, 0.4, 1.6, 1.0), - new SkillInfo(31, "Archery", 2.5, 7.5, 0.0, "Archer", null, 0.25, 0.75, 0.0, 1.0), - new SkillInfo(32, "Spirit Speak", 0.0, 0.0, 0.0, "Medium", null, 0.0, 0.0, 1.0, 1.0), - new SkillInfo(33, "Stealing", 0.0, 10.0, 0.0, "Pickpocket", null, 0.0, 1.0, 0.0, 1.0), - new SkillInfo(34, "Tailoring", 3.75, 16.25, 5.0, "Tailor", null, 0.38, 1.63, 0.5, 1.0), - new SkillInfo(35, "Animal Taming", 14.0, 2.0, 4.0, "Tamer", null, 1.4, 0.2, 0.4, 1.0), - new SkillInfo(36, "Taste Identification", 0.0, 0.0, 0.0, "Praegustator", null, 0.2, 0.0, 0.8, 1.0), - new SkillInfo(37, "Tinkering", 5.0, 2.0, 3.0, "Tinker", null, 0.5, 0.2, 0.3, 1.0), - new SkillInfo(38, "Tracking", 0.0, 12.5, 12.5, "Ranger", null, 0.0, 1.25, 1.25, 1.0), - new SkillInfo(39, "Veterinary", 8.0, 4.0, 8.0, "Veterinarian", null, 0.8, 0.4, 0.8, 1.0), - new SkillInfo(40, "Swordsmanship", 7.5, 2.5, 0.0, "Swordsman", null, 0.75, 0.25, 0.0, 1.0), - new SkillInfo(41, "Mace Fighting", 9.0, 1.0, 0.0, "Armsman", null, 0.9, 0.1, 0.0, 1.0), - new SkillInfo(42, "Fencing", 4.5, 5.5, 0.0, "Fencer", null, 0.45, 0.55, 0.0, 1.0), - new SkillInfo(43, "Wrestling", 9.0, 1.0, 0.0, "Wrestler", null, 0.9, 0.1, 0.0, 1.0), - new SkillInfo(44, "Lumberjacking", 20.0, 0.0, 0.0, "Lumberjack", null, 2.0, 0.0, 0.0, 1.0), - new SkillInfo(45, "Mining", 20.0, 0.0, 0.0, "Miner", null, 2.0, 0.0, 0.0, 1.0), - new SkillInfo(46, "Meditation", 0.0, 0.0, 0.0, "Stoic", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(47, "Stealth", 0.0, 0.0, 0.0, "Rogue", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(48, "Remove Trap", 0.0, 0.0, 0.0, "Trap Specialist", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(49, "Necromancy", 0.0, 0.0, 0.0, "Necromancer", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(50, "Focus", 0.0, 0.0, 0.0, "Driven", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(51, "Chivalry", 0.0, 0.0, 0.0, "Paladin", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(52, "Bushido", 0.0, 0.0, 0.0, "Samurai", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(53, "Ninjitsu", 0.0, 0.0, 0.0, "Ninja", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(54, "Spellweaving", 0.0, 0.0, 0.0, "Arcanist", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(55, "Mysticism", 0.0, 0.0, 0.0, "Mystic", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(56, "Imbuing", 0.0, 0.0, 0.0, "Artificer", null, 0.0, 0.0, 0.0, 1.0), - new SkillInfo(57, "Throwing", 0.0, 0.0, 0.0, "Bladeweaver", null, 0.0, 0.0, 0.0, 1.0) + new(0, "Alchemy", 0.0, 5.0, 5.0, "Alchemist", null, 0.0, 0.5, 0.5, 1.0), + new(1, "Anatomy", 0.0, 0.0, 0.0, "Biologist", null, 0.15, 0.15, 0.7, 1.0), + new(2, "Animal Lore", 0.0, 0.0, 0.0, "Naturalist", null, 0.0, 0.0, 1.0, 1.0), + new(3, "Item Identification", 0.0, 0.0, 0.0, "Merchant", null, 0.0, 0.0, 1.0, 1.0), + new(4, "Arms Lore", 0.0, 0.0, 0.0, "Weapon Master", null, 0.75, 0.15, 0.1, 1.0), + new(5, "Parrying", 7.5, 2.5, 0.0, "Duelist", null, 0.75, 0.25, 0.0, 1.0), + new(6, "Begging", 0.0, 0.0, 0.0, "Beggar", null, 0.0, 0.0, 0.0, 1.0), + new(7, "Blacksmithy", 10.0, 0.0, 0.0, "Blacksmith", null, 1.0, 0.0, 0.0, 1.0), + new(8, "Bowcraft/Fletching", 6.0, 16.0, 0.0, "Bowyer", null, 0.6, 1.6, 0.0, 1.0), + new(9, "Peacemaking", 0.0, 0.0, 0.0, "Pacifier", null, 0.0, 0.0, 0.0, 1.0), + new(10, "Camping", 20.0, 15.0, 15.0, "Explorer", null, 2.0, 1.5, 1.5, 1.0), + new(11, "Carpentry", 20.0, 5.0, 0.0, "Carpenter", null, 2.0, 0.5, 0.0, 1.0), + new(12, "Cartography", 0.0, 7.5, 7.5, "Cartographer", null, 0.0, 0.75, 0.75, 1.0), + new(13, "Cooking", 0.0, 20.0, 30.0, "Chef", null, 0.0, 2.0, 3.0, 1.0), + new(14, "Detecting Hidden", 0.0, 0.0, 0.0, "Scout", null, 0.0, 0.4, 0.6, 1.0), + new(15, "Discordance", 0.0, 2.5, 2.5, "Demoralizer", null, 0.0, 0.25, 0.25, 1.0), + new(16, "Evaluating Intelligence", 0.0, 0.0, 0.0, "Scholar", null, 0.0, 0.0, 1.0, 1.0), + new(17, "Healing", 6.0, 6.0, 8.0, "Healer", null, 0.6, 0.6, 0.8, 1.0), + new(18, "Fishing", 0.0, 0.0, 0.0, "Fisherman", null, 0.5, 0.5, 0.0, 1.0), + new(19, "Forensic Evaluation", 0.0, 0.0, 0.0, "Detective", null, 0.0, 0.2, 0.8, 1.0), + new(20, "Herding", 16.25, 6.25, 2.5, "Shepherd", null, 1.625, 0.625, 0.25, 1.0), + new(21, "Hiding", 0.0, 0.0, 0.0, "Shade", null, 0.0, 0.8, 0.2, 1.0), + new(22, "Provocation", 0.0, 4.5, 0.5, "Rouser", null, 0.0, 0.45, 0.05, 1.0), + new(23, "Inscription", 0.0, 2.0, 8.0, "Scribe", null, 0.0, 0.2, 0.8, 1.0), + new(24, "Lockpicking", 0.0, 25.0, 0.0, "Infiltrator", null, 0.0, 2.0, 0.0, 1.0), + new(25, "Magery", 0.0, 0.0, 15.0, "Mage", null, 0.0, 0.0, 1.5, 1.0), + new(26, "Resisting Spells", 0.0, 0.0, 0.0, "Warder", null, 0.25, 0.25, 0.5, 1.0), + new(27, "Tactics", 0.0, 0.0, 0.0, "Tactician", null, 0.0, 0.0, 0.0, 1.0), + new(28, "Snooping", 0.0, 25.0, 0.0, "Spy", null, 0.0, 2.5, 0.0, 1.0), + new(29, "Musicianship", 0.0, 0.0, 0.0, "Bard", null, 0.0, 0.8, 0.2, 1.0), + new(30, "Poisoning", 0.0, 4.0, 16.0, "Assassin", null, 0.0, 0.4, 1.6, 1.0), + new(31, "Archery", 2.5, 7.5, 0.0, "Archer", null, 0.25, 0.75, 0.0, 1.0), + new(32, "Spirit Speak", 0.0, 0.0, 0.0, "Medium", null, 0.0, 0.0, 1.0, 1.0), + new(33, "Stealing", 0.0, 10.0, 0.0, "Pickpocket", null, 0.0, 1.0, 0.0, 1.0), + new(34, "Tailoring", 3.75, 16.25, 5.0, "Tailor", null, 0.38, 1.63, 0.5, 1.0), + new(35, "Animal Taming", 14.0, 2.0, 4.0, "Tamer", null, 1.4, 0.2, 0.4, 1.0), + new(36, "Taste Identification", 0.0, 0.0, 0.0, "Praegustator", null, 0.2, 0.0, 0.8, 1.0), + new(37, "Tinkering", 5.0, 2.0, 3.0, "Tinker", null, 0.5, 0.2, 0.3, 1.0), + new(38, "Tracking", 0.0, 12.5, 12.5, "Ranger", null, 0.0, 1.25, 1.25, 1.0), + new(39, "Veterinary", 8.0, 4.0, 8.0, "Veterinarian", null, 0.8, 0.4, 0.8, 1.0), + new(40, "Swordsmanship", 7.5, 2.5, 0.0, "Swordsman", null, 0.75, 0.25, 0.0, 1.0), + new(41, "Mace Fighting", 9.0, 1.0, 0.0, "Armsman", null, 0.9, 0.1, 0.0, 1.0), + new(42, "Fencing", 4.5, 5.5, 0.0, "Fencer", null, 0.45, 0.55, 0.0, 1.0), + new(43, "Wrestling", 9.0, 1.0, 0.0, "Wrestler", null, 0.9, 0.1, 0.0, 1.0), + new(44, "Lumberjacking", 20.0, 0.0, 0.0, "Lumberjack", null, 2.0, 0.0, 0.0, 1.0), + new(45, "Mining", 20.0, 0.0, 0.0, "Miner", null, 2.0, 0.0, 0.0, 1.0), + new(46, "Meditation", 0.0, 0.0, 0.0, "Stoic", null, 0.0, 0.0, 0.0, 1.0), + new(47, "Stealth", 0.0, 0.0, 0.0, "Rogue", null, 0.0, 0.0, 0.0, 1.0), + new(48, "Remove Trap", 0.0, 0.0, 0.0, "Trap Specialist", null, 0.0, 0.0, 0.0, 1.0), + new(49, "Necromancy", 0.0, 0.0, 0.0, "Necromancer", null, 0.0, 0.0, 0.0, 1.0), + new(50, "Focus", 0.0, 0.0, 0.0, "Driven", null, 0.0, 0.0, 0.0, 1.0), + new(51, "Chivalry", 0.0, 0.0, 0.0, "Paladin", null, 0.0, 0.0, 0.0, 1.0), + new(52, "Bushido", 0.0, 0.0, 0.0, "Samurai", null, 0.0, 0.0, 0.0, 1.0), + new(53, "Ninjitsu", 0.0, 0.0, 0.0, "Ninja", null, 0.0, 0.0, 0.0, 1.0), + new(54, "Spellweaving", 0.0, 0.0, 0.0, "Arcanist", null, 0.0, 0.0, 0.0, 1.0), + new(55, "Mysticism", 0.0, 0.0, 0.0, "Mystic", null, 0.0, 0.0, 0.0, 1.0), + new(56, "Imbuing", 0.0, 0.0, 0.0, "Artificer", null, 0.0, 0.0, 0.0, 1.0), + new(57, "Throwing", 0.0, 0.0, 0.0, "Bladeweaver", null, 0.0, 0.0, 0.0, 1.0) }; } @@ -621,7 +621,7 @@ namespace Server { var sk = m_Skills[i]; - if (sk != null && sk.BaseFixedPoint > value) + if (sk?.BaseFixedPoint > value) { value = sk.BaseFixedPoint; highest = sk; diff --git a/Projects/Server/TileMatrix.cs b/Projects/Server/TileMatrix.cs index db5ea3839..1c112aad2 100644 --- a/Projects/Server/TileMatrix.cs +++ b/Projects/Server/TileMatrix.cs @@ -9,10 +9,10 @@ namespace Server { public class TileMatrix { - private static readonly List m_Instances = new List(); + private static readonly List m_Instances = new(); private readonly int m_FileIndex; - private readonly List m_FileShare = new List(); + private readonly List m_FileShare = new(); private readonly BinaryReader m_IndexReader; @@ -29,7 +29,7 @@ namespace Server private readonly int[][] m_StaticPatches; private readonly StaticTile[][][][][] m_StaticTiles; - private readonly TileList m_TilesList = new TileList(); + private readonly TileList m_TilesList = new(); private TileList[][] m_Lists; private DateTime m_NextLandWarning; diff --git a/Projects/Server/Timer/Timer.cs b/Projects/Server/Timer/Timer.cs index eae982389..59c8a4116 100644 --- a/Projects/Server/Timer/Timer.cs +++ b/Projects/Server/Timer/Timer.cs @@ -21,7 +21,7 @@ namespace Server public partial class Timer { - private static readonly Queue m_Queue = new Queue(); + private static readonly Queue m_Queue = new(); private static int m_QueueCountAtSlice; private readonly int m_Count; @@ -253,7 +253,7 @@ namespace Server public class TimerThread { private static readonly Dictionary - m_Changed = new Dictionary(); + m_Changed = new(); private static readonly long[] m_NextPriorities = new long[8]; @@ -271,17 +271,17 @@ namespace Server private static readonly List[] m_Timers = { - new List(), - new List(), - new List(), - new List(), - new List(), - new List(), - new List(), - new List() + new(), + new(), + new(), + new(), + new(), + new(), + new(), + new() }; - private static readonly AutoResetEvent m_Signal = new AutoResetEvent(false); + private static readonly AutoResetEvent m_Signal = new(false); public static void DumpInfo(TextWriter tw) { @@ -443,7 +443,7 @@ namespace Server private class TimerChangeEntry { - private static readonly Queue m_InstancePool = new Queue(); + private static readonly Queue m_InstancePool = new(); public bool m_IsAdd; public int m_NewIndex; public Timer m_Timer; diff --git a/Projects/Server/Utilities/RefPool.cs b/Projects/Server/Utilities/RefPool.cs index 8c7bbc58c..a2d256279 100644 --- a/Projects/Server/Utilities/RefPool.cs +++ b/Projects/Server/Utilities/RefPool.cs @@ -60,7 +60,7 @@ namespace Server.Utilities public const int DEFAULT_RESOURCE_RETENTION = 10; private readonly Generator m_Generator; - private readonly Stack m_Resources = new Stack(); + private readonly Stack m_Resources = new(); private int m_MaxRefrenceRetention; /// The generator function for creating new resources. diff --git a/Projects/Server/Utilities/Utility.cs b/Projects/Server/Utilities/Utility.cs index c2f9aeead..28dba9de0 100644 --- a/Projects/Server/Utilities/Utility.cs +++ b/Projects/Server/Utilities/Utility.cs @@ -100,7 +100,7 @@ namespace Server SkillName.Tinkering }; - private static readonly Stack m_ConsoleColors = new Stack(); + private static readonly Stack m_ConsoleColors = new(); public static Encoding UTF8 => m_UTF8 ??= new UTF8Encoding(false, false); public static Encoding UTF8WithEncoding => m_UTF8WithEncoding ??= new UTF8Encoding(true, false); diff --git a/Projects/Server/World/World.cs b/Projects/Server/World/World.cs index 708b8fc5a..4ea98b54a 100644 --- a/Projects/Server/World/World.cs +++ b/Projects/Server/World/World.cs @@ -40,10 +40,10 @@ namespace Server public static class World { - private static readonly ManualResetEvent m_DiskWriteHandle = new ManualResetEvent(true); - private static readonly Dictionary _pendingAdd = new Dictionary(); - private static readonly Dictionary _pendingDelete = new Dictionary(); - private static readonly ConcurrentQueue _decayQueue = new ConcurrentQueue(); + private static readonly ManualResetEvent m_DiskWriteHandle = new(true); + private static readonly Dictionary _pendingAdd = new(); + private static readonly Dictionary _pendingDelete = new(); + private static readonly ConcurrentQueue _decayQueue = new(); public const uint ItemOffset = 0x40000000; public const uint MaxItemSerial = 0x7FFFFFFF; @@ -121,9 +121,9 @@ namespace Server private static void OutOfMemory(string message) => throw new OutOfMemoryException(message); internal static int _Saves; - internal static List ItemTypes { get; } = new List(); - internal static List MobileTypes { get; } = new List(); - internal static List GuildTypes { get; } = new List(); + internal static List ItemTypes { get; } = new(); + internal static List MobileTypes { get; } = new(); + internal static List GuildTypes { get; } = new(); public static WorldState WorldState { get; private set; } public static bool Saving => WorldState == WorldState.Saving; diff --git a/Projects/UOContent/Accounting/AccountAttackLimiter.cs b/Projects/UOContent/Accounting/AccountAttackLimiter.cs index ba02e2c85..4072c588a 100644 --- a/Projects/UOContent/Accounting/AccountAttackLimiter.cs +++ b/Projects/UOContent/Accounting/AccountAttackLimiter.cs @@ -10,7 +10,7 @@ namespace Server.Accounting { public static bool Enabled; - private static readonly List m_List = new List(); + private static readonly List m_List = new(); public static void Configure() { diff --git a/Projects/UOContent/Accounting/AccountHandler.cs b/Projects/UOContent/Accounting/AccountHandler.cs index 204551b0b..d1addf3b6 100644 --- a/Projects/UOContent/Accounting/AccountHandler.cs +++ b/Projects/UOContent/Accounting/AccountHandler.cs @@ -19,15 +19,15 @@ namespace Server.Misc private static readonly CityInfo[] StartingCities = { - new CityInfo("New Haven", "New Haven Bank", 1150168, 3667, 2625, 0), - new CityInfo("Yew", "The Empath Abbey", 1075072, 633, 858, 0), - new CityInfo("Minoc", "The Barnacle", 1075073, 2476, 413, 15), - new CityInfo("Britain", "The Wayfarer's Inn", 1075074, 1602, 1591, 20), - new CityInfo("Moonglow", "The Scholars Inn", 1075075, 4408, 1168, 0), - new CityInfo("Trinsic", "The Traveler's Inn", 1075076, 1845, 2745, 0), - new CityInfo("Jhelom", "The Mercenary Inn", 1075078, 1374, 3826, 0), - new CityInfo("Skara Brae", "The Falconer's Inn", 1075079, 618, 2234, 0), - new CityInfo("Vesper", "The Ironwood Inn", 1075080, 2771, 976, 0) + new("New Haven", "New Haven Bank", 1150168, 3667, 2625, 0), + new("Yew", "The Empath Abbey", 1075072, 633, 858, 0), + new("Minoc", "The Barnacle", 1075073, 2476, 413, 15), + new("Britain", "The Wayfarer's Inn", 1075074, 1602, 1591, 20), + new("Moonglow", "The Scholars Inn", 1075075, 4408, 1168, 0), + new("Trinsic", "The Traveler's Inn", 1075076, 1845, 2745, 0), + new("Jhelom", "The Mercenary Inn", 1075078, 1374, 3826, 0), + new("Skara Brae", "The Falconer's Inn", 1075079, 618, 2234, 0), + new("Vesper", "The Ironwood Inn", 1075080, 2771, 976, 0) }; /* Old Haven/Magincia Locations diff --git a/Projects/UOContent/Accounting/Accounts.cs b/Projects/UOContent/Accounting/Accounts.cs index 570e643c2..f75c1fd58 100644 --- a/Projects/UOContent/Accounting/Accounts.cs +++ b/Projects/UOContent/Accounting/Accounts.cs @@ -7,7 +7,7 @@ namespace Server.Accounting { public static class Accounts { - private static Dictionary m_Accounts = new Dictionary(); + private static Dictionary m_Accounts = new(); static Accounts() { diff --git a/Projects/UOContent/Accounting/Security/Argon2PasswordProtection.cs b/Projects/UOContent/Accounting/Security/Argon2PasswordProtection.cs index 39e836e8e..9851960bc 100644 --- a/Projects/UOContent/Accounting/Security/Argon2PasswordProtection.cs +++ b/Projects/UOContent/Accounting/Security/Argon2PasswordProtection.cs @@ -22,7 +22,7 @@ namespace Server.Accounting.Security { public static IPasswordProtection Instance = new Argon2PasswordProtection(); - private readonly Argon2PasswordHasher m_PasswordHasher = new Argon2PasswordHasher( + private readonly Argon2PasswordHasher m_PasswordHasher = new( rng: (RandomSources.SecureSource as SecureRandom)?.Generator ); diff --git a/Projects/UOContent/Accounting/Security/MD5PasswordProtection.cs b/Projects/UOContent/Accounting/Security/MD5PasswordProtection.cs index ad7efb19f..76da4dbdf 100644 --- a/Projects/UOContent/Accounting/Security/MD5PasswordProtection.cs +++ b/Projects/UOContent/Accounting/Security/MD5PasswordProtection.cs @@ -23,7 +23,7 @@ namespace Server.Accounting.Security { public static IPasswordProtection Instance = new MD5PasswordProtection(); #pragma warning disable CA5351 - private readonly MD5CryptoServiceProvider m_MD5HashProvider = new MD5CryptoServiceProvider(); + private readonly MD5CryptoServiceProvider m_MD5HashProvider = new(); #pragma warning restore CA5351 public string EncryptPassword(string plainPassword) diff --git a/Projects/UOContent/Accounting/Security/SHA1PasswordProtection.cs b/Projects/UOContent/Accounting/Security/SHA1PasswordProtection.cs index bd0a091cc..2005c2ded 100644 --- a/Projects/UOContent/Accounting/Security/SHA1PasswordProtection.cs +++ b/Projects/UOContent/Accounting/Security/SHA1PasswordProtection.cs @@ -23,7 +23,7 @@ namespace Server.Accounting.Security { public static IPasswordProtection Instance = new SHA1PasswordProtection(); #pragma warning disable CA5350 - private readonly SHA1CryptoServiceProvider m_SHA1HashProvider = new SHA1CryptoServiceProvider(); + private readonly SHA1CryptoServiceProvider m_SHA1HashProvider = new(); #pragma warning restore CA5350 public string EncryptPassword(string plainPassword) diff --git a/Projects/UOContent/Accounting/Security/SHA2PasswordProtection.cs b/Projects/UOContent/Accounting/Security/SHA2PasswordProtection.cs index aa9fd5d19..0c452e458 100644 --- a/Projects/UOContent/Accounting/Security/SHA2PasswordProtection.cs +++ b/Projects/UOContent/Accounting/Security/SHA2PasswordProtection.cs @@ -22,7 +22,7 @@ namespace Server.Accounting.Security public class SHA2PasswordProtection : IPasswordProtection { public static IPasswordProtection Instance = new SHA2PasswordProtection(); - private readonly SHA512CryptoServiceProvider m_SHA2HashProvider = new SHA512CryptoServiceProvider(); + private readonly SHA512CryptoServiceProvider m_SHA2HashProvider = new(); public string EncryptPassword(string plainPassword) { diff --git a/Projects/UOContent/Commands/Batch.cs b/Projects/UOContent/Commands/Batch.cs index c04584b34..2c5ee8944 100644 --- a/Projects/UOContent/Commands/Batch.cs +++ b/Projects/UOContent/Commands/Batch.cs @@ -19,7 +19,7 @@ namespace Server.Commands public string Condition { get; set; } = ""; - public List BatchCommands { get; } = new List(); + public List BatchCommands { get; } = new(); public override void ExecuteList(CommandEventArgs e, List list) { diff --git a/Projects/UOContent/Commands/Docs.cs b/Projects/UOContent/Commands/Docs.cs index 63371c36b..7075c7f81 100644 --- a/Projects/UOContent/Commands/Docs.cs +++ b/Projects/UOContent/Commands/Docs.cs @@ -520,9 +520,9 @@ namespace Server.Commands } private static StreamWriter GetWriter(string root, string name) => - new StreamWriter(Path.Combine(Path.Combine(m_RootDirectory, root), name)); + new(Path.Combine(Path.Combine(m_RootDirectory, root), name)); - private static StreamWriter GetWriter(string path) => new StreamWriter(Path.Combine(m_RootDirectory, path)); + private static StreamWriter GetWriter(string path) => new(Path.Combine(m_RootDirectory, path)); public static string GetPair(Type varType, string name, bool ignoreRef) { diff --git a/Projects/UOContent/Commands/Generic/Commands/BaseCommand.cs b/Projects/UOContent/Commands/Generic/Commands/BaseCommand.cs index 3729ba606..82160550c 100644 --- a/Projects/UOContent/Commands/Generic/Commands/BaseCommand.cs +++ b/Projects/UOContent/Commands/Generic/Commands/BaseCommand.cs @@ -12,8 +12,8 @@ namespace Server.Commands.Generic public abstract class BaseCommand { - private readonly List m_Failures = new List(); - private readonly List m_Responses = new List(); + private readonly List m_Failures = new(); + private readonly List m_Responses = new(); public bool ListOptimized { get; set; } diff --git a/Projects/UOContent/Commands/Generic/Commands/Commands.cs b/Projects/UOContent/Commands/Generic/Commands/Commands.cs index 5485ffed0..c6464f2c4 100644 --- a/Projects/UOContent/Commands/Generic/Commands/Commands.cs +++ b/Projects/UOContent/Commands/Generic/Commands/Commands.cs @@ -14,7 +14,7 @@ namespace Server.Commands.Generic { public static class TargetCommands { - public static List AllCommands { get; } = new List(); + public static List AllCommands { get; } = new(); public static void Initialize() { diff --git a/Projects/UOContent/Commands/Generic/Extensions/BaseExtension.cs b/Projects/UOContent/Commands/Generic/Extensions/BaseExtension.cs index 5aa2a700b..8709f0d14 100644 --- a/Projects/UOContent/Commands/Generic/Extensions/BaseExtension.cs +++ b/Projects/UOContent/Commands/Generic/Extensions/BaseExtension.cs @@ -18,7 +18,7 @@ namespace Server.Commands.Generic } public static Dictionary Table { get; } = - new Dictionary(StringComparer.InvariantCultureIgnoreCase); + new(StringComparer.InvariantCultureIgnoreCase); public int Order { get; } diff --git a/Projects/UOContent/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs b/Projects/UOContent/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs index 7061dc90f..feafc9b9a 100644 --- a/Projects/UOContent/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs +++ b/Projects/UOContent/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs @@ -22,7 +22,7 @@ namespace Server.Commands.Generic public sealed class TypeCondition : ICondition { - public static TypeCondition Default = new TypeCondition(); + public static TypeCondition Default = new(); void ICondition.Construct(TypeBuilder typeBuilder, ILGenerator il, int index) { diff --git a/Projects/UOContent/Commands/Generic/Extensions/DistinctExtension.cs b/Projects/UOContent/Commands/Generic/Extensions/DistinctExtension.cs index 889ee6d48..2ed85ec1b 100644 --- a/Projects/UOContent/Commands/Generic/Extensions/DistinctExtension.cs +++ b/Projects/UOContent/Commands/Generic/Extensions/DistinctExtension.cs @@ -6,7 +6,7 @@ namespace Server.Commands.Generic public sealed class DistinctExtension : BaseExtension { public static ExtensionInfo ExtInfo = - new ExtensionInfo(30, "Distinct", -1, () => new DistinctExtension()); + new(30, "Distinct", -1, () => new DistinctExtension()); private readonly List m_Properties; diff --git a/Projects/UOContent/Commands/Generic/Extensions/LimitExtension.cs b/Projects/UOContent/Commands/Generic/Extensions/LimitExtension.cs index dfcd341a8..be4382892 100644 --- a/Projects/UOContent/Commands/Generic/Extensions/LimitExtension.cs +++ b/Projects/UOContent/Commands/Generic/Extensions/LimitExtension.cs @@ -5,7 +5,7 @@ namespace Server.Commands.Generic { public sealed class LimitExtension : BaseExtension { - public static ExtensionInfo ExtInfo = new ExtensionInfo(80, "Limit", 1, () => new LimitExtension()); + public static ExtensionInfo ExtInfo = new(80, "Limit", 1, () => new LimitExtension()); public override ExtensionInfo Info => ExtInfo; diff --git a/Projects/UOContent/Commands/Generic/Extensions/SortExtension.cs b/Projects/UOContent/Commands/Generic/Extensions/SortExtension.cs index 99a0c53a2..c1ae5f7c7 100644 --- a/Projects/UOContent/Commands/Generic/Extensions/SortExtension.cs +++ b/Projects/UOContent/Commands/Generic/Extensions/SortExtension.cs @@ -5,7 +5,7 @@ namespace Server.Commands.Generic { public sealed class SortExtension : BaseExtension { - public static ExtensionInfo ExtInfo = new ExtensionInfo(40, "Order", -1, () => new SortExtension()); + public static ExtensionInfo ExtInfo = new(40, "Order", -1, () => new SortExtension()); private readonly List m_Orders; diff --git a/Projects/UOContent/Commands/Generic/Extensions/WhereExtension.cs b/Projects/UOContent/Commands/Generic/Extensions/WhereExtension.cs index dc06ccb3b..47d8cd9a2 100644 --- a/Projects/UOContent/Commands/Generic/Extensions/WhereExtension.cs +++ b/Projects/UOContent/Commands/Generic/Extensions/WhereExtension.cs @@ -4,7 +4,7 @@ namespace Server.Commands.Generic { public sealed class WhereExtension : BaseExtension { - public static ExtensionInfo ExtInfo = new ExtensionInfo(20, "Where", -1, () => new WhereExtension()); + public static ExtensionInfo ExtInfo = new(20, "Where", -1, () => new WhereExtension()); public override ExtensionInfo Info => ExtInfo; diff --git a/Projects/UOContent/Commands/Generic/Implementors/ObjectConditional.cs b/Projects/UOContent/Commands/Generic/Implementors/ObjectConditional.cs index e2838eb21..16411710d 100644 --- a/Projects/UOContent/Commands/Generic/Implementors/ObjectConditional.cs +++ b/Projects/UOContent/Commands/Generic/Implementors/ObjectConditional.cs @@ -8,7 +8,7 @@ namespace Server.Commands.Generic private static readonly Type typeofItem = typeof(Item); private static readonly Type typeofMobile = typeof(Mobile); - public static readonly ObjectConditional Empty = new ObjectConditional(null, null); + public static readonly ObjectConditional Empty = new(null, null); private readonly ICondition[][] m_Conditions; diff --git a/Projects/UOContent/Commands/HelpInfo.cs b/Projects/UOContent/Commands/HelpInfo.cs index 6b07df89a..5f5525719 100644 --- a/Projects/UOContent/Commands/HelpInfo.cs +++ b/Projects/UOContent/Commands/HelpInfo.cs @@ -11,9 +11,9 @@ namespace Server.Commands { public static class HelpInfo { - public static Dictionary HelpInfos { get; } = new Dictionary(); + public static Dictionary HelpInfos { get; } = new(); - public static List SortedHelpInfo { get; private set; } = new List(); + public static List SortedHelpInfo { get; private set; } = new(); [CallPriority(100)] public static void Initialize() diff --git a/Projects/UOContent/Commands/LocationCommand.cs b/Projects/UOContent/Commands/LocationCommand.cs index 8ce554f81..271dbd233 100644 --- a/Projects/UOContent/Commands/LocationCommand.cs +++ b/Projects/UOContent/Commands/LocationCommand.cs @@ -7,7 +7,7 @@ namespace Server.Commands { public class LocationCommand : BaseCommand { - private static readonly List m_DefaultGraphics = new List { 0x17AF, 0x17B0, 0x17B1, 0x17B2 }; + private static readonly List m_DefaultGraphics = new() { 0x17AF, 0x17B0, 0x17B1, 0x17B2 }; public LocationCommand() { diff --git a/Projects/UOContent/Commands/Object Creation/Decorate.cs b/Projects/UOContent/Commands/Object Creation/Decorate.cs index 3a28cc3f1..c035849fa 100644 --- a/Projects/UOContent/Commands/Object Creation/Decorate.cs +++ b/Projects/UOContent/Commands/Object Creation/Decorate.cs @@ -74,7 +74,7 @@ namespace Server.Commands private static readonly Type typeofCannon = typeof(Cannon); private static readonly Type typeofSerpentPillar = typeof(SerpentPillar); - private static readonly Queue m_DeleteQueue = new Queue(); + private static readonly Queue m_DeleteQueue = new(); private static readonly string[] m_EmptyParams = Array.Empty(); private List m_Entries; diff --git a/Projects/UOContent/Commands/Object Creation/DecorateMag.cs b/Projects/UOContent/Commands/Object Creation/DecorateMag.cs index d0d983c05..67220c553 100644 --- a/Projects/UOContent/Commands/Object Creation/DecorateMag.cs +++ b/Projects/UOContent/Commands/Object Creation/DecorateMag.cs @@ -71,7 +71,7 @@ namespace Server.Commands private static readonly Type typeofCannon = typeof(Cannon); private static readonly Type typeofSerpentPillar = typeof(SerpentPillar); - private static readonly Queue m_DeleteQueue = new Queue(); + private static readonly Queue m_DeleteQueue = new(); private static readonly string[] m_EmptyParams = Array.Empty(); private List m_Entries; diff --git a/Projects/UOContent/Commands/SignParser.cs b/Projects/UOContent/Commands/SignParser.cs index a02011d8f..0cf0f417a 100644 --- a/Projects/UOContent/Commands/SignParser.cs +++ b/Projects/UOContent/Commands/SignParser.cs @@ -7,7 +7,7 @@ namespace Server.Commands { public static class SignParser { - private static readonly Queue m_ToDelete = new Queue(); + private static readonly Queue m_ToDelete = new(); public static void Initialize() { diff --git a/Projects/UOContent/Commands/Statics.cs b/Projects/UOContent/Commands/Statics.cs index 784a280b6..12ff060f5 100644 --- a/Projects/UOContent/Commands/Statics.cs +++ b/Projects/UOContent/Commands/Statics.cs @@ -30,7 +30,7 @@ namespace Server "It is strongly recommended that you make backup of the data files mentioned above. " + "Do you wish to proceed?"; - private static readonly Point3D NullP3D = new Point3D(int.MinValue, int.MinValue, int.MinValue); + private static readonly Point3D NullP3D = new(int.MinValue, int.MinValue, int.MinValue); private static byte[] m_Buffer; diff --git a/Projects/UOContent/Engines/BulkOrders/Rewards.cs b/Projects/UOContent/Engines/BulkOrders/Rewards.cs index 9a367868b..4aaae3152 100644 --- a/Projects/UOContent/Engines/BulkOrders/Rewards.cs +++ b/Projects/UOContent/Engines/BulkOrders/Rewards.cs @@ -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 = { diff --git a/Projects/UOContent/Engines/CannedEvil/ChampionSpawnType.cs b/Projects/UOContent/Engines/CannedEvil/ChampionSpawnType.cs index c4ffee7c4..c6d999dc0 100644 --- a/Projects/UOContent/Engines/CannedEvil/ChampionSpawnType.cs +++ b/Projects/UOContent/Engines/CannedEvil/ChampionSpawnType.cs @@ -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" }, diff --git a/Projects/UOContent/Engines/Chat/Channel.cs b/Projects/UOContent/Engines/Chat/Channel.cs index 7bf8c5c5d..190415f2d 100644 --- a/Projects/UOContent/Engines/Chat/Channel.cs +++ b/Projects/UOContent/Engines/Chat/Channel.cs @@ -64,7 +64,7 @@ namespace Server.Engines.Chat public bool AlwaysAvailable { get; set; } - public static List Channels { get; } = new List(); + public static List Channels { get; } = new(); public bool Contains(ChatUser user) => m_Users.Contains(user); diff --git a/Projects/UOContent/Engines/Chat/ChatUser.cs b/Projects/UOContent/Engines/Chat/ChatUser.cs index 3d539b079..28742aeb1 100644 --- a/Projects/UOContent/Engines/Chat/ChatUser.cs +++ b/Projects/UOContent/Engines/Chat/ChatUser.cs @@ -8,8 +8,8 @@ namespace Server.Engines.Chat public const char ModeratorColorCharacter = '1'; public const char VoicedColorCharacter = '2'; - private static readonly List m_Users = new List(); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly List m_Users = new(); + private static readonly Dictionary m_Table = new(); public ChatUser(Mobile m, string username) { diff --git a/Projects/UOContent/Engines/ConPVP/AcceptDuelGump.cs b/Projects/UOContent/Engines/ConPVP/AcceptDuelGump.cs index 0429491b1..942f5e575 100644 --- a/Projects/UOContent/Engines/ConPVP/AcceptDuelGump.cs +++ b/Projects/UOContent/Engines/ConPVP/AcceptDuelGump.cs @@ -12,7 +12,7 @@ namespace Server.Engines.ConPVP private const int BlackColor32 = 0x000008; private static readonly Dictionary> m_IgnoreLists = - new Dictionary>(); + new(); private readonly Mobile m_Challenged; private readonly Mobile m_Challenger; diff --git a/Projects/UOContent/Engines/ConPVP/Arena.cs b/Projects/UOContent/Engines/ConPVP/Arena.cs index 2c3d32154..0f9865bfc 100644 --- a/Projects/UOContent/Engines/ConPVP/Arena.cs +++ b/Projects/UOContent/Engines/ConPVP/Arena.cs @@ -31,7 +31,7 @@ namespace Server.Engines.ConPVP public override string DefaultName => "arena controller"; - public static List Instances { get; set; } = new List(); + public static List 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 Arenas { get; } = new List(); + public static List Arenas { get; } = new(); public int CompareTo(Arena c) => string.CompareOrdinal(m_Name, c?.m_Name); diff --git a/Projects/UOContent/Engines/ConPVP/DuelContext.cs b/Projects/UOContent/Engines/ConPVP/DuelContext.cs index 11abf248e..abdbbbc26 100644 --- a/Projects/UOContent/Engines/ConPVP/DuelContext.cs +++ b/Projects/UOContent/Engines/ConPVP/DuelContext.cs @@ -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 m_Walls = new List(); + private readonly List m_Walls = new(); private Timer m_AutoTieTimer; diff --git a/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs b/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs index b1160b4eb..92324ad9f 100644 --- a/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs +++ b/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs @@ -16,7 +16,7 @@ namespace Server.Engines.ConPVP private readonly List 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++) diff --git a/Projects/UOContent/Engines/ConPVP/Ladder.cs b/Projects/UOContent/Engines/ConPVP/Ladder.cs index 529795d14..7cc4cca2f 100644 --- a/Projects/UOContent/Engines/ConPVP/Ladder.cs +++ b/Projects/UOContent/Engines/ConPVP/Ladder.cs @@ -164,7 +164,7 @@ namespace Server.Engines.ConPVP } } - public List Entries { get; } = new List(); + public List Entries { get; } = new(); public static Ladder Instance { get; set; } diff --git a/Projects/UOContent/Engines/ConPVP/Ruleset.cs b/Projects/UOContent/Engines/ConPVP/Ruleset.cs index e5d61011c..fb4a1ec8b 100644 --- a/Projects/UOContent/Engines/ConPVP/Ruleset.cs +++ b/Projects/UOContent/Engines/ConPVP/Ruleset.cs @@ -19,7 +19,7 @@ namespace Server.Engines.ConPVP public Ruleset Base { get; private set; } - public List Flavors { get; } = new List(); + public List Flavors { get; } = new(); public bool Changed { get; set; } diff --git a/Projects/UOContent/Engines/ConPVP/RulesetLayout.cs b/Projects/UOContent/Engines/ConPVP/RulesetLayout.cs index 600c5cfed..4582b6f77 100644 --- a/Projects/UOContent/Engines/ConPVP/RulesetLayout.cs +++ b/Projects/UOContent/Engines/ConPVP/RulesetLayout.cs @@ -66,7 +66,7 @@ namespace Server.Engines.ConPVP var entries = new List { - new RulesetLayout( + new( "Spells", new[] { diff --git a/Projects/UOContent/Engines/ConPVP/TournamentController.cs b/Projects/UOContent/Engines/ConPVP/TournamentController.cs index 66a7cb274..3555a75b5 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentController.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentController.cs @@ -7,7 +7,7 @@ namespace Server.Engines.ConPVP { public class TournamentController : Item { - private static readonly List m_Instances = new List(); + private static readonly List m_Instances = new(); [Constructible] public TournamentController() : base(0x1B7A) diff --git a/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs b/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs index fc43596b7..8c73047d4 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs @@ -209,7 +209,7 @@ namespace Server.Engines.ConPVP public class PyramidLevel { - public List Matches { get; set; } = new List(); + public List Matches { get; set; } = new(); public TourneyParticipant FreeAdvance { get; set; } } } diff --git a/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs b/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs index 5f9cf9b9f..480ba2a12 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs @@ -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; diff --git a/Projects/UOContent/Engines/Craft/Core/CraftItem.cs b/Projects/UOContent/Engines/Craft/Core/CraftItem.cs index cdd337738..3c586790b 100644 --- a/Projects/UOContent/Engines/Craft/Core/CraftItem.cs +++ b/Projects/UOContent/Engines/Craft/Core/CraftItem.cs @@ -26,7 +26,7 @@ namespace Server.Engines.Craft public class CraftItem { - private static readonly Dictionary _itemIds = new Dictionary(); + private static readonly Dictionary _itemIds = new(); private static readonly int[] m_HeatSources = { diff --git a/Projects/UOContent/Engines/Craft/Core/CraftSystem.cs b/Projects/UOContent/Engines/Craft/Core/CraftSystem.cs index c3e2c1e05..4b00e03e3 100644 --- a/Projects/UOContent/Engines/Craft/Core/CraftSystem.cs +++ b/Projects/UOContent/Engines/Craft/Core/CraftSystem.cs @@ -13,7 +13,7 @@ namespace Server.Engines.Craft public abstract class CraftSystem { - private readonly Dictionary m_ContextTable = new Dictionary(); + private readonly Dictionary m_ContextTable = new(); private readonly List m_RareRecipes; private readonly List m_Recipes; diff --git a/Projects/UOContent/Engines/Craft/Core/Recipes.cs b/Projects/UOContent/Engines/Craft/Core/Recipes.cs index 869561fec..1f5b491a7 100644 --- a/Projects/UOContent/Engines/Craft/Core/Recipes.cs +++ b/Projects/UOContent/Engines/Craft/Core/Recipes.cs @@ -24,7 +24,7 @@ namespace Server.Engines.Craft LargestRecipeID = Math.Max(id, LargestRecipeID); } - public static Dictionary Recipes { get; } = new Dictionary(); + public static Dictionary Recipes { get; } = new(); public static int LargestRecipeID { get; private set; } diff --git a/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs b/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs index 6f6de1a20..21a2ee0da 100644 --- a/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs +++ b/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs @@ -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) { diff --git a/Projects/UOContent/Engines/Events/EventScheduler.cs b/Projects/UOContent/Engines/Events/EventScheduler.cs index 3a5d13fb5..01b7889ce 100644 --- a/Projects/UOContent/Engines/Events/EventScheduler.cs +++ b/Projects/UOContent/Engines/Events/EventScheduler.cs @@ -37,14 +37,14 @@ namespace Server.Engines.Events public class EventScheduler : Timer { private static EventScheduler _instance; - private readonly List _schedule = new List(); + private readonly List _schedule = new(); private EventScheduler() : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0)) { } public static EventScheduler Instance => _instance ??= new EventScheduler(); - public static List AvailableEvents { get; } = new List(); + public static List AvailableEvents { get; } = new(); public static void Initialize() { diff --git a/Projects/UOContent/Engines/Factions/Core/Faction.cs b/Projects/UOContent/Engines/Factions/Core/Faction.cs index cd942038b..05009ec15 100644 --- a/Projects/UOContent/Engines/Factions/Core/Faction.cs +++ b/Projects/UOContent/Engines/Factions/Core/Faction.cs @@ -27,7 +27,7 @@ namespace Server.Factions public static readonly TimeSpan SkillLossPeriod = TimeSpan.FromMinutes(20.0); private static readonly Dictionary - m_SkillLoss = new Dictionary(); + 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; diff --git a/Projects/UOContent/Engines/Factions/Core/MerchantTitles.cs b/Projects/UOContent/Engines/Factions/Core/MerchantTitles.cs index cb4b5486e..d2e384837 100644 --- a/Projects/UOContent/Engines/Factions/Core/MerchantTitles.cs +++ b/Projects/UOContent/Engines/Factions/Core/MerchantTitles.cs @@ -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"), diff --git a/Projects/UOContent/Engines/Factions/Definitions/FactionItemDefinition.cs b/Projects/UOContent/Engines/Factions/Definitions/FactionItemDefinition.cs index ba3399008..14cee20b0 100644 --- a/Projects/UOContent/Engines/Factions/Definitions/FactionItemDefinition.cs +++ b/Projects/UOContent/Engines/Factions/Definitions/FactionItemDefinition.cs @@ -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) { diff --git a/Projects/UOContent/Engines/Factions/Definitions/VendorDefinition.cs b/Projects/UOContent/Engines/Factions/Definitions/VendorDefinition.cs index 9426dc8ac..c08131371 100644 --- a/Projects/UOContent/Engines/Factions/Definitions/VendorDefinition.cs +++ b/Projects/UOContent/Engines/Factions/Definitions/VendorDefinition.cs @@ -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, diff --git a/Projects/UOContent/Engines/Factions/Items/BaseMonolith.cs b/Projects/UOContent/Engines/Factions/Items/BaseMonolith.cs index b239d769b..594864fba 100644 --- a/Projects/UOContent/Engines/Factions/Items/BaseMonolith.cs +++ b/Projects/UOContent/Engines/Factions/Items/BaseMonolith.cs @@ -70,7 +70,7 @@ namespace Server.Factions } } - public static List Monoliths { get; set; } = new List(); + public static List Monoliths { get; set; } = new(); public override void OnLocationChange(Point3D oldLocation) { diff --git a/Projects/UOContent/Engines/Factions/Items/BaseSystemController.cs b/Projects/UOContent/Engines/Factions/Items/BaseSystemController.cs index e7bba10a3..64c184485 100644 --- a/Projects/UOContent/Engines/Factions/Items/BaseSystemController.cs +++ b/Projects/UOContent/Engines/Factions/Items/BaseSystemController.cs @@ -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; diff --git a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs index 2a25143f8..a5e0800a0 100644 --- a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs +++ b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs @@ -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) diff --git a/Projects/UOContent/Engines/Factions/Items/Sigil.cs b/Projects/UOContent/Engines/Factions/Items/Sigil.cs index c8974eb62..541c096a9 100644 --- a/Projects/UOContent/Engines/Factions/Items/Sigil.cs +++ b/Projects/UOContent/Engines/Factions/Items/Sigil.cs @@ -121,7 +121,7 @@ namespace Server.Factions } } - public static List Sigils { get; } = new List(); + public static List Sigils { get; } = new(); public void Update() { diff --git a/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs b/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs index 42188bcff..d0faec3f1 100644 --- a/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs +++ b/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs @@ -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); } diff --git a/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs b/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs index 60b702ee8..9826345ef 100644 --- a/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs +++ b/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs @@ -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)), diff --git a/Projects/UOContent/Engines/Harvest/Core/HarvestDefinition.cs b/Projects/UOContent/Engines/Harvest/Core/HarvestDefinition.cs index 30c3948b4..fb1902503 100644 --- a/Projects/UOContent/Engines/Harvest/Core/HarvestDefinition.cs +++ b/Projects/UOContent/Engines/Harvest/Core/HarvestDefinition.cs @@ -79,7 +79,7 @@ namespace Server.Engines.Harvest public uint VeinWeights { get; private set; } public Dictionary> Banks { get; } - = new Dictionary>(); + = new(); public void SendMessageTo(Mobile from, TextDefinition message) { diff --git a/Projects/UOContent/Engines/Harvest/Fishing.cs b/Projects/UOContent/Engines/Harvest/Fishing.cs index 6620f4436..bb52f2a9f 100644 --- a/Projects/UOContent/Engines/Harvest/Fishing.cs +++ b/Projects/UOContent/Engines/Harvest/Fishing.cs @@ -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; diff --git a/Projects/UOContent/Engines/Harvest/Mining.cs b/Projects/UOContent/Engines/Harvest/Mining.cs index 2ee254f18..f14d63bef 100644 --- a/Projects/UOContent/Engines/Harvest/Mining.cs +++ b/Projects/UOContent/Engines/Harvest/Mining.cs @@ -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; diff --git a/Projects/UOContent/Engines/Help/PageQueue.cs b/Projects/UOContent/Engines/Help/PageQueue.cs index ae531ea4c..de72530a2 100644 --- a/Projects/UOContent/Engines/Help/PageQueue.cs +++ b/Projects/UOContent/Engines/Help/PageQueue.cs @@ -116,10 +116,10 @@ namespace Server.Engines.Help public static class PageQueue { - private static readonly Dictionary m_KeyedByHandler = new Dictionary(); - private static readonly Dictionary m_KeyedBySender = new Dictionary(); + private static readonly Dictionary m_KeyedByHandler = new(); + private static readonly Dictionary m_KeyedBySender = new(); - public static List List { get; } = new List(); + public static List List { get; } = new(); public static void Initialize() { diff --git a/Projects/UOContent/Engines/Help/StuckMenu.cs b/Projects/UOContent/Engines/Help/StuckMenu.cs index ed9f671fd..9a95f1fc7 100644 --- a/Projects/UOContent/Engines/Help/StuckMenu.cs +++ b/Projects/UOContent/Engines/Help/StuckMenu.cs @@ -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[] { diff --git a/Projects/UOContent/Engines/Khaldun/Books/GrimmochJournal.cs b/Projects/UOContent/Engines/Khaldun/Books/GrimmochJournal.cs index 76c1fd0cf..3ce08eeb2 100644 --- a/Projects/UOContent/Engines/Khaldun/Books/GrimmochJournal.cs +++ b/Projects/UOContent/Engines/Khaldun/Books/GrimmochJournal.cs @@ -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( diff --git a/Projects/UOContent/Engines/Khaldun/Books/LysanderNotebook.cs b/Projects/UOContent/Engines/Khaldun/Books/LysanderNotebook.cs index ca2daa001..1a51a9461 100644 --- a/Projects/UOContent/Engines/Khaldun/Books/LysanderNotebook.cs +++ b/Projects/UOContent/Engines/Khaldun/Books/LysanderNotebook.cs @@ -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( diff --git a/Projects/UOContent/Engines/Khaldun/Books/TavarasJournal.cs b/Projects/UOContent/Engines/Khaldun/Books/TavarasJournal.cs index d59d182c8..cc69a2df4 100644 --- a/Projects/UOContent/Engines/Khaldun/Books/TavarasJournal.cs +++ b/Projects/UOContent/Engines/Khaldun/Books/TavarasJournal.cs @@ -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( diff --git a/Projects/UOContent/Engines/Khaldun/PuzzleChest.cs b/Projects/UOContent/Engines/Khaldun/PuzzleChest.cs index cf1828691..972ea9a09 100644 --- a/Projects/UOContent/Engines/Khaldun/PuzzleChest.cs +++ b/Projects/UOContent/Engines/Khaldun/PuzzleChest.cs @@ -203,7 +203,7 @@ namespace Server.Items public readonly TimeSpan CleanupTime = TimeSpan.FromHours(1.0); private readonly Dictionary m_Guesses = - new Dictionary(); + new(); private PuzzleChestSolution m_Solution; diff --git a/Projects/UOContent/Engines/MLQuests/Items/BedlamTeleporter.cs b/Projects/UOContent/Engines/MLQuests/Items/BedlamTeleporter.cs index 27ede2185..2f436baad 100644 --- a/Projects/UOContent/Engines/MLQuests/Items/BedlamTeleporter.cs +++ b/Projects/UOContent/Engines/MLQuests/Items/BedlamTeleporter.cs @@ -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() diff --git a/Projects/UOContent/Engines/MLQuests/MLQuest.cs b/Projects/UOContent/Engines/MLQuests/MLQuest.cs index 259c164c7..91d9e60a5 100644 --- a/Projects/UOContent/Engines/MLQuests/MLQuest.cs +++ b/Projects/UOContent/Engines/MLQuests/MLQuest.cs @@ -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); diff --git a/Projects/UOContent/Engines/MLQuests/MLQuestEntry.cs b/Projects/UOContent/Engines/MLQuests/MLQuestEntry.cs index f4adcb5fb..fef958cf8 100644 --- a/Projects/UOContent/Engines/MLQuests/MLQuestEntry.cs +++ b/Projects/UOContent/Engines/MLQuests/MLQuestEntry.cs @@ -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 ); } diff --git a/Projects/UOContent/Engines/MLQuests/MLQuestSystem.cs b/Projects/UOContent/Engines/MLQuests/MLQuestSystem.cs index 828a2a2b1..1c339d910 100644 --- a/Projects/UOContent/Engines/MLQuests/MLQuestSystem.cs +++ b/Projects/UOContent/Engines/MLQuests/MLQuestSystem.cs @@ -21,8 +21,8 @@ namespace Server.Engines.MLQuests public static readonly bool AutoGenerateNew = true; public static readonly bool Debug = false; - public static readonly List EmptyList = new List(); - private static readonly List m_EligiblePool = new List(); + public static readonly List EmptyList = new(); + private static readonly List m_EligiblePool = new(); static MLQuestSystem() { diff --git a/Projects/UOContent/Engines/MLQuests/QuesterNameAttribute.cs b/Projects/UOContent/Engines/MLQuests/QuesterNameAttribute.cs index c46d2f953..a8c09345a 100644 --- a/Projects/UOContent/Engines/MLQuests/QuesterNameAttribute.cs +++ b/Projects/UOContent/Engines/MLQuests/QuesterNameAttribute.cs @@ -7,7 +7,7 @@ namespace Server.Engines.MLQuests public class QuesterNameAttribute : Attribute { private static readonly Type m_Type = typeof(QuesterNameAttribute); - private static readonly Dictionary m_Cache = new Dictionary(); + private static readonly Dictionary m_Cache = new(); public QuesterNameAttribute(string questerName) => QuesterName = questerName; diff --git a/Projects/UOContent/Engines/MLQuests/Rewards/ItemReward.cs b/Projects/UOContent/Engines/MLQuests/Rewards/ItemReward.cs index e7c2e84c6..49cbbcef1 100644 --- a/Projects/UOContent/Engines/MLQuests/Rewards/ItemReward.cs +++ b/Projects/UOContent/Engines/MLQuests/Rewards/ItemReward.cs @@ -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; diff --git a/Projects/UOContent/Engines/Party/DeclineTimer.cs b/Projects/UOContent/Engines/Party/DeclineTimer.cs index 824950423..8f6fdb5c1 100644 --- a/Projects/UOContent/Engines/Party/DeclineTimer.cs +++ b/Projects/UOContent/Engines/Party/DeclineTimer.cs @@ -5,7 +5,7 @@ namespace Server.Engines.PartySystem { public class DeclineTimer : Timer { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); private readonly Mobile m_Leader; private readonly Mobile m_Mobile; diff --git a/Projects/UOContent/Engines/Pathing/FastAStarAlgorithm.cs b/Projects/UOContent/Engines/Pathing/FastAStarAlgorithm.cs index 7dcb6cdd8..cad99c5f7 100644 --- a/Projects/UOContent/Engines/Pathing/FastAStarAlgorithm.cs +++ b/Projects/UOContent/Engines/Pathing/FastAStarAlgorithm.cs @@ -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; diff --git a/Projects/UOContent/Engines/Pathing/FastMovement.cs b/Projects/UOContent/Engines/Pathing/FastMovement.cs index 3f8a32594..4f2ad387c 100644 --- a/Projects/UOContent/Engines/Pathing/FastMovement.cs +++ b/Projects/UOContent/Engines/Pathing/FastMovement.cs @@ -635,8 +635,8 @@ namespace Server.Movement private static class MovementPool { - private static readonly object _MovePoolLock = new object(); - private static readonly Queue> _MoveCachePool = new Queue>(0x400); + private static readonly object _MovePoolLock = new(); + private static readonly Queue> _MoveCachePool = new(0x400); public static void AcquireMoveCache(ref List cache, IEnumerable items) { diff --git a/Projects/UOContent/Engines/Pathing/Movement.cs b/Projects/UOContent/Engines/Pathing/Movement.cs index 5e43c9330..c3c8ca0cb 100644 --- a/Projects/UOContent/Engines/Pathing/Movement.cs +++ b/Projects/UOContent/Engines/Pathing/Movement.cs @@ -14,11 +14,11 @@ namespace Server.Movement private static Point3D m_Goal; - private readonly List[] m_MobPools = { new List(), new List(), new List() }; + private readonly List[] m_MobPools = { new(), new(), new() }; - private readonly List[] m_Pools = { new List(), new List(), new List(), new List() }; + private readonly List[] m_Pools = { new(), new(), new(), new() }; - private readonly List m_Sectors = new List(); + private readonly List m_Sectors = new(); private MovementImpl() { diff --git a/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs b/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs index 02a8243ee..cef40714d 100644 --- a/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs +++ b/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs @@ -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) { diff --git a/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs b/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs index 4e994a274..1e33465da 100644 --- a/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs +++ b/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs @@ -7,7 +7,7 @@ namespace Server.Items public class OrangePetals : Item { private static readonly Dictionary m_Table = - new Dictionary(); + new(); [Constructible] public OrangePetals(int amount = 1) : base(0x1021) diff --git a/Projects/UOContent/Engines/Plants/PlantHue.cs b/Projects/UOContent/Engines/Plants/PlantHue.cs index 6493d0db0..b3c3fb03d 100644 --- a/Projects/UOContent/Engines/Plants/PlantHue.cs +++ b/Projects/UOContent/Engines/Plants/PlantHue.cs @@ -44,25 +44,25 @@ namespace Server.Engines.Plants static PlantHueInfo() => m_Table = new Dictionary { - [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) diff --git a/Projects/UOContent/Engines/Plants/PlantItem.cs b/Projects/UOContent/Engines/Plants/PlantItem.cs index b3c4bedae..3615be705 100644 --- a/Projects/UOContent/Engines/Plants/PlantItem.cs +++ b/Projects/UOContent/Engines/Plants/PlantItem.cs @@ -169,7 +169,7 @@ namespace Server.Engines.Plants [CommandProperty(AccessLevel.GameMaster)] public bool Reproduces => PlantHueInfo.CanReproduce(PlantHue) && PlantTypeInfo.CanReproduce(PlantType); - public static List Plants { get; } = new List(); + public static List Plants { get; } = new(); [CommandProperty(AccessLevel.GameMaster)] public SecureLevel Level { get; set; } diff --git a/Projects/UOContent/Engines/Plants/PlantResources.cs b/Projects/UOContent/Engines/Plants/PlantResources.cs index 1bbff005c..9811d38e5 100644 --- a/Projects/UOContent/Engines/Plants/PlantResources.cs +++ b/Projects/UOContent/Engines/Plants/PlantResources.cs @@ -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) diff --git a/Projects/UOContent/Engines/Plants/PlantType.cs b/Projects/UOContent/Engines/Plants/PlantType.cs index 58dbdf144..a6c2b980e 100644 --- a/Projects/UOContent/Engines/Plants/PlantType.cs +++ b/Projects/UOContent/Engines/Plants/PlantType.cs @@ -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, diff --git a/Projects/UOContent/Engines/Plants/Seed.cs b/Projects/UOContent/Engines/Plants/Seed.cs index 5b855d09f..98727af42 100644 --- a/Projects/UOContent/Engines/Plants/Seed.cs +++ b/Projects/UOContent/Engines/Plants/Seed.cs @@ -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 ); diff --git a/Projects/UOContent/Engines/Quests/Collector/Items/ImageTypeInfo.cs b/Projects/UOContent/Engines/Quests/Collector/Items/ImageTypeInfo.cs index 18ce3dd36..4ad0d7000 100644 --- a/Projects/UOContent/Engines/Quests/Collector/Items/ImageTypeInfo.cs +++ b/Projects/UOContent/Engines/Quests/Collector/Items/ImageTypeInfo.cs @@ -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) diff --git a/Projects/UOContent/Engines/Quests/Collector/Objectives.cs b/Projects/UOContent/Engines/Quests/Collector/Objectives.cs index 30b744a08..53a98726e 100644 --- a/Projects/UOContent/Engines/Quests/Collector/Objectives.cs +++ b/Projects/UOContent/Engines/Quests/Collector/Objectives.cs @@ -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; diff --git a/Projects/UOContent/Engines/Quests/Core/Items/EnchantedSextant.cs b/Projects/UOContent/Engines/Quests/Core/Items/EnchantedSextant.cs index 139b18fcf..b671b2960 100644 --- a/Projects/UOContent/Engines/Quests/Core/Items/EnchantedSextant.cs +++ b/Projects/UOContent/Engines/Quests/Core/Items/EnchantedSextant.cs @@ -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] diff --git a/Projects/UOContent/Engines/Quests/Dark Tides/Conversations.cs b/Projects/UOContent/Engines/Quests/Dark Tides/Conversations.cs index f43f822c4..b6437837b 100644 --- a/Projects/UOContent/Engines/Quests/Dark Tides/Conversations.cs +++ b/Projects/UOContent/Engines/Quests/Dark Tides/Conversations.cs @@ -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; diff --git a/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs b/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs index 19c70a3e0..804ee8976 100644 --- a/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs +++ b/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs @@ -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] diff --git a/Projects/UOContent/Engines/Quests/Dark Tides/Objectives.cs b/Projects/UOContent/Engines/Quests/Dark Tides/Objectives.cs index ec3366746..7719b2d7f 100644 --- a/Projects/UOContent/Engines/Quests/Dark Tides/Objectives.cs +++ b/Projects/UOContent/Engines/Quests/Dark Tides/Objectives.cs @@ -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; diff --git a/Projects/UOContent/Engines/Quests/Study of the Solen Hive/NestArea.cs b/Projects/UOContent/Engines/Quests/Study of the Solen Hive/NestArea.cs index a03b6884e..0064e38ee 100644 --- a/Projects/UOContent/Engines/Quests/Study of the Solen Hive/NestArea.cs +++ b/Projects/UOContent/Engines/Quests/Study of the Solen Hive/NestArea.cs @@ -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) diff --git a/Projects/UOContent/Engines/Quests/Study of the Solen Hive/Objectives.cs b/Projects/UOContent/Engines/Quests/Study of the Solen Hive/Objectives.cs index 125f00d8a..8af09f20b 100644 --- a/Projects/UOContent/Engines/Quests/Study of the Solen Hive/Objectives.cs +++ b/Projects/UOContent/Engines/Quests/Study of the Solen Hive/Objectives.cs @@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Naturalist { public class StudyNestsObjective : QuestObjective { - private readonly List m_StudiedNests = new List(); + private readonly List m_StudiedNests = new(); private NestArea m_CurrentNest; private DateTime m_StudyBegin; private StudyState m_StudyState; diff --git a/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Conversations.cs b/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Conversations.cs index 2a0424a46..7cbeb257b 100644 --- a/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Conversations.cs +++ b/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Conversations.cs @@ -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 diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/Ingredient.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/Ingredient.cs index 5ef2e7d5a..1c859ec15 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/Ingredient.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/Ingredient.cs @@ -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) diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagApprenticeCorpse.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagApprenticeCorpse.cs index 9603bab33..dfaa2e6ad 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagApprenticeCorpse.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagApprenticeCorpse.cs @@ -37,7 +37,7 @@ namespace Server.Engines.Quests.Hag return apprentice; } - private static List GetEquipment() => new List(); + private static List GetEquipment() => new(); public override void AddNameProperty(ObjectPropertyList list) { diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs index 2379cc57b..62690d110 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs @@ -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; diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs index 4077c9860..90ea3726a 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs @@ -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) diff --git a/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs b/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs index 6bef45883..916bab5f1 100644 --- a/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs +++ b/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs @@ -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); } diff --git a/Projects/UOContent/Engines/VeteranRewards/RewardOptionGump.cs b/Projects/UOContent/Engines/VeteranRewards/RewardOptionGump.cs index 97716d86f..8b4272d58 100644 --- a/Projects/UOContent/Engines/VeteranRewards/RewardOptionGump.cs +++ b/Projects/UOContent/Engines/VeteranRewards/RewardOptionGump.cs @@ -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) { diff --git a/Projects/UOContent/Engines/Virtues/VirtueGump.cs b/Projects/UOContent/Engines/Virtues/VirtueGump.cs index be4ed8bd5..acc50f6f8 100644 --- a/Projects/UOContent/Engines/Virtues/VirtueGump.cs +++ b/Projects/UOContent/Engines/Virtues/VirtueGump.cs @@ -8,7 +8,7 @@ namespace Server public class VirtueGump : Gump { - private static readonly Dictionary m_Callbacks = new Dictionary(); + private static readonly Dictionary m_Callbacks = new(); private static readonly int[] m_Table = { diff --git a/Projects/UOContent/Gumps/AddDoorGump.cs b/Projects/UOContent/Gumps/AddDoorGump.cs index 3ea6d7053..c10879225 100644 --- a/Projects/UOContent/Gumps/AddDoorGump.cs +++ b/Projects/UOContent/Gumps/AddDoorGump.cs @@ -8,11 +8,11 @@ namespace Server.Gumps { public static DoorInfo[] m_Types = { - new DoorInfo(typeof(MetalDoor), 0x675), - new DoorInfo(typeof(RattanDoor), 0x695), - new DoorInfo(typeof(DarkWoodDoor), 0x6A5), - new DoorInfo(typeof(LightWoodDoor), 0x6D5), - new DoorInfo(typeof(StrongWoodDoor), 0x6E5) + new(typeof(MetalDoor), 0x675), + new(typeof(RattanDoor), 0x695), + new(typeof(DarkWoodDoor), 0x6A5), + new(typeof(LightWoodDoor), 0x6D5), + new(typeof(StrongWoodDoor), 0x6E5) }; private readonly int m_Type; diff --git a/Projects/UOContent/Gumps/AdminGump.cs b/Projects/UOContent/Gumps/AdminGump.cs index 997a40d4f..afc6aed45 100644 --- a/Projects/UOContent/Gumps/AdminGump.cs +++ b/Projects/UOContent/Gumps/AdminGump.cs @@ -3681,7 +3681,7 @@ namespace Server.Gumps { index -= 4; - if (m_List != null && index < m_List.Count) + if (index < m_List?.Count) { from.SendGump( new AdminGump(from, AdminGumpPage.FirewallInfo, 0, null, null, m_List[index]) @@ -3889,7 +3889,7 @@ namespace Server.Gumps } case 8: { - if (m_List != null && index < m_List.Count) + if (index < m_List?.Count) { if (!(m_State is Account a)) { @@ -3933,7 +3933,7 @@ namespace Server.Gumps } case 9: { - if (m_List != null && index < m_List.Count) + if (index < m_List?.Count) { if (m_PageType == AdminGumpPage.AccountDetails_Access_ClientIPs) { @@ -3984,7 +3984,7 @@ namespace Server.Gumps } case 10: { - if (m_List != null && index < m_List.Count) + if (index < m_List?.Count) { if (m_PageType == AdminGumpPage.AccountDetails_Access_ClientIPs) { diff --git a/Projects/UOContent/Gumps/BaseGridGump.cs b/Projects/UOContent/Gumps/BaseGridGump.cs index 7b7ae2b35..c755cde62 100644 --- a/Projects/UOContent/Gumps/BaseGridGump.cs +++ b/Projects/UOContent/Gumps/BaseGridGump.cs @@ -101,14 +101,14 @@ namespace Server.Gumps width = CurrentX + BorderSize; - if (m_Background != null && width > m_Background.Width) + if (width > m_Background?.Width) { m_Background.Width = width; } width = CurrentX - BorderSize; - if (m_Offset != null && width > m_Offset.Width) + if (width > m_Offset?.Width) { m_Offset.Width = width; } diff --git a/Projects/UOContent/Gumps/Guilds/New Guild System/GuildRosterGump.cs b/Projects/UOContent/Gumps/Guilds/New Guild System/GuildRosterGump.cs index 7c7cef563..d3f181887 100644 --- a/Projects/UOContent/Gumps/Guilds/New Guild System/GuildRosterGump.cs +++ b/Projects/UOContent/Gumps/Guilds/New Guild System/GuildRosterGump.cs @@ -11,10 +11,10 @@ namespace Server.Guilds { private static readonly InfoField[] m_Fields = { - new InfoField(1062955, 130, NameComparer.Instance), // Name - new InfoField(1062956, 80, RankComparer.Instance), // Rank - new InfoField(1062952, 80, LastOnComparer.Instance), // Last On - new InfoField(1062953, 150, TitleComparer.Instance) // Guild Title + new(1062955, 130, NameComparer.Instance), // Name + new(1062956, 80, RankComparer.Instance), // Rank + new(1062952, 80, LastOnComparer.Instance), // Last On + new(1062953, 150, TitleComparer.Instance) // Guild Title }; public GuildRosterGump(PlayerMobile pm, Guild g) : this(pm, g, LastOnComparer.Instance) diff --git a/Projects/UOContent/Gumps/HouseGumpAOS.cs b/Projects/UOContent/Gumps/HouseGumpAOS.cs index adf139346..fd4b2d944 100644 --- a/Projects/UOContent/Gumps/HouseGumpAOS.cs +++ b/Projects/UOContent/Gumps/HouseGumpAOS.cs @@ -67,7 +67,7 @@ namespace Server.Gumps 974, 982 }; - private static readonly List _HouseSigns = new List(); + private static readonly List _HouseSigns = new(); private readonly BaseHouse m_House; private readonly HouseGumpPageAOS m_Page; diff --git a/Projects/UOContent/Gumps/PlayerVendorGumps.cs b/Projects/UOContent/Gumps/PlayerVendorGumps.cs index 54bb5644e..de78b3c17 100644 --- a/Projects/UOContent/Gumps/PlayerVendorGumps.cs +++ b/Projects/UOContent/Gumps/PlayerVendorGumps.cs @@ -320,7 +320,7 @@ namespace Server.Gumps { private static readonly CustomCategory[] Categories = { - new CustomCategory( + new( Layer.InnerTorso, 1011357, true, @@ -335,7 +335,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.MiddleTorso, 1011371, true, @@ -352,7 +352,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.Shoes, 1011388, true, @@ -366,7 +366,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.Helm, 1011375, true, @@ -382,7 +382,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.Helm, 1015319, true, @@ -398,7 +398,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.Pants, 1011367, true, @@ -411,7 +411,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.Cloak, 1011393, true, @@ -422,7 +422,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.Hair, 1011395, true, @@ -441,7 +441,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.FacialHair, 1015320, true, @@ -458,7 +458,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.FirstValid, 1011397, false, @@ -477,7 +477,7 @@ namespace Server.Gumps } ), - new CustomCategory( + new( Layer.FirstValid, 1015325, false, @@ -906,26 +906,26 @@ namespace Server.Gumps { private static readonly HairOrBeard[] m_HairStyles = { - new HairOrBeard(0x203B, 1011052), // Short - new HairOrBeard(0x203C, 1011053), // Long - new HairOrBeard(0x203D, 1011054), // Ponytail - new HairOrBeard(0x2044, 1011055), // Mohawk - new HairOrBeard(0x2045, 1011047), // Pageboy - new HairOrBeard(0x204A, 1011050), // Topknot - new HairOrBeard(0x2047, 1011396), // Curly - new HairOrBeard(0x2048, 1011048), // Receding - new HairOrBeard(0x2049, 1011049) // 2-tails + new(0x203B, 1011052), // Short + new(0x203C, 1011053), // Long + new(0x203D, 1011054), // Ponytail + new(0x2044, 1011055), // Mohawk + new(0x2045, 1011047), // Pageboy + new(0x204A, 1011050), // Topknot + new(0x2047, 1011396), // Curly + new(0x2048, 1011048), // Receding + new(0x2049, 1011049) // 2-tails }; private static readonly HairOrBeard[] m_BeardStyles = { - new HairOrBeard(0x2041, 1011062), // Mustache - new HairOrBeard(0x203F, 1011060), // Short beard - new HairOrBeard(0x204B, 1015321), // Short Beard & Moustache - new HairOrBeard(0x203E, 1011061), // Long beard - new HairOrBeard(0x204C, 1015322), // Long Beard & Moustache - new HairOrBeard(0x2040, 1015323), // Goatee - new HairOrBeard(0x204D, 1011401) // Vandyke + new(0x2041, 1011062), // Mustache + new(0x203F, 1011060), // Short beard + new(0x204B, 1015321), // Short Beard & Moustache + new(0x203E, 1011061), // Long beard + new(0x204C, 1015322), // Long Beard & Moustache + new(0x2040, 1015323), // Goatee + new(0x204D, 1011401) // Vandyke }; private readonly PlayerVendor m_Vendor; diff --git a/Projects/UOContent/Gumps/PolymorphGump.cs b/Projects/UOContent/Gumps/PolymorphGump.cs index 0649d3a80..8fc84dfed 100644 --- a/Projects/UOContent/Gumps/PolymorphGump.cs +++ b/Projects/UOContent/Gumps/PolymorphGump.cs @@ -6,24 +6,24 @@ namespace Server.Gumps { public class PolymorphEntry { - public static readonly PolymorphEntry Chicken = new PolymorphEntry(8401, 0xD0, 1015236, 15, 10); - public static readonly PolymorphEntry Dog = new PolymorphEntry(8405, 0xD9, 1015237, 17, 10); - public static readonly PolymorphEntry Wolf = new PolymorphEntry(8426, 0xE1, 1015238, 18, 10); - public static readonly PolymorphEntry Panther = new PolymorphEntry(8473, 0xD6, 1015239, 20, 14); - public static readonly PolymorphEntry Gorilla = new PolymorphEntry(8437, 0x1D, 1015240, 23, 10); - public static readonly PolymorphEntry BlackBear = new PolymorphEntry(8399, 0xD3, 1015241, 22, 10); - public static readonly PolymorphEntry GrizzlyBear = new PolymorphEntry(8411, 0xD4, 1015242, 22, 12); - public static readonly PolymorphEntry PolarBear = new PolymorphEntry(8417, 0xD5, 1015243, 26, 10); - public static readonly PolymorphEntry HumanMale = new PolymorphEntry(8397, 0x190, 1015244, 29, 8); - public static readonly PolymorphEntry HumanFemale = new PolymorphEntry(8398, 0x191, 1015254, 29, 10); - public static readonly PolymorphEntry Slime = new PolymorphEntry(8424, 0x33, 1015246, 5, 10); - public static readonly PolymorphEntry Orc = new PolymorphEntry(8416, 0x11, 1015247, 29, 10); - public static readonly PolymorphEntry LizardMan = new PolymorphEntry(8414, 0x21, 1015248, 26, 10); - public static readonly PolymorphEntry Gargoyle = new PolymorphEntry(8409, 0x04, 1015249, 22, 10); - public static readonly PolymorphEntry Ogre = new PolymorphEntry(8415, 0x01, 1015250, 24, 9); - public static readonly PolymorphEntry Troll = new PolymorphEntry(8425, 0x36, 1015251, 25, 9); - public static readonly PolymorphEntry Ettin = new PolymorphEntry(8408, 0x02, 1015252, 25, 8); - public static readonly PolymorphEntry Daemon = new PolymorphEntry(8403, 0x09, 1015253, 25, 8); + public static readonly PolymorphEntry Chicken = new(8401, 0xD0, 1015236, 15, 10); + public static readonly PolymorphEntry Dog = new(8405, 0xD9, 1015237, 17, 10); + public static readonly PolymorphEntry Wolf = new(8426, 0xE1, 1015238, 18, 10); + public static readonly PolymorphEntry Panther = new(8473, 0xD6, 1015239, 20, 14); + public static readonly PolymorphEntry Gorilla = new(8437, 0x1D, 1015240, 23, 10); + public static readonly PolymorphEntry BlackBear = new(8399, 0xD3, 1015241, 22, 10); + public static readonly PolymorphEntry GrizzlyBear = new(8411, 0xD4, 1015242, 22, 12); + public static readonly PolymorphEntry PolarBear = new(8417, 0xD5, 1015243, 26, 10); + public static readonly PolymorphEntry HumanMale = new(8397, 0x190, 1015244, 29, 8); + public static readonly PolymorphEntry HumanFemale = new(8398, 0x191, 1015254, 29, 10); + public static readonly PolymorphEntry Slime = new(8424, 0x33, 1015246, 5, 10); + public static readonly PolymorphEntry Orc = new(8416, 0x11, 1015247, 29, 10); + public static readonly PolymorphEntry LizardMan = new(8414, 0x21, 1015248, 26, 10); + public static readonly PolymorphEntry Gargoyle = new(8409, 0x04, 1015249, 22, 10); + public static readonly PolymorphEntry Ogre = new(8415, 0x01, 1015250, 24, 9); + public static readonly PolymorphEntry Troll = new(8425, 0x36, 1015251, 25, 9); + public static readonly PolymorphEntry Ettin = new(8408, 0x02, 1015252, 25, 8); + public static readonly PolymorphEntry Daemon = new(8403, 0x09, 1015253, 25, 8); private PolymorphEntry(int art, int body, int locNum, int x, int y) { @@ -49,7 +49,7 @@ namespace Server.Gumps { private static readonly PolymorphCategory[] Categories = { - new PolymorphCategory( + new( 1015235, // Animals PolymorphEntry.Chicken, PolymorphEntry.Dog, @@ -62,7 +62,7 @@ namespace Server.Gumps PolymorphEntry.HumanMale ), - new PolymorphCategory( + new( 1015245, // Monsters PolymorphEntry.Slime, PolymorphEntry.Orc, diff --git a/Projects/UOContent/Gumps/Props/PropsGump.cs b/Projects/UOContent/Gumps/Props/PropsGump.cs index 14aaebd03..568952a61 100644 --- a/Projects/UOContent/Gumps/Props/PropsGump.cs +++ b/Projects/UOContent/Gumps/Props/PropsGump.cs @@ -850,7 +850,7 @@ namespace Server.Gumps private class PropertySorter : IComparer { - public static readonly PropertySorter Instance = new PropertySorter(); + public static readonly PropertySorter Instance = new(); private PropertySorter() { diff --git a/Projects/UOContent/Gumps/SkillsGump.cs b/Projects/UOContent/Gumps/SkillsGump.cs index 0ae402ff9..1afdec16e 100644 --- a/Projects/UOContent/Gumps/SkillsGump.cs +++ b/Projects/UOContent/Gumps/SkillsGump.cs @@ -525,7 +525,7 @@ namespace Server.Gumps public static SkillsGumpGroup[] Groups { get; } = { - new SkillsGumpGroup( + new( "Crafting", new[] { @@ -541,7 +541,7 @@ namespace Server.Gumps SkillName.Imbuing } ), - new SkillsGumpGroup( + new( "Bardic", new[] { @@ -551,7 +551,7 @@ namespace Server.Gumps SkillName.Provocation } ), - new SkillsGumpGroup( + new( "Magical", new[] { @@ -568,7 +568,7 @@ namespace Server.Gumps SkillName.Mysticism } ), - new SkillsGumpGroup( + new( "Miscellaneous", new[] { @@ -584,7 +584,7 @@ namespace Server.Gumps SkillName.Veterinary } ), - new SkillsGumpGroup( + new( "Combat Ratings", new[] { @@ -598,7 +598,7 @@ namespace Server.Gumps SkillName.Throwing } ), - new SkillsGumpGroup( + new( "Actions", new[] { @@ -613,7 +613,7 @@ namespace Server.Gumps SkillName.Tracking } ), - new SkillsGumpGroup( + new( "Lore & Knowledge", new[] { diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs index 988630b39..e02b744b0 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs @@ -11,14 +11,14 @@ namespace Server.Engines.Events private static readonly Rectangle2D[] m_PumpkinFields = { - new Rectangle2D(4557, 1471, 20, 10), - new Rectangle2D(796, 2152, 36, 24), - new Rectangle2D(816, 2251, 16, 8), - new Rectangle2D(816, 2261, 16, 8), - new Rectangle2D(816, 2271, 16, 8), - new Rectangle2D(816, 2281, 16, 8), - new Rectangle2D(835, 2344, 16, 16), - new Rectangle2D(816, 2344, 16, 24) + new(4557, 1471, 20, 10), + new(796, 2152, 36, 24), + new(816, 2251, 16, 8), + new(816, 2261, 16, 8), + new(816, 2271, 16, 8), + new(816, 2281, 16, 8), + new(835, 2344, 16, 16), + new(816, 2344, 16, 24) }; public static void Initialize() diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs index ec36af8a6..6a02f9a29 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs @@ -20,23 +20,23 @@ namespace Server.Engines.Events private static readonly Rectangle2D[] m_Cemetaries = { - new Rectangle2D(1272, 3712, 30, 20), // Jhelom - new Rectangle2D(1337, 1444, 48, 52), // Britain - new Rectangle2D(2424, 1098, 20, 28), // Trinsic - new Rectangle2D(2728, 840, 54, 54), // Vesper - new Rectangle2D(4528, 1314, 20, 28), // Moonglow - new Rectangle2D(712, 1104, 30, 22), // Yew - new Rectangle2D(5824, 1464, 22, 6), // Fire Dungeon - new Rectangle2D(5224, 3655, 14, 5), // T2A + new(1272, 3712, 30, 20), // Jhelom + new(1337, 1444, 48, 52), // Britain + new(2424, 1098, 20, 28), // Trinsic + new(2728, 840, 54, 54), // Vesper + new(4528, 1314, 20, 28), // Moonglow + new(712, 1104, 30, 22), // Yew + new(5824, 1464, 22, 6), // Fire Dungeon + new(5224, 3655, 14, 5), // T2A - new Rectangle2D(1272, 3712, 20, 30), // Jhelom - new Rectangle2D(1337, 1444, 52, 48), // Britain - new Rectangle2D(2424, 1098, 28, 20), // Trinsic - new Rectangle2D(2728, 840, 54, 54), // Vesper - new Rectangle2D(4528, 1314, 28, 20), // Moonglow - new Rectangle2D(712, 1104, 22, 30), // Yew - new Rectangle2D(5824, 1464, 6, 22), // Fire Dungeon - new Rectangle2D(5224, 3655, 5, 14) // T2A + new(1272, 3712, 20, 30), // Jhelom + new(1337, 1444, 52, 48), // Britain + new(2424, 1098, 28, 20), // Trinsic + new(2728, 840, 54, 54), // Vesper + new(4528, 1314, 28, 20), // Moonglow + new(712, 1104, 22, 30), // Yew + new(5824, 1464, 6, 22), // Fire Dungeon + new(5224, 3655, 5, 14) // T2A }; public static Dictionary ReAnimated { get; set; } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs b/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs index 56e0f7701..8e00fe9bc 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs @@ -31,9 +31,9 @@ namespace Server.Events.Halloween }; public static DateTime StartHalloween // YY MM DD - => new DateTime(2012, 10, 24); + => new(2012, 10, 24); - public static DateTime FinishHalloween => new DateTime(2012, 11, 15); + public static DateTime FinishHalloween => new(2012, 11, 15); public static Item RandomGMBeggerItem => m_GMBeggarTreats.RandomElement().CreateInstance(); diff --git a/Projects/UOContent/Items/Addons/AddonComponent.cs b/Projects/UOContent/Items/Addons/AddonComponent.cs index 083dd1e88..036a3d2a6 100644 --- a/Projects/UOContent/Items/Addons/AddonComponent.cs +++ b/Projects/UOContent/Items/Addons/AddonComponent.cs @@ -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] diff --git a/Projects/UOContent/Items/Addons/JackOLantern.cs b/Projects/UOContent/Items/Addons/JackOLantern.cs index 7c34f121b..d3a72ea3c 100644 --- a/Projects/UOContent/Items/Addons/JackOLantern.cs +++ b/Projects/UOContent/Items/Addons/JackOLantern.cs @@ -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" diff --git a/Projects/UOContent/Items/Addons/SHTeleporter.cs b/Projects/UOContent/Items/Addons/SHTeleporter.cs index 746d5f479..9b2553c8a 100644 --- a/Projects/UOContent/Items/Addons/SHTeleporter.cs +++ b/Projects/UOContent/Items/Addons/SHTeleporter.cs @@ -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); } diff --git a/Projects/UOContent/Items/Books/Defined/BlackthornWelcomeBook.cs b/Projects/UOContent/Items/Books/Defined/BlackthornWelcomeBook.cs index 41a4592c8..eb8aff44b 100644 --- a/Projects/UOContent/Items/Books/Defined/BlackthornWelcomeBook.cs +++ b/Projects/UOContent/Items/Books/Defined/BlackthornWelcomeBook.cs @@ -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( diff --git a/Projects/UOContent/Items/Books/Defined/DrakovsJournal.cs b/Projects/UOContent/Items/Books/Defined/DrakovsJournal.cs index e42443b90..1b14e6e39 100644 --- a/Projects/UOContent/Items/Books/Defined/DrakovsJournal.cs +++ b/Projects/UOContent/Items/Books/Defined/DrakovsJournal.cs @@ -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( diff --git a/Projects/UOContent/Items/Books/Defined/FropozJournal.cs b/Projects/UOContent/Items/Books/Defined/FropozJournal.cs index cf053ce7d..e3149eab4 100644 --- a/Projects/UOContent/Items/Books/Defined/FropozJournal.cs +++ b/Projects/UOContent/Items/Books/Defined/FropozJournal.cs @@ -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( diff --git a/Projects/UOContent/Items/Books/Defined/KaburJournal.cs b/Projects/UOContent/Items/Books/Defined/KaburJournal.cs index fbd0c9469..50f459716 100644 --- a/Projects/UOContent/Items/Books/Defined/KaburJournal.cs +++ b/Projects/UOContent/Items/Books/Defined/KaburJournal.cs @@ -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( diff --git a/Projects/UOContent/Items/Books/Defined/LibraryBooks.cs b/Projects/UOContent/Items/Books/Defined/LibraryBooks.cs index 74cbe8d29..8d041fdd2 100644 --- a/Projects/UOContent/Items/Books/Defined/LibraryBooks.cs +++ b/Projects/UOContent/Items/Books/Defined/LibraryBooks.cs @@ -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( diff --git a/Projects/UOContent/Items/Books/Defined/NewAquariumBook.cs b/Projects/UOContent/Items/Books/Defined/NewAquariumBook.cs index 1f9ec8612..fe9192518 100644 --- a/Projects/UOContent/Items/Books/Defined/NewAquariumBook.cs +++ b/Projects/UOContent/Items/Books/Defined/NewAquariumBook.cs @@ -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( diff --git a/Projects/UOContent/Items/Books/Defined/TranslatedGargoyleJournal.cs b/Projects/UOContent/Items/Books/Defined/TranslatedGargoyleJournal.cs index 9f2881cd7..3dca6448d 100644 --- a/Projects/UOContent/Items/Books/Defined/TranslatedGargoyleJournal.cs +++ b/Projects/UOContent/Items/Books/Defined/TranslatedGargoyleJournal.cs @@ -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( diff --git a/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs b/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs index aa1f7179e..657e344b6 100644 --- a/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs +++ b/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs @@ -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; diff --git a/Projects/UOContent/Items/Containers/FillableContainers.cs b/Projects/UOContent/Items/Containers/FillableContainers.cs index 27d31bb13..5b582a115 100644 --- a/Projects/UOContent/Items/Containers/FillableContainers.cs +++ b/Projects/UOContent/Items/Containers/FillableContainers.cs @@ -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(), 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(), 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(), 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(), 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(), new[] @@ -1251,7 +1251,7 @@ namespace Server.Items } ); - public static FillableContent Painter = new FillableContent( + public static FillableContent Painter = new( 1, Array.Empty(), 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[] { diff --git a/Projects/UOContent/Items/Containers/FurnitureContainer.cs b/Projects/UOContent/Items/Containers/FurnitureContainer.cs index 25f841781..3da897893 100644 --- a/Projects/UOContent/Items/Containers/FurnitureContainer.cs +++ b/Projects/UOContent/Items/Containers/FurnitureContainer.cs @@ -309,7 +309,7 @@ namespace Server.Items public static class DynamicFurniture { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public static bool Open(Container c, Mobile m) { diff --git a/Projects/UOContent/Items/Containers/TreasureMapChest.cs b/Projects/UOContent/Items/Containers/TreasureMapChest.cs index c68059693..848c455d9 100644 --- a/Projects/UOContent/Items/Containers/TreasureMapChest.cs +++ b/Projects/UOContent/Items/Containers/TreasureMapChest.cs @@ -10,7 +10,7 @@ namespace Server.Items { public class TreasureMapChest : LockableContainer { - private List m_Lifted = new List(); + private List m_Lifted = new(); private Timer m_Timer; diff --git a/Projects/UOContent/Items/Decoration Artifacts/StealableArtifactsSpawner.cs b/Projects/UOContent/Items/Decoration Artifacts/StealableArtifactsSpawner.cs index c9950990d..9f8b39fa0 100644 --- a/Projects/UOContent/Items/Decoration Artifacts/StealableArtifactsSpawner.cs +++ b/Projects/UOContent/Items/Decoration Artifacts/StealableArtifactsSpawner.cs @@ -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 diff --git a/Projects/UOContent/Items/Food/Beverage.cs b/Projects/UOContent/Items/Food/Beverage.cs index 967e81d29..dfae77cab 100644 --- a/Projects/UOContent/Items/Food/Beverage.cs +++ b/Projects/UOContent/Items/Food/Beverage.cs @@ -572,7 +572,7 @@ namespace Server.Items 0x3FFC, 0x3FFE }; - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); private BeverageType m_Content; private int m_Quantity; diff --git a/Projects/UOContent/Items/Games/Mahjong/MahjongWallBreakIndicator.cs b/Projects/UOContent/Items/Games/Mahjong/MahjongWallBreakIndicator.cs index a11839823..febd3c228 100644 --- a/Projects/UOContent/Items/Games/Mahjong/MahjongWallBreakIndicator.cs +++ b/Projects/UOContent/Items/Games/Mahjong/MahjongWallBreakIndicator.cs @@ -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) { diff --git a/Projects/UOContent/Items/Maps/MapItem.cs b/Projects/UOContent/Items/Maps/MapItem.cs index cf849e645..8898e6161 100644 --- a/Projects/UOContent/Items/Maps/MapItem.cs +++ b/Projects/UOContent/Items/Maps/MapItem.cs @@ -40,7 +40,7 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public Map Facet { get; set; } - public List Pins { get; } = new List(); + public List Pins { get; } = new(); public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, diff --git a/Projects/UOContent/Items/Maps/PresetMap.cs b/Projects/UOContent/Items/Maps/PresetMap.cs index e5bc63fa9..48bdc2490 100644 --- a/Projects/UOContent/Items/Maps/PresetMap.cs +++ b/Projects/UOContent/Items/Maps/PresetMap.cs @@ -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 }; } diff --git a/Projects/UOContent/Items/Misc/CommunicationCrystals.cs b/Projects/UOContent/Items/Misc/CommunicationCrystals.cs index 8b29232c7..98a3247f8 100644 --- a/Projects/UOContent/Items/Misc/CommunicationCrystals.cs +++ b/Projects/UOContent/Items/Misc/CommunicationCrystals.cs @@ -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) diff --git a/Projects/UOContent/Items/Misc/Corpses/Packets.cs b/Projects/UOContent/Items/Misc/Corpses/Packets.cs index 9651ee1c0..c9f6223ae 100644 --- a/Projects/UOContent/Items/Misc/Corpses/Packets.cs +++ b/Projects/UOContent/Items/Misc/Corpses/Packets.cs @@ -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); diff --git a/Projects/UOContent/Items/Misc/EffectItem.cs b/Projects/UOContent/Items/Misc/EffectItem.cs index 8ad1fb5fc..a268e8248 100644 --- a/Projects/UOContent/Items/Misc/EffectItem.cs +++ b/Projects/UOContent/Items/Misc/EffectItem.cs @@ -5,7 +5,7 @@ namespace Server.Items { public class EffectItem : Item { - private static readonly List m_Free = new List(); // List of available EffectItems + private static readonly List m_Free = new(); // List of available EffectItems public static readonly TimeSpan DefaultDuration = TimeSpan.FromSeconds(5.0); diff --git a/Projects/UOContent/Items/Misc/HairDye.cs b/Projects/UOContent/Items/Misc/HairDye.cs index ebaa47689..2ab248676 100644 --- a/Projects/UOContent/Items/Misc/HairDye.cs +++ b/Projects/UOContent/Items/Misc/HairDye.cs @@ -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; diff --git a/Projects/UOContent/Items/Misc/PowerGenerator.cs b/Projects/UOContent/Items/Misc/PowerGenerator.cs index 35d8899d8..d2e60e62f 100644 --- a/Projects/UOContent/Items/Misc/PowerGenerator.cs +++ b/Projects/UOContent/Items/Misc/PowerGenerator.cs @@ -57,7 +57,7 @@ namespace Server.Items { private static readonly TimeSpan m_UseTimeout = TimeSpan.FromMinutes(2.0); - private readonly HashSet m_DamageTable = new HashSet(); + private readonly HashSet m_DamageTable = new(); private DateTime m_LastUse; private int m_SideLength; diff --git a/Projects/UOContent/Items/Misc/PublicMoongate.cs b/Projects/UOContent/Items/Misc/PublicMoongate.cs index aa7ebd037..9e07b130a 100644 --- a/Projects/UOContent/Items/Misc/PublicMoongate.cs +++ b/Projects/UOContent/Items/Misc/PublicMoongate.cs @@ -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, diff --git a/Projects/UOContent/Items/Misc/SpecialBeardDye.cs b/Projects/UOContent/Items/Misc/SpecialBeardDye.cs index 28cfd7695..9ce604fb9 100644 --- a/Projects/UOContent/Items/Misc/SpecialBeardDye.cs +++ b/Projects/UOContent/Items/Misc/SpecialBeardDye.cs @@ -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; diff --git a/Projects/UOContent/Items/Misc/SpecialHairDye.cs b/Projects/UOContent/Items/Misc/SpecialHairDye.cs index 50aa93539..3829506bd 100644 --- a/Projects/UOContent/Items/Misc/SpecialHairDye.cs +++ b/Projects/UOContent/Items/Misc/SpecialHairDye.cs @@ -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; diff --git a/Projects/UOContent/Items/Skill Items/Camping/Campfire.cs b/Projects/UOContent/Items/Skill Items/Camping/Campfire.cs index 447660288..82a78f3a5 100644 --- a/Projects/UOContent/Items/Skill Items/Camping/Campfire.cs +++ b/Projects/UOContent/Items/Skill Items/Camping/Campfire.cs @@ -16,7 +16,7 @@ namespace Server.Items { public static readonly int SecureRange = 7; - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); private readonly List m_Entries; diff --git a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs index 1a285abfa..f1a66fbcf 100644 --- a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs +++ b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs @@ -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] diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs index 4c835c10d..416550283 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs @@ -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...

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...
...pirates came, I was in the rigging practicing with my sextant. {0} if I am not mistaken...
....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...
...grabbed the captain's treasure, screamed, 'It'll go down with me!'
...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}
...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!
Unfort...y he grabbe...est, and all his riches went with him!
...sked the captain, and he says we're at {0}
...so maybe..." diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs index 7b08b59ef..4efa8af73 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs @@ -7,8 +7,8 @@ namespace Server.Items { public abstract class BaseConflagrationPotion : BasePotion { - private static readonly Dictionary m_Delay = new Dictionary(); - private readonly List m_Users = new List(); + private static readonly Dictionary m_Delay = new(); + private readonly List m_Users = new(); public BaseConflagrationPotion(PotionEffect effect) : base(0xF06, effect) => Hue = 0x489; diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs index 67cb5f046..c271dd761 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs @@ -9,8 +9,8 @@ namespace Server.Items { public abstract class BaseConfusionBlastPotion : BasePotion { - private static readonly Dictionary m_Delay = new Dictionary(); - private readonly List m_Users = new List(); + private static readonly Dictionary m_Delay = new(); + private readonly List m_Users = new(); public BaseConfusionBlastPotion(PotionEffect effect) : base(0xF06, effect) => Hue = 0x48D; diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/CurePotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/CurePotion.cs index 64e378b4d..e1b408134 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/CurePotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/CurePotion.cs @@ -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] diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/GreaterCurePotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/GreaterCurePotion.cs index 0801f8743..1c1b6ca8c 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/GreaterCurePotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/GreaterCurePotion.cs @@ -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] diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/LesserCurePotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/LesserCurePotion.cs index fb7d65a9b..288d98933 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/LesserCurePotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Cure Potions/LesserCurePotion.cs @@ -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] diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs index b613d1005..e951800b4 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs @@ -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]; diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/InvisibilityPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/InvisibilityPotion.cs index 0c53c41a1..593d094db 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/InvisibilityPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/InvisibilityPotion.cs @@ -5,7 +5,7 @@ namespace Server.Items { public class InvisibilityPotion : BasePotion { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); [Constructible] public InvisibilityPotion() : base(0xF0A, PotionEffect.Invisibility) => Hue = 0x48D; diff --git a/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs b/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs index 95114362b..385069521 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs @@ -87,7 +87,7 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public int MaxCharges { get; set; } - public List Openers { get; set; } = new List(); + public List Openers { get; set; } = new(); public override int LabelNumber => 1041267; // runebook diff --git a/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs b/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs index 9d4158dc7..82c552b0a 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs @@ -30,7 +30,7 @@ namespace Server.Items public class Spellbook : Item, ICraftable, ISlayer { - private static readonly Dictionary> m_Table = new Dictionary>(); + private static readonly Dictionary> m_Table = new(); private static readonly int[] m_LegendPropertyCounts = { diff --git a/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs b/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs index dd5985915..03a205c69 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs @@ -157,7 +157,7 @@ namespace Server.Items public class BandageContext { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary 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]; diff --git a/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs b/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs index e9ec386a6..9eaae4465 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs @@ -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) diff --git a/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs b/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs index 98296973a..901d38c39 100644 --- a/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs +++ b/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs @@ -18,7 +18,7 @@ namespace Server.Items public abstract class BaseInstrument : Item, ICraftable, ISlayer { - private static readonly Dictionary m_Instruments = new Dictionary(); + private static readonly Dictionary m_Instruments = new(); private Mobile m_Crafter; private DateTime m_LastReplenished; diff --git a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs index abf3818e9..7f233ba52 100644 --- a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs +++ b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs @@ -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 */ diff --git a/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs b/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs index 137f4b1a8..22177f3eb 100644 --- a/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs +++ b/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs @@ -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 Timers { get; } = new Dictionary(); + public static Dictionary Timers { get; } = new(); public static void Initialize() { diff --git a/Projects/UOContent/Items/Skill Items/Tinkering/Clocks.cs b/Projects/UOContent/Items/Skill Items/Tinkering/Clocks.cs index 9e7f58998..eedfb03a3 100644 --- a/Projects/UOContent/Items/Skill Items/Tinkering/Clocks.cs +++ b/Projects/UOContent/Items/Skill Items/Tinkering/Clocks.cs @@ -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; diff --git a/Projects/UOContent/Items/Skill Items/Tools/BaseRunicTool.cs b/Projects/UOContent/Items/Skill Items/Tools/BaseRunicTool.cs index d829c5064..3e500fe79 100644 --- a/Projects/UOContent/Items/Skill Items/Tools/BaseRunicTool.cs +++ b/Projects/UOContent/Items/Skill Items/Tools/BaseRunicTool.cs @@ -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; diff --git a/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs b/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs index 2cb17d374..502673f23 100644 --- a/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs +++ b/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs @@ -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; } diff --git a/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs b/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs index 20f92bee0..fbb3ddbc8 100644 --- a/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs +++ b/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs @@ -5,7 +5,7 @@ namespace Server.Items { public class CandyCane : Food { - private static readonly Dictionary m_ToothAches = new Dictionary(); + private static readonly Dictionary m_ToothAches = new(); [Constructible] public CandyCane() diff --git a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs index 99497b5d5..9d60418fe 100644 --- a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs +++ b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs @@ -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 m_AllStones = new List(); + private static readonly List m_AllStones = new(); private Rectangle2D m_Bounds; private TimeSpan m_Duration; private Map m_Facet; diff --git a/Projects/UOContent/Items/Special/MiniHouses.cs b/Projects/UOContent/Items/Special/MiniHouses.cs index 51f0fb858..660b06170 100644 --- a/Projects/UOContent/Items/Special/MiniHouses.cs +++ b/Projects/UOContent/Items/Special/MiniHouses.cs @@ -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) diff --git a/Projects/UOContent/Items/Special/MonsterStatuette.cs b/Projects/UOContent/Items/Special/MonsterStatuette.cs index 3644095b1..1767b0df0 100644 --- a/Projects/UOContent/Items/Special/MonsterStatuette.cs +++ b/Projects/UOContent/Items/Special/MonsterStatuette.cs @@ -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()), - /* 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()), + /* 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) diff --git a/Projects/UOContent/Items/Special/Solen Items/BallOfSummoning.cs b/Projects/UOContent/Items/Special/Solen Items/BallOfSummoning.cs index ed6b6971a..85e82e57e 100644 --- a/Projects/UOContent/Items/Special/Solen Items/BallOfSummoning.cs +++ b/Projects/UOContent/Items/Special/Solen Items/BallOfSummoning.cs @@ -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; diff --git a/Projects/UOContent/Items/Special/Special Scrolls/PowerScroll.cs b/Projects/UOContent/Items/Special/Special Scrolls/PowerScroll.cs index dc08615da..50273d2ff 100644 --- a/Projects/UOContent/Items/Special/Special Scrolls/PowerScroll.cs +++ b/Projects/UOContent/Items/Special/Special Scrolls/PowerScroll.cs @@ -65,7 +65,7 @@ namespace Server.Items }; */ - private static readonly List _Skills = new List(); + private static readonly List _Skills = new(); [Constructible] public PowerScroll(SkillName skill = SkillName.Alchemy, double value = 0.0) : base(skill, value) diff --git a/Projects/UOContent/Items/Special/Special Scrolls/ScrollofTranscendence.cs b/Projects/UOContent/Items/Special/Special Scrolls/ScrollofTranscendence.cs index 5c8092824..35c803142 100644 --- a/Projects/UOContent/Items/Special/Special Scrolls/ScrollofTranscendence.cs +++ b/Projects/UOContent/Items/Special/Special Scrolls/ScrollofTranscendence.cs @@ -31,7 +31,7 @@ namespace Server.Items $"Scroll of Transcendence ({Value} Skill):"; 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) { diff --git a/Projects/UOContent/Items/Special/Valentines/2007/ValentinesCard.cs b/Projects/UOContent/Items/Special/Valentines/2007/ValentinesCard.cs index dba0fbedf..7e851da24 100644 --- a/Projects/UOContent/Items/Special/Valentines/2007/ValentinesCard.cs +++ b/Projects/UOContent/Items/Special/Valentines/2007/ValentinesCard.cs @@ -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) { diff --git a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel1.cs b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel1.cs index 405f494ac..1f8f4c6fa 100644 --- a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel1.cs +++ b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel1.cs @@ -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() { diff --git a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel2.cs b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel2.cs index 6d887f64a..14e4d3946 100644 --- a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel2.cs +++ b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel2.cs @@ -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() { diff --git a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel3.cs b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel3.cs index 15359e5a8..bcd179d9a 100644 --- a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel3.cs +++ b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel3.cs @@ -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() { diff --git a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel4.cs b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel4.cs index 36b1c52b1..ba550a924 100644 --- a/Projects/UOContent/Items/TreasureChests/TreasureChestLevel4.cs +++ b/Projects/UOContent/Items/TreasureChests/TreasureChestLevel4.cs @@ -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() { diff --git a/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs b/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs index 2c1c4c046..3861f5ce8 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs @@ -14,7 +14,7 @@ namespace Server.Items /// public class BleedAttack : WeaponAbility { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/Block.cs b/Projects/UOContent/Items/Weapons/Abilities/Block.cs index 947b485e8..d23e6c462 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/Block.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/Block.cs @@ -8,7 +8,7 @@ namespace Server.Items /// public class Block : WeaponAbility { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/DefenseMastery.cs b/Projects/UOContent/Items/Weapons/Abilities/DefenseMastery.cs index d40892723..7fa706493 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/DefenseMastery.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/DefenseMastery.cs @@ -10,7 +10,7 @@ namespace Server.Items public class DefenseMastery : WeaponAbility { private static readonly Dictionary - m_Table = new Dictionary(); + m_Table = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs b/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs index 32ee795a8..4203318f8 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs @@ -8,7 +8,7 @@ namespace Server.Items /// public class DualWield : WeaponAbility { - public static Dictionary Registry { get; } = new Dictionary(); + public static Dictionary Registry { get; } = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/Feint.cs b/Projects/UOContent/Items/Weapons/Abilities/Feint.cs index d2921e375..93a30afe0 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/Feint.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/Feint.cs @@ -8,7 +8,7 @@ namespace Server.Items /// public class Feint : WeaponAbility { - public static Dictionary Registry { get; } = new Dictionary(); + public static Dictionary Registry { get; } = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs b/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs index bcfc04ec5..2ec584973 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs @@ -13,7 +13,7 @@ namespace Server.Items public override int BaseMana => 30; public static Dictionary Registry { get; } = - new Dictionary(); + new(); public override bool CheckSkills(Mobile from) { diff --git a/Projects/UOContent/Items/Weapons/Abilities/MortalStrike.cs b/Projects/UOContent/Items/Weapons/Abilities/MortalStrike.cs index 0a9130f4b..babf26573 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/MortalStrike.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/MortalStrike.cs @@ -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 m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/ParalyzingBlow.cs b/Projects/UOContent/Items/Weapons/Abilities/ParalyzingBlow.cs index a365badd0..f82f56e3b 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/ParalyzingBlow.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/ParalyzingBlow.cs @@ -13,7 +13,7 @@ namespace Server.Items public static readonly TimeSpan FreezeDelayDuration = TimeSpan.FromSeconds(8.0); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public override int BaseMana => 30; diff --git a/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs b/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs index 83173fa36..265f65835 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs @@ -8,7 +8,7 @@ namespace Server.Items /// public class TalonStrike : WeaponAbility { - private static readonly HashSet m_Table = new HashSet(); + private static readonly HashSet m_Table = new(); public override int BaseMana => 30; public override double DamageScalar => 1.2; diff --git a/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs b/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs index 3dbd092f3..35cad337d 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs @@ -83,7 +83,7 @@ namespace Server.Items public static readonly WeaponAbility Disrobe = Abilities[30]; private static readonly Dictionary m_PlayersTable = - new Dictionary(); + new(); public virtual int BaseMana => 0; @@ -92,7 +92,7 @@ namespace Server.Items public virtual bool RequiresSE => false; - public static Dictionary Table { get; } = new Dictionary(); + public static Dictionary Table { get; } = new(); public virtual bool ValidatesDuringHit => true; diff --git a/Projects/UOContent/Items/Weapons/HitLower.cs b/Projects/UOContent/Items/Weapons/HitLower.cs index 1351f7643..a06379cf2 100644 --- a/Projects/UOContent/Items/Weapons/HitLower.cs +++ b/Projects/UOContent/Items/Weapons/HitLower.cs @@ -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 m_AttackTable = new HashSet(); - private static readonly HashSet m_DefenseTable = new HashSet(); + private static readonly HashSet m_AttackTable = new(); + private static readonly HashSet m_DefenseTable = new(); public static bool IsUnderAttackEffect(Mobile m) => m_AttackTable.Contains(m); diff --git a/Projects/UOContent/Misc/CharacterCreation.cs b/Projects/UOContent/Misc/CharacterCreation.cs index 8fb280fa0..733b1a2a7 100644 --- a/Projects/UOContent/Misc/CharacterCreation.cs +++ b/Projects/UOContent/Misc/CharacterCreation.cs @@ -10,7 +10,7 @@ namespace Server.Misc public static class CharacterCreation { private static readonly CityInfo m_NewHavenInfo = - new CityInfo("New Haven", "The Bountiful Harvest Inn", 3503, 2574, 14, Map.Trammel); + new("New Haven", "The Bountiful Harvest Inn", 3503, 2574, 14, Map.Trammel); private static Mobile m_Mobile; diff --git a/Projects/UOContent/Misc/DoorGenerator.cs b/Projects/UOContent/Misc/DoorGenerator.cs index aefcc7d8a..2a910c21e 100644 --- a/Projects/UOContent/Misc/DoorGenerator.cs +++ b/Projects/UOContent/Misc/DoorGenerator.cs @@ -7,32 +7,32 @@ namespace Server { private static readonly Rectangle2D[] m_BritRegions = { - new Rectangle2D(new Point2D(250, 750), new Point2D(775, 1330)), - new Rectangle2D(new Point2D(525, 2095), new Point2D(925, 2430)), - new Rectangle2D(new Point2D(1025, 2155), new Point2D(1265, 2310)), - new Rectangle2D(new Point2D(1635, 2430), new Point2D(1705, 2508)), - new Rectangle2D(new Point2D(1775, 2605), new Point2D(2165, 2975)), - new Rectangle2D(new Point2D(1055, 3520), new Point2D(1570, 4075)), - new Rectangle2D(new Point2D(2860, 3310), new Point2D(3120, 3630)), - new Rectangle2D(new Point2D(2470, 1855), new Point2D(3950, 3045)), - new Rectangle2D(new Point2D(3425, 990), new Point2D(3900, 1455)), - new Rectangle2D(new Point2D(4175, 735), new Point2D(4840, 1600)), - new Rectangle2D(new Point2D(2375, 330), new Point2D(3100, 1045)), - new Rectangle2D(new Point2D(2100, 1090), new Point2D(2310, 1450)), - new Rectangle2D(new Point2D(1495, 1400), new Point2D(1550, 1475)), - new Rectangle2D(new Point2D(1085, 1520), new Point2D(1415, 1910)), - new Rectangle2D(new Point2D(1410, 1500), new Point2D(1745, 1795)), - new Rectangle2D(new Point2D(5120, 2300), new Point2D(6143, 4095)) + new(new Point2D(250, 750), new Point2D(775, 1330)), + new(new Point2D(525, 2095), new Point2D(925, 2430)), + new(new Point2D(1025, 2155), new Point2D(1265, 2310)), + new(new Point2D(1635, 2430), new Point2D(1705, 2508)), + new(new Point2D(1775, 2605), new Point2D(2165, 2975)), + new(new Point2D(1055, 3520), new Point2D(1570, 4075)), + new(new Point2D(2860, 3310), new Point2D(3120, 3630)), + new(new Point2D(2470, 1855), new Point2D(3950, 3045)), + new(new Point2D(3425, 990), new Point2D(3900, 1455)), + new(new Point2D(4175, 735), new Point2D(4840, 1600)), + new(new Point2D(2375, 330), new Point2D(3100, 1045)), + new(new Point2D(2100, 1090), new Point2D(2310, 1450)), + new(new Point2D(1495, 1400), new Point2D(1550, 1475)), + new(new Point2D(1085, 1520), new Point2D(1415, 1910)), + new(new Point2D(1410, 1500), new Point2D(1745, 1795)), + new(new Point2D(5120, 2300), new Point2D(6143, 4095)) }; private static readonly Rectangle2D[] m_IlshRegions = { - new Rectangle2D(new Point2D(0, 0), new Point2D(288 * 8, 200 * 8)) + new(new Point2D(0, 0), new Point2D(288 * 8, 200 * 8)) }; private static readonly Rectangle2D[] m_MalasRegions = { - new Rectangle2D(new Point2D(0, 0), new Point2D(320 * 8, 256 * 8)) + new(new Point2D(0, 0), new Point2D(320 * 8, 256 * 8)) }; private static readonly int[] m_SouthFrames = diff --git a/Projects/UOContent/Misc/Gifts/Winter2004/Winter2004.cs b/Projects/UOContent/Misc/Gifts/Winter2004/Winter2004.cs index 58886adee..d3a755881 100644 --- a/Projects/UOContent/Misc/Gifts/Winter2004/Winter2004.cs +++ b/Projects/UOContent/Misc/Gifts/Winter2004/Winter2004.cs @@ -5,8 +5,8 @@ namespace Server.Misc { public class WinterGiftGiver2004 : GiftGiver { - public override DateTime Start => new DateTime(2004, 12, 24); - public override DateTime Finish => new DateTime(2005, 1, 1); + public override DateTime Start => new(2004, 12, 24); + public override DateTime Finish => new(2005, 1, 1); public static void Initialize() { diff --git a/Projects/UOContent/Misc/Guild.cs b/Projects/UOContent/Misc/Guild.cs index c7e5c0aca..4ecd10997 100644 --- a/Projects/UOContent/Misc/Guild.cs +++ b/Projects/UOContent/Misc/Guild.cs @@ -32,16 +32,16 @@ namespace Server.Guilds { public static RankDefinition[] Ranks = { - new RankDefinition(1062963, 0, RankFlags.None), // Ronin - new RankDefinition(1062962, 1, RankFlags.Member), // Member - new RankDefinition( + new(1062963, 0, RankFlags.None), // Ronin + new(1062962, 1, RankFlags.Member), // Member + new( 1062961, 2, RankFlags.Member | RankFlags.RemovePlayers | RankFlags.CanInvitePlayer | RankFlags.CanSetGuildTitle | RankFlags.CanPromoteDemote - ), // Emmissary - new RankDefinition(1062960, 3, RankFlags.Member | RankFlags.ControlWarStatus), // Warlord - new RankDefinition(1062959, 4, RankFlags.All) // Leader + ), // Emmissary + new(1062960, 3, RankFlags.Member | RankFlags.ControlWarStatus), // Warlord + new(1062959, 4, RankFlags.All) // Leader }; public RankDefinition(TextDefinition name, int rank, RankFlags flags) @@ -115,7 +115,7 @@ namespace Server.Guilds } } - public static Dictionary Alliances { get; } = new Dictionary(); + public static Dictionary Alliances { get; } = new(); public string Name { get; } @@ -1538,7 +1538,7 @@ namespace Server.Guilds var votingMembers = 0; - for (var i = 0; Members != null && i < Members.Count; ++i) + for (var i = 0; i < Members?.Count; ++i) { var memb = Members[i]; diff --git a/Projects/UOContent/Misc/LanguageStatistics.cs b/Projects/UOContent/Misc/LanguageStatistics.cs index f68c3006a..b19092a8f 100644 --- a/Projects/UOContent/Misc/LanguageStatistics.cs +++ b/Projects/UOContent/Misc/LanguageStatistics.cs @@ -23,141 +23,141 @@ namespace Server.Misc { private static readonly InternationalCode[] InternationalCodes = { - new InternationalCode("ARA", "Arabic", "Saudi Arabia", "العربية", "السعودية"), - new InternationalCode("ARI", "Arabic", "Iraq", "العربية", "العراق"), - new InternationalCode("ARE", "Arabic", "Egypt", "العربية", "مصر"), - new InternationalCode("ARL", "Arabic", "Libya", "العربية", "ليبيا"), - new InternationalCode("ARG", "Arabic", "Algeria", "العربية", "الجزائر"), - new InternationalCode("ARM", "Arabic", "Morocco", "العربية", "المغرب"), - new InternationalCode("ART", "Arabic", "Tunisia", "العربية", "تونس"), - new InternationalCode("ARO", "Arabic", "Oman", "العربية", "عمان"), - new InternationalCode("ARY", "Arabic", "Yemen", "العربية", "اليمن"), - new InternationalCode("ARS", "Arabic", "Syria", "العربية", "سورية"), - new InternationalCode("ARJ", "Arabic", "Jordan", "العربية", "الأردن"), - new InternationalCode("ARB", "Arabic", "Lebanon", "العربية", "لبنان"), - new InternationalCode("ARK", "Arabic", "Kuwait", "العربية", "الكويت"), - new InternationalCode("ARU", "Arabic", "U.A.E.", "العربية", "الامارات"), - new InternationalCode("ARH", "Arabic", "Bahrain", "العربية", "البحرين"), - new InternationalCode("ARQ", "Arabic", "Qatar", "العربية", "قطر"), - new InternationalCode("BGR", "Bulgarian", "Bulgaria", "Български", "България"), - new InternationalCode("CAT", "Catalan", "Spain", "Català", "Espanya"), - new InternationalCode("CHT", "Chinese", "Taiwan", "台語", "臺灣"), - new InternationalCode("CHS", "Chinese", "PRC", "中文", "中国"), - new InternationalCode("ZHH", "Chinese", "Hong Kong", "中文", "香港"), - new InternationalCode("ZHI", "Chinese", "Singapore", "中文", "新加坡"), - new InternationalCode("ZHM", "Chinese", "Macau", "中文", "澳門"), - new InternationalCode("CSY", "Czech", "Czech Republic", "Čeština", "Česká republika"), - new InternationalCode("DAN", "Danish", "Denmark", "Dansk", "Danmark"), - new InternationalCode("DEU", "German", "Germany", "Deutsch", "Deutschland"), - new InternationalCode("DES", "German", "Switzerland", "Deutsch", "der Schweiz"), - new InternationalCode("DEA", "German", "Austria", "Deutsch", "Österreich"), - new InternationalCode("DEL", "German", "Luxembourg", "Deutsch", "Luxembourg"), - new InternationalCode("DEC", "German", "Liechtenstein", "Deutsch", "Liechtenstein"), - new InternationalCode("ELL", "Greek", "Greece", "Ελληνικά", "Ελλάδα"), - new InternationalCode("ENU", "English", "United States"), - new InternationalCode("ENG", "English", "United Kingdom"), - new InternationalCode("ENA", "English", "Australia"), - new InternationalCode("ENC", "English", "Canada"), - new InternationalCode("ENZ", "English", "New Zealand"), - new InternationalCode("ENI", "English", "Ireland"), - new InternationalCode("ENS", "English", "South Africa"), - new InternationalCode("ENJ", "English", "Jamaica"), - new InternationalCode("ENB", "English", "Caribbean"), - new InternationalCode("ENL", "English", "Belize"), - new InternationalCode("ENT", "English", "Trinidad"), - new InternationalCode("ENW", "English", "Zimbabwe"), - new InternationalCode("ENP", "English", "Philippines"), - new InternationalCode("ESP", "Spanish", "Spain (Traditional Sort)", "Español", "España (tipo tradicional)"), - new InternationalCode("ESM", "Spanish", "Mexico", "Español", "México"), - new InternationalCode("ESN", "Spanish", "Spain (International Sort)", "Español", "España (tipo internacional)"), - new InternationalCode("ESG", "Spanish", "Guatemala", "Español", "Guatemala"), - new InternationalCode("ESC", "Spanish", "Costa Rica", "Español", "Costa Rica"), - new InternationalCode("ESA", "Spanish", "Panama", "Español", "Panama"), - new InternationalCode("ESD", "Spanish", "Dominican Republic", "Español", "Republica Dominicana"), - new InternationalCode("ESV", "Spanish", "Venezuela", "Español", "Venezuela"), - new InternationalCode("ESO", "Spanish", "Colombia", "Español", "Colombia"), - new InternationalCode("ESR", "Spanish", "Peru", "Español", "Peru"), - new InternationalCode("ESS", "Spanish", "Argentina", "Español", "Argentina"), - new InternationalCode("ESF", "Spanish", "Ecuador", "Español", "Ecuador"), - new InternationalCode("ESL", "Spanish", "Chile", "Español", "Chile"), - new InternationalCode("ESY", "Spanish", "Uruguay", "Español", "Uruguay"), - new InternationalCode("ESZ", "Spanish", "Paraguay", "Español", "Paraguay"), - new InternationalCode("ESB", "Spanish", "Bolivia", "Español", "Bolivia"), - new InternationalCode("ESE", "Spanish", "El Salvador", "Español", "El Salvador"), - new InternationalCode("ESH", "Spanish", "Honduras", "Español", "Honduras"), - new InternationalCode("ESI", "Spanish", "Nicaragua", "Español", "Nicaragua"), - new InternationalCode("ESU", "Spanish", "Puerto Rico", "Español", "Puerto Rico"), - new InternationalCode("FIN", "Finnish", "Finland", "Suomi", "Suomi"), - new InternationalCode("FRA", "French", "France", "Français", "France"), - new InternationalCode("FRB", "French", "Belgium", "Français", "Belgique"), - new InternationalCode("FRC", "French", "Canada", "Français", "Canada"), - new InternationalCode("FRS", "French", "Switzerland", "Français", "Suisse"), - new InternationalCode("FRL", "French", "Luxembourg", "Français", "Luxembourg"), - new InternationalCode("FRM", "French", "Monaco", "Français", "Monaco"), - new InternationalCode("HEB", "Hebrew", "Israel", "עִבְרִית", "ישׂראל"), - new InternationalCode("HUN", "Hungarian", "Hungary", "Magyar", "Magyarország"), - new InternationalCode("ISL", "Icelandic", "Iceland", "Íslenska", "Ísland"), - new InternationalCode("ITA", "Italian", "Italy", "Italiano", "Italia"), - new InternationalCode("ITS", "Italian", "Switzerland", "Italiano", "Svizzera"), - new InternationalCode("JPN", "Japanese", "Japan", "日本語", "日本"), - new InternationalCode("KOR", "Korean (Extended Wansung)", "Korea", "한국어", "한국"), - new InternationalCode("NLD", "Dutch", "Netherlands", "Nederlands", "Nederland"), - new InternationalCode("NLB", "Dutch", "Belgium", "Nederlands", "België"), - new InternationalCode("NOR", "Norwegian", "Norway (Bokmål)", "Norsk", "Norge (Bokmål)"), - new InternationalCode("NON", "Norwegian", "Norway (Nynorsk)", "Norsk", "Norge (Nynorsk)"), - new InternationalCode("PLK", "Polish", "Poland", "Polski", "Polska"), - new InternationalCode("PTB", "Portuguese", "Brazil", "Português", "Brasil"), - new InternationalCode("PTG", "Portuguese", "Portugal", "Português", "Brasil"), - new InternationalCode("ROM", "Romanian", "Romania", "Limba Română", "România"), - new InternationalCode("RUS", "Russian", "Russia", "Русский", "Россия"), - new InternationalCode("HRV", "Croatian", "Croatia", "Hrvatski", "Hrvatska"), - new InternationalCode("SRL", "Serbian", "Serbia (Latin)", "Srpski", "Srbija i Crna Gora"), - new InternationalCode("SRB", "Serbian", "Serbia (Cyrillic)", "Српски", "Србија и Црна Гора"), - new InternationalCode("SKY", "Slovak", "Slovakia", "Slovenčina", "Slovensko"), - new InternationalCode("SQI", "Albanian", "Albania", "Shqip", "Shqipëria"), - new InternationalCode("SVE", "Swedish", "Sweden", "Svenska", "Sverige"), - new InternationalCode("SVF", "Swedish", "Finland", "Svenska", "Finland"), - new InternationalCode("THA", "Thai", "Thailand", "ภาษาไทย", "ประเทศไทย"), - new InternationalCode("TRK", "Turkish", "Turkey", "Türkçe", "Türkiye"), - new InternationalCode("URP", "Urdu", "Pakistan", "اردو", "پاکستان"), - new InternationalCode("IND", "Indonesian", "Indonesia", "Bahasa Indonesia", "Indonesia"), - new InternationalCode("UKR", "Ukrainian", "Ukraine", "Українська", "Украина"), - new InternationalCode("BEL", "Belarusian", "Belarus", "Беларускі", "Беларусь"), - new InternationalCode("SLV", "Slovene", "Slovenia", "Slovenščina", "Slovenija"), - new InternationalCode("ETI", "Estonian", "Estonia", "Eesti", "Eesti"), - new InternationalCode("LVI", "Latvian", "Latvia", "Latviešu", "Latvija"), - new InternationalCode("LTH", "Lithuanian", "Lithuania", "Lietuvių", "Lietuva"), - new InternationalCode("LTC", "Classic Lithuanian", "Lithuania", "Lietuviškai", "Lietuva"), - new InternationalCode("FAR", "Farsi", "Iran", "فارسى", "ايران"), - new InternationalCode("VIT", "Vietnamese", "Viet Nam", "tiếng Việt", "Việt Nam"), - new InternationalCode("HYE", "Armenian", "Armenia", "Հայերէն", "Հայաստան"), - new InternationalCode("AZE", "Azeri", "Azerbaijan (Latin)", "Azərbaycanca", "Azərbaycan"), - new InternationalCode("AZE", "Azeri", "Azerbaijan (Cyrillic)", "Азәрбајҹанҹа", "Азәрбајҹан"), - new InternationalCode("EUQ", "Basque", "Spain", "Euskera", "Espainia"), - new InternationalCode("MKI", "Macedonian", "Macedonia", "Македонски", "Македонија"), - new InternationalCode("AFK", "Afrikaans", "South Africa", "Afrikaans", "Republiek van Suid-Afrika"), - new InternationalCode("KAT", "Georgian", "Georgia", "ქართული", "საკარტველო"), - new InternationalCode("FOS", "Faeroese", "Faeroe Islands", "Føroyska", "Føroya"), - new InternationalCode("HIN", "Hindi", "India", "हिन्दी", "भारत"), - new InternationalCode("MSL", "Malay", "Malaysia", "Bahasa melayu", "Malaysia"), - new InternationalCode("MSB", "Malay", "Brunei Darussalam", "Bahasa melayu", "Negara Brunei Darussalam"), - new InternationalCode("KAZ", "Kazak", "Kazakstan", "Қазақ", "Қазақстан"), - new InternationalCode("SWK", "Swahili", "Kenya", "Kiswahili", "Kenya"), - new InternationalCode("UZB", "Uzbek", "Uzbekistan (Latin)", "O'zbek", "O'zbekiston"), - new InternationalCode("UZB", "Uzbek", "Uzbekistan (Cyrillic)", "Ўзбек", "Ўзбекистон"), - new InternationalCode("TAT", "Tatar", "Tatarstan", "Татарча", "Татарстан"), - new InternationalCode("BEN", "Bengali", "India", "বাংলা", "ভারত"), - new InternationalCode("PAN", "Punjabi", "India", "ਪੰਜਾਬੀ", "ਭਾਰਤ"), - new InternationalCode("GUJ", "Gujarati", "India", "ગુજરાતી", "ભારત"), - new InternationalCode("ORI", "Oriya", "India", "ଓଡ଼ିଆ", "ଭାରତ"), - new InternationalCode("TAM", "Tamil", "India", "தமிழ்", "இந்தியா"), - new InternationalCode("TEL", "Telugu", "India", "తెలుగు", "భారత"), - new InternationalCode("KAN", "Kannada", "India", "ಕನ್ನಡ", "ಭಾರತ"), - new InternationalCode("MAL", "Malayalam", "India", "മലയാളം", "ഭാരത"), - new InternationalCode("ASM", "Assamese", "India", "অসমিয়া", "Bhārat"), // missing correct country name - new InternationalCode("MAR", "Marathi", "India", "मराठी", "भारत"), - new InternationalCode("SAN", "Sanskrit", "India", "संस्कृत", "भारतम्"), - new InternationalCode("KOK", "Konkani", "India", "कोंकणी", "भारत") + new("ARA", "Arabic", "Saudi Arabia", "العربية", "السعودية"), + new("ARI", "Arabic", "Iraq", "العربية", "العراق"), + new("ARE", "Arabic", "Egypt", "العربية", "مصر"), + new("ARL", "Arabic", "Libya", "العربية", "ليبيا"), + new("ARG", "Arabic", "Algeria", "العربية", "الجزائر"), + new("ARM", "Arabic", "Morocco", "العربية", "المغرب"), + new("ART", "Arabic", "Tunisia", "العربية", "تونس"), + new("ARO", "Arabic", "Oman", "العربية", "عمان"), + new("ARY", "Arabic", "Yemen", "العربية", "اليمن"), + new("ARS", "Arabic", "Syria", "العربية", "سورية"), + new("ARJ", "Arabic", "Jordan", "العربية", "الأردن"), + new("ARB", "Arabic", "Lebanon", "العربية", "لبنان"), + new("ARK", "Arabic", "Kuwait", "العربية", "الكويت"), + new("ARU", "Arabic", "U.A.E.", "العربية", "الامارات"), + new("ARH", "Arabic", "Bahrain", "العربية", "البحرين"), + new("ARQ", "Arabic", "Qatar", "العربية", "قطر"), + new("BGR", "Bulgarian", "Bulgaria", "Български", "България"), + new("CAT", "Catalan", "Spain", "Català", "Espanya"), + new("CHT", "Chinese", "Taiwan", "台語", "臺灣"), + new("CHS", "Chinese", "PRC", "中文", "中国"), + new("ZHH", "Chinese", "Hong Kong", "中文", "香港"), + new("ZHI", "Chinese", "Singapore", "中文", "新加坡"), + new("ZHM", "Chinese", "Macau", "中文", "澳門"), + new("CSY", "Czech", "Czech Republic", "Čeština", "Česká republika"), + new("DAN", "Danish", "Denmark", "Dansk", "Danmark"), + new("DEU", "German", "Germany", "Deutsch", "Deutschland"), + new("DES", "German", "Switzerland", "Deutsch", "der Schweiz"), + new("DEA", "German", "Austria", "Deutsch", "Österreich"), + new("DEL", "German", "Luxembourg", "Deutsch", "Luxembourg"), + new("DEC", "German", "Liechtenstein", "Deutsch", "Liechtenstein"), + new("ELL", "Greek", "Greece", "Ελληνικά", "Ελλάδα"), + new("ENU", "English", "United States"), + new("ENG", "English", "United Kingdom"), + new("ENA", "English", "Australia"), + new("ENC", "English", "Canada"), + new("ENZ", "English", "New Zealand"), + new("ENI", "English", "Ireland"), + new("ENS", "English", "South Africa"), + new("ENJ", "English", "Jamaica"), + new("ENB", "English", "Caribbean"), + new("ENL", "English", "Belize"), + new("ENT", "English", "Trinidad"), + new("ENW", "English", "Zimbabwe"), + new("ENP", "English", "Philippines"), + new("ESP", "Spanish", "Spain (Traditional Sort)", "Español", "España (tipo tradicional)"), + new("ESM", "Spanish", "Mexico", "Español", "México"), + new("ESN", "Spanish", "Spain (International Sort)", "Español", "España (tipo internacional)"), + new("ESG", "Spanish", "Guatemala", "Español", "Guatemala"), + new("ESC", "Spanish", "Costa Rica", "Español", "Costa Rica"), + new("ESA", "Spanish", "Panama", "Español", "Panama"), + new("ESD", "Spanish", "Dominican Republic", "Español", "Republica Dominicana"), + new("ESV", "Spanish", "Venezuela", "Español", "Venezuela"), + new("ESO", "Spanish", "Colombia", "Español", "Colombia"), + new("ESR", "Spanish", "Peru", "Español", "Peru"), + new("ESS", "Spanish", "Argentina", "Español", "Argentina"), + new("ESF", "Spanish", "Ecuador", "Español", "Ecuador"), + new("ESL", "Spanish", "Chile", "Español", "Chile"), + new("ESY", "Spanish", "Uruguay", "Español", "Uruguay"), + new("ESZ", "Spanish", "Paraguay", "Español", "Paraguay"), + new("ESB", "Spanish", "Bolivia", "Español", "Bolivia"), + new("ESE", "Spanish", "El Salvador", "Español", "El Salvador"), + new("ESH", "Spanish", "Honduras", "Español", "Honduras"), + new("ESI", "Spanish", "Nicaragua", "Español", "Nicaragua"), + new("ESU", "Spanish", "Puerto Rico", "Español", "Puerto Rico"), + new("FIN", "Finnish", "Finland", "Suomi", "Suomi"), + new("FRA", "French", "France", "Français", "France"), + new("FRB", "French", "Belgium", "Français", "Belgique"), + new("FRC", "French", "Canada", "Français", "Canada"), + new("FRS", "French", "Switzerland", "Français", "Suisse"), + new("FRL", "French", "Luxembourg", "Français", "Luxembourg"), + new("FRM", "French", "Monaco", "Français", "Monaco"), + new("HEB", "Hebrew", "Israel", "עִבְרִית", "ישׂראל"), + new("HUN", "Hungarian", "Hungary", "Magyar", "Magyarország"), + new("ISL", "Icelandic", "Iceland", "Íslenska", "Ísland"), + new("ITA", "Italian", "Italy", "Italiano", "Italia"), + new("ITS", "Italian", "Switzerland", "Italiano", "Svizzera"), + new("JPN", "Japanese", "Japan", "日本語", "日本"), + new("KOR", "Korean (Extended Wansung)", "Korea", "한국어", "한국"), + new("NLD", "Dutch", "Netherlands", "Nederlands", "Nederland"), + new("NLB", "Dutch", "Belgium", "Nederlands", "België"), + new("NOR", "Norwegian", "Norway (Bokmål)", "Norsk", "Norge (Bokmål)"), + new("NON", "Norwegian", "Norway (Nynorsk)", "Norsk", "Norge (Nynorsk)"), + new("PLK", "Polish", "Poland", "Polski", "Polska"), + new("PTB", "Portuguese", "Brazil", "Português", "Brasil"), + new("PTG", "Portuguese", "Portugal", "Português", "Brasil"), + new("ROM", "Romanian", "Romania", "Limba Română", "România"), + new("RUS", "Russian", "Russia", "Русский", "Россия"), + new("HRV", "Croatian", "Croatia", "Hrvatski", "Hrvatska"), + new("SRL", "Serbian", "Serbia (Latin)", "Srpski", "Srbija i Crna Gora"), + new("SRB", "Serbian", "Serbia (Cyrillic)", "Српски", "Србија и Црна Гора"), + new("SKY", "Slovak", "Slovakia", "Slovenčina", "Slovensko"), + new("SQI", "Albanian", "Albania", "Shqip", "Shqipëria"), + new("SVE", "Swedish", "Sweden", "Svenska", "Sverige"), + new("SVF", "Swedish", "Finland", "Svenska", "Finland"), + new("THA", "Thai", "Thailand", "ภาษาไทย", "ประเทศไทย"), + new("TRK", "Turkish", "Turkey", "Türkçe", "Türkiye"), + new("URP", "Urdu", "Pakistan", "اردو", "پاکستان"), + new("IND", "Indonesian", "Indonesia", "Bahasa Indonesia", "Indonesia"), + new("UKR", "Ukrainian", "Ukraine", "Українська", "Украина"), + new("BEL", "Belarusian", "Belarus", "Беларускі", "Беларусь"), + new("SLV", "Slovene", "Slovenia", "Slovenščina", "Slovenija"), + new("ETI", "Estonian", "Estonia", "Eesti", "Eesti"), + new("LVI", "Latvian", "Latvia", "Latviešu", "Latvija"), + new("LTH", "Lithuanian", "Lithuania", "Lietuvių", "Lietuva"), + new("LTC", "Classic Lithuanian", "Lithuania", "Lietuviškai", "Lietuva"), + new("FAR", "Farsi", "Iran", "فارسى", "ايران"), + new("VIT", "Vietnamese", "Viet Nam", "tiếng Việt", "Việt Nam"), + new("HYE", "Armenian", "Armenia", "Հայերէն", "Հայաստան"), + new("AZE", "Azeri", "Azerbaijan (Latin)", "Azərbaycanca", "Azərbaycan"), + new("AZE", "Azeri", "Azerbaijan (Cyrillic)", "Азәрбајҹанҹа", "Азәрбајҹан"), + new("EUQ", "Basque", "Spain", "Euskera", "Espainia"), + new("MKI", "Macedonian", "Macedonia", "Македонски", "Македонија"), + new("AFK", "Afrikaans", "South Africa", "Afrikaans", "Republiek van Suid-Afrika"), + new("KAT", "Georgian", "Georgia", "ქართული", "საკარტველო"), + new("FOS", "Faeroese", "Faeroe Islands", "Føroyska", "Føroya"), + new("HIN", "Hindi", "India", "हिन्दी", "भारत"), + new("MSL", "Malay", "Malaysia", "Bahasa melayu", "Malaysia"), + new("MSB", "Malay", "Brunei Darussalam", "Bahasa melayu", "Negara Brunei Darussalam"), + new("KAZ", "Kazak", "Kazakstan", "Қазақ", "Қазақстан"), + new("SWK", "Swahili", "Kenya", "Kiswahili", "Kenya"), + new("UZB", "Uzbek", "Uzbekistan (Latin)", "O'zbek", "O'zbekiston"), + new("UZB", "Uzbek", "Uzbekistan (Cyrillic)", "Ўзбек", "Ўзбекистон"), + new("TAT", "Tatar", "Tatarstan", "Татарча", "Татарстан"), + new("BEN", "Bengali", "India", "বাংলা", "ভারত"), + new("PAN", "Punjabi", "India", "ਪੰਜਾਬੀ", "ਭਾਰਤ"), + new("GUJ", "Gujarati", "India", "ગુજરાતી", "ભારત"), + new("ORI", "Oriya", "India", "ଓଡ଼ିଆ", "ଭାରତ"), + new("TAM", "Tamil", "India", "தமிழ்", "இந்தியா"), + new("TEL", "Telugu", "India", "తెలుగు", "భారత"), + new("KAN", "Kannada", "India", "ಕನ್ನಡ", "ಭಾರತ"), + new("MAL", "Malayalam", "India", "മലയാളം", "ഭാരത"), + new("ASM", "Assamese", "India", "অসমিয়া", "Bhārat"), // missing correct country name + new("MAR", "Marathi", "India", "मराठी", "भारत"), + new("SAN", "Sanskrit", "India", "संस्कृत", "भारतम्"), + new("KOK", "Konkani", "India", "कोंकणी", "भारत") }; private static readonly bool DefaultLocalNames = false; @@ -166,7 +166,7 @@ namespace Server.Misc private static string GetFormattedInfo(string code) { - if (code == null || code.Length != 3) + if (code?.Length != 3) { return $"Unknown code {code}"; } @@ -341,7 +341,7 @@ namespace Server.Misc private class InternationalCodeComparer : IComparer { - public static readonly InternationalCodeComparer Instance = new InternationalCodeComparer(); + public static readonly InternationalCodeComparer Instance = new(); public int Compare(InternationalCodeCounter x, InternationalCodeCounter y) { diff --git a/Projects/UOContent/Misc/LootPack.cs b/Projects/UOContent/Misc/LootPack.cs index 1985eebb7..ae9a7df59 100644 --- a/Projects/UOContent/Misc/LootPack.cs +++ b/Projects/UOContent/Misc/LootPack.cs @@ -9,82 +9,82 @@ namespace Server { public static readonly LootPackItem[] Gold = { - new LootPackItem(typeof(Gold), 1) + new(typeof(Gold), 1) }; public static readonly LootPackItem[] Instruments = { - new LootPackItem(typeof(BaseInstrument), 1) + new(typeof(BaseInstrument), 1) }; public static readonly LootPackItem[] LowScrollItems = { - new LootPackItem(typeof(ClumsyScroll), 1) + new(typeof(ClumsyScroll), 1) }; public static readonly LootPackItem[] MedScrollItems = { - new LootPackItem(typeof(ArchCureScroll), 1) + new(typeof(ArchCureScroll), 1) }; public static readonly LootPackItem[] HighScrollItems = { - new LootPackItem(typeof(SummonAirElementalScroll), 1) + new(typeof(SummonAirElementalScroll), 1) }; public static readonly LootPackItem[] GemItems = { - new LootPackItem(typeof(Amber), 1) + new(typeof(Amber), 1) }; public static readonly LootPackItem[] PotionItems = { - new LootPackItem(typeof(AgilityPotion), 1), - new LootPackItem(typeof(StrengthPotion), 1), - new LootPackItem(typeof(RefreshPotion), 1), - new LootPackItem(typeof(LesserCurePotion), 1), - new LootPackItem(typeof(LesserHealPotion), 1), - new LootPackItem(typeof(LesserPoisonPotion), 1) + new(typeof(AgilityPotion), 1), + new(typeof(StrengthPotion), 1), + new(typeof(RefreshPotion), 1), + new(typeof(LesserCurePotion), 1), + new(typeof(LesserHealPotion), 1), + new(typeof(LesserPoisonPotion), 1) }; public static readonly LootPackItem[] OldMagicItems = { - new LootPackItem(typeof(BaseJewel), 1), - new LootPackItem(typeof(BaseArmor), 4), - new LootPackItem(typeof(BaseWeapon), 3), - new LootPackItem(typeof(BaseRanged), 1), - new LootPackItem(typeof(BaseShield), 1) + new(typeof(BaseJewel), 1), + new(typeof(BaseArmor), 4), + new(typeof(BaseWeapon), 3), + new(typeof(BaseRanged), 1), + new(typeof(BaseShield), 1) }; - public static readonly LootPack LowScrolls = new LootPack( + public static readonly LootPack LowScrolls = new( new[] { new LootPackEntry(false, LowScrollItems, 100.00, 1) } ); - public static readonly LootPack MedScrolls = new LootPack( + public static readonly LootPack MedScrolls = new( new[] { new LootPackEntry(false, MedScrollItems, 100.00, 1) } ); - public static readonly LootPack HighScrolls = new LootPack( + public static readonly LootPack HighScrolls = new( new[] { new LootPackEntry(false, HighScrollItems, 100.00, 1) } ); - public static readonly LootPack Gems = new LootPack( + public static readonly LootPack Gems = new( new[] { new LootPackEntry(false, GemItems, 100.00, 1) } ); - public static readonly LootPack Potions = new LootPack( + public static readonly LootPack Potions = new( new[] { new LootPackEntry(false, PotionItems, 100.00, 1) @@ -193,14 +193,14 @@ namespace Server public static readonly LootPackItem[] AosMagicItemsRichType1 = { - new LootPackItem(typeof(BaseWeapon), 211), - new LootPackItem(typeof(BaseRanged), 53), - new LootPackItem(typeof(BaseArmor), 303), - new LootPackItem(typeof(BaseShield), 39), - new LootPackItem(typeof(BaseJewel), 158) + new(typeof(BaseWeapon), 211), + new(typeof(BaseRanged), 53), + new(typeof(BaseArmor), 303), + new(typeof(BaseShield), 39), + new(typeof(BaseJewel), 158) }; - public static readonly LootPack MlRich = new LootPack( + public static readonly LootPack MlRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "4d50+450"), @@ -213,86 +213,86 @@ namespace Server public static readonly LootPackItem[] AosMagicItemsPoor = { - new LootPackItem(typeof(BaseWeapon), 3), - new LootPackItem(typeof(BaseRanged), 1), - new LootPackItem(typeof(BaseArmor), 4), - new LootPackItem(typeof(BaseShield), 1), - new LootPackItem(typeof(BaseJewel), 2) + new(typeof(BaseWeapon), 3), + new(typeof(BaseRanged), 1), + new(typeof(BaseArmor), 4), + new(typeof(BaseShield), 1), + new(typeof(BaseJewel), 2) }; public static readonly LootPackItem[] AosMagicItemsMeagerType1 = { - new LootPackItem(typeof(BaseWeapon), 56), - new LootPackItem(typeof(BaseRanged), 14), - new LootPackItem(typeof(BaseArmor), 81), - new LootPackItem(typeof(BaseShield), 11), - new LootPackItem(typeof(BaseJewel), 42) + new(typeof(BaseWeapon), 56), + new(typeof(BaseRanged), 14), + new(typeof(BaseArmor), 81), + new(typeof(BaseShield), 11), + new(typeof(BaseJewel), 42) }; public static readonly LootPackItem[] AosMagicItemsMeagerType2 = { - new LootPackItem(typeof(BaseWeapon), 28), - new LootPackItem(typeof(BaseRanged), 7), - new LootPackItem(typeof(BaseArmor), 40), - new LootPackItem(typeof(BaseShield), 5), - new LootPackItem(typeof(BaseJewel), 21) + new(typeof(BaseWeapon), 28), + new(typeof(BaseRanged), 7), + new(typeof(BaseArmor), 40), + new(typeof(BaseShield), 5), + new(typeof(BaseJewel), 21) }; public static readonly LootPackItem[] AosMagicItemsAverageType1 = { - new LootPackItem(typeof(BaseWeapon), 90), - new LootPackItem(typeof(BaseRanged), 23), - new LootPackItem(typeof(BaseArmor), 130), - new LootPackItem(typeof(BaseShield), 17), - new LootPackItem(typeof(BaseJewel), 68) + new(typeof(BaseWeapon), 90), + new(typeof(BaseRanged), 23), + new(typeof(BaseArmor), 130), + new(typeof(BaseShield), 17), + new(typeof(BaseJewel), 68) }; public static readonly LootPackItem[] AosMagicItemsAverageType2 = { - new LootPackItem(typeof(BaseWeapon), 54), - new LootPackItem(typeof(BaseRanged), 13), - new LootPackItem(typeof(BaseArmor), 77), - new LootPackItem(typeof(BaseShield), 10), - new LootPackItem(typeof(BaseJewel), 40) + new(typeof(BaseWeapon), 54), + new(typeof(BaseRanged), 13), + new(typeof(BaseArmor), 77), + new(typeof(BaseShield), 10), + new(typeof(BaseJewel), 40) }; public static readonly LootPackItem[] AosMagicItemsRichType2 = { - new LootPackItem(typeof(BaseWeapon), 170), - new LootPackItem(typeof(BaseRanged), 43), - new LootPackItem(typeof(BaseArmor), 245), - new LootPackItem(typeof(BaseShield), 32), - new LootPackItem(typeof(BaseJewel), 128) + new(typeof(BaseWeapon), 170), + new(typeof(BaseRanged), 43), + new(typeof(BaseArmor), 245), + new(typeof(BaseShield), 32), + new(typeof(BaseJewel), 128) }; public static readonly LootPackItem[] AosMagicItemsFilthyRichType1 = { - new LootPackItem(typeof(BaseWeapon), 219), - new LootPackItem(typeof(BaseRanged), 55), - new LootPackItem(typeof(BaseArmor), 315), - new LootPackItem(typeof(BaseShield), 41), - new LootPackItem(typeof(BaseJewel), 164) + new(typeof(BaseWeapon), 219), + new(typeof(BaseRanged), 55), + new(typeof(BaseArmor), 315), + new(typeof(BaseShield), 41), + new(typeof(BaseJewel), 164) }; public static readonly LootPackItem[] AosMagicItemsFilthyRichType2 = { - new LootPackItem(typeof(BaseWeapon), 239), - new LootPackItem(typeof(BaseRanged), 60), - new LootPackItem(typeof(BaseArmor), 343), - new LootPackItem(typeof(BaseShield), 90), - new LootPackItem(typeof(BaseJewel), 45) + new(typeof(BaseWeapon), 239), + new(typeof(BaseRanged), 60), + new(typeof(BaseArmor), 343), + new(typeof(BaseShield), 90), + new(typeof(BaseJewel), 45) }; public static readonly LootPackItem[] AosMagicItemsUltraRich = { - new LootPackItem(typeof(BaseWeapon), 276), - new LootPackItem(typeof(BaseRanged), 69), - new LootPackItem(typeof(BaseArmor), 397), - new LootPackItem(typeof(BaseShield), 52), - new LootPackItem(typeof(BaseJewel), 207) + new(typeof(BaseWeapon), 276), + new(typeof(BaseRanged), 69), + new(typeof(BaseArmor), 397), + new(typeof(BaseShield), 52), + new(typeof(BaseJewel), 207) }; - public static readonly LootPack SePoor = new LootPack( + public static readonly LootPack SePoor = new( new[] { new LootPackEntry(true, Gold, 100.00, "2d10+20"), @@ -301,7 +301,7 @@ namespace Server } ); - public static readonly LootPack SeMeager = new LootPack( + public static readonly LootPack SeMeager = new( new[] { new LootPackEntry(true, Gold, 100.00, "4d10+40"), @@ -311,7 +311,7 @@ namespace Server } ); - public static readonly LootPack SeAverage = new LootPack( + public static readonly LootPack SeAverage = new( new[] { new LootPackEntry(true, Gold, 100.00, "8d10+100"), @@ -322,7 +322,7 @@ namespace Server } ); - public static readonly LootPack SeRich = new LootPack( + public static readonly LootPack SeRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "15d10+225"), @@ -333,7 +333,7 @@ namespace Server } ); - public static readonly LootPack SeFilthyRich = new LootPack( + public static readonly LootPack SeFilthyRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "3d100+400"), @@ -344,7 +344,7 @@ namespace Server } ); - public static readonly LootPack SeUltraRich = new LootPack( + public static readonly LootPack SeUltraRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "6d100+600"), @@ -358,7 +358,7 @@ namespace Server } ); - public static readonly LootPack SeSuperBoss = new LootPack( + public static readonly LootPack SeSuperBoss = new( new[] { new LootPackEntry(true, Gold, 100.00, "10d100+800"), @@ -376,7 +376,7 @@ namespace Server } ); - public static readonly LootPack AosPoor = new LootPack( + public static readonly LootPack AosPoor = new( new[] { new LootPackEntry(true, Gold, 100.00, "1d10+10"), @@ -385,7 +385,7 @@ namespace Server } ); - public static readonly LootPack AosMeager = new LootPack( + public static readonly LootPack AosMeager = new( new[] { new LootPackEntry(true, Gold, 100.00, "3d10+20"), @@ -395,7 +395,7 @@ namespace Server } ); - public static readonly LootPack AosAverage = new LootPack( + public static readonly LootPack AosAverage = new( new[] { new LootPackEntry(true, Gold, 100.00, "5d10+50"), @@ -406,7 +406,7 @@ namespace Server } ); - public static readonly LootPack AosRich = new LootPack( + public static readonly LootPack AosRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "10d10+150"), @@ -417,7 +417,7 @@ namespace Server } ); - public static readonly LootPack AosFilthyRich = new LootPack( + public static readonly LootPack AosFilthyRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "2d100+200"), @@ -429,7 +429,7 @@ namespace Server } ); - public static readonly LootPack AosUltraRich = new LootPack( + public static readonly LootPack AosUltraRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "5d100+500"), @@ -443,7 +443,7 @@ namespace Server } ); - public static readonly LootPack AosSuperBoss = new LootPack( + public static readonly LootPack AosSuperBoss = new( new[] { new LootPackEntry(true, Gold, 100.00, "5d100+500"), @@ -461,7 +461,7 @@ namespace Server } ); - public static readonly LootPack OldPoor = new LootPack( + public static readonly LootPack OldPoor = new( new[] { new LootPackEntry(true, Gold, 100.00, "1d25"), @@ -469,7 +469,7 @@ namespace Server } ); - public static readonly LootPack OldMeager = new LootPack( + public static readonly LootPack OldMeager = new( new[] { new LootPackEntry(true, Gold, 100.00, "5d10+25"), @@ -479,7 +479,7 @@ namespace Server } ); - public static readonly LootPack OldAverage = new LootPack( + public static readonly LootPack OldAverage = new( new[] { new LootPackEntry(true, Gold, 100.00, "10d10+50"), @@ -490,7 +490,7 @@ namespace Server } ); - public static readonly LootPack OldRich = new LootPack( + public static readonly LootPack OldRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "10d10+250"), @@ -501,7 +501,7 @@ namespace Server } ); - public static readonly LootPack OldFilthyRich = new LootPack( + public static readonly LootPack OldFilthyRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "2d125+400"), @@ -513,7 +513,7 @@ namespace Server } ); - public static readonly LootPack OldUltraRich = new LootPack( + public static readonly LootPack OldUltraRich = new( new[] { new LootPackEntry(true, Gold, 100.00, "5d100+500"), @@ -527,7 +527,7 @@ namespace Server } ); - public static readonly LootPack OldSuperBoss = new LootPack( + public static readonly LootPack OldSuperBoss = new( new[] { new LootPackEntry(true, Gold, 100.00, "5d100+500"), diff --git a/Projects/UOContent/Misc/NameList.cs b/Projects/UOContent/Misc/NameList.cs index 81d3e8217..065fc9739 100644 --- a/Projects/UOContent/Misc/NameList.cs +++ b/Projects/UOContent/Misc/NameList.cs @@ -9,7 +9,7 @@ namespace Server public class NameList { private static readonly Dictionary m_Table = - new Dictionary(StringComparer.OrdinalIgnoreCase); + new(StringComparer.OrdinalIgnoreCase); [JsonPropertyName("type")] public string Type { get; set; } diff --git a/Projects/UOContent/Misc/Notoriety.cs b/Projects/UOContent/Misc/Notoriety.cs index e4ed616e0..0a8234d33 100644 --- a/Projects/UOContent/Misc/Notoriety.cs +++ b/Projects/UOContent/Misc/Notoriety.cs @@ -365,7 +365,7 @@ namespace Server.Misc return Notoriety.Murderer; } - if (target.Criminal && target.Map != null && (target.Map.Rules & MapRules.HarmfulRestrictions) == 0) + if (target.Criminal && (target.Map?.Rules & MapRules.HarmfulRestrictions) == 0) { return Notoriety.Criminal; } diff --git a/Projects/UOContent/Misc/RegenRates.cs b/Projects/UOContent/Misc/RegenRates.cs index d7280c6f2..674d2d444 100644 --- a/Projects/UOContent/Misc/RegenRates.cs +++ b/Projects/UOContent/Misc/RegenRates.cs @@ -254,7 +254,7 @@ namespace Server.Misc private static double GetArmorMeditationValue(BaseArmor ar) { - if (ar == null || ar.ArmorAttributes.MageArmor != 0 || ar.Attributes.SpellChanneling != 0) + if (ar?.ArmorAttributes.MageArmor != 0 || ar.Attributes.SpellChanneling != 0) { return 0.0; } diff --git a/Projects/UOContent/Misc/ResourceInfo.cs b/Projects/UOContent/Misc/ResourceInfo.cs index 37e59457d..e8214ed1a 100644 --- a/Projects/UOContent/Misc/ResourceInfo.cs +++ b/Projects/UOContent/Misc/ResourceInfo.cs @@ -417,7 +417,7 @@ namespace Server.Items { private static readonly CraftResourceInfo[] m_MetalInfo = { - new CraftResourceInfo( + new( 0x000, 1053109, "Iron", @@ -427,7 +427,7 @@ namespace Server.Items typeof(IronOre), typeof(Granite) ), - new CraftResourceInfo( + new( 0x973, 1053108, "Dull Copper", @@ -437,7 +437,7 @@ namespace Server.Items typeof(DullCopperOre), typeof(DullCopperGranite) ), - new CraftResourceInfo( + new( 0x966, 1053107, "Shadow Iron", @@ -447,7 +447,7 @@ namespace Server.Items typeof(ShadowIronOre), typeof(ShadowIronGranite) ), - new CraftResourceInfo( + new( 0x96D, 1053106, "Copper", @@ -457,7 +457,7 @@ namespace Server.Items typeof(CopperOre), typeof(CopperGranite) ), - new CraftResourceInfo( + new( 0x972, 1053105, "Bronze", @@ -467,7 +467,7 @@ namespace Server.Items typeof(BronzeOre), typeof(BronzeGranite) ), - new CraftResourceInfo( + new( 0x8A5, 1053104, "Gold", @@ -477,7 +477,7 @@ namespace Server.Items typeof(GoldOre), typeof(GoldGranite) ), - new CraftResourceInfo( + new( 0x979, 1053103, "Agapite", @@ -487,7 +487,7 @@ namespace Server.Items typeof(AgapiteOre), typeof(AgapiteGranite) ), - new CraftResourceInfo( + new( 0x89F, 1053102, "Verite", @@ -497,7 +497,7 @@ namespace Server.Items typeof(VeriteOre), typeof(VeriteGranite) ), - new CraftResourceInfo( + new( 0x8AB, 1053101, "Valorite", @@ -511,7 +511,7 @@ namespace Server.Items private static readonly CraftResourceInfo[] m_ScaleInfo = { - new CraftResourceInfo( + new( 0x66D, 1053129, "Red Scales", @@ -519,7 +519,7 @@ namespace Server.Items CraftResource.RedScales, typeof(RedScales) ), - new CraftResourceInfo( + new( 0x8A8, 1053130, "Yellow Scales", @@ -527,7 +527,7 @@ namespace Server.Items CraftResource.YellowScales, typeof(YellowScales) ), - new CraftResourceInfo( + new( 0x455, 1053131, "Black Scales", @@ -535,7 +535,7 @@ namespace Server.Items CraftResource.BlackScales, typeof(BlackScales) ), - new CraftResourceInfo( + new( 0x851, 1053132, "Green Scales", @@ -543,7 +543,7 @@ namespace Server.Items CraftResource.GreenScales, typeof(GreenScales) ), - new CraftResourceInfo( + new( 0x8FD, 1053133, "White Scales", @@ -551,7 +551,7 @@ namespace Server.Items CraftResource.WhiteScales, typeof(WhiteScales) ), - new CraftResourceInfo( + new( 0x8B0, 1053134, "Blue Scales", @@ -563,7 +563,7 @@ namespace Server.Items private static readonly CraftResourceInfo[] m_LeatherInfo = { - new CraftResourceInfo( + new( 0x000, 1049353, "Normal", @@ -572,7 +572,7 @@ namespace Server.Items typeof(Leather), typeof(Hides) ), - new CraftResourceInfo( + new( 0x283, 1049354, "Spined", @@ -581,7 +581,7 @@ namespace Server.Items typeof(SpinedLeather), typeof(SpinedHides) ), - new CraftResourceInfo( + new( 0x227, 1049355, "Horned", @@ -590,7 +590,7 @@ namespace Server.Items typeof(HornedLeather), typeof(HornedHides) ), - new CraftResourceInfo( + new( 0x1C1, 1049356, "Barbed", @@ -603,7 +603,7 @@ namespace Server.Items private static readonly CraftResourceInfo[] m_AOSLeatherInfo = { - new CraftResourceInfo( + new( 0x000, 1049353, "Normal", @@ -612,7 +612,7 @@ namespace Server.Items typeof(Leather), typeof(Hides) ), - new CraftResourceInfo( + new( 0x8AC, 1049354, "Spined", @@ -621,7 +621,7 @@ namespace Server.Items typeof(SpinedLeather), typeof(SpinedHides) ), - new CraftResourceInfo( + new( 0x845, 1049355, "Horned", @@ -630,7 +630,7 @@ namespace Server.Items typeof(HornedLeather), typeof(HornedHides) ), - new CraftResourceInfo( + new( 0x851, 1049356, "Barbed", @@ -643,7 +643,7 @@ namespace Server.Items private static readonly CraftResourceInfo[] m_WoodInfo = { - new CraftResourceInfo( + new( 0x000, 1011542, "Normal", @@ -652,7 +652,7 @@ namespace Server.Items typeof(Log), typeof(Board) ), - new CraftResourceInfo( + new( 0x7DA, 1072533, "Oak", @@ -661,7 +661,7 @@ namespace Server.Items typeof(OakLog), typeof(OakBoard) ), - new CraftResourceInfo( + new( 0x4A7, 1072534, "Ash", @@ -670,7 +670,7 @@ namespace Server.Items typeof(AshLog), typeof(AshBoard) ), - new CraftResourceInfo( + new( 0x4A8, 1072535, "Yew", @@ -679,7 +679,7 @@ namespace Server.Items typeof(YewLog), typeof(YewBoard) ), - new CraftResourceInfo( + new( 0x4A9, 1072536, "Heartwood", @@ -688,7 +688,7 @@ namespace Server.Items typeof(HeartwoodLog), typeof(HeartwoodBoard) ), - new CraftResourceInfo( + new( 0x4AA, 1072538, "Bloodwood", @@ -697,7 +697,7 @@ namespace Server.Items typeof(BloodwoodLog), typeof(BloodwoodBoard) ), - new CraftResourceInfo( + new( 0x47F, 1072539, "Frostwood", @@ -934,15 +934,15 @@ namespace Server.Items // No changes to it should be required for custom resources. public class OreInfo { - public static readonly OreInfo Iron = new OreInfo(0, 0x000, "Iron"); - public static readonly OreInfo DullCopper = new OreInfo(1, 0x973, "Dull Copper"); - public static readonly OreInfo ShadowIron = new OreInfo(2, 0x966, "Shadow Iron"); - public static readonly OreInfo Copper = new OreInfo(3, 0x96D, "Copper"); - public static readonly OreInfo Bronze = new OreInfo(4, 0x972, "Bronze"); - public static readonly OreInfo Gold = new OreInfo(5, 0x8A5, "Gold"); - public static readonly OreInfo Agapite = new OreInfo(6, 0x979, "Agapite"); - public static readonly OreInfo Verite = new OreInfo(7, 0x89F, "Verite"); - public static readonly OreInfo Valorite = new OreInfo(8, 0x8AB, "Valorite"); + public static readonly OreInfo Iron = new(0, 0x000, "Iron"); + public static readonly OreInfo DullCopper = new(1, 0x973, "Dull Copper"); + public static readonly OreInfo ShadowIron = new(2, 0x966, "Shadow Iron"); + public static readonly OreInfo Copper = new(3, 0x96D, "Copper"); + public static readonly OreInfo Bronze = new(4, 0x972, "Bronze"); + public static readonly OreInfo Gold = new(5, 0x8A5, "Gold"); + public static readonly OreInfo Agapite = new(6, 0x979, "Agapite"); + public static readonly OreInfo Verite = new(7, 0x89F, "Verite"); + public static readonly OreInfo Valorite = new(8, 0x8AB, "Valorite"); public OreInfo(int level, int hue, string name) { diff --git a/Projects/UOContent/Misc/ShardPoller.cs b/Projects/UOContent/Misc/ShardPoller.cs index 6fd437b54..82c3769d1 100644 --- a/Projects/UOContent/Misc/ShardPoller.cs +++ b/Projects/UOContent/Misc/ShardPoller.cs @@ -10,7 +10,7 @@ namespace Server.Misc { public class ShardPoller : Item { - private static readonly List m_ActivePollers = new List(); + private static readonly List m_ActivePollers = new(); private bool m_Active; private string m_Title; @@ -621,7 +621,7 @@ namespace Server.Misc public class ShardPollPrompt : Prompt { private static readonly Regex m_UrlRegex = - new Regex(@"\[url(?:=(.*?))?\](.*?)\[/url\]", RegexOptions.IgnoreCase | RegexOptions.Compiled); + new(@"\[url(?:=(.*?))?\](.*?)\[/url\]", RegexOptions.IgnoreCase | RegexOptions.Compiled); private readonly ShardPollOption m_Option; private readonly ShardPoller m_Poller; diff --git a/Projects/UOContent/Misc/TextDefinition.cs b/Projects/UOContent/Misc/TextDefinition.cs index ff7a0d0b1..8fbb4407c 100644 --- a/Projects/UOContent/Misc/TextDefinition.cs +++ b/Projects/UOContent/Misc/TextDefinition.cs @@ -83,9 +83,9 @@ namespace Server } } - public static implicit operator TextDefinition(int v) => new TextDefinition(v); + public static implicit operator TextDefinition(int v) => new(v); - public static implicit operator TextDefinition(string s) => new TextDefinition(s); + public static implicit operator TextDefinition(string s) => new(s); public static implicit operator int(TextDefinition m) => m?.Number ?? 0; diff --git a/Projects/UOContent/Misc/Titles.cs b/Projects/UOContent/Misc/Titles.cs index f868e2fcf..662fc98a7 100644 --- a/Projects/UOContent/Misc/Titles.cs +++ b/Projects/UOContent/Misc/Titles.cs @@ -35,7 +35,7 @@ namespace Server.Misc private static readonly FameEntry[] m_FameEntries = { - new FameEntry( + new( 1249, new[] { @@ -52,7 +52,7 @@ namespace Server.Misc new KarmaEntry(10000, "The Trustworthy {0}") } ), - new FameEntry( + new( 2499, new[] { @@ -69,7 +69,7 @@ namespace Server.Misc new KarmaEntry(10000, "The Estimable {0}") } ), - new FameEntry( + new( 4999, new[] { @@ -86,7 +86,7 @@ namespace Server.Misc new KarmaEntry(10000, "The Great {0}") } ), - new FameEntry( + new( 9999, new[] { @@ -103,7 +103,7 @@ namespace Server.Misc new KarmaEntry(10000, "The Glorious {0}") } ), - new FameEntry( + new( 10000, new[] { diff --git a/Projects/UOContent/Misc/VendorGenerator.cs b/Projects/UOContent/Misc/VendorGenerator.cs index 89272868b..4d2da4507 100644 --- a/Projects/UOContent/Misc/VendorGenerator.cs +++ b/Projects/UOContent/Misc/VendorGenerator.cs @@ -9,27 +9,27 @@ namespace Server { private static readonly Rectangle2D[] m_BritRegions = { - new Rectangle2D(new Point2D(250, 750), new Point2D(775, 1330)), - new Rectangle2D(new Point2D(525, 2095), new Point2D(925, 2430)), - new Rectangle2D(new Point2D(1025, 2155), new Point2D(1265, 2310)), - new Rectangle2D(new Point2D(1635, 2430), new Point2D(1705, 2508)), - new Rectangle2D(new Point2D(1775, 2605), new Point2D(2165, 2975)), - new Rectangle2D(new Point2D(1055, 3520), new Point2D(1570, 4075)), - new Rectangle2D(new Point2D(2860, 3310), new Point2D(3120, 3630)), - new Rectangle2D(new Point2D(2470, 1855), new Point2D(3950, 3045)), - new Rectangle2D(new Point2D(3425, 990), new Point2D(3900, 1455)), - new Rectangle2D(new Point2D(4175, 735), new Point2D(4840, 1600)), - new Rectangle2D(new Point2D(2375, 330), new Point2D(3100, 1045)), - new Rectangle2D(new Point2D(2100, 1090), new Point2D(2310, 1450)), - new Rectangle2D(new Point2D(1495, 1400), new Point2D(1550, 1475)), - new Rectangle2D(new Point2D(1085, 1520), new Point2D(1415, 1910)), - new Rectangle2D(new Point2D(1410, 1500), new Point2D(1745, 1795)), - new Rectangle2D(new Point2D(5120, 2300), new Point2D(6143, 4095)) + new(new Point2D(250, 750), new Point2D(775, 1330)), + new(new Point2D(525, 2095), new Point2D(925, 2430)), + new(new Point2D(1025, 2155), new Point2D(1265, 2310)), + new(new Point2D(1635, 2430), new Point2D(1705, 2508)), + new(new Point2D(1775, 2605), new Point2D(2165, 2975)), + new(new Point2D(1055, 3520), new Point2D(1570, 4075)), + new(new Point2D(2860, 3310), new Point2D(3120, 3630)), + new(new Point2D(2470, 1855), new Point2D(3950, 3045)), + new(new Point2D(3425, 990), new Point2D(3900, 1455)), + new(new Point2D(4175, 735), new Point2D(4840, 1600)), + new(new Point2D(2375, 330), new Point2D(3100, 1045)), + new(new Point2D(2100, 1090), new Point2D(2310, 1450)), + new(new Point2D(1495, 1400), new Point2D(1550, 1475)), + new(new Point2D(1085, 1520), new Point2D(1415, 1910)), + new(new Point2D(1410, 1500), new Point2D(1745, 1795)), + new(new Point2D(5120, 2300), new Point2D(6143, 4095)) }; private static readonly Rectangle2D[] m_IlshRegions = { - new Rectangle2D(new Point2D(0, 0), new Point2D(288 * 8, 200 * 8)) + new(new Point2D(0, 0), new Point2D(288 * 8, 200 * 8)) }; private static Dictionary m_ShopTable; diff --git a/Projects/UOContent/Misc/Weather.cs b/Projects/UOContent/Misc/Weather.cs index 97cf98360..97fd9c53d 100644 --- a/Projects/UOContent/Misc/Weather.cs +++ b/Projects/UOContent/Misc/Weather.cs @@ -8,7 +8,7 @@ namespace Server.Misc public class Weather { private static Map[] m_Facets; - private static readonly Dictionary> m_WeatherByFacet = new Dictionary>(); + private static readonly Dictionary> m_WeatherByFacet = new(); private bool m_Active; private bool m_ExtremeTemperature; diff --git a/Projects/UOContent/Misc/WebStatus.cs b/Projects/UOContent/Misc/WebStatus.cs index 831f9ecdd..55e4ecd50 100644 --- a/Projects/UOContent/Misc/WebStatus.cs +++ b/Projects/UOContent/Misc/WebStatus.cs @@ -17,7 +17,7 @@ namespace Server.Misc private static string _StatusPage = string.Empty; private static byte[] _StatusBuffer = Array.Empty(); - private static readonly object _StatusLock = new object(); + private static readonly object _StatusLock = new(); public StatusPage() : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(60.0)) => diff --git a/Projects/UOContent/Mobiles/AI/BaseAI.cs b/Projects/UOContent/Mobiles/AI/BaseAI.cs index 112e5aaa4..1ecdf31dc 100644 --- a/Projects/UOContent/Mobiles/AI/BaseAI.cs +++ b/Projects/UOContent/Mobiles/AI/BaseAI.cs @@ -94,7 +94,7 @@ namespace Server.Mobiles SkillName.Meditation }; - private static readonly Queue m_Obstacles = new Queue(); + private static readonly Queue m_Obstacles = new(); protected ActionType m_Action; public BaseCreature m_Mobile; @@ -380,8 +380,7 @@ namespace Server.Mobiles var skill = ourSkills[i]; var theirSkill = theirSkills[i]; - if (skill != null && skill.Base >= 60.0 && - m_Mobile.CheckTeach(skill.SkillName, e.Mobile)) + if (skill?.Base >= 60.0 && m_Mobile.CheckTeach(skill.SkillName, e.Mobile)) { var toTeach = skill.Base / 3.0; diff --git a/Projects/UOContent/Mobiles/AI/OppositionGroup.cs b/Projects/UOContent/Mobiles/AI/OppositionGroup.cs index 7af0d48b2..9c7dafb97 100644 --- a/Projects/UOContent/Mobiles/AI/OppositionGroup.cs +++ b/Projects/UOContent/Mobiles/AI/OppositionGroup.cs @@ -9,7 +9,7 @@ namespace Server public OppositionGroup(Type[][] types) => m_Types = types; - public static OppositionGroup TerathansAndOphidians { get; } = new OppositionGroup( + public static OppositionGroup TerathansAndOphidians { get; } = new( new[] { new[] @@ -30,7 +30,7 @@ namespace Server } ); - public static OppositionGroup SavagesAndOrcs { get; } = new OppositionGroup( + public static OppositionGroup SavagesAndOrcs { get; } = new( new[] { new[] @@ -53,7 +53,7 @@ namespace Server } ); - public static OppositionGroup FeyAndUndead { get; } = new OppositionGroup( + public static OppositionGroup FeyAndUndead { get; } = new( new[] { new[] diff --git a/Projects/UOContent/Mobiles/AI/SpeedInfo.cs b/Projects/UOContent/Mobiles/AI/SpeedInfo.cs index 8bfa85fa9..a6403922f 100644 --- a/Projects/UOContent/Mobiles/AI/SpeedInfo.cs +++ b/Projects/UOContent/Mobiles/AI/SpeedInfo.cs @@ -15,7 +15,7 @@ namespace Server private static readonly SpeedInfo[] m_Speeds = { /* Slow */ - new SpeedInfo( + new( 0.3, 0.6, new[] @@ -34,7 +34,7 @@ namespace Server } ), /* Fast */ - new SpeedInfo( + new( 0.2, 0.4, new[] @@ -61,7 +61,7 @@ namespace Server } ), /* Very Fast */ - new SpeedInfo( + new( 0.175, 0.350, new[] @@ -78,7 +78,7 @@ namespace Server } ), /* Medium */ - new SpeedInfo( + new( 0.25, 0.5, new[] diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs index 18402f246..6c18c6677 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs @@ -349,7 +349,7 @@ namespace Server.Mobiles private class EtherealSpell : Spell { - private static readonly SpellInfo m_Info = new SpellInfo("Ethereal Mount", "", 230); + private static readonly SpellInfo m_Info = new("Ethereal Mount", "", 230); private readonly EtherealMount m_Mount; private readonly Mobile m_Rider; diff --git a/Projects/UOContent/Mobiles/Townfolk/TownCrier.cs b/Projects/UOContent/Mobiles/Townfolk/TownCrier.cs index e80c962dc..0193755c7 100644 --- a/Projects/UOContent/Mobiles/Townfolk/TownCrier.cs +++ b/Projects/UOContent/Mobiles/Townfolk/TownCrier.cs @@ -298,7 +298,7 @@ namespace Server.Mobiles var entries = m_Owner.Entries; var index = info.ButtonID - 2; - if (entries != null && index < entries.Count) + if (index < entries?.Count) { var tce = entries[index]; var ts = tce.ExpireTime - DateTime.UtcNow; diff --git a/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs b/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs index ea4e117f9..4a42dbbab 100644 --- a/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs +++ b/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs @@ -1312,12 +1312,12 @@ namespace Server.Mobiles var sbInfos = SBInfos; - for (var i = 0; sbInfos != null && i < sbInfos.Count; ++i) + for (var i = 0; i < sbInfos?.Count; ++i) { var sbInfo = sbInfos[i]; var buyInfo = sbInfo.BuyInfo; - for (var j = 0; buyInfo != null && j < buyInfo.Count; ++j) + for (var j = 0; j < buyInfo?.Count; ++j) { var gbi = buyInfo[j]; diff --git a/Projects/UOContent/Mobiles/Vendors/GenericSell.cs b/Projects/UOContent/Mobiles/Vendors/GenericSell.cs index a55cf2e6d..b5a4ddcb4 100644 --- a/Projects/UOContent/Mobiles/Vendors/GenericSell.cs +++ b/Projects/UOContent/Mobiles/Vendors/GenericSell.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles { public class GenericSellInfo : IShopSellInfo { - private readonly Dictionary m_Table = new Dictionary(); + private readonly Dictionary m_Table = new(); private Type[] m_Types; public int GetSellPriceFor(Item item) diff --git a/Projects/UOContent/Mobiles/Vendors/NPC/CustomHairstylist.cs b/Projects/UOContent/Mobiles/Vendors/NPC/CustomHairstylist.cs index cc7ef962d..d88d613d0 100644 --- a/Projects/UOContent/Mobiles/Vendors/NPC/CustomHairstylist.cs +++ b/Projects/UOContent/Mobiles/Vendors/NPC/CustomHairstylist.cs @@ -9,9 +9,9 @@ namespace Server.Mobiles { public class CustomHairstylist : BaseVendor { - public static readonly object From = new object(); - public static readonly object Vendor = new object(); - public static readonly object Price = new object(); + public static readonly object From = new(); + public static readonly object Vendor = new(); + public static readonly object Price = new(); private static readonly HairstylistBuyInfo[] m_SellList = { @@ -286,30 +286,30 @@ namespace Server.Mobiles { public static readonly ChangeHairHueEntry[] BrightEntries = { - new ChangeHairHueEntry("*****", 12, 10), - new ChangeHairHueEntry("*****", 32, 5), - new ChangeHairHueEntry("*****", 38, 8), - new ChangeHairHueEntry("*****", 54, 3), - new ChangeHairHueEntry("*****", 62, 10), - new ChangeHairHueEntry("*****", 81, 2), - new ChangeHairHueEntry("*****", 89, 2), - new ChangeHairHueEntry("*****", 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) }; public static readonly ChangeHairHueEntry[] RegularEntries = { - new ChangeHairHueEntry("*****", 1602, 26), - new ChangeHairHueEntry("*****", 1628, 27), - new ChangeHairHueEntry("*****", 1502, 32), - new ChangeHairHueEntry("*****", 1302, 32), - new ChangeHairHueEntry("*****", 1402, 32), - new ChangeHairHueEntry("*****", 1202, 24), - new ChangeHairHueEntry("*****", 2402, 29), - new ChangeHairHueEntry("*****", 2213, 6), - new ChangeHairHueEntry("*****", 1102, 8), - new ChangeHairHueEntry("*****", 1110, 8), - new ChangeHairHueEntry("*****", 1118, 16), - new ChangeHairHueEntry("*****", 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) }; public ChangeHairHueEntry(string name, int[] hues) @@ -464,28 +464,28 @@ namespace Server.Mobiles { public static readonly ChangeHairstyleEntry[] HairEntries = { - new ChangeHairstyleEntry(50700, 70 - 137, 20 - 60, 0x203B), - new ChangeHairstyleEntry(60710, 193 - 260, 18 - 60, 0x2045), - new ChangeHairstyleEntry(50703, 316 - 383, 25 - 60, 0x2044), - new ChangeHairstyleEntry(60708, 70 - 137, 75 - 125, 0x203C), - new ChangeHairstyleEntry(60900, 193 - 260, 85 - 125, 0x2047), - new ChangeHairstyleEntry(60713, 320 - 383, 85 - 125, 0x204A), - new ChangeHairstyleEntry(60702, 70 - 137, 140 - 190, 0x203D), - new ChangeHairstyleEntry(60707, 193 - 260, 140 - 190, 0x2049), - new ChangeHairstyleEntry(60901, 315 - 383, 150 - 190, 0x2048), - new ChangeHairstyleEntry(0, 0, 0, 0) + new(50700, 70 - 137, 20 - 60, 0x203B), + new(60710, 193 - 260, 18 - 60, 0x2045), + new(50703, 316 - 383, 25 - 60, 0x2044), + new(60708, 70 - 137, 75 - 125, 0x203C), + new(60900, 193 - 260, 85 - 125, 0x2047), + new(60713, 320 - 383, 85 - 125, 0x204A), + new(60702, 70 - 137, 140 - 190, 0x203D), + new(60707, 193 - 260, 140 - 190, 0x2049), + new(60901, 315 - 383, 150 - 190, 0x2048), + new(0, 0, 0, 0) }; public static readonly ChangeHairstyleEntry[] BeardEntries = { - new ChangeHairstyleEntry(50800, 120 - 187, 30 - 80, 0x2040), - new ChangeHairstyleEntry(50904, 243 - 310, 33 - 80, 0x204B), - new ChangeHairstyleEntry(50906, 120 - 187, 100 - 150, 0x204D), - new ChangeHairstyleEntry(50801, 243 - 310, 95 - 150, 0x203E), - new ChangeHairstyleEntry(50802, 120 - 187, 173 - 220, 0x203F), - new ChangeHairstyleEntry(50905, 243 - 310, 165 - 220, 0x204C), - new ChangeHairstyleEntry(50808, 120 - 187, 242 - 290, 0x2041), - new ChangeHairstyleEntry(0, 0, 0, 0) + new(50800, 120 - 187, 30 - 80, 0x2040), + new(50904, 243 - 310, 33 - 80, 0x204B), + new(50906, 120 - 187, 100 - 150, 0x204D), + new(50801, 243 - 310, 95 - 150, 0x203E), + new(50802, 120 - 187, 173 - 220, 0x203F), + new(50905, 243 - 310, 165 - 220, 0x204C), + new(50808, 120 - 187, 242 - 290, 0x2041), + new(0, 0, 0, 0) }; public ChangeHairstyleEntry(int gumpID, int x, int y, int itemID) diff --git a/Projects/UOContent/Mobiles/Vendors/PlayerBarkeeper.cs b/Projects/UOContent/Mobiles/Vendors/PlayerBarkeeper.cs index 0203126e1..c8ab60372 100644 --- a/Projects/UOContent/Mobiles/Vendors/PlayerBarkeeper.cs +++ b/Projects/UOContent/Mobiles/Vendors/PlayerBarkeeper.cs @@ -621,66 +621,66 @@ namespace Server.Mobiles { private static readonly Entry[] m_Entries = { - new Entry("Alchemist"), - new Entry("Animal Tamer"), - new Entry("Apothecary"), - new Entry("Artist"), - new Entry("Baker", true), - new Entry("Bard"), - new Entry("Barkeep", "the barkeeper", true), - new Entry("Beggar"), - new Entry("Blacksmith"), - new Entry("Bounty Hunter"), - new Entry("Brigand"), - new Entry("Butler"), - new Entry("Carpenter"), - new Entry("Chef", true), - new Entry("Commander"), - new Entry("Curator"), - new Entry("Drunkard"), - new Entry("Farmer"), - new Entry("Fisherman"), - new Entry("Gambler"), - new Entry("Gypsy"), - new Entry("Herald"), - new Entry("Herbalist"), - new Entry("Hermit"), - new Entry("Innkeeper", true), - new Entry("Jailor"), - new Entry("Jester"), - new Entry("Librarian"), - new Entry("Mage"), - new Entry("Mercenary"), - new Entry("Merchant"), - new Entry("Messenger"), - new Entry("Miner"), - new Entry("Monk"), - new Entry("Noble"), - new Entry("Paladin"), - new Entry("Peasant"), - new Entry("Pirate"), - new Entry("Prisoner"), - new Entry("Prophet"), - new Entry("Ranger"), - new Entry("Sage"), - new Entry("Sailor"), - new Entry("Scholar"), - new Entry("Scribe"), - new Entry("Sentry"), - new Entry("Servant"), - new Entry("Shepherd"), - new Entry("Soothsayer"), - new Entry("Stoic"), - new Entry("Storyteller"), - new Entry("Tailor"), - new Entry("Thief"), - new Entry("Tinker"), - new Entry("Town Crier"), - new Entry("Treasure Hunter"), - new Entry("Waiter", true), - new Entry("Warrior"), - new Entry("Watchman"), - new Entry("No Title", null) + new("Alchemist"), + new("Animal Tamer"), + new("Apothecary"), + new("Artist"), + new("Baker", true), + new("Bard"), + new("Barkeep", "the barkeeper", true), + new("Beggar"), + new("Blacksmith"), + new("Bounty Hunter"), + new("Brigand"), + new("Butler"), + new("Carpenter"), + new("Chef", true), + new("Commander"), + new("Curator"), + new("Drunkard"), + new("Farmer"), + new("Fisherman"), + new("Gambler"), + new("Gypsy"), + new("Herald"), + new("Herbalist"), + new("Hermit"), + new("Innkeeper", true), + new("Jailor"), + new("Jester"), + new("Librarian"), + new("Mage"), + new("Mercenary"), + new("Merchant"), + new("Messenger"), + new("Miner"), + new("Monk"), + new("Noble"), + new("Paladin"), + new("Peasant"), + new("Pirate"), + new("Prisoner"), + new("Prophet"), + new("Ranger"), + new("Sage"), + new("Sailor"), + new("Scholar"), + new("Scribe"), + new("Sentry"), + new("Servant"), + new("Shepherd"), + new("Soothsayer"), + new("Stoic"), + new("Storyteller"), + new("Tailor"), + new("Thief"), + new("Tinker"), + new("Town Crier"), + new("Treasure Hunter"), + new("Waiter", true), + new("Warrior"), + new("Watchman"), + new("No Title", null) }; private readonly PlayerBarkeeper m_Barkeeper; diff --git a/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs b/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs index cebb4bbe2..fafd750ec 100644 --- a/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs +++ b/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs @@ -200,7 +200,7 @@ namespace Server.Mobiles var vi = pv?.GetVendorItem(item); - if (vi?.Description != null && vi.Description.Length > 0) + if (vi?.Description?.Length > 0) { list.Add(1043305, vi.Description); //
Seller's Description:
"~1_DESC~" } diff --git a/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs b/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs index 9ef1ca18a..3d248891b 100644 --- a/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs +++ b/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs @@ -12,10 +12,10 @@ namespace Server.Mobiles { public static readonly VendorRentalDuration[] Instances = { - new VendorRentalDuration(TimeSpan.FromDays(7.0), 1062361), // 1 Week - new VendorRentalDuration(TimeSpan.FromDays(14.0), 1062362), // 2 Weeks - new VendorRentalDuration(TimeSpan.FromDays(21.0), 1062363), // 3 Weeks - new VendorRentalDuration(TimeSpan.FromDays(28.0), 1062364) // 1 Month + new(TimeSpan.FromDays(7.0), 1062361), // 1 Week + new(TimeSpan.FromDays(14.0), 1062362), // 2 Weeks + new(TimeSpan.FromDays(21.0), 1062363), // 3 Weeks + new(TimeSpan.FromDays(28.0), 1062364) // 1 Month }; private VendorRentalDuration(TimeSpan duration, int name) diff --git a/Projects/UOContent/Mobiles/Vendors/SBInfo/SBInfo.cs b/Projects/UOContent/Mobiles/Vendors/SBInfo/SBInfo.cs index c2bcd851c..88b5486d1 100644 --- a/Projects/UOContent/Mobiles/Vendors/SBInfo/SBInfo.cs +++ b/Projects/UOContent/Mobiles/Vendors/SBInfo/SBInfo.cs @@ -4,7 +4,7 @@ namespace Server.Mobiles { public abstract class SBInfo { - public static readonly List Empty = new List(); + public static readonly List Empty = new(); public abstract IShopSellInfo SellInfo { get; } public abstract List BuyInfo { get; } diff --git a/Projects/UOContent/Multis/BaseHouse.cs b/Projects/UOContent/Multis/BaseHouse.cs index c68a87ef8..07c29b08b 100644 --- a/Projects/UOContent/Multis/BaseHouse.cs +++ b/Projects/UOContent/Multis/BaseHouse.cs @@ -24,7 +24,7 @@ namespace Server.Multis public const int MaximumBarkeepCount = 2; - private static readonly Dictionary> m_Table = new Dictionary>(); + private static readonly Dictionary> m_Table = new(); private DecayLevel m_CurrentStage; @@ -300,7 +300,7 @@ namespace Server.Multis } } - public static List AllHouses { get; } = new List(); + public static List AllHouses { get; } = new(); public abstract Rectangle2D[] Area { get; } public abstract Point3D BaseBanLocation { get; } @@ -482,15 +482,15 @@ namespace Server.Multis public HouseSign Sign { get; set; } - public List PlayerVendors { get; } = new List(); + public List PlayerVendors { get; } = new(); - public List PlayerBarkeepers { get; } = new List(); + public List PlayerBarkeepers { get; } = new(); public List VendorRentalContracts { get; private set; } - public List VendorInventories { get; } = new List(); + public List VendorInventories { get; } = new(); - public List RelocatedEntities { get; } = new List(); + public List RelocatedEntities { get; } = new(); public MovingCrate MovingCrate { get; set; } @@ -1942,7 +1942,7 @@ namespace Server.Multis return; } - for (var i = 0; Doors != null && i < Doors.Count; ++i) + for (var i = 0; i < Doors?.Count; ++i) { var door = Doors[i]; var p = door.Location; @@ -2404,7 +2404,7 @@ namespace Server.Multis public virtual bool IsCombatRestricted(Mobile m) { if (m?.Player != true || m.AccessLevel >= AccessLevel.GameMaster || !IsAosRules || - m_Owner != null && m_Owner.AccessLevel >= AccessLevel.GameMaster) + m_Owner?.AccessLevel >= AccessLevel.GameMaster) { return false; } @@ -2513,7 +2513,7 @@ namespace Server.Multis } } - for (var i = 0; Doors != null && i < Doors.Count; ++i) + for (var i = 0; i < Doors?.Count; ++i) { var door = Doors[i]; var p = door.Location; @@ -4276,7 +4276,7 @@ namespace Server.Multis { var list = house.Secures; - for (var i = 0; sec == null && list != null && i < list.Count; ++i) + for (var i = 0; sec == null && i < list?.Count; ++i) { var si = list[i]; diff --git a/Projects/UOContent/Multis/Boats/BaseBoat.cs b/Projects/UOContent/Multis/Boats/BaseBoat.cs index a4c136825..3e1ee8279 100644 --- a/Projects/UOContent/Multis/Boats/BaseBoat.cs +++ b/Projects/UOContent/Multis/Boats/BaseBoat.cs @@ -29,10 +29,10 @@ namespace Server.Multis } private static readonly Rectangle2D[] m_BritWrap = - { new Rectangle2D(16, 16, 5120 - 32, 4096 - 32), new Rectangle2D(5136, 2320, 992, 1760) }; + { new(16, 16, 5120 - 32, 4096 - 32), new(5136, 2320, 992, 1760) }; - private static readonly Rectangle2D[] m_IlshWrap = { new Rectangle2D(16, 16, 2304 - 32, 1600 - 32) }; - private static readonly Rectangle2D[] m_TokunoWrap = { new Rectangle2D(16, 16, 1448 - 32, 1448 - 32) }; + private static readonly Rectangle2D[] m_IlshWrap = { new(16, 16, 2304 - 32, 1600 - 32) }; + private static readonly Rectangle2D[] m_TokunoWrap = { new(16, 16, 1448 - 32, 1448 - 32) }; private static readonly TimeSpan BoatDecayDelay = TimeSpan.FromDays(9.0); @@ -211,7 +211,7 @@ namespace Server.Multis public virtual BaseDockedBoat DockedBoat => null; - public static List Boats { get; } = new List(); + public static List Boats { get; } = new(); /* * Intervals: @@ -723,7 +723,7 @@ namespace Server.Multis return DryDockResult.NotAnchored; } - if (Hold != null && Hold.Items.Count > 0) + if (Hold?.Items.Count > 0) { return DryDockResult.Hold; } diff --git a/Projects/UOContent/Multis/Boats/LargeBoat.cs b/Projects/UOContent/Multis/Boats/LargeBoat.cs index 64151ae81..b918cd794 100644 --- a/Projects/UOContent/Multis/Boats/LargeBoat.cs +++ b/Projects/UOContent/Multis/Boats/LargeBoat.cs @@ -19,10 +19,10 @@ namespace Server.Multis public override int HoldDistance => 5; public override int TillerManDistance => -5; - public override Point2D StarboardOffset => new Point2D(2, -1); - public override Point2D PortOffset => new Point2D(-2, -1); + public override Point2D StarboardOffset => new(2, -1); + public override Point2D PortOffset => new(-2, -1); - public override Point3D MarkOffset => new Point3D(0, 0, 3); + public override Point3D MarkOffset => new(0, 0, 3); public override BaseDockedBoat DockedBoat => new LargeDockedBoat(this); diff --git a/Projects/UOContent/Multis/Boats/LargeDragonBoat.cs b/Projects/UOContent/Multis/Boats/LargeDragonBoat.cs index 64b39bf47..ab18a632a 100644 --- a/Projects/UOContent/Multis/Boats/LargeDragonBoat.cs +++ b/Projects/UOContent/Multis/Boats/LargeDragonBoat.cs @@ -19,10 +19,10 @@ namespace Server.Multis public override int HoldDistance => 5; public override int TillerManDistance => -5; - public override Point2D StarboardOffset => new Point2D(2, -1); - public override Point2D PortOffset => new Point2D(-2, -1); + public override Point2D StarboardOffset => new(2, -1); + public override Point2D PortOffset => new(-2, -1); - public override Point3D MarkOffset => new Point3D(0, 0, 3); + public override Point3D MarkOffset => new(0, 0, 3); public override BaseDockedBoat DockedBoat => new LargeDockedDragonBoat(this); diff --git a/Projects/UOContent/Multis/Boats/MediumBoat.cs b/Projects/UOContent/Multis/Boats/MediumBoat.cs index ae9d5c23b..cfda8b192 100644 --- a/Projects/UOContent/Multis/Boats/MediumBoat.cs +++ b/Projects/UOContent/Multis/Boats/MediumBoat.cs @@ -19,10 +19,10 @@ namespace Server.Multis public override int HoldDistance => 4; public override int TillerManDistance => -5; - public override Point2D StarboardOffset => new Point2D(2, 0); - public override Point2D PortOffset => new Point2D(-2, 0); + public override Point2D StarboardOffset => new(2, 0); + public override Point2D PortOffset => new(-2, 0); - public override Point3D MarkOffset => new Point3D(0, 1, 3); + public override Point3D MarkOffset => new(0, 1, 3); public override BaseDockedBoat DockedBoat => new MediumDockedBoat(this); diff --git a/Projects/UOContent/Multis/Boats/MediumDragonBoat.cs b/Projects/UOContent/Multis/Boats/MediumDragonBoat.cs index a13b776e5..8ff4b44f3 100644 --- a/Projects/UOContent/Multis/Boats/MediumDragonBoat.cs +++ b/Projects/UOContent/Multis/Boats/MediumDragonBoat.cs @@ -19,10 +19,10 @@ namespace Server.Multis public override int HoldDistance => 4; public override int TillerManDistance => -5; - public override Point2D StarboardOffset => new Point2D(2, 0); - public override Point2D PortOffset => new Point2D(-2, 0); + public override Point2D StarboardOffset => new(2, 0); + public override Point2D PortOffset => new(-2, 0); - public override Point3D MarkOffset => new Point3D(0, 1, 3); + public override Point3D MarkOffset => new(0, 1, 3); public override BaseDockedBoat DockedBoat => new MediumDockedDragonBoat(this); diff --git a/Projects/UOContent/Multis/Boats/SmallBoat.cs b/Projects/UOContent/Multis/Boats/SmallBoat.cs index 13c2a3913..f3c691ba2 100644 --- a/Projects/UOContent/Multis/Boats/SmallBoat.cs +++ b/Projects/UOContent/Multis/Boats/SmallBoat.cs @@ -19,10 +19,10 @@ namespace Server.Multis public override int HoldDistance => 4; public override int TillerManDistance => -4; - public override Point2D StarboardOffset => new Point2D(2, 0); - public override Point2D PortOffset => new Point2D(-2, 0); + public override Point2D StarboardOffset => new(2, 0); + public override Point2D PortOffset => new(-2, 0); - public override Point3D MarkOffset => new Point3D(0, 1, 3); + public override Point3D MarkOffset => new(0, 1, 3); public override BaseDockedBoat DockedBoat => new SmallDockedBoat(this); diff --git a/Projects/UOContent/Multis/Boats/SmallDragonBoat.cs b/Projects/UOContent/Multis/Boats/SmallDragonBoat.cs index 39b4902e4..74d584f94 100644 --- a/Projects/UOContent/Multis/Boats/SmallDragonBoat.cs +++ b/Projects/UOContent/Multis/Boats/SmallDragonBoat.cs @@ -19,10 +19,10 @@ namespace Server.Multis public override int HoldDistance => 4; public override int TillerManDistance => -4; - public override Point2D StarboardOffset => new Point2D(2, 0); - public override Point2D PortOffset => new Point2D(-2, 0); + public override Point2D StarboardOffset => new(2, 0); + public override Point2D PortOffset => new(-2, 0); - public override Point3D MarkOffset => new Point3D(0, 1, 3); + public override Point3D MarkOffset => new(0, 1, 3); public override BaseDockedBoat DockedBoat => new SmallDockedDragonBoat(this); diff --git a/Projects/UOContent/Multis/Boats/Strandedness.cs b/Projects/UOContent/Multis/Boats/Strandedness.cs index 1bfb2a1ba..bf787c862 100644 --- a/Projects/UOContent/Multis/Boats/Strandedness.cs +++ b/Projects/UOContent/Multis/Boats/Strandedness.cs @@ -4,83 +4,83 @@ namespace Server.Misc { private static readonly Point2D[] m_Felucca = { - new Point2D(2528, 3568), new Point2D(2376, 3400), new Point2D(2528, 3896), - new Point2D(2168, 3904), new Point2D(1136, 3416), new Point2D(1432, 3648), - new Point2D(1416, 4000), new Point2D(4512, 3936), new Point2D(4440, 3120), - new Point2D(4192, 3672), new Point2D(4720, 3472), new Point2D(3744, 2768), - new Point2D(3480, 2432), new Point2D(3560, 2136), new Point2D(3792, 2112), - new Point2D(2800, 2296), new Point2D(2736, 2016), new Point2D(4576, 1456), - new Point2D(4680, 1152), new Point2D(4304, 1104), new Point2D(4496, 984), - new Point2D(4248, 696), new Point2D(4040, 616), new Point2D(3896, 248), - new Point2D(4176, 384), new Point2D(3672, 1104), new Point2D(3520, 1152), - new Point2D(3720, 1360), new Point2D(2184, 2152), new Point2D(1952, 2088), - new Point2D(2056, 1936), new Point2D(1720, 1992), new Point2D(472, 2064), - new Point2D(656, 2096), new Point2D(3008, 3592), new Point2D(2784, 3472), - new Point2D(5456, 2400), new Point2D(5976, 2424), new Point2D(5328, 3112), - new Point2D(5792, 3152), new Point2D(2120, 3616), new Point2D(2136, 3128), - new Point2D(1632, 3528), new Point2D(1328, 3160), new Point2D(1072, 3136), - new Point2D(1128, 2976), new Point2D(960, 2576), new Point2D(752, 1832), - new Point2D(184, 1488), new Point2D(592, 1440), new Point2D(368, 1216), - new Point2D(232, 752), new Point2D(696, 744), new Point2D(304, 1000), - new Point2D(840, 376), new Point2D(1192, 624), new Point2D(1200, 192), - new Point2D(1512, 240), new Point2D(1336, 456), new Point2D(1536, 648), - new Point2D(1104, 952), new Point2D(1864, 264), new Point2D(2136, 200), - new Point2D(2160, 528), new Point2D(1904, 512), new Point2D(2240, 784), - new Point2D(2536, 776), new Point2D(2488, 216), new Point2D(2336, 72), - new Point2D(2648, 288), new Point2D(2680, 576), new Point2D(2896, 88), - new Point2D(2840, 344), new Point2D(3136, 72), new Point2D(2968, 520), - new Point2D(3192, 328), new Point2D(3448, 208), new Point2D(3432, 608), - new Point2D(3184, 752), new Point2D(2800, 704), new Point2D(2768, 1016), - new Point2D(2448, 1232), new Point2D(2272, 920), new Point2D(2072, 1080), - new Point2D(2048, 1264), new Point2D(1808, 1528), new Point2D(1496, 1880), - new Point2D(1656, 2168), new Point2D(2096, 2320), new Point2D(1816, 2528), - new Point2D(1840, 2640), new Point2D(1928, 2952), new Point2D(2120, 2712) + new(2528, 3568), new(2376, 3400), new(2528, 3896), + new(2168, 3904), new(1136, 3416), new(1432, 3648), + new(1416, 4000), new(4512, 3936), new(4440, 3120), + new(4192, 3672), new(4720, 3472), new(3744, 2768), + new(3480, 2432), new(3560, 2136), new(3792, 2112), + new(2800, 2296), new(2736, 2016), new(4576, 1456), + new(4680, 1152), new(4304, 1104), new(4496, 984), + new(4248, 696), new(4040, 616), new(3896, 248), + new(4176, 384), new(3672, 1104), new(3520, 1152), + new(3720, 1360), new(2184, 2152), new(1952, 2088), + new(2056, 1936), new(1720, 1992), new(472, 2064), + new(656, 2096), new(3008, 3592), new(2784, 3472), + new(5456, 2400), new(5976, 2424), new(5328, 3112), + new(5792, 3152), new(2120, 3616), new(2136, 3128), + new(1632, 3528), new(1328, 3160), new(1072, 3136), + new(1128, 2976), new(960, 2576), new(752, 1832), + new(184, 1488), new(592, 1440), new(368, 1216), + new(232, 752), new(696, 744), new(304, 1000), + new(840, 376), new(1192, 624), new(1200, 192), + new(1512, 240), new(1336, 456), new(1536, 648), + new(1104, 952), new(1864, 264), new(2136, 200), + new(2160, 528), new(1904, 512), new(2240, 784), + new(2536, 776), new(2488, 216), new(2336, 72), + new(2648, 288), new(2680, 576), new(2896, 88), + new(2840, 344), new(3136, 72), new(2968, 520), + new(3192, 328), new(3448, 208), new(3432, 608), + new(3184, 752), new(2800, 704), new(2768, 1016), + new(2448, 1232), new(2272, 920), new(2072, 1080), + new(2048, 1264), new(1808, 1528), new(1496, 1880), + new(1656, 2168), new(2096, 2320), new(1816, 2528), + new(1840, 2640), new(1928, 2952), new(2120, 2712) }; private static readonly Point2D[] m_Trammel = m_Felucca; private static readonly Point2D[] m_Ilshenar = { - new Point2D(1252, 1180), new Point2D(1562, 1090), new Point2D(1444, 1016), - new Point2D(1324, 968), new Point2D(1418, 806), new Point2D(1722, 874), - new Point2D(1456, 684), new Point2D(1036, 866), new Point2D(612, 476), - new Point2D(1476, 372), new Point2D(762, 472), new Point2D(812, 1162), - new Point2D(1422, 1144), new Point2D(1254, 1066), new Point2D(1598, 870), - new Point2D(1358, 866), new Point2D(510, 302), new Point2D(510, 392) + new(1252, 1180), new(1562, 1090), new(1444, 1016), + new(1324, 968), new(1418, 806), new(1722, 874), + new(1456, 684), new(1036, 866), new(612, 476), + new(1476, 372), new(762, 472), new(812, 1162), + new(1422, 1144), new(1254, 1066), new(1598, 870), + new(1358, 866), new(510, 302), new(510, 392) }; private static readonly Point2D[] m_Tokuno = { // Makoto-Jima - new Point2D(837, 1351), new Point2D(941, 1241), new Point2D(959, 1185), - new Point2D(923, 1091), new Point2D(904, 983), new Point2D(845, 944), - new Point2D(829, 896), new Point2D(794, 852), new Point2D(766, 821), - new Point2D(695, 814), new Point2D(576, 835), new Point2D(518, 840), - new Point2D(519, 902), new Point2D(502, 950), new Point2D(503, 1045), - new Point2D(547, 1131), new Point2D(518, 1204), new Point2D(506, 1243), - new Point2D(526, 1271), new Point2D(562, 1295), new Point2D(616, 1335), - new Point2D(789, 1347), new Point2D(712, 1359), + new(837, 1351), new(941, 1241), new(959, 1185), + new(923, 1091), new(904, 983), new(845, 944), + new(829, 896), new(794, 852), new(766, 821), + new(695, 814), new(576, 835), new(518, 840), + new(519, 902), new(502, 950), new(503, 1045), + new(547, 1131), new(518, 1204), new(506, 1243), + new(526, 1271), new(562, 1295), new(616, 1335), + new(789, 1347), new(712, 1359), // Homare-Jima - new Point2D(202, 498), new Point2D(116, 600), new Point2D(107, 699), - new Point2D(162, 799), new Point2D(158, 889), new Point2D(169, 989), - new Point2D(194, 1101), new Point2D(250, 1163), new Point2D(295, 1176), - new Point2D(280, 1194), new Point2D(286, 1102), new Point2D(250, 1000), - new Point2D(260, 906), new Point2D(360, 838), new Point2D(389, 763), - new Point2D(415, 662), new Point2D(500, 597), new Point2D(570, 572), - new Point2D(631, 577), new Point2D(692, 500), new Point2D(723, 445), - new Point2D(672, 379), new Point2D(626, 332), new Point2D(494, 291), - new Point2D(371, 336), new Point2D(324, 334), new Point2D(270, 362), + new(202, 498), new(116, 600), new(107, 699), + new(162, 799), new(158, 889), new(169, 989), + new(194, 1101), new(250, 1163), new(295, 1176), + new(280, 1194), new(286, 1102), new(250, 1000), + new(260, 906), new(360, 838), new(389, 763), + new(415, 662), new(500, 597), new(570, 572), + new(631, 577), new(692, 500), new(723, 445), + new(672, 379), new(626, 332), new(494, 291), + new(371, 336), new(324, 334), new(270, 362), // Isamu-Jima - new Point2D(1240, 1076), new Point2D(1189, 1115), new Point2D(1046, 1039), - new Point2D(1025, 885), new Point2D(907, 809), new Point2D(840, 506), - new Point2D(799, 396), new Point2D(720, 258), new Point2D(744, 158), - new Point2D(904, 37), new Point2D(974, 91), new Point2D(1020, 187), - new Point2D(1035, 288), new Point2D(1104, 395), new Point2D(1215, 462), - new Point2D(1275, 488), new Point2D(1348, 611), new Point2D(1363, 739), - new Point2D(1364, 765), new Point2D(1364, 876), new Point2D(1300, 936), - new Point2D(1240, 1003) + new(1240, 1076), new(1189, 1115), new(1046, 1039), + new(1025, 885), new(907, 809), new(840, 506), + new(799, 396), new(720, 258), new(744, 158), + new(904, 37), new(974, 91), new(1020, 187), + new(1035, 288), new(1104, 395), new(1215, 462), + new(1275, 488), new(1348, 611), new(1363, 739), + new(1364, 765), new(1364, 876), new(1300, 936), + new(1240, 1003) }; public static void Initialize() diff --git a/Projects/UOContent/Multis/ContestHouses.cs b/Projects/UOContent/Multis/ContestHouses.cs index 65839941b..b4dcee930 100644 --- a/Projects/UOContent/Multis/ContestHouses.cs +++ b/Projects/UOContent/Multis/ContestHouses.cs @@ -31,7 +31,7 @@ namespace Server.Multis public virtual int SignPostID => 9; - public override Point3D BaseBanLocation => new Point3D( + public override Point3D BaseBanLocation => new( Components.Min.X, Components.Height - 1 - Components.Center.Y, 0 @@ -249,8 +249,8 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-11, -11, 23, 23), new Rectangle2D(-10, 13, 6, 1), - new Rectangle2D(-2, 13, 6, 1), new Rectangle2D(6, 13, 7, 1) + new(-11, -11, 23, 23), new(-10, 13, 6, 1), + new(-2, 13, 6, 1), new(6, 13, 7, 1) }; public TrinsicKeep(Mobile owner) @@ -282,10 +282,10 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-15, -15, 31, 31), - new Rectangle2D(-14, 16, 11, 1), - new Rectangle2D(-2, 16, 6, 1), - new Rectangle2D(5, 16, 11, 1) + new(-15, -15, 31, 31), + new(-14, 16, 11, 1), + new(-2, 16, 6, 1), + new(5, 16, 11, 1) }; public GothicRoseCastle(Mobile owner) @@ -390,10 +390,10 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-15, -15, 31, 31), - new Rectangle2D(5, 16, 1, 1), - new Rectangle2D(7, 16, 4, 1), - new Rectangle2D(12, 16, 1, 1) + new(-15, -15, 31, 31), + new(5, 16, 1, 1), + new(7, 16, 4, 1), + new(12, 16, 1, 1) }; public FeudalCastle(Mobile owner) @@ -450,10 +450,10 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-11, -11, 23, 23), - new Rectangle2D(-10, 13, 6, 1), - new Rectangle2D(-2, 13, 6, 1), - new Rectangle2D(6, 13, 7, 1) + new(-11, -11, 23, 23), + new(-10, 13, 6, 1), + new(-2, 13, 6, 1), + new(6, 13, 7, 1) }; public TraditionalKeep(Mobile owner) @@ -662,10 +662,10 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-15, -15, 31, 31), - new Rectangle2D(-14, 16, 6, 1), - new Rectangle2D(-7, 16, 8, 1), - new Rectangle2D(10, 16, 5, 1) + new(-15, -15, 31, 31), + new(-14, 16, 6, 1), + new(-7, 16, 8, 1), + new(10, 16, 5, 1) }; public OkinawaSweetDreamCastle(Mobile owner) @@ -722,10 +722,10 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-15, -15, 31, 31), - new Rectangle2D(-14, 16, 9, 1), - new Rectangle2D(-3, 16, 8, 1), - new Rectangle2D(7, 16, 9, 1) + new(-15, -15, 31, 31), + new(-14, 16, 9, 1), + new(-3, 16, 8, 1), + new(7, 16, 9, 1) }; public GrimswindSisters(Mobile owner) diff --git a/Projects/UOContent/Multis/HouseFoundation.cs b/Projects/UOContent/Multis/HouseFoundation.cs index cd45eca4a..512126f55 100644 --- a/Projects/UOContent/Multis/HouseFoundation.cs +++ b/Projects/UOContent/Multis/HouseFoundation.cs @@ -183,7 +183,7 @@ namespace Server.Multis } public override Point3D BaseBanLocation => - new Point3D(Components.Min.X, Components.Height - 1 - Components.Center.Y, 0); + new(Components.Min.X, Components.Height - 1 - Components.Center.Y, 0); public override int DefaultPrice => m_DefaultPrice; @@ -2262,7 +2262,7 @@ namespace Server.Multis public int MaxLevels => Foundation.MaxLevels; - public static Dictionary Table { get; } = new Dictionary(); + public static Dictionary Table { get; } = new(); public static DesignContext Find(Mobile from) { @@ -2317,7 +2317,7 @@ namespace Server.Multis var fixtures = foundation.Fixtures; - for (var i = 0; fixtures != null && i < fixtures.Count; ++i) + for (var i = 0; i < fixtures?.Count; ++i) { var item = fixtures[i]; @@ -2367,7 +2367,7 @@ namespace Server.Multis var fixtures = context.Foundation.Fixtures; - for (var i = 0; fixtures != null && i < fixtures.Count; ++i) + for (var i = 0; i < fixtures?.Count; ++i) { var item = fixtures[i]; diff --git a/Projects/UOContent/Multis/HousePlacement.cs b/Projects/UOContent/Multis/HousePlacement.cs index 33942957d..0cff65cfa 100644 --- a/Projects/UOContent/Multis/HousePlacement.cs +++ b/Projects/UOContent/Multis/HousePlacement.cs @@ -84,7 +84,7 @@ namespace Server.Multis var mobiles = new List(); // These are also storage lists. They hold location values indicating the yard and border locations. - List yard = new List(), borders = new List(); + List yard = new(), borders = new(); /* RULES: * diff --git a/Projects/UOContent/Multis/HousePlacementTool.cs b/Projects/UOContent/Multis/HousePlacementTool.cs index 685c23e1c..7b5e51ecc 100644 --- a/Projects/UOContent/Multis/HousePlacementTool.cs +++ b/Projects/UOContent/Multis/HousePlacementTool.cs @@ -359,53 +359,53 @@ namespace Server.Items public static HousePlacementEntry[] ClassicHouses { get; } = { - new HousePlacementEntry(typeof(SmallOldHouse), 1011303, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0064), - new HousePlacementEntry(typeof(SmallOldHouse), 1011304, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0066), - new HousePlacementEntry(typeof(SmallOldHouse), 1011305, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0068), - new HousePlacementEntry(typeof(SmallOldHouse), 1011306, 425, 212, 489, 244, 10, 35250, 0, 4, 0, 0x006A), - new HousePlacementEntry(typeof(SmallOldHouse), 1011307, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006C), - new HousePlacementEntry(typeof(SmallOldHouse), 1011308, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006E), - new HousePlacementEntry(typeof(SmallShop), 1011321, 425, 212, 489, 244, 10, 50500, -1, 4, 0, 0x00A0), - new HousePlacementEntry(typeof(SmallShop), 1011322, 425, 212, 489, 244, 10, 52500, 0, 4, 0, 0x00A2), - new HousePlacementEntry(typeof(SmallTower), 1011317, 580, 290, 667, 333, 14, 73500, 3, 4, 0, 0x0098), - new HousePlacementEntry(typeof(TwoStoryVilla), 1011319, 1100, 550, 1265, 632, 24, 113750, 3, 6, 0, 0x009E), - new HousePlacementEntry(typeof(SandStonePatio), 1011320, 850, 425, 1265, 632, 24, 76500, -1, 4, 0, 0x009C), - new HousePlacementEntry(typeof(LogCabin), 1011318, 1100, 550, 1265, 632, 24, 81750, 1, 6, 0, 0x009A), - new HousePlacementEntry(typeof(GuildHouse), 1011309, 1370, 685, 1576, 788, 28, 131500, -1, 7, 0, 0x0074), - new HousePlacementEntry(typeof(TwoStoryHouse), 1011310, 1370, 685, 1576, 788, 28, 162750, -3, 7, 0, 0x0076), - new HousePlacementEntry(typeof(TwoStoryHouse), 1011311, 1370, 685, 1576, 788, 28, 162000, -3, 7, 0, 0x0078), - new HousePlacementEntry(typeof(LargePatioHouse), 1011315, 1370, 685, 1576, 788, 28, 129250, -4, 7, 0, 0x008C), - new HousePlacementEntry(typeof(LargeMarbleHouse), 1011316, 1370, 685, 1576, 788, 28, 160500, -4, 7, 0, 0x0096), - new HousePlacementEntry(typeof(Tower), 1011312, 2119, 1059, 2437, 1218, 42, 366500, 0, 7, 0, 0x007A), - new HousePlacementEntry(typeof(Keep), 1011313, 2625, 1312, 3019, 1509, 52, 572750, 0, 11, 0, 0x007C), - new HousePlacementEntry(typeof(Castle), 1011314, 4076, 2038, 4688, 2344, 78, 865250, 0, 16, 0, 0x007E) + new(typeof(SmallOldHouse), 1011303, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0064), + new(typeof(SmallOldHouse), 1011304, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0066), + new(typeof(SmallOldHouse), 1011305, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0068), + new(typeof(SmallOldHouse), 1011306, 425, 212, 489, 244, 10, 35250, 0, 4, 0, 0x006A), + new(typeof(SmallOldHouse), 1011307, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006C), + new(typeof(SmallOldHouse), 1011308, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006E), + new(typeof(SmallShop), 1011321, 425, 212, 489, 244, 10, 50500, -1, 4, 0, 0x00A0), + new(typeof(SmallShop), 1011322, 425, 212, 489, 244, 10, 52500, 0, 4, 0, 0x00A2), + new(typeof(SmallTower), 1011317, 580, 290, 667, 333, 14, 73500, 3, 4, 0, 0x0098), + new(typeof(TwoStoryVilla), 1011319, 1100, 550, 1265, 632, 24, 113750, 3, 6, 0, 0x009E), + new(typeof(SandStonePatio), 1011320, 850, 425, 1265, 632, 24, 76500, -1, 4, 0, 0x009C), + new(typeof(LogCabin), 1011318, 1100, 550, 1265, 632, 24, 81750, 1, 6, 0, 0x009A), + new(typeof(GuildHouse), 1011309, 1370, 685, 1576, 788, 28, 131500, -1, 7, 0, 0x0074), + new(typeof(TwoStoryHouse), 1011310, 1370, 685, 1576, 788, 28, 162750, -3, 7, 0, 0x0076), + new(typeof(TwoStoryHouse), 1011311, 1370, 685, 1576, 788, 28, 162000, -3, 7, 0, 0x0078), + new(typeof(LargePatioHouse), 1011315, 1370, 685, 1576, 788, 28, 129250, -4, 7, 0, 0x008C), + new(typeof(LargeMarbleHouse), 1011316, 1370, 685, 1576, 788, 28, 160500, -4, 7, 0, 0x0096), + new(typeof(Tower), 1011312, 2119, 1059, 2437, 1218, 42, 366500, 0, 7, 0, 0x007A), + new(typeof(Keep), 1011313, 2625, 1312, 3019, 1509, 52, 572750, 0, 11, 0, 0x007C), + new(typeof(Castle), 1011314, 4076, 2038, 4688, 2344, 78, 865250, 0, 16, 0, 0x007E) }; public static HousePlacementEntry[] HousesEJ { get; } = { - new HousePlacementEntry(typeof(SmallOldHouse), 1011303, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0064), - new HousePlacementEntry(typeof(SmallOldHouse), 1011304, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0066), - new HousePlacementEntry(typeof(SmallOldHouse), 1011305, 425, 212, 489, 244, 10, 36500, 0, 4, 0, 0x0068), - new HousePlacementEntry(typeof(SmallOldHouse), 1011306, 425, 212, 489, 244, 10, 35000, 0, 4, 0, 0x006A), - new HousePlacementEntry(typeof(SmallOldHouse), 1011307, 425, 212, 489, 244, 10, 36500, 0, 4, 0, 0x006C), - new HousePlacementEntry(typeof(SmallOldHouse), 1011308, 425, 212, 489, 244, 10, 36500, 0, 4, 0, 0x006E), - new HousePlacementEntry(typeof(SmallShop), 1011321, 425, 212, 489, 244, 10, 50250, -1, 4, 0, 0x00A0), - new HousePlacementEntry(typeof(SmallShop), 1011322, 425, 212, 489, 244, 10, 52250, 0, 4, 0, 0x00A2), - new HousePlacementEntry(typeof(SmallTower), 1011317, 580, 290, 667, 333, 14, 73250, 3, 4, 0, 0x0098), - new HousePlacementEntry(typeof(TwoStoryVilla), 1011319, 1100, 550, 1265, 632, 24, 113500, 3, 6, 0, 0x009E), - new HousePlacementEntry(typeof(SandStonePatio), 1011320, 850, 425, 1265, 632, 24, 76250, -1, 4, 0, 0x009C), - new HousePlacementEntry(typeof(LogCabin), 1011318, 1100, 550, 1265, 632, 24, 81250, 1, 6, 0, 0x009A), - new HousePlacementEntry(typeof(GuildHouse), 1011309, 1370, 685, 1576, 788, 28, 131250, -1, 7, 0, 0x0074), - new HousePlacementEntry(typeof(TwoStoryHouse), 1011310, 1370, 685, 1576, 788, 28, 162500, -3, 7, 0, 0x0076), - new HousePlacementEntry(typeof(TwoStoryHouse), 1011311, 1370, 685, 1576, 788, 28, 162750, -3, 7, 0, 0x0078), - new HousePlacementEntry(typeof(LargePatioHouse), 1011315, 1370, 685, 1576, 788, 28, 129000, -4, 7, 0, 0x008C), - new HousePlacementEntry(typeof(LargeMarbleHouse), 1011316, 1370, 685, 1576, 788, 28, 160250, -4, 7, 0, 0x0096), - new HousePlacementEntry(typeof(Tower), 1011312, 2119, 1059, 2437, 1218, 42, 366250, 0, 7, 0, 0x007A), - new HousePlacementEntry(typeof(Keep), 1011313, 2625, 1312, 3019, 1509, 52, 562500, 0, 11, 0, 0x007C), - new HousePlacementEntry(typeof(Castle), 1011314, 4076, 2038, 4688, 2344, 78, 865000, 0, 16, 0, 0x007E), + new(typeof(SmallOldHouse), 1011303, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0064), + new(typeof(SmallOldHouse), 1011304, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0066), + new(typeof(SmallOldHouse), 1011305, 425, 212, 489, 244, 10, 36500, 0, 4, 0, 0x0068), + new(typeof(SmallOldHouse), 1011306, 425, 212, 489, 244, 10, 35000, 0, 4, 0, 0x006A), + new(typeof(SmallOldHouse), 1011307, 425, 212, 489, 244, 10, 36500, 0, 4, 0, 0x006C), + new(typeof(SmallOldHouse), 1011308, 425, 212, 489, 244, 10, 36500, 0, 4, 0, 0x006E), + new(typeof(SmallShop), 1011321, 425, 212, 489, 244, 10, 50250, -1, 4, 0, 0x00A0), + new(typeof(SmallShop), 1011322, 425, 212, 489, 244, 10, 52250, 0, 4, 0, 0x00A2), + new(typeof(SmallTower), 1011317, 580, 290, 667, 333, 14, 73250, 3, 4, 0, 0x0098), + new(typeof(TwoStoryVilla), 1011319, 1100, 550, 1265, 632, 24, 113500, 3, 6, 0, 0x009E), + new(typeof(SandStonePatio), 1011320, 850, 425, 1265, 632, 24, 76250, -1, 4, 0, 0x009C), + new(typeof(LogCabin), 1011318, 1100, 550, 1265, 632, 24, 81250, 1, 6, 0, 0x009A), + new(typeof(GuildHouse), 1011309, 1370, 685, 1576, 788, 28, 131250, -1, 7, 0, 0x0074), + new(typeof(TwoStoryHouse), 1011310, 1370, 685, 1576, 788, 28, 162500, -3, 7, 0, 0x0076), + new(typeof(TwoStoryHouse), 1011311, 1370, 685, 1576, 788, 28, 162750, -3, 7, 0, 0x0078), + new(typeof(LargePatioHouse), 1011315, 1370, 685, 1576, 788, 28, 129000, -4, 7, 0, 0x008C), + new(typeof(LargeMarbleHouse), 1011316, 1370, 685, 1576, 788, 28, 160250, -4, 7, 0, 0x0096), + new(typeof(Tower), 1011312, 2119, 1059, 2437, 1218, 42, 366250, 0, 7, 0, 0x007A), + new(typeof(Keep), 1011313, 2625, 1312, 3019, 1509, 52, 562500, 0, 11, 0, 0x007C), + new(typeof(Castle), 1011314, 4076, 2038, 4688, 2344, 78, 865000, 0, 16, 0, 0x007E), - new HousePlacementEntry(typeof(TrinsicKeep), 1158748, 2625, 1312, 3019, 1509, 52, 29643750, 0, 11, 0, 0x147E), - new HousePlacementEntry( + new(typeof(TrinsicKeep), 1158748, 2625, 1312, 3019, 1509, 52, 29643750, 0, 11, 0, 0x147E), + new( typeof(GothicRoseCastle), 1158749, 4076, @@ -419,9 +419,9 @@ namespace Server.Items 0, 0x147F ), - new HousePlacementEntry(typeof(ElsaCastle), 1158750, 4076, 2038, 4688, 2344, 78, 45450000, 0, 16, 0, 0x1480), - new HousePlacementEntry(typeof(Spires), 1158761, 4076, 2038, 4688, 2344, 78, 47025000, 0, 16, 0, 0x1481), - new HousePlacementEntry( + new(typeof(ElsaCastle), 1158750, 4076, 2038, 4688, 2344, 78, 45450000, 0, 16, 0, 0x1480), + new(typeof(Spires), 1158761, 4076, 2038, 4688, 2344, 78, 47025000, 0, 16, 0, 0x1481), + new( typeof(CastleOfOceania), 1158760, 4076, @@ -435,9 +435,9 @@ namespace Server.Items 0, 0x1482 ), - new HousePlacementEntry(typeof(FeudalCastle), 1158762, 4076, 2038, 4688, 2344, 78, 27337500, 0, 16, 0, 0x1483), - new HousePlacementEntry(typeof(RobinsNest), 1158850, 2625, 1312, 3019, 1509, 52, 25301250, 0, 11, 0, 0x1484), - new HousePlacementEntry( + new(typeof(FeudalCastle), 1158762, 4076, 2038, 4688, 2344, 78, 27337500, 0, 16, 0, 0x1483), + new(typeof(RobinsNest), 1158850, 2625, 1312, 3019, 1509, 52, 25301250, 0, 11, 0, 0x1484), + new( typeof(TraditionalKeep), 1158851, 2625, @@ -451,14 +451,14 @@ namespace Server.Items 0, 0x1485 ), - new HousePlacementEntry(typeof(VillaCrowley), 1158852, 2625, 1312, 3019, 1509, 52, 21813750, 0, 11, 0, 0x1486), - new HousePlacementEntry(typeof(DarkthornKeep), 1158853, 2625, 1312, 3019, 1509, 52, 27990000, 0, 11, 0, 0x1487), - new HousePlacementEntry(typeof(SandalwoodKeep), 1158854, 2625, 1312, 3019, 1509, 52, 23456250, 0, 11, 0, 0x1488), - new HousePlacementEntry(typeof(CasaMoga), 1158855, 2625, 1312, 3019, 1509, 52, 26313750, 0, 11, 0, 0x1489), + new(typeof(VillaCrowley), 1158852, 2625, 1312, 3019, 1509, 52, 21813750, 0, 11, 0, 0x1486), + new(typeof(DarkthornKeep), 1158853, 2625, 1312, 3019, 1509, 52, 27990000, 0, 11, 0, 0x1487), + new(typeof(SandalwoodKeep), 1158854, 2625, 1312, 3019, 1509, 52, 23456250, 0, 11, 0, 0x1488), + new(typeof(CasaMoga), 1158855, 2625, 1312, 3019, 1509, 52, 26313750, 0, 11, 0, 0x1489), - new HousePlacementEntry(typeof(RobinsRoost), 1158960, 4076, 2038, 4688, 2344, 78, 43863750, 0, 16, 0, 0x148A), - new HousePlacementEntry(typeof(Camelot), 1158961, 4076, 2038, 4688, 2344, 78, 47092500, 0, 16, 0, 0x148B), - new HousePlacementEntry( + new(typeof(RobinsRoost), 1158960, 4076, 2038, 4688, 2344, 78, 43863750, 0, 16, 0, 0x148A), + new(typeof(Camelot), 1158961, 4076, 2038, 4688, 2344, 78, 47092500, 0, 16, 0, 0x148B), + new( typeof(LacrimaeInCaelo), 1158962, 4076, @@ -472,7 +472,7 @@ namespace Server.Items 0, 0x148C ), - new HousePlacementEntry( + new( typeof(OkinawaSweetDreamCastle), 1158963, 4076, @@ -486,7 +486,7 @@ namespace Server.Items 0, 0x148D ), - new HousePlacementEntry( + new( typeof(TheSandstoneCastle), 1158964, 4076, @@ -500,7 +500,7 @@ namespace Server.Items 0, 0x148E ), - new HousePlacementEntry( + new( typeof(GrimswindSisters), 1158965, 4076, @@ -518,7 +518,7 @@ namespace Server.Items public static HousePlacementEntry[] TwoStoryFoundations { get; } = { - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060241, 425, @@ -532,7 +532,7 @@ namespace Server.Items 0, 0x13EC ), // 7x7 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060242, 580, @@ -546,7 +546,7 @@ namespace Server.Items 0, 0x13ED ), // 7x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060243, 650, @@ -560,7 +560,7 @@ namespace Server.Items 0, 0x13EE ), // 7x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060244, 700, @@ -574,7 +574,7 @@ namespace Server.Items 0, 0x13EF ), // 7x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060245, 750, @@ -588,7 +588,7 @@ namespace Server.Items 0, 0x13F0 ), // 7x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060246, 800, @@ -602,7 +602,7 @@ namespace Server.Items 0, 0x13F1 ), // 7x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060253, 580, @@ -616,7 +616,7 @@ namespace Server.Items 0, 0x13F8 ), // 8x7 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060254, 650, @@ -630,7 +630,7 @@ namespace Server.Items 0, 0x13F9 ), // 8x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060255, 700, @@ -644,7 +644,7 @@ namespace Server.Items 0, 0x13FA ), // 8x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060256, 750, @@ -658,7 +658,7 @@ namespace Server.Items 0, 0x13FB ), // 8x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060257, 800, @@ -672,7 +672,7 @@ namespace Server.Items 0, 0x13FC ), // 8x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060258, 850, @@ -686,7 +686,7 @@ namespace Server.Items 0, 0x13FD ), // 8x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060259, 1100, @@ -700,7 +700,7 @@ namespace Server.Items 0, 0x13FE ), // 8x13 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060265, 650, @@ -714,7 +714,7 @@ namespace Server.Items 0, 0x1404 ), // 9x7 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060266, 700, @@ -728,7 +728,7 @@ namespace Server.Items 0, 0x1405 ), // 9x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060267, 750, @@ -742,7 +742,7 @@ namespace Server.Items 0, 0x1406 ), // 9x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060268, 800, @@ -756,7 +756,7 @@ namespace Server.Items 0, 0x1407 ), // 9x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060269, 850, @@ -770,7 +770,7 @@ namespace Server.Items 0, 0x1408 ), // 9x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060270, 1100, @@ -784,7 +784,7 @@ namespace Server.Items 0, 0x1409 ), // 9x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060271, 1100, @@ -798,7 +798,7 @@ namespace Server.Items 0, 0x140A ), // 9x13 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060277, 700, @@ -812,7 +812,7 @@ namespace Server.Items 0, 0x1410 ), // 10x7 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060278, 750, @@ -826,7 +826,7 @@ namespace Server.Items 0, 0x1411 ), // 10x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060279, 800, @@ -840,7 +840,7 @@ namespace Server.Items 0, 0x1412 ), // 10x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060280, 850, @@ -854,7 +854,7 @@ namespace Server.Items 0, 0x1413 ), // 10x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060281, 1100, @@ -868,7 +868,7 @@ namespace Server.Items 0, 0x1414 ), // 10x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060282, 1100, @@ -882,7 +882,7 @@ namespace Server.Items 0, 0x1415 ), // 10x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060283, 1150, @@ -896,7 +896,7 @@ namespace Server.Items 0, 0x1416 ), // 10x13 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060289, 750, @@ -910,7 +910,7 @@ namespace Server.Items 0, 0x141C ), // 11x7 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060290, 800, @@ -924,7 +924,7 @@ namespace Server.Items 0, 0x141D ), // 11x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060291, 850, @@ -938,7 +938,7 @@ namespace Server.Items 0, 0x141E ), // 11x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060292, 1100, @@ -952,7 +952,7 @@ namespace Server.Items 0, 0x141F ), // 11x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060293, 1100, @@ -966,7 +966,7 @@ namespace Server.Items 0, 0x1420 ), // 11x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060294, 1150, @@ -980,7 +980,7 @@ namespace Server.Items 0, 0x1421 ), // 11x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060295, 1200, @@ -994,7 +994,7 @@ namespace Server.Items 0, 0x1422 ), // 11x13 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060301, 800, @@ -1008,7 +1008,7 @@ namespace Server.Items 0, 0x1428 ), // 12x7 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060302, 850, @@ -1022,7 +1022,7 @@ namespace Server.Items 0, 0x1429 ), // 12x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060303, 1100, @@ -1036,7 +1036,7 @@ namespace Server.Items 0, 0x142A ), // 12x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060304, 1100, @@ -1050,7 +1050,7 @@ namespace Server.Items 0, 0x142B ), // 12x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060305, 1150, @@ -1064,7 +1064,7 @@ namespace Server.Items 0, 0x142C ), // 12x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060306, 1200, @@ -1078,7 +1078,7 @@ namespace Server.Items 0, 0x142D ), // 12x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060307, 1250, @@ -1092,7 +1092,7 @@ namespace Server.Items 0, 0x142E ), // 12x13 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060314, 1100, @@ -1106,7 +1106,7 @@ namespace Server.Items 0, 0x1435 ), // 13x8 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060315, 1100, @@ -1120,7 +1120,7 @@ namespace Server.Items 0, 0x1436 ), // 13x9 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060316, 1150, @@ -1134,7 +1134,7 @@ namespace Server.Items 0, 0x1437 ), // 13x10 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060317, 1200, @@ -1148,7 +1148,7 @@ namespace Server.Items 0, 0x1438 ), // 13x11 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060318, 1250, @@ -1162,7 +1162,7 @@ namespace Server.Items 0, 0x1439 ), // 13x12 2-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060319, 1300, @@ -1180,7 +1180,7 @@ namespace Server.Items public static HousePlacementEntry[] ThreeStoryFoundations { get; } = { - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060272, 1150, @@ -1194,7 +1194,7 @@ namespace Server.Items 0, 0x140B ), // 9x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060284, 1200, @@ -1208,7 +1208,7 @@ namespace Server.Items 0, 0x1417 ), // 10x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060285, 1250, @@ -1222,7 +1222,7 @@ namespace Server.Items 0, 0x1418 ), // 10x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060296, 1250, @@ -1236,7 +1236,7 @@ namespace Server.Items 0, 0x1423 ), // 11x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060297, 1300, @@ -1250,7 +1250,7 @@ namespace Server.Items 0, 0x1424 ), // 11x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060298, 1350, @@ -1264,7 +1264,7 @@ namespace Server.Items 0, 0x1425 ), // 11x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060308, 1300, @@ -1278,7 +1278,7 @@ namespace Server.Items 0, 0x142F ), // 12x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060309, 1350, @@ -1292,7 +1292,7 @@ namespace Server.Items 0, 0x1430 ), // 12x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060310, 1370, @@ -1306,7 +1306,7 @@ namespace Server.Items 0, 0x1431 ), // 12x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060311, 1370, @@ -1320,7 +1320,7 @@ namespace Server.Items 0, 0x1432 ), // 12x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060320, 1350, @@ -1334,7 +1334,7 @@ namespace Server.Items 0, 0x143B ), // 13x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060321, 1370, @@ -1348,7 +1348,7 @@ namespace Server.Items 0, 0x143C ), // 13x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060322, 1370, @@ -1362,7 +1362,7 @@ namespace Server.Items 0, 0x143D ), // 13x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060323, 2119, @@ -1376,7 +1376,7 @@ namespace Server.Items 0, 0x143E ), // 13x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060324, 2119, @@ -1390,7 +1390,7 @@ namespace Server.Items 0, 0x143F ), // 13x18 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060327, 1150, @@ -1404,7 +1404,7 @@ namespace Server.Items 0, 0x1442 ), // 14x9 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060328, 1200, @@ -1418,7 +1418,7 @@ namespace Server.Items 0, 0x1443 ), // 14x10 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060329, 1250, @@ -1432,7 +1432,7 @@ namespace Server.Items 0, 0x1444 ), // 14x11 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060330, 1300, @@ -1446,7 +1446,7 @@ namespace Server.Items 0, 0x1445 ), // 14x12 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060331, 1350, @@ -1460,7 +1460,7 @@ namespace Server.Items 0, 0x1446 ), // 14x13 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060332, 1370, @@ -1474,7 +1474,7 @@ namespace Server.Items 0, 0x1447 ), // 14x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060333, 1370, @@ -1488,7 +1488,7 @@ namespace Server.Items 0, 0x1448 ), // 14x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060334, 2119, @@ -1502,7 +1502,7 @@ namespace Server.Items 0, 0x1449 ), // 14x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060335, 2119, @@ -1516,7 +1516,7 @@ namespace Server.Items 0, 0x144A ), // 14x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060336, 2119, @@ -1530,7 +1530,7 @@ namespace Server.Items 0, 0x144B ), // 14x18 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060340, 1250, @@ -1544,7 +1544,7 @@ namespace Server.Items 0, 0x144F ), // 15x10 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060341, 1300, @@ -1558,7 +1558,7 @@ namespace Server.Items 0, 0x1450 ), // 15x11 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060342, 1350, @@ -1572,7 +1572,7 @@ namespace Server.Items 0, 0x1451 ), // 15x12 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060343, 1370, @@ -1586,7 +1586,7 @@ namespace Server.Items 0, 0x1452 ), // 15x13 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060344, 1370, @@ -1600,7 +1600,7 @@ namespace Server.Items 0, 0x1453 ), // 15x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060345, 2119, @@ -1614,7 +1614,7 @@ namespace Server.Items 0, 0x1454 ), // 15x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060346, 2119, @@ -1628,7 +1628,7 @@ namespace Server.Items 0, 0x1455 ), // 15x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060347, 2119, @@ -1642,7 +1642,7 @@ namespace Server.Items 0, 0x1456 ), // 15x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060348, 2119, @@ -1656,7 +1656,7 @@ namespace Server.Items 0, 0x1457 ), // 15x18 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060353, 1350, @@ -1670,7 +1670,7 @@ namespace Server.Items 0, 0x145C ), // 16x11 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060354, 1370, @@ -1684,7 +1684,7 @@ namespace Server.Items 0, 0x145D ), // 16x12 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060355, 1370, @@ -1698,7 +1698,7 @@ namespace Server.Items 0, 0x145E ), // 16x13 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060356, 2119, @@ -1712,7 +1712,7 @@ namespace Server.Items 0, 0x145F ), // 16x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060357, 2119, @@ -1726,7 +1726,7 @@ namespace Server.Items 0, 0x1460 ), // 16x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060358, 2119, @@ -1740,7 +1740,7 @@ namespace Server.Items 0, 0x1461 ), // 16x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060359, 2119, @@ -1754,7 +1754,7 @@ namespace Server.Items 0, 0x1462 ), // 16x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060360, 2119, @@ -1768,7 +1768,7 @@ namespace Server.Items 0, 0x1463 ), // 16x18 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060366, 1370, @@ -1782,7 +1782,7 @@ namespace Server.Items 0, 0x1469 ), // 17x12 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060367, 2119, @@ -1796,7 +1796,7 @@ namespace Server.Items 0, 0x146A ), // 17x13 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060368, 2119, @@ -1810,7 +1810,7 @@ namespace Server.Items 0, 0x146B ), // 17x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060369, 2119, @@ -1824,7 +1824,7 @@ namespace Server.Items 0, 0x146C ), // 17x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060370, 2119, @@ -1838,7 +1838,7 @@ namespace Server.Items 0, 0x146D ), // 17x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060371, 2119, @@ -1852,7 +1852,7 @@ namespace Server.Items 0, 0x146E ), // 17x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060372, 2119, @@ -1866,7 +1866,7 @@ namespace Server.Items 0, 0x146F ), // 17x18 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060379, 2119, @@ -1880,7 +1880,7 @@ namespace Server.Items 0, 0x1476 ), // 18x13 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060380, 2119, @@ -1894,7 +1894,7 @@ namespace Server.Items 0, 0x1477 ), // 18x14 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060381, 2119, @@ -1908,7 +1908,7 @@ namespace Server.Items 0, 0x1478 ), // 18x15 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060382, 2119, @@ -1922,7 +1922,7 @@ namespace Server.Items 0, 0x1479 ), // 18x16 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060383, 2119, @@ -1936,7 +1936,7 @@ namespace Server.Items 0, 0x147A ), // 18x17 3-Story Customizable House - new HousePlacementEntry( + new( typeof(HouseFoundation), 1060384, 2119, diff --git a/Projects/UOContent/Multis/Houses.cs b/Projects/UOContent/Multis/Houses.cs index de60e623a..b8f5c9a94 100644 --- a/Projects/UOContent/Multis/Houses.cs +++ b/Projects/UOContent/Multis/Houses.cs @@ -5,7 +5,7 @@ namespace Server.Multis { public class SmallOldHouse : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-3, -3, 7, 7), new Rectangle2D(-1, 4, 3, 1) }; + public static Rectangle2D[] AreaArray = { new(-3, -3, 7, 7), new(-1, 4, 3, 1) }; public SmallOldHouse(Mobile owner, int id) : base(id, owner, 425, 3) { @@ -21,7 +21,7 @@ namespace Server.Multis } public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(2, 4, 0); + public override Point3D BaseBanLocation => new(2, 4, 0); public override int DefaultPrice => 43800; @@ -56,7 +56,7 @@ namespace Server.Multis public class GuildHouse : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-7, -7, 14, 14), new Rectangle2D(-2, 7, 4, 1) }; + public static Rectangle2D[] AreaArray = { new(-7, -7, 14, 14), new(-2, 7, 4, 1) }; public GuildHouse(Mobile owner) : base(0x74, owner, 1100, 8) { @@ -81,7 +81,7 @@ namespace Server.Multis public override int ConvertOffsetY => -1; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(4, 8, 0); + public override Point3D BaseBanLocation => new(4, 8, 0); public override HouseDeed GetDeed() => new BrickHouseDeed(); @@ -101,7 +101,7 @@ namespace Server.Multis public class TwoStoryHouse : BaseHouse { public static Rectangle2D[] AreaArray = - { new Rectangle2D(-7, 0, 14, 7), new Rectangle2D(-7, -7, 9, 7), new Rectangle2D(-4, 7, 4, 1) }; + { new(-7, 0, 14, 7), new(-7, -7, 9, 7), new(-4, 7, 4, 1) }; public TwoStoryHouse(Mobile owner, int id) : base(id, owner, 1370, 10) { @@ -120,7 +120,7 @@ namespace Server.Multis } public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(2, 8, 0); + public override Point3D BaseBanLocation => new(2, 8, 0); public override int DefaultPrice => 192400; @@ -151,8 +151,8 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-7, -7, 16, 14), new Rectangle2D(-1, 7, 4, 2), new Rectangle2D(-11, 0, 4, 7), - new Rectangle2D(9, 0, 4, 7) + new(-7, -7, 16, 14), new(-1, 7, 4, 2), new(-11, 0, 4, 7), + new(9, 0, 4, 7) }; public Tower(Mobile owner) : base(0x7A, owner, 2119, 15) @@ -178,7 +178,7 @@ namespace Server.Multis public override int ConvertOffsetY => -1; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(5, 8, 0); + public override Point3D BaseBanLocation => new(5, 8, 0); public override HouseDeed GetDeed() => new TowerDeed(); @@ -199,9 +199,9 @@ namespace Server.Multis { public static Rectangle2D[] AreaArray = { - new Rectangle2D(-11, -11, 7, 8), new Rectangle2D(-11, 5, 7, 8), new Rectangle2D(6, -11, 7, 8), - new Rectangle2D(6, 5, 7, 8), new Rectangle2D(-9, -3, 5, 8), new Rectangle2D(6, -3, 5, 8), - new Rectangle2D(-4, -9, 10, 20), new Rectangle2D(-1, 11, 4, 1) + new(-11, -11, 7, 8), new(-11, 5, 7, 8), new(6, -11, 7, 8), + new(6, 5, 7, 8), new(-9, -3, 5, 8), new(6, -3, 5, 8), + new(-4, -9, 10, 20), new(-1, 11, 4, 1) }; public Keep(Mobile owner) : base(0x7C, owner, 2625, 18) @@ -220,7 +220,7 @@ namespace Server.Multis public override int DefaultPrice => 665200; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(5, 13, 0); + public override Point3D BaseBanLocation => new(5, 13, 0); public override HouseDeed GetDeed() => new KeepDeed(); @@ -239,7 +239,7 @@ namespace Server.Multis public class Castle : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-15, -15, 31, 31), new Rectangle2D(-1, 16, 4, 1) }; + public static Rectangle2D[] AreaArray = { new(-15, -15, 31, 31), new(-1, 16, 4, 1) }; public Castle(Mobile owner) : base(0x7E, owner, 4076, 28) { @@ -261,7 +261,7 @@ namespace Server.Multis public override int DefaultPrice => 1022800; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(5, 17, 0); + public override Point3D BaseBanLocation => new(5, 17, 0); public override HouseDeed GetDeed() => new CastleDeed(); @@ -280,7 +280,7 @@ namespace Server.Multis public class LargePatioHouse : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-7, -7, 15, 14), new Rectangle2D(-5, 7, 4, 1) }; + public static Rectangle2D[] AreaArray = { new(-7, -7, 15, 14), new(-5, 7, 4, 1) }; public LargePatioHouse(Mobile owner) : base(0x8C, owner, 1100, 8) { @@ -305,7 +305,7 @@ namespace Server.Multis public override int ConvertOffsetY => -1; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(1, 8, 0); + public override Point3D BaseBanLocation => new(1, 8, 0); public override HouseDeed GetDeed() => new LargePatioDeed(); @@ -324,7 +324,7 @@ namespace Server.Multis public class LargeMarbleHouse : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-7, -7, 15, 14), new Rectangle2D(-6, 7, 6, 1) }; + public static Rectangle2D[] AreaArray = { new(-7, -7, 15, 14), new(-6, 7, 6, 1) }; public LargeMarbleHouse(Mobile owner) : base(0x96, owner, 1370, 10) { @@ -345,7 +345,7 @@ namespace Server.Multis public override int ConvertOffsetY => -1; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(1, 8, 0); + public override Point3D BaseBanLocation => new(1, 8, 0); public override HouseDeed GetDeed() => new LargeMarbleDeed(); @@ -364,7 +364,7 @@ namespace Server.Multis public class SmallTower : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-3, -3, 8, 7), new Rectangle2D(2, 4, 3, 1) }; + public static Rectangle2D[] AreaArray = { new(-3, -3, 8, 7), new(2, 4, 3, 1) }; public SmallTower(Mobile owner) : base(0x98, owner, 580, 4) { @@ -384,7 +384,7 @@ namespace Server.Multis public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[6]; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(1, 4, 0); + public override Point3D BaseBanLocation => new(1, 4, 0); public override HouseDeed GetDeed() => new SmallTowerDeed(); @@ -403,7 +403,7 @@ namespace Server.Multis public class LogCabin : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-3, -6, 8, 13) }; + public static Rectangle2D[] AreaArray = { new(-3, -6, 8, 13) }; public LogCabin(Mobile owner) : base(0x9A, owner, 1100, 8) { @@ -425,7 +425,7 @@ namespace Server.Multis public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[12]; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(5, 8, 0); + public override Point3D BaseBanLocation => new(5, 8, 0); public override HouseDeed GetDeed() => new LogCabinDeed(); @@ -444,7 +444,7 @@ namespace Server.Multis public class SandStonePatio : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-5, -4, 12, 8), new Rectangle2D(-2, 4, 3, 1) }; + public static Rectangle2D[] AreaArray = { new(-5, -4, 12, 8), new(-2, 4, 3, 1) }; public SandStonePatio(Mobile owner) : base(0x9C, owner, 850, 6) { @@ -465,7 +465,7 @@ namespace Server.Multis public override int ConvertOffsetY => -1; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(4, 6, 0); + public override Point3D BaseBanLocation => new(4, 6, 0); public override HouseDeed GetDeed() => new SandstonePatioDeed(); @@ -484,7 +484,7 @@ namespace Server.Multis public class TwoStoryVilla : BaseHouse { - public static Rectangle2D[] AreaArray = { new Rectangle2D(-5, -5, 11, 11), new Rectangle2D(2, 6, 4, 1) }; + public static Rectangle2D[] AreaArray = { new(-5, -5, 11, 11), new(2, 6, 4, 1) }; public TwoStoryVilla(Mobile owner) : base(0x9E, owner, 1100, 8) { @@ -507,7 +507,7 @@ namespace Server.Multis public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[31]; public override Rectangle2D[] Area => AreaArray; - public override Point3D BaseBanLocation => new Point3D(3, 8, 0); + public override Point3D BaseBanLocation => new(3, 8, 0); public override HouseDeed GetDeed() => new VillaDeed(); @@ -526,8 +526,8 @@ namespace Server.Multis public class SmallShop : BaseHouse { - public static Rectangle2D[] AreaArray1 = { new Rectangle2D(-3, -3, 7, 7), new Rectangle2D(-1, 4, 4, 1) }; - public static Rectangle2D[] AreaArray2 = { new Rectangle2D(-3, -3, 7, 7), new Rectangle2D(-2, 4, 3, 1) }; + public static Rectangle2D[] AreaArray1 = { new(-3, -3, 7, 7), new(-1, 4, 4, 1) }; + public static Rectangle2D[] AreaArray2 = { new(-3, -3, 7, 7), new(-2, 4, 3, 1) }; public SmallShop(Mobile owner, int id) : base(id, owner, 425, 3) { @@ -555,7 +555,7 @@ namespace Server.Multis } public override Rectangle2D[] Area => ItemID == 0x40A2 ? AreaArray1 : AreaArray2; - public override Point3D BaseBanLocation => new Point3D(3, 4, 0); + public override Point3D BaseBanLocation => new(3, 4, 0); public override int DefaultPrice => 63000; diff --git a/Projects/UOContent/Multis/MovingCrate.cs b/Projects/UOContent/Multis/MovingCrate.cs index c2e71139a..6c090a0f8 100644 --- a/Projects/UOContent/Multis/MovingCrate.cs +++ b/Projects/UOContent/Multis/MovingCrate.cs @@ -297,7 +297,7 @@ namespace Server.Multis public override int DefaultGumpID => 0x4B; public override int DefaultDropSound => 0x42; - public override Rectangle2D Bounds => new Rectangle2D(16, 51, 168, 73); + public override Rectangle2D Bounds => new(16, 51, 168, 73); public override int DefaultMaxItems => 0; public override int DefaultMaxWeight => 0; diff --git a/Projects/UOContent/Regions/BaseRegion.cs b/Projects/UOContent/Regions/BaseRegion.cs index 1eb0fb01e..5359bbb74 100644 --- a/Projects/UOContent/Regions/BaseRegion.cs +++ b/Projects/UOContent/Regions/BaseRegion.cs @@ -10,8 +10,8 @@ namespace Server.Regions { public class BaseRegion : Region { - private static readonly List m_RectBuffer1 = new List(); - private static readonly List m_RectBuffer2 = new List(); + private static readonly List m_RectBuffer1 = new(); + private static readonly List m_RectBuffer2 = new(); public BaseRegion(string name, Map map, int priority, params Rectangle2D[] area) : base(name, map, priority, area) { diff --git a/Projects/UOContent/Regions/GuardedRegion.cs b/Projects/UOContent/Regions/GuardedRegion.cs index 980051fe1..b00e940e3 100644 --- a/Projects/UOContent/Regions/GuardedRegion.cs +++ b/Projects/UOContent/Regions/GuardedRegion.cs @@ -12,7 +12,7 @@ namespace Server.Regions { private static readonly object[] m_GuardParams = new object[1]; - private readonly Dictionary m_GuardCandidates = new Dictionary(); + private readonly Dictionary m_GuardCandidates = new(); private readonly Type m_GuardType; public GuardedRegion(string name, Map map, int priority, params Rectangle3D[] area) : diff --git a/Projects/UOContent/Skills/AnimalTaming.cs b/Projects/UOContent/Skills/AnimalTaming.cs index 9922bad83..afef32f41 100644 --- a/Projects/UOContent/Skills/AnimalTaming.cs +++ b/Projects/UOContent/Skills/AnimalTaming.cs @@ -12,7 +12,7 @@ namespace Server.SkillHandlers { public static class AnimalTaming { - private static readonly HashSet m_BeingTamed = new HashSet(); + private static readonly HashSet m_BeingTamed = new(); public static bool DisableMessage { get; set; } diff --git a/Projects/UOContent/Skills/Discordance.cs b/Projects/UOContent/Skills/Discordance.cs index a91cf6f75..560f3d9aa 100644 --- a/Projects/UOContent/Skills/Discordance.cs +++ b/Projects/UOContent/Skills/Discordance.cs @@ -8,7 +8,7 @@ namespace Server.SkillHandlers { public static class Discordance { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public static void Initialize() { diff --git a/Projects/UOContent/Skills/Inscribe.cs b/Projects/UOContent/Skills/Inscribe.cs index 4006652f6..87733dbbd 100644 --- a/Projects/UOContent/Skills/Inscribe.cs +++ b/Projects/UOContent/Skills/Inscribe.cs @@ -8,7 +8,7 @@ namespace Server.SkillHandlers { public static class Inscribe { - private static readonly Dictionary m_UseTable = new Dictionary(); + private static readonly Dictionary m_UseTable = new(); public static void Initialize() { diff --git a/Projects/UOContent/Skills/SpiritSpeak.cs b/Projects/UOContent/Skills/SpiritSpeak.cs index 80af6a159..c7d9d9f8b 100644 --- a/Projects/UOContent/Skills/SpiritSpeak.cs +++ b/Projects/UOContent/Skills/SpiritSpeak.cs @@ -79,7 +79,7 @@ namespace Server.SkillHandlers private class SpiritSpeakSpell : Spell { - private static readonly SpellInfo m_Info = new SpellInfo("Spirit Speak", "", 269); + private static readonly SpellInfo m_Info = new("Spirit Speak", "", 269); public SpiritSpeakSpell(Mobile caster) : base(caster, null, m_Info) { diff --git a/Projects/UOContent/Skills/Stealing.cs b/Projects/UOContent/Skills/Stealing.cs index d4e6e7fed..99bce568e 100644 --- a/Projects/UOContent/Skills/Stealing.cs +++ b/Projects/UOContent/Skills/Stealing.cs @@ -421,7 +421,7 @@ namespace Server.SkillHandlers { public static readonly TimeSpan StealTime = TimeSpan.FromMinutes(2.0); - private static readonly Queue m_Queue = new Queue(); + private static readonly Queue m_Queue = new(); public StolenItem(Item stolen, Mobile thief, Mobile victim) { diff --git a/Projects/UOContent/Skills/Tracking/Tracking.cs b/Projects/UOContent/Skills/Tracking/Tracking.cs index 929c67847..ad438f20e 100644 --- a/Projects/UOContent/Skills/Tracking/Tracking.cs +++ b/Projects/UOContent/Skills/Tracking/Tracking.cs @@ -11,7 +11,7 @@ namespace Server.SkillHandlers { public static class Tracking { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public static void Configure() { diff --git a/Projects/UOContent/SpecialSystems/Engines/GiftGiving.cs b/Projects/UOContent/SpecialSystems/Engines/GiftGiving.cs index 30247233c..c82384ba7 100644 --- a/Projects/UOContent/SpecialSystems/Engines/GiftGiving.cs +++ b/Projects/UOContent/SpecialSystems/Engines/GiftGiving.cs @@ -12,7 +12,7 @@ namespace Server.Misc public static class GiftGiving { - private static readonly List m_Givers = new List(); + private static readonly List m_Givers = new(); public static void Register(GiftGiver giver) { diff --git a/Projects/UOContent/SpecialSystems/Engines/PreventInaccess.cs b/Projects/UOContent/SpecialSystems/Engines/PreventInaccess.cs index 1a212a9b4..e4c9a0eb2 100644 --- a/Projects/UOContent/SpecialSystems/Engines/PreventInaccess.cs +++ b/Projects/UOContent/SpecialSystems/Engines/PreventInaccess.cs @@ -21,10 +21,10 @@ namespace Server.Misc private static readonly LocationInfo[] m_Destinations = { - new LocationInfo(new Point3D(5275, 1163, 0), Map.Felucca), // Jail - new LocationInfo(new Point3D(5275, 1163, 0), Map.Trammel), - new LocationInfo(new Point3D(5445, 1153, 0), Map.Felucca), // Green acres - new LocationInfo(new Point3D(5445, 1153, 0), Map.Trammel) + new(new Point3D(5275, 1163, 0), Map.Felucca), // Jail + new(new Point3D(5275, 1163, 0), Map.Trammel), + new(new Point3D(5445, 1153, 0), Map.Felucca), // Green acres + new(new Point3D(5445, 1153, 0), Map.Trammel) }; private static Dictionary m_MoveHistory; diff --git a/Projects/UOContent/Spells/Base/SpecialMove.cs b/Projects/UOContent/Spells/Base/SpecialMove.cs index 8410e017c..86db6cec1 100644 --- a/Projects/UOContent/Spells/Base/SpecialMove.cs +++ b/Projects/UOContent/Spells/Base/SpecialMove.cs @@ -12,7 +12,7 @@ namespace Server.Spells public abstract class SpecialMove { private static readonly Dictionary m_PlayersTable = - new Dictionary(); + new(); public virtual int BaseMana => 0; @@ -24,7 +24,7 @@ namespace Server.Spells public virtual bool BlockedByAnimalForm => true; public virtual bool DelayedContext => false; - public static Dictionary Table { get; } = new Dictionary(); + public static Dictionary Table { get; } = new(); public virtual bool ValidatesDuringHit => true; diff --git a/Projects/UOContent/Spells/Base/Spell.cs b/Projects/UOContent/Spells/Base/Spell.cs index f8132ced2..9f8700807 100644 --- a/Projects/UOContent/Spells/Base/Spell.cs +++ b/Projects/UOContent/Spells/Base/Spell.cs @@ -25,7 +25,7 @@ namespace Server.Spells // of course, two MA's won't. private static readonly Dictionary m_ContextTable = - new Dictionary(); + new(); private AnimTimer m_AnimTimer; @@ -834,7 +834,7 @@ namespace Server.Spells private class DelayedDamageContextWrapper { - private readonly Dictionary m_Contexts = new Dictionary(); + private readonly Dictionary m_Contexts = new(); public void Add(Mobile m, Timer t) { diff --git a/Projects/UOContent/Spells/Base/SpellHelper.cs b/Projects/UOContent/Spells/Base/SpellHelper.cs index 6ba7c2242..c3b342dfb 100644 --- a/Projects/UOContent/Spells/Base/SpellHelper.cs +++ b/Projects/UOContent/Spells/Base/SpellHelper.cs @@ -1225,7 +1225,7 @@ namespace Server.Spells public static class TransformationSpellHelper { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public static bool CheckCast(Mobile caster, Spell spell) { diff --git a/Projects/UOContent/Spells/Base/SpellRegistry.cs b/Projects/UOContent/Spells/Base/SpellRegistry.cs index 2b512a710..4aaf9bc30 100644 --- a/Projects/UOContent/Spells/Base/SpellRegistry.cs +++ b/Projects/UOContent/Spells/Base/SpellRegistry.cs @@ -9,7 +9,7 @@ namespace Server.Spells private static readonly Type[] m_Types = new Type[700]; private static int m_Count; - private static readonly Dictionary m_IDsFromTypes = new Dictionary(m_Types.Length); + private static readonly Dictionary m_IDsFromTypes = new(m_Types.Length); private static readonly object[] m_Params = new object[2]; @@ -61,7 +61,7 @@ namespace Server.Spells } } - public static Dictionary SpecialMoves { get; } = new Dictionary(); + public static Dictionary SpecialMoves { get; } = new(); public static int GetRegistryNumber(ISpell s) => GetRegistryNumber(s.GetType()); diff --git a/Projects/UOContent/Spells/Bushido/Confidence.cs b/Projects/UOContent/Spells/Bushido/Confidence.cs index cf248f006..02503d836 100644 --- a/Projects/UOContent/Spells/Bushido/Confidence.cs +++ b/Projects/UOContent/Spells/Bushido/Confidence.cs @@ -5,15 +5,15 @@ namespace Server.Spells.Bushido { public class Confidence : SamuraiSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Confidence", null, -1, 9002 ); - private static readonly Dictionary m_Table = new Dictionary(); - private static readonly Dictionary m_RegenTable = new Dictionary(); + private static readonly Dictionary m_Table = new(); + private static readonly Dictionary m_RegenTable = new(); public Confidence(Mobile caster, Item scroll) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Bushido/CounterAttack.cs b/Projects/UOContent/Spells/Bushido/CounterAttack.cs index 06bcd092b..e4069f398 100644 --- a/Projects/UOContent/Spells/Bushido/CounterAttack.cs +++ b/Projects/UOContent/Spells/Bushido/CounterAttack.cs @@ -6,14 +6,14 @@ namespace Server.Spells.Bushido { public class CounterAttack : SamuraiSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "CounterAttack", null, -1, 9002 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public CounterAttack(Mobile caster, Item scroll) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Bushido/Evasion.cs b/Projects/UOContent/Spells/Bushido/Evasion.cs index 24bc2c0b8..2b27533ac 100644 --- a/Projects/UOContent/Spells/Bushido/Evasion.cs +++ b/Projects/UOContent/Spells/Bushido/Evasion.cs @@ -6,14 +6,14 @@ namespace Server.Spells.Bushido { public class Evasion : SamuraiSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Evasion", null, -1, 9002 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public Evasion(Mobile caster, Item scroll) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Bushido/HonorableExecution.cs b/Projects/UOContent/Spells/Bushido/HonorableExecution.cs index 08df46f42..d7b9adfa2 100644 --- a/Projects/UOContent/Spells/Bushido/HonorableExecution.cs +++ b/Projects/UOContent/Spells/Bushido/HonorableExecution.cs @@ -6,13 +6,13 @@ namespace Server.Spells.Bushido public class HonorableExecution : SamuraiMove { private static readonly Dictionary m_Table = - new Dictionary(); + new(); public override int BaseMana => 0; public override double RequiredSkill => 25.0; public override TextDefinition AbilityMessage => - new TextDefinition(1063122); // You better kill your enemy with your next hit or you'll be rather sorry... + new(1063122); // You better kill your enemy with your next hit or you'll be rather sorry... public override double GetDamageScalar(Mobile attacker, Mobile defender) { diff --git a/Projects/UOContent/Spells/Bushido/LightningStrike.cs b/Projects/UOContent/Spells/Bushido/LightningStrike.cs index db5cb51c6..4b5f33714 100644 --- a/Projects/UOContent/Spells/Bushido/LightningStrike.cs +++ b/Projects/UOContent/Spells/Bushido/LightningStrike.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Bushido public override int BaseMana => 5; public override double RequiredSkill => 50.0; - public override TextDefinition AbilityMessage => new TextDefinition(1063167); // You prepare to strike quickly. + public override TextDefinition AbilityMessage => new(1063167); // You prepare to strike quickly. public override bool DelayedContext => true; diff --git a/Projects/UOContent/Spells/Bushido/MomentumStrike.cs b/Projects/UOContent/Spells/Bushido/MomentumStrike.cs index 8dc9042a0..5513c5429 100644 --- a/Projects/UOContent/Spells/Bushido/MomentumStrike.cs +++ b/Projects/UOContent/Spells/Bushido/MomentumStrike.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Bushido public override double RequiredSkill => 70.0; public override TextDefinition AbilityMessage => - new TextDefinition(1070757); // You prepare to strike two enemies with one blow. + new(1070757); // You prepare to strike two enemies with one blow. public override void OnHit(Mobile attacker, Mobile defender, int damage) { diff --git a/Projects/UOContent/Spells/Chivalry/CleanseByFire.cs b/Projects/UOContent/Spells/Chivalry/CleanseByFire.cs index 57be69bef..f5ef5332a 100644 --- a/Projects/UOContent/Spells/Chivalry/CleanseByFire.cs +++ b/Projects/UOContent/Spells/Chivalry/CleanseByFire.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Chivalry { public class CleanseByFireSpell : PaladinSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Cleanse By Fire", "Expor Flamus", -1, diff --git a/Projects/UOContent/Spells/Chivalry/CloseWounds.cs b/Projects/UOContent/Spells/Chivalry/CloseWounds.cs index a7f2497c2..b3211b5d5 100644 --- a/Projects/UOContent/Spells/Chivalry/CloseWounds.cs +++ b/Projects/UOContent/Spells/Chivalry/CloseWounds.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Chivalry { public class CloseWoundsSpell : PaladinSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Close Wounds", "Obsu Vulni", -1, diff --git a/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs b/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs index 0646f20c7..66127da2e 100644 --- a/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs +++ b/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs @@ -6,14 +6,14 @@ namespace Server.Spells.Chivalry { public class ConsecrateWeaponSpell : PaladinSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Consecrate Weapon", "Consecrus Arma", -1, 9002 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public ConsecrateWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Chivalry/DispelEvil.cs b/Projects/UOContent/Spells/Chivalry/DispelEvil.cs index 556e668d2..71b48ee72 100644 --- a/Projects/UOContent/Spells/Chivalry/DispelEvil.cs +++ b/Projects/UOContent/Spells/Chivalry/DispelEvil.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Chivalry { public class DispelEvilSpell : PaladinSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Dispel Evil", "Dispiro Malas", -1, diff --git a/Projects/UOContent/Spells/Chivalry/DivineFury.cs b/Projects/UOContent/Spells/Chivalry/DivineFury.cs index 16cd4aec0..7916a94ac 100644 --- a/Projects/UOContent/Spells/Chivalry/DivineFury.cs +++ b/Projects/UOContent/Spells/Chivalry/DivineFury.cs @@ -5,14 +5,14 @@ namespace Server.Spells.Chivalry { public class DivineFurySpell : PaladinSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Divine Fury", "Divinum Furis", -1, 9002 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public DivineFurySpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Chivalry/EnemyOfOne.cs b/Projects/UOContent/Spells/Chivalry/EnemyOfOne.cs index c926b6a58..abc69aad3 100644 --- a/Projects/UOContent/Spells/Chivalry/EnemyOfOne.cs +++ b/Projects/UOContent/Spells/Chivalry/EnemyOfOne.cs @@ -6,14 +6,14 @@ namespace Server.Spells.Chivalry { public class EnemyOfOneSpell : PaladinSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Enemy of One", "Forul Solum", -1, 9002 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public EnemyOfOneSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Chivalry/HolyLight.cs b/Projects/UOContent/Spells/Chivalry/HolyLight.cs index 976a2771d..1f117f7b3 100644 --- a/Projects/UOContent/Spells/Chivalry/HolyLight.cs +++ b/Projects/UOContent/Spells/Chivalry/HolyLight.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Chivalry { public class HolyLightSpell : PaladinSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Holy Light", "Augus Luminos", -1, diff --git a/Projects/UOContent/Spells/Chivalry/NobleSacrifice.cs b/Projects/UOContent/Spells/Chivalry/NobleSacrifice.cs index cae387370..f17e2df88 100644 --- a/Projects/UOContent/Spells/Chivalry/NobleSacrifice.cs +++ b/Projects/UOContent/Spells/Chivalry/NobleSacrifice.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Chivalry { public class NobleSacrificeSpell : PaladinSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Noble Sacrifice", "Dium Prostra", -1, diff --git a/Projects/UOContent/Spells/Chivalry/RemoveCurse.cs b/Projects/UOContent/Spells/Chivalry/RemoveCurse.cs index 5d2e3c63e..10436d6de 100644 --- a/Projects/UOContent/Spells/Chivalry/RemoveCurse.cs +++ b/Projects/UOContent/Spells/Chivalry/RemoveCurse.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Chivalry { public class RemoveCurseSpell : PaladinSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Remove Curse", "Extermo Vomica", -1, diff --git a/Projects/UOContent/Spells/Chivalry/SacredJourney.cs b/Projects/UOContent/Spells/Chivalry/SacredJourney.cs index df669a534..3c56bb4c0 100644 --- a/Projects/UOContent/Spells/Chivalry/SacredJourney.cs +++ b/Projects/UOContent/Spells/Chivalry/SacredJourney.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Chivalry { public class SacredJourneySpell : PaladinSpell, IRecallSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Sacred Journey", "Sanctum Viatas", -1, @@ -79,7 +79,7 @@ namespace Server.Spells.Chivalry { Caster.SendLocalizedMessage(501942); // That location is blocked. } - else if (m_Book != null && m_Book.CurCharges <= 0) + else if (m_Book?.CurCharges <= 0) { Caster.SendLocalizedMessage(502412); // There are no charges left on that item. } diff --git a/Projects/UOContent/Spells/Eighth/AirElemental.cs b/Projects/UOContent/Spells/Eighth/AirElemental.cs index 398e20f8c..40107272a 100644 --- a/Projects/UOContent/Spells/Eighth/AirElemental.cs +++ b/Projects/UOContent/Spells/Eighth/AirElemental.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class AirElementalSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Air Elemental", "Kal Vas Xen Hur", 269, diff --git a/Projects/UOContent/Spells/Eighth/EarthElemental.cs b/Projects/UOContent/Spells/Eighth/EarthElemental.cs index 94faf7f70..5c06991ef 100644 --- a/Projects/UOContent/Spells/Eighth/EarthElemental.cs +++ b/Projects/UOContent/Spells/Eighth/EarthElemental.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class EarthElementalSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Earth Elemental", "Kal Vas Xen Ylem", 269, diff --git a/Projects/UOContent/Spells/Eighth/Earthquake.cs b/Projects/UOContent/Spells/Eighth/Earthquake.cs index c4dceef0e..80bd47bee 100644 --- a/Projects/UOContent/Spells/Eighth/Earthquake.cs +++ b/Projects/UOContent/Spells/Eighth/Earthquake.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class EarthquakeSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Earthquake", "In Vas Por", 233, diff --git a/Projects/UOContent/Spells/Eighth/EnergyVortex.cs b/Projects/UOContent/Spells/Eighth/EnergyVortex.cs index b723b61b0..c61d0dbaa 100644 --- a/Projects/UOContent/Spells/Eighth/EnergyVortex.cs +++ b/Projects/UOContent/Spells/Eighth/EnergyVortex.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class EnergyVortexSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Energy Vortex", "Vas Corp Por", 260, diff --git a/Projects/UOContent/Spells/Eighth/FireElemental.cs b/Projects/UOContent/Spells/Eighth/FireElemental.cs index d48989085..790d34527 100644 --- a/Projects/UOContent/Spells/Eighth/FireElemental.cs +++ b/Projects/UOContent/Spells/Eighth/FireElemental.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class FireElementalSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Fire Elemental", "Kal Vas Xen Flam", 269, diff --git a/Projects/UOContent/Spells/Eighth/Resurrection.cs b/Projects/UOContent/Spells/Eighth/Resurrection.cs index 426820f56..04f7023bf 100644 --- a/Projects/UOContent/Spells/Eighth/Resurrection.cs +++ b/Projects/UOContent/Spells/Eighth/Resurrection.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Eighth { public class ResurrectionSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Resurrection", "An Corp", 245, diff --git a/Projects/UOContent/Spells/Eighth/SummonDaemon.cs b/Projects/UOContent/Spells/Eighth/SummonDaemon.cs index 8b77f1d17..8dcb1d367 100644 --- a/Projects/UOContent/Spells/Eighth/SummonDaemon.cs +++ b/Projects/UOContent/Spells/Eighth/SummonDaemon.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class SummonDaemonSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Summon Daemon", "Kal Vas Xen Corp", 269, diff --git a/Projects/UOContent/Spells/Eighth/WaterElemental.cs b/Projects/UOContent/Spells/Eighth/WaterElemental.cs index c79f11445..597bc919e 100644 --- a/Projects/UOContent/Spells/Eighth/WaterElemental.cs +++ b/Projects/UOContent/Spells/Eighth/WaterElemental.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Eighth { public class WaterElementalSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Water Elemental", "Kal Vas Xen An Flam", 269, diff --git a/Projects/UOContent/Spells/Fifth/BladeSpirits.cs b/Projects/UOContent/Spells/Fifth/BladeSpirits.cs index d7a5526fd..3128673d9 100644 --- a/Projects/UOContent/Spells/Fifth/BladeSpirits.cs +++ b/Projects/UOContent/Spells/Fifth/BladeSpirits.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Fifth { public class BladeSpiritsSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Blade Spirits", "In Jux Hur Ylem", 266, diff --git a/Projects/UOContent/Spells/Fifth/DispelField.cs b/Projects/UOContent/Spells/Fifth/DispelField.cs index 177772e86..055eff7be 100644 --- a/Projects/UOContent/Spells/Fifth/DispelField.cs +++ b/Projects/UOContent/Spells/Fifth/DispelField.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Fifth { public class DispelFieldSpell : MagerySpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Dispel Field", "An Grav", 206, diff --git a/Projects/UOContent/Spells/Fifth/Incognito.cs b/Projects/UOContent/Spells/Fifth/Incognito.cs index d638c4171..9e7ecaaa8 100644 --- a/Projects/UOContent/Spells/Fifth/Incognito.cs +++ b/Projects/UOContent/Spells/Fifth/Incognito.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Fifth { public class IncognitoSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Incognito", "Kal In Ex", 206, @@ -19,7 +19,7 @@ namespace Server.Spells.Fifth Reagent.Nightshade ); - private static readonly Dictionary m_Timers = new Dictionary(); + private static readonly Dictionary m_Timers = new(); public IncognitoSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Fifth/MagicReflect.cs b/Projects/UOContent/Spells/Fifth/MagicReflect.cs index c28cfa001..814887828 100644 --- a/Projects/UOContent/Spells/Fifth/MagicReflect.cs +++ b/Projects/UOContent/Spells/Fifth/MagicReflect.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Fifth { public class MagicReflectSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Magic Reflection", "In Jux Sanct", 242, @@ -14,7 +14,7 @@ namespace Server.Spells.Fifth Reagent.SpidersSilk ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public MagicReflectSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Fifth/MindBlast.cs b/Projects/UOContent/Spells/Fifth/MindBlast.cs index c149cb11e..f7daa19d7 100644 --- a/Projects/UOContent/Spells/Fifth/MindBlast.cs +++ b/Projects/UOContent/Spells/Fifth/MindBlast.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Fifth { public class MindBlastSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mind Blast", "Por Corp Wis", 218, diff --git a/Projects/UOContent/Spells/Fifth/Paralyze.cs b/Projects/UOContent/Spells/Fifth/Paralyze.cs index 9b4bccc67..5ff2a3d72 100644 --- a/Projects/UOContent/Spells/Fifth/Paralyze.cs +++ b/Projects/UOContent/Spells/Fifth/Paralyze.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Fifth { public class ParalyzeSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Paralyze", "An Ex Por", 218, diff --git a/Projects/UOContent/Spells/Fifth/PoisonField.cs b/Projects/UOContent/Spells/Fifth/PoisonField.cs index 3cbd6c577..5dfabbfd1 100644 --- a/Projects/UOContent/Spells/Fifth/PoisonField.cs +++ b/Projects/UOContent/Spells/Fifth/PoisonField.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Fifth { public class PoisonFieldSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Poison Field", "In Nox Grav", 230, @@ -220,7 +220,7 @@ namespace Server.Spells.Fifth private class InternalTimer : Timer { - private static readonly Queue m_Queue = new Queue(); + private static readonly Queue m_Queue = new(); private readonly bool m_CanFit; private readonly bool m_InLOS; private readonly InternalItem m_Item; diff --git a/Projects/UOContent/Spells/Fifth/SummonCreature.cs b/Projects/UOContent/Spells/Fifth/SummonCreature.cs index 628eb3b49..93c147c72 100644 --- a/Projects/UOContent/Spells/Fifth/SummonCreature.cs +++ b/Projects/UOContent/Spells/Fifth/SummonCreature.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Fifth { public class SummonCreatureSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Summon Creature", "Kal Xen", 16, diff --git a/Projects/UOContent/Spells/First/Clumsy.cs b/Projects/UOContent/Spells/First/Clumsy.cs index 78d0aff6f..d63d16b67 100644 --- a/Projects/UOContent/Spells/First/Clumsy.cs +++ b/Projects/UOContent/Spells/First/Clumsy.cs @@ -4,7 +4,7 @@ namespace Server.Spells.First { public class ClumsySpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Clumsy", "Uus Jux", 212, diff --git a/Projects/UOContent/Spells/First/CreateFood.cs b/Projects/UOContent/Spells/First/CreateFood.cs index 373f21474..720ec2d37 100644 --- a/Projects/UOContent/Spells/First/CreateFood.cs +++ b/Projects/UOContent/Spells/First/CreateFood.cs @@ -6,7 +6,7 @@ namespace Server.Spells.First { public class CreateFoodSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Create Food", "In Mani Ylem", 224, @@ -18,16 +18,16 @@ namespace Server.Spells.First private static readonly FoodInfo[] m_Food = { - new FoodInfo(typeof(Grapes), "a grape bunch"), - new FoodInfo(typeof(Ham), "a ham"), - new FoodInfo(typeof(CheeseWedge), "a wedge of cheese"), - new FoodInfo(typeof(Muffins), "muffins"), - new FoodInfo(typeof(FishSteak), "a fish steak"), - new FoodInfo(typeof(Ribs), "cut of ribs"), - new FoodInfo(typeof(CookedBird), "a cooked bird"), - new FoodInfo(typeof(Sausage), "sausage"), - new FoodInfo(typeof(Apple), "an apple"), - new FoodInfo(typeof(Peach), "a peach") + new(typeof(Grapes), "a grape bunch"), + new(typeof(Ham), "a ham"), + new(typeof(CheeseWedge), "a wedge of cheese"), + new(typeof(Muffins), "muffins"), + new(typeof(FishSteak), "a fish steak"), + new(typeof(Ribs), "cut of ribs"), + new(typeof(CookedBird), "a cooked bird"), + new(typeof(Sausage), "sausage"), + new(typeof(Apple), "an apple"), + new(typeof(Peach), "a peach") }; public CreateFoodSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/First/Feeblemind.cs b/Projects/UOContent/Spells/First/Feeblemind.cs index f3a94b418..277cffb32 100644 --- a/Projects/UOContent/Spells/First/Feeblemind.cs +++ b/Projects/UOContent/Spells/First/Feeblemind.cs @@ -4,7 +4,7 @@ namespace Server.Spells.First { public class FeeblemindSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Feeblemind", "Rel Wis", 212, diff --git a/Projects/UOContent/Spells/First/Heal.cs b/Projects/UOContent/Spells/First/Heal.cs index 23e0d7156..395b69674 100644 --- a/Projects/UOContent/Spells/First/Heal.cs +++ b/Projects/UOContent/Spells/First/Heal.cs @@ -8,7 +8,7 @@ namespace Server.Spells.First { public class HealSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Heal", "In Mani", 224, diff --git a/Projects/UOContent/Spells/First/MagicArrow.cs b/Projects/UOContent/Spells/First/MagicArrow.cs index 474cc56a6..e8cdb0c0b 100644 --- a/Projects/UOContent/Spells/First/MagicArrow.cs +++ b/Projects/UOContent/Spells/First/MagicArrow.cs @@ -4,7 +4,7 @@ namespace Server.Spells.First { public class MagicArrowSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Magic Arrow", "In Por Ylem", 212, diff --git a/Projects/UOContent/Spells/First/NightSight.cs b/Projects/UOContent/Spells/First/NightSight.cs index 55046f36a..daa618c97 100644 --- a/Projects/UOContent/Spells/First/NightSight.cs +++ b/Projects/UOContent/Spells/First/NightSight.cs @@ -5,7 +5,7 @@ namespace Server.Spells.First { public class NightSightSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Night Sight", "In Lor", 236, diff --git a/Projects/UOContent/Spells/First/ReactiveArmor.cs b/Projects/UOContent/Spells/First/ReactiveArmor.cs index 738f4f067..4e85f0e02 100644 --- a/Projects/UOContent/Spells/First/ReactiveArmor.cs +++ b/Projects/UOContent/Spells/First/ReactiveArmor.cs @@ -5,7 +5,7 @@ namespace Server.Spells.First { public class ReactiveArmorSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Reactive Armor", "Flam Sanct", 236, @@ -15,7 +15,7 @@ namespace Server.Spells.First Reagent.SulfurousAsh ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public ReactiveArmorSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/First/Weaken.cs b/Projects/UOContent/Spells/First/Weaken.cs index 6eb850bb2..4ff913447 100644 --- a/Projects/UOContent/Spells/First/Weaken.cs +++ b/Projects/UOContent/Spells/First/Weaken.cs @@ -4,7 +4,7 @@ namespace Server.Spells.First { public class WeakenSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Weaken", "Des Mani", 212, diff --git a/Projects/UOContent/Spells/Fourth/ArchCure.cs b/Projects/UOContent/Spells/Fourth/ArchCure.cs index 135c55904..55e031045 100644 --- a/Projects/UOContent/Spells/Fourth/ArchCure.cs +++ b/Projects/UOContent/Spells/Fourth/ArchCure.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Fourth { public class ArchCureSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Arch Cure", "Vas An Nox", 215, diff --git a/Projects/UOContent/Spells/Fourth/ArchProtection.cs b/Projects/UOContent/Spells/Fourth/ArchProtection.cs index 3f313d93d..a60455db3 100644 --- a/Projects/UOContent/Spells/Fourth/ArchProtection.cs +++ b/Projects/UOContent/Spells/Fourth/ArchProtection.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Fourth { public class ArchProtectionSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Arch Protection", "Vas Uus Sanct", Core.AOS ? 239 : 215, @@ -20,7 +20,7 @@ namespace Server.Spells.Fourth Reagent.SulfurousAsh ); - private static readonly Dictionary _Table = new Dictionary(); + private static readonly Dictionary _Table = new(); public ArchProtectionSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Fourth/Curse.cs b/Projects/UOContent/Spells/Fourth/Curse.cs index 840f757b2..d27ebc975 100644 --- a/Projects/UOContent/Spells/Fourth/Curse.cs +++ b/Projects/UOContent/Spells/Fourth/Curse.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Fourth { public class CurseSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Curse", "Des Sanct", 227, @@ -15,7 +15,7 @@ namespace Server.Spells.Fourth Reagent.SulfurousAsh ); - private static readonly HashSet m_UnderEffect = new HashSet(); + private static readonly HashSet m_UnderEffect = new(); public CurseSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Fourth/FireField.cs b/Projects/UOContent/Spells/Fourth/FireField.cs index c4eaf37c4..3b9b01b87 100644 --- a/Projects/UOContent/Spells/Fourth/FireField.cs +++ b/Projects/UOContent/Spells/Fourth/FireField.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Fourth { public class FireFieldSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Fire Field", "In Flam Grav", 215, @@ -216,7 +216,7 @@ namespace Server.Spells.Fourth private class InternalTimer : Timer { - private static readonly Queue m_Queue = new Queue(); + private static readonly Queue m_Queue = new(); private readonly bool m_CanFit; private readonly bool m_InLOS; private readonly FireFieldItem m_Item; diff --git a/Projects/UOContent/Spells/Fourth/GreaterHeal.cs b/Projects/UOContent/Spells/Fourth/GreaterHeal.cs index edabfde61..fd1fcc010 100644 --- a/Projects/UOContent/Spells/Fourth/GreaterHeal.cs +++ b/Projects/UOContent/Spells/Fourth/GreaterHeal.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Fourth { public class GreaterHealSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Greater Heal", "In Vas Mani", 204, diff --git a/Projects/UOContent/Spells/Fourth/Lightning.cs b/Projects/UOContent/Spells/Fourth/Lightning.cs index dcbccb065..e0f2b8745 100644 --- a/Projects/UOContent/Spells/Fourth/Lightning.cs +++ b/Projects/UOContent/Spells/Fourth/Lightning.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Fourth { public class LightningSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Lightning", "Por Ort Grav", 239, diff --git a/Projects/UOContent/Spells/Fourth/ManaDrain.cs b/Projects/UOContent/Spells/Fourth/ManaDrain.cs index d8cb4cec5..ce484bf50 100644 --- a/Projects/UOContent/Spells/Fourth/ManaDrain.cs +++ b/Projects/UOContent/Spells/Fourth/ManaDrain.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Fourth { public class ManaDrainSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mana Drain", "Ort Rel", 215, @@ -16,7 +16,7 @@ namespace Server.Spells.Fourth Reagent.SpidersSilk ); - private static readonly HashSet m_Table = new HashSet(); + private static readonly HashSet m_Table = new(); public ManaDrainSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Fourth/Recall.cs b/Projects/UOContent/Spells/Fourth/Recall.cs index a43dabc3d..4ffa32f60 100644 --- a/Projects/UOContent/Spells/Fourth/Recall.cs +++ b/Projects/UOContent/Spells/Fourth/Recall.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Fourth { public class RecallSpell : MagerySpell, IRecallSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Recall", "Kal Ort Por", 239, @@ -78,7 +78,7 @@ namespace Server.Spells.Fourth { Caster.SendLocalizedMessage(501942); // That location is blocked. } - else if (m_Book != null && m_Book.CurCharges <= 0) + else if (m_Book?.CurCharges <= 0) { Caster.SendLocalizedMessage(502412); // There are no charges left on that item. } diff --git a/Projects/UOContent/Spells/Gargoyle/SpellDefinitions/FlySpell.cs b/Projects/UOContent/Spells/Gargoyle/SpellDefinitions/FlySpell.cs index 953945cca..3ead16edf 100644 --- a/Projects/UOContent/Spells/Gargoyle/SpellDefinitions/FlySpell.cs +++ b/Projects/UOContent/Spells/Gargoyle/SpellDefinitions/FlySpell.cs @@ -4,7 +4,7 @@ namespace Server.Spells { public class FlySpell : Spell { - private static readonly SpellInfo m_Info = new SpellInfo("Gargoyle Flight", null, -1, 9002); + private static readonly SpellInfo m_Info = new("Gargoyle Flight", null, -1, 9002); private bool m_Stop; public FlySpell(Mobile caster) diff --git a/Projects/UOContent/Spells/Mysticism/AnimatedWeaponSpell.cs b/Projects/UOContent/Spells/Mysticism/AnimatedWeaponSpell.cs index 9fd9d20fb..341d06697 100644 --- a/Projects/UOContent/Spells/Mysticism/AnimatedWeaponSpell.cs +++ b/Projects/UOContent/Spells/Mysticism/AnimatedWeaponSpell.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Mysticism { public class AnimatedWeaponSpell : MysticSpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Animated Weapon", "In Jux Por Ylem", -1, diff --git a/Projects/UOContent/Spells/Mysticism/EagleStrikeSpell.cs b/Projects/UOContent/Spells/Mysticism/EagleStrikeSpell.cs index bcbffdc65..09838188f 100644 --- a/Projects/UOContent/Spells/Mysticism/EagleStrikeSpell.cs +++ b/Projects/UOContent/Spells/Mysticism/EagleStrikeSpell.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Mysticism { public class EagleStrikeSpell : MysticSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Eagle Strike", "Kal Por Xen", -1, diff --git a/Projects/UOContent/Spells/Mysticism/HailStormSpell.cs b/Projects/UOContent/Spells/Mysticism/HailStormSpell.cs index 333421217..d830e8148 100644 --- a/Projects/UOContent/Spells/Mysticism/HailStormSpell.cs +++ b/Projects/UOContent/Spells/Mysticism/HailStormSpell.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Mysticism { public class HailStormSpell : MysticSpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Hail Storm", "Kal Des Ylem", -1, diff --git a/Projects/UOContent/Spells/Mysticism/NetherCycloneSpell.cs b/Projects/UOContent/Spells/Mysticism/NetherCycloneSpell.cs index a73d6d39e..4dd9a1a47 100644 --- a/Projects/UOContent/Spells/Mysticism/NetherCycloneSpell.cs +++ b/Projects/UOContent/Spells/Mysticism/NetherCycloneSpell.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Mysticism { public class NetherCycloneSpell : MysticSpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Nether Cyclone", "Grav Hur", -1, diff --git a/Projects/UOContent/Spells/Mysticism/SpellPlagueSpell.cs b/Projects/UOContent/Spells/Mysticism/SpellPlagueSpell.cs index 947a20acb..5b6d241aa 100644 --- a/Projects/UOContent/Spells/Mysticism/SpellPlagueSpell.cs +++ b/Projects/UOContent/Spells/Mysticism/SpellPlagueSpell.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Mysticism { public class SpellPlagueSpell : MysticSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Spell Plague", "Vas Rel Jux Ort", -1, @@ -18,7 +18,7 @@ namespace Server.Spells.Mysticism ); private static readonly Dictionary - m_Table = new Dictionary(); + m_Table = new(); public SpellPlagueSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Mysticism/StoneFormSpell.cs b/Projects/UOContent/Spells/Mysticism/StoneFormSpell.cs index a5ae827d4..81bbf2393 100644 --- a/Projects/UOContent/Spells/Mysticism/StoneFormSpell.cs +++ b/Projects/UOContent/Spells/Mysticism/StoneFormSpell.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Mysticism { public class StoneFormSpell : MysticSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Stone Form", "In Rel Ylem", -1, @@ -19,7 +19,7 @@ namespace Server.Spells.Mysticism Reagent.Garlic ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public StoneFormSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Necromancy/AnimateDeadSpell.cs b/Projects/UOContent/Spells/Necromancy/AnimateDeadSpell.cs index f71cb8992..002823b6b 100644 --- a/Projects/UOContent/Spells/Necromancy/AnimateDeadSpell.cs +++ b/Projects/UOContent/Spells/Necromancy/AnimateDeadSpell.cs @@ -11,7 +11,7 @@ namespace Server.Spells.Necromancy { public class AnimateDeadSpell : NecromancerSpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Animate Dead", "Uus Corp", 203, @@ -23,9 +23,9 @@ namespace Server.Spells.Necromancy private static readonly CreatureGroup[] m_Groups = { // Undead group--empty - new CreatureGroup(SlayerGroup.GetEntryByName(SlayerName.Silver).Types, Array.Empty()), + new(SlayerGroup.GetEntryByName(SlayerName.Silver).Types, Array.Empty()), // Insects - new CreatureGroup( + new( new[] { typeof(DreadSpider), typeof(FrostSpider), typeof(GiantSpider), typeof(GiantBlackWidow), @@ -43,7 +43,7 @@ namespace Server.Spells.Necromancy } ), // Mounts - new CreatureGroup( + new( new[] { typeof(Horse), typeof(Nightmare), typeof(FireSteed), @@ -56,7 +56,7 @@ namespace Server.Spells.Necromancy } ), // Elementals - new CreatureGroup( + new( new[] { typeof(BloodElemental), typeof(EarthElemental), typeof(SummonedEarthElemental), @@ -74,7 +74,7 @@ namespace Server.Spells.Necromancy } ), // Dragons - new CreatureGroup( + new( new[] { typeof(AncientWyrm), typeof(Dragon), typeof(GreaterDragon), typeof(SerpentineDragon), @@ -93,7 +93,7 @@ namespace Server.Spells.Necromancy } ), // Default group - new CreatureGroup( + new( Array.Empty(), new[] { @@ -108,7 +108,7 @@ namespace Server.Spells.Necromancy ) }; - private static readonly Dictionary> m_Table = new Dictionary>(); + private static readonly Dictionary> m_Table = new(); public AnimateDeadSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { @@ -157,7 +157,7 @@ namespace Server.Spells.Necromancy } if (c.ItemID != 0x2006 || c.Animated || type == typeof(PlayerMobile) || type == null || - c.Owner != null && c.Owner.Fame < 100 || + c.Owner?.Fame < 100 || c.Owner is BaseCreature creature && (creature.Summoned || creature.IsBonded)) { Caster.SendLocalizedMessage(1061085); // There's not enough life force there to animate. diff --git a/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs b/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs index 19c91e7ff..41011b085 100644 --- a/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs +++ b/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Necromancy { public class BloodOathSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Blood Oath", "In Jux Mani Xen", 203, @@ -15,8 +15,8 @@ namespace Server.Spells.Necromancy Reagent.DaemonBlood ); - private static readonly Dictionary m_OathTable = new Dictionary(); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_OathTable = new(); + private static readonly Dictionary m_Table = new(); public BloodOathSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Necromancy/CorpseSkin.cs b/Projects/UOContent/Spells/Necromancy/CorpseSkin.cs index e080d53f9..95ee90ed6 100644 --- a/Projects/UOContent/Spells/Necromancy/CorpseSkin.cs +++ b/Projects/UOContent/Spells/Necromancy/CorpseSkin.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Necromancy { public class CorpseSkinSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Corpse Skin", "In Agle Corp Ylem", 203, @@ -15,7 +15,7 @@ namespace Server.Spells.Necromancy Reagent.GraveDust ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public CorpseSkinSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs b/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs index bcaf5d53a..3061aedc5 100644 --- a/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs +++ b/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Necromancy { public class CurseWeaponSpell : NecromancerSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Curse Weapon", "An Sanct Gra Char", 203, @@ -14,7 +14,7 @@ namespace Server.Spells.Necromancy Reagent.PigIron ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public CurseWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Necromancy/EvilOmen.cs b/Projects/UOContent/Spells/Necromancy/EvilOmen.cs index a83d349bc..89b509949 100644 --- a/Projects/UOContent/Spells/Necromancy/EvilOmen.cs +++ b/Projects/UOContent/Spells/Necromancy/EvilOmen.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Necromancy { public class EvilOmenSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Evil Omen", "Pas Tym An Sanct", 203, @@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy Reagent.NoxCrystal ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public EvilOmenSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Necromancy/Exorcism.cs b/Projects/UOContent/Spells/Necromancy/Exorcism.cs index c43b65c8e..e375630b7 100644 --- a/Projects/UOContent/Spells/Necromancy/Exorcism.cs +++ b/Projects/UOContent/Spells/Necromancy/Exorcism.cs @@ -11,7 +11,7 @@ namespace Server.Spells.Necromancy { public class ExorcismSpell : NecromancerSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Exorcism", "Ort Corp Grav", 203, @@ -24,38 +24,38 @@ namespace Server.Spells.Necromancy private static readonly Point3D[] m_BritanniaLocs = { - new Point3D(1470, 843, 0), - new Point3D(1857, 865, -1), - new Point3D(4220, 563, 36), - new Point3D(1732, 3528, 0), - new Point3D(1300, 644, 8), - new Point3D(3355, 302, 9), - new Point3D(1606, 2490, 5), - new Point3D(2500, 3931, 3), - new Point3D(4264, 3707, 0) + new(1470, 843, 0), + new(1857, 865, -1), + new(4220, 563, 36), + new(1732, 3528, 0), + new(1300, 644, 8), + new(3355, 302, 9), + new(1606, 2490, 5), + new(2500, 3931, 3), + new(4264, 3707, 0) }; private static readonly Point3D[] m_IllshLocs = { - new Point3D(1222, 474, -17), - new Point3D(718, 1360, -60), - new Point3D(297, 1014, -19), - new Point3D(986, 1006, -36), - new Point3D(1180, 1288, -30), - new Point3D(1538, 1341, -3), - new Point3D(528, 223, -38) + new(1222, 474, -17), + new(718, 1360, -60), + new(297, 1014, -19), + new(986, 1006, -36), + new(1180, 1288, -30), + new(1538, 1341, -3), + new(528, 223, -38) }; private static readonly Point3D[] m_MalasLocs = { - new Point3D(976, 517, -30) + new(976, 517, -30) }; private static readonly Point3D[] m_TokunoLocs = { - new Point3D(710, 1162, 25), - new Point3D(1034, 515, 18), - new Point3D(295, 712, 55) + new(710, 1162, 25), + new(1034, 515, 18), + new(295, 712, 55) }; public ExorcismSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Necromancy/HorrificBeast.cs b/Projects/UOContent/Spells/Necromancy/HorrificBeast.cs index f2a10cddf..8a2335baa 100644 --- a/Projects/UOContent/Spells/Necromancy/HorrificBeast.cs +++ b/Projects/UOContent/Spells/Necromancy/HorrificBeast.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Necromancy { public class HorrificBeastSpell : TransformationSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Horrific Beast", "Rel Xen Vas Bal", 203, diff --git a/Projects/UOContent/Spells/Necromancy/LichForm.cs b/Projects/UOContent/Spells/Necromancy/LichForm.cs index 23422790c..42676075e 100644 --- a/Projects/UOContent/Spells/Necromancy/LichForm.cs +++ b/Projects/UOContent/Spells/Necromancy/LichForm.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Necromancy { public class LichFormSpell : TransformationSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Lich Form", "Rel Xen Corp Ort", 203, diff --git a/Projects/UOContent/Spells/Necromancy/MindRot.cs b/Projects/UOContent/Spells/Necromancy/MindRot.cs index 9b4ab9253..946cba8b0 100644 --- a/Projects/UOContent/Spells/Necromancy/MindRot.cs +++ b/Projects/UOContent/Spells/Necromancy/MindRot.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Necromancy { public class MindRotSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mind Rot", "Wis An Ben", 203, @@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy Reagent.DaemonBlood ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public MindRotSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Necromancy/PainSpike.cs b/Projects/UOContent/Spells/Necromancy/PainSpike.cs index 3aeaac3b7..76763e9d0 100644 --- a/Projects/UOContent/Spells/Necromancy/PainSpike.cs +++ b/Projects/UOContent/Spells/Necromancy/PainSpike.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Necromancy { public class PainSpikeSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Pain Spike", "In Sar", 203, @@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy Reagent.PigIron ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public PainSpikeSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Necromancy/PoisonStrike.cs b/Projects/UOContent/Spells/Necromancy/PoisonStrike.cs index f24284a4a..0fb74ab18 100644 --- a/Projects/UOContent/Spells/Necromancy/PoisonStrike.cs +++ b/Projects/UOContent/Spells/Necromancy/PoisonStrike.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Necromancy { public class PoisonStrikeSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Poison Strike", "In Vas Nox", 203, diff --git a/Projects/UOContent/Spells/Necromancy/Strangle.cs b/Projects/UOContent/Spells/Necromancy/Strangle.cs index 61767c7be..cbf61e6b6 100644 --- a/Projects/UOContent/Spells/Necromancy/Strangle.cs +++ b/Projects/UOContent/Spells/Necromancy/Strangle.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Necromancy { public class StrangleSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Strangle", "In Bal Nox", 209, @@ -15,7 +15,7 @@ namespace Server.Spells.Necromancy Reagent.NoxCrystal ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public StrangleSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Necromancy/SummonFamiliar.cs b/Projects/UOContent/Spells/Necromancy/SummonFamiliar.cs index 27b599dfa..9bff30d79 100644 --- a/Projects/UOContent/Spells/Necromancy/SummonFamiliar.cs +++ b/Projects/UOContent/Spells/Necromancy/SummonFamiliar.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Necromancy { public class SummonFamiliarSpell : NecromancerSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Summon Familiar", "Kal Xen Bal", 203, @@ -28,15 +28,15 @@ namespace Server.Spells.Necromancy public override double RequiredSkill => 30.0; public override int RequiredMana => 17; - public static Dictionary Table { get; } = new Dictionary(); + public static Dictionary Table { get; } = new(); public static SummonFamiliarEntry[] Entries { get; } = { - new SummonFamiliarEntry(typeof(HordeMinionFamiliar), 1060146, 30.0, 30.0), // Horde Minion - new SummonFamiliarEntry(typeof(ShadowWispFamiliar), 1060142, 50.0, 50.0), // Shadow Wisp - new SummonFamiliarEntry(typeof(DarkWolfFamiliar), 1060143, 60.0, 60.0), // Dark Wolf - new SummonFamiliarEntry(typeof(DeathAdder), 1060145, 80.0, 80.0), // Death Adder - new SummonFamiliarEntry(typeof(VampireBatFamiliar), 1060144, 100.0, 100.0) // Vampire Bat + new(typeof(HordeMinionFamiliar), 1060146, 30.0, 30.0), // Horde Minion + new(typeof(ShadowWispFamiliar), 1060142, 50.0, 50.0), // Shadow Wisp + new(typeof(DarkWolfFamiliar), 1060143, 60.0, 60.0), // Dark Wolf + new(typeof(DeathAdder), 1060145, 80.0, 80.0), // Death Adder + new(typeof(VampireBatFamiliar), 1060144, 100.0, 100.0) // Vampire Bat }; public override bool CheckCast() diff --git a/Projects/UOContent/Spells/Necromancy/VampiricEmbrace.cs b/Projects/UOContent/Spells/Necromancy/VampiricEmbrace.cs index c7dd3ea27..968e63e3c 100644 --- a/Projects/UOContent/Spells/Necromancy/VampiricEmbrace.cs +++ b/Projects/UOContent/Spells/Necromancy/VampiricEmbrace.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Necromancy { public class VampiricEmbraceSpell : TransformationSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Vampiric Embrace", "Rel Xen An Sanct", 203, diff --git a/Projects/UOContent/Spells/Necromancy/VengefulSpirit.cs b/Projects/UOContent/Spells/Necromancy/VengefulSpirit.cs index 39b940e92..017c12fe0 100644 --- a/Projects/UOContent/Spells/Necromancy/VengefulSpirit.cs +++ b/Projects/UOContent/Spells/Necromancy/VengefulSpirit.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Necromancy { public class VengefulSpiritSpell : NecromancerSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Vengeful Spirit", "Kal Xen Bal Beh", 203, diff --git a/Projects/UOContent/Spells/Necromancy/Wither.cs b/Projects/UOContent/Spells/Necromancy/Wither.cs index 4860c31ae..25f548644 100644 --- a/Projects/UOContent/Spells/Necromancy/Wither.cs +++ b/Projects/UOContent/Spells/Necromancy/Wither.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Necromancy { public class WitherSpell : NecromancerSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Wither", "Kal Vas An Flam", 203, diff --git a/Projects/UOContent/Spells/Necromancy/WraithForm.cs b/Projects/UOContent/Spells/Necromancy/WraithForm.cs index 2978bf2c1..48f847330 100644 --- a/Projects/UOContent/Spells/Necromancy/WraithForm.cs +++ b/Projects/UOContent/Spells/Necromancy/WraithForm.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Necromancy { public class WraithFormSpell : TransformationSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Wraith Form", "Rel Xen Um", 203, diff --git a/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs b/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs index ecb54d3b4..28469f9ef 100644 --- a/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs +++ b/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs @@ -18,15 +18,15 @@ namespace Server.Spells.Ninjitsu NoSkill } - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Animal Form", null, -1, 9002 ); - private static readonly Dictionary m_LastAnimalForms = new Dictionary(); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_LastAnimalForms = new(); + private static readonly Dictionary m_Table = new(); private bool m_WasMoving; @@ -45,22 +45,22 @@ namespace Server.Spells.Ninjitsu public static AnimalFormEntry[] Entries { get; } = { - new AnimalFormEntry(typeof(Kirin), 1029632, 9632, 0, 1070811, 100.0, 0x84, 0, 0), - new AnimalFormEntry(typeof(Unicorn), 1018214, 9678, 0, 1070812, 100.0, 0x7A, 0, 0), - new AnimalFormEntry(typeof(BakeKitsune), 1030083, 10083, 0, 1070810, 82.5, 0xF6, 0, 0), - new AnimalFormEntry(typeof(GreyWolf), 1028482, 9681, 2309, 1070810, 82.5, 0x19, 0x8FD, 0x90E), - new AnimalFormEntry(typeof(Llama), 1028438, 8438, 0, 1070809, 70.0, 0xDC, 0, 0), - new AnimalFormEntry(typeof(ForestOstard), 1018273, 8503, 2212, 1070809, 70.0, 0xDB, 0x899, 0x8B0), - new AnimalFormEntry(typeof(BullFrog), 1028496, 8496, 2003, 1070807, 50.0, 0x51, 0x7D1, 0x7D6, false, false), - new AnimalFormEntry(typeof(GiantSerpent), 1018114, 9663, 2009, 1070808, 50.0, 0x15, 0x7D1, 0x7E2, false, false), - new AnimalFormEntry(typeof(Dog), 1018280, 8476, 2309, 1070806, 40.0, 0xD9, 0x8FD, 0x90E, false, false), - new AnimalFormEntry(typeof(Cat), 1018264, 8475, 2309, 1070806, 40.0, 0xC9, 0x8FD, 0x90E, false, false), - new AnimalFormEntry(typeof(Rat), 1018294, 8483, 2309, 1070805, 20.0, 0xEE, 0x8FD, 0x90E, true, false), - new AnimalFormEntry(typeof(Rabbit), 1028485, 8485, 2309, 1070805, 20.0, 0xCD, 0x8FD, 0x90E, true, false), - new AnimalFormEntry(typeof(Squirrel), 1031671, 11671, 0, 0, 20.0, 0x116, 0, 0, false, false), - new AnimalFormEntry(typeof(Ferret), 1031672, 11672, 0, 1075220, 40.0, 0x117, 0, 0, false, false, true), - new AnimalFormEntry(typeof(CuSidhe), 1031670, 11670, 0, 1075221, 60.0, 0x115, 0, 0, false, false), - new AnimalFormEntry(typeof(Reptalon), 1075202, 11669, 0, 1075222, 90.0, 0x114, 0, 0, false, false) + new(typeof(Kirin), 1029632, 9632, 0, 1070811, 100.0, 0x84, 0, 0), + new(typeof(Unicorn), 1018214, 9678, 0, 1070812, 100.0, 0x7A, 0, 0), + new(typeof(BakeKitsune), 1030083, 10083, 0, 1070810, 82.5, 0xF6, 0, 0), + new(typeof(GreyWolf), 1028482, 9681, 2309, 1070810, 82.5, 0x19, 0x8FD, 0x90E), + new(typeof(Llama), 1028438, 8438, 0, 1070809, 70.0, 0xDC, 0, 0), + new(typeof(ForestOstard), 1018273, 8503, 2212, 1070809, 70.0, 0xDB, 0x899, 0x8B0), + new(typeof(BullFrog), 1028496, 8496, 2003, 1070807, 50.0, 0x51, 0x7D1, 0x7D6, false, false), + new(typeof(GiantSerpent), 1018114, 9663, 2009, 1070808, 50.0, 0x15, 0x7D1, 0x7E2, false, false), + new(typeof(Dog), 1018280, 8476, 2309, 1070806, 40.0, 0xD9, 0x8FD, 0x90E, false, false), + new(typeof(Cat), 1018264, 8475, 2309, 1070806, 40.0, 0xC9, 0x8FD, 0x90E, false, false), + new(typeof(Rat), 1018294, 8483, 2309, 1070805, 20.0, 0xEE, 0x8FD, 0x90E, true, false), + new(typeof(Rabbit), 1028485, 8485, 2309, 1070805, 20.0, 0xCD, 0x8FD, 0x90E, true, false), + new(typeof(Squirrel), 1031671, 11671, 0, 0, 20.0, 0x116, 0, 0, false, false), + new(typeof(Ferret), 1031672, 11672, 0, 1075220, 40.0, 0x117, 0, 0, false, false, true), + new(typeof(CuSidhe), 1031670, 11670, 0, 1075221, 60.0, 0x115, 0, 0, false, false), + new(typeof(Reptalon), 1075202, 11669, 0, 1075222, 90.0, 0x114, 0, 0, false, false) }; public static void Initialize() diff --git a/Projects/UOContent/Spells/Ninjitsu/Backstab.cs b/Projects/UOContent/Spells/Ninjitsu/Backstab.cs index f4ac17cd4..1fbf4b3b3 100644 --- a/Projects/UOContent/Spells/Ninjitsu/Backstab.cs +++ b/Projects/UOContent/Spells/Ninjitsu/Backstab.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Ninjitsu public override double RequiredSkill => Core.ML ? 40.0 : 20.0; public override TextDefinition AbilityMessage => - new TextDefinition(1063089); // You prepare to Backstab your opponent. + new(1063089); // You prepare to Backstab your opponent. public override bool ValidatesDuringHit => false; diff --git a/Projects/UOContent/Spells/Ninjitsu/DeathStrike.cs b/Projects/UOContent/Spells/Ninjitsu/DeathStrike.cs index dcf7be3e2..653575d19 100644 --- a/Projects/UOContent/Spells/Ninjitsu/DeathStrike.cs +++ b/Projects/UOContent/Spells/Ninjitsu/DeathStrike.cs @@ -7,13 +7,13 @@ namespace Server.Spells.Ninjitsu { public class DeathStrike : NinjaMove { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public override int BaseMana => 30; public override double RequiredSkill => 85.0; public override TextDefinition AbilityMessage => - new TextDefinition(1063091); // You prepare to hit your opponent with a Death Strike. + new(1063091); // You prepare to hit your opponent with a Death Strike. public override double GetDamageScalar(Mobile attacker, Mobile defender) => 0.5; diff --git a/Projects/UOContent/Spells/Ninjitsu/FocusAttack.cs b/Projects/UOContent/Spells/Ninjitsu/FocusAttack.cs index c7edb6526..ec88fd711 100644 --- a/Projects/UOContent/Spells/Ninjitsu/FocusAttack.cs +++ b/Projects/UOContent/Spells/Ninjitsu/FocusAttack.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Ninjitsu public override double RequiredSkill => Core.ML ? 30.0 : 60; public override TextDefinition AbilityMessage => - new TextDefinition(1063095); // You prepare to focus all of your abilities into your next strike. + new(1063095); // You prepare to focus all of your abilities into your next strike. public override bool Validate(Mobile from) { diff --git a/Projects/UOContent/Spells/Ninjitsu/KiAttack.cs b/Projects/UOContent/Spells/Ninjitsu/KiAttack.cs index 1c073c140..6981e101c 100644 --- a/Projects/UOContent/Spells/Ninjitsu/KiAttack.cs +++ b/Projects/UOContent/Spells/Ninjitsu/KiAttack.cs @@ -6,13 +6,13 @@ namespace Server.Spells.Ninjitsu { public class KiAttack : NinjaMove { - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public override int BaseMana => 25; public override double RequiredSkill => 80.0; public override TextDefinition AbilityMessage => - new TextDefinition(1063099); // Your Ki Attack must be complete within 2 seconds for the damage bonus! + new(1063099); // Your Ki Attack must be complete within 2 seconds for the damage bonus! public override void OnUse(Mobile from) { diff --git a/Projects/UOContent/Spells/Ninjitsu/MirrorImage.cs b/Projects/UOContent/Spells/Ninjitsu/MirrorImage.cs index 868c9467f..2cd5544e1 100644 --- a/Projects/UOContent/Spells/Ninjitsu/MirrorImage.cs +++ b/Projects/UOContent/Spells/Ninjitsu/MirrorImage.cs @@ -10,9 +10,9 @@ namespace Server.Spells.Ninjitsu { public class MirrorImage : NinjaSpell { - private static readonly Dictionary m_CloneCount = new Dictionary(); + private static readonly Dictionary m_CloneCount = new(); - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mirror Image", null, -1, diff --git a/Projects/UOContent/Spells/Ninjitsu/ShadowJump.cs b/Projects/UOContent/Spells/Ninjitsu/ShadowJump.cs index bacee7b35..775d0742c 100644 --- a/Projects/UOContent/Spells/Ninjitsu/ShadowJump.cs +++ b/Projects/UOContent/Spells/Ninjitsu/ShadowJump.cs @@ -11,7 +11,7 @@ namespace Server.Spells.Ninjitsu { public class Shadowjump : NinjaSpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Shadowjump", null, -1, diff --git a/Projects/UOContent/Spells/Ninjitsu/SurpriseAttack.cs b/Projects/UOContent/Spells/Ninjitsu/SurpriseAttack.cs index e49c8f227..9874cbb8b 100644 --- a/Projects/UOContent/Spells/Ninjitsu/SurpriseAttack.cs +++ b/Projects/UOContent/Spells/Ninjitsu/SurpriseAttack.cs @@ -7,12 +7,12 @@ namespace Server.Spells.Ninjitsu public class SurpriseAttack : NinjaMove { private static readonly Dictionary - m_Table = new Dictionary(); + m_Table = new(); public override int BaseMana => 20; public override double RequiredSkill => Core.ML ? 60.0 : 30.0; - public override TextDefinition AbilityMessage => new TextDefinition(1063128); // You prepare to surprise your prey. + public override TextDefinition AbilityMessage => new(1063128); // You prepare to surprise your prey. public override bool ValidatesDuringHit => false; diff --git a/Projects/UOContent/Spells/Second/Agility.cs b/Projects/UOContent/Spells/Second/Agility.cs index bdd1fb2b3..56380d476 100644 --- a/Projects/UOContent/Spells/Second/Agility.cs +++ b/Projects/UOContent/Spells/Second/Agility.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class AgilitySpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Agility", "Ex Uus", 212, diff --git a/Projects/UOContent/Spells/Second/Cunning.cs b/Projects/UOContent/Spells/Second/Cunning.cs index 4348d982f..e3ad7c701 100644 --- a/Projects/UOContent/Spells/Second/Cunning.cs +++ b/Projects/UOContent/Spells/Second/Cunning.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class CunningSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Cunning", "Uus Wis", 212, diff --git a/Projects/UOContent/Spells/Second/Cure.cs b/Projects/UOContent/Spells/Second/Cure.cs index b53ff1db3..1b02a0240 100644 --- a/Projects/UOContent/Spells/Second/Cure.cs +++ b/Projects/UOContent/Spells/Second/Cure.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class CureSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Cure", "An Nox", 212, diff --git a/Projects/UOContent/Spells/Second/Harm.cs b/Projects/UOContent/Spells/Second/Harm.cs index f529f82d1..3960d2b54 100644 --- a/Projects/UOContent/Spells/Second/Harm.cs +++ b/Projects/UOContent/Spells/Second/Harm.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Second { public class HarmSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Harm", "An Mani", 212, diff --git a/Projects/UOContent/Spells/Second/MagicTrap.cs b/Projects/UOContent/Spells/Second/MagicTrap.cs index 64baff50a..58abfbd5f 100644 --- a/Projects/UOContent/Spells/Second/MagicTrap.cs +++ b/Projects/UOContent/Spells/Second/MagicTrap.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class MagicTrapSpell : MagerySpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Magic Trap", "In Jux", 212, diff --git a/Projects/UOContent/Spells/Second/Protection.cs b/Projects/UOContent/Spells/Second/Protection.cs index 8941d765a..25f79b7a8 100644 --- a/Projects/UOContent/Spells/Second/Protection.cs +++ b/Projects/UOContent/Spells/Second/Protection.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class ProtectionSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Protection", "Uus Sanct", 236, @@ -16,13 +16,13 @@ namespace Server.Spells.Second ); private static readonly Dictionary> m_Table = - new Dictionary>(); + new(); public ProtectionSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { } - public static Dictionary Registry { get; } = new Dictionary(); + public static Dictionary Registry { get; } = new(); public override SpellCircle Circle => SpellCircle.Second; diff --git a/Projects/UOContent/Spells/Second/RemoveTrap.cs b/Projects/UOContent/Spells/Second/RemoveTrap.cs index 5423a405b..a573cada7 100644 --- a/Projects/UOContent/Spells/Second/RemoveTrap.cs +++ b/Projects/UOContent/Spells/Second/RemoveTrap.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class RemoveTrapSpell : MagerySpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Remove Trap", "An Jux", 212, diff --git a/Projects/UOContent/Spells/Second/Strength.cs b/Projects/UOContent/Spells/Second/Strength.cs index 5800db5ba..749c624e9 100644 --- a/Projects/UOContent/Spells/Second/Strength.cs +++ b/Projects/UOContent/Spells/Second/Strength.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Second { public class StrengthSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Strength", "Uus Mani", 212, diff --git a/Projects/UOContent/Spells/Seventh/ChainLightning.cs b/Projects/UOContent/Spells/Seventh/ChainLightning.cs index bca360c4e..7823ba97b 100644 --- a/Projects/UOContent/Spells/Seventh/ChainLightning.cs +++ b/Projects/UOContent/Spells/Seventh/ChainLightning.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Seventh { public class ChainLightningSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Chain Lightning", "Vas Ort Grav", 209, diff --git a/Projects/UOContent/Spells/Seventh/EnergyField.cs b/Projects/UOContent/Spells/Seventh/EnergyField.cs index c81f0643f..a153aa14e 100644 --- a/Projects/UOContent/Spells/Seventh/EnergyField.cs +++ b/Projects/UOContent/Spells/Seventh/EnergyField.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Seventh { public class EnergyFieldSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Energy Field", "In Sanct Grav", 221, diff --git a/Projects/UOContent/Spells/Seventh/FlameStrike.cs b/Projects/UOContent/Spells/Seventh/FlameStrike.cs index 65d765c7a..81e1c4af2 100644 --- a/Projects/UOContent/Spells/Seventh/FlameStrike.cs +++ b/Projects/UOContent/Spells/Seventh/FlameStrike.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Seventh { public class FlameStrikeSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Flame Strike", "Kal Vas Flam", 245, diff --git a/Projects/UOContent/Spells/Seventh/GateTravel.cs b/Projects/UOContent/Spells/Seventh/GateTravel.cs index 3b8438934..c446ee78b 100644 --- a/Projects/UOContent/Spells/Seventh/GateTravel.cs +++ b/Projects/UOContent/Spells/Seventh/GateTravel.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Seventh { public class GateTravelSpell : MagerySpell, IRecallSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Gate Travel", "Vas Rel Por", 263, diff --git a/Projects/UOContent/Spells/Seventh/ManaVampire.cs b/Projects/UOContent/Spells/Seventh/ManaVampire.cs index 08856460a..d7ec16654 100644 --- a/Projects/UOContent/Spells/Seventh/ManaVampire.cs +++ b/Projects/UOContent/Spells/Seventh/ManaVampire.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Seventh { public class ManaVampireSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mana Vampire", "Ort Sanct", 221, diff --git a/Projects/UOContent/Spells/Seventh/MassDispel.cs b/Projects/UOContent/Spells/Seventh/MassDispel.cs index 0702fce41..63b4109e7 100644 --- a/Projects/UOContent/Spells/Seventh/MassDispel.cs +++ b/Projects/UOContent/Spells/Seventh/MassDispel.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Seventh { public class MassDispelSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mass Dispel", "Vas An Ort", 263, diff --git a/Projects/UOContent/Spells/Seventh/MeteorSwarm.cs b/Projects/UOContent/Spells/Seventh/MeteorSwarm.cs index b1a492d01..7ab463e54 100644 --- a/Projects/UOContent/Spells/Seventh/MeteorSwarm.cs +++ b/Projects/UOContent/Spells/Seventh/MeteorSwarm.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Seventh { public class MeteorSwarmSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Meteor Swarm", "Flam Kal Des Ylem", 233, diff --git a/Projects/UOContent/Spells/Seventh/Polymorph.cs b/Projects/UOContent/Spells/Seventh/Polymorph.cs index 20eb00424..349945c79 100644 --- a/Projects/UOContent/Spells/Seventh/Polymorph.cs +++ b/Projects/UOContent/Spells/Seventh/Polymorph.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Seventh { public class PolymorphSpell : MagerySpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Polymorph", "Vas Ylem Rel", 221, @@ -19,7 +19,7 @@ namespace Server.Spells.Seventh Reagent.MandrakeRoot ); - private static readonly Dictionary m_Timers = new Dictionary(); + private static readonly Dictionary m_Timers = new(); private readonly int m_NewBody; diff --git a/Projects/UOContent/Spells/Sixth/Dispel.cs b/Projects/UOContent/Spells/Sixth/Dispel.cs index 89386d1d4..d67753515 100644 --- a/Projects/UOContent/Spells/Sixth/Dispel.cs +++ b/Projects/UOContent/Spells/Sixth/Dispel.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Sixth { public class DispelSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Dispel", "An Ort", 218, diff --git a/Projects/UOContent/Spells/Sixth/EnergyBolt.cs b/Projects/UOContent/Spells/Sixth/EnergyBolt.cs index e2e74c421..6026fceaf 100644 --- a/Projects/UOContent/Spells/Sixth/EnergyBolt.cs +++ b/Projects/UOContent/Spells/Sixth/EnergyBolt.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Sixth { public class EnergyBoltSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Energy Bolt", "Corp Por", 230, diff --git a/Projects/UOContent/Spells/Sixth/Explosion.cs b/Projects/UOContent/Spells/Sixth/Explosion.cs index ff6999039..7047d44e7 100644 --- a/Projects/UOContent/Spells/Sixth/Explosion.cs +++ b/Projects/UOContent/Spells/Sixth/Explosion.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Sixth { public class ExplosionSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Explosion", "Vas Ort Flam", 230, diff --git a/Projects/UOContent/Spells/Sixth/Invisibility.cs b/Projects/UOContent/Spells/Sixth/Invisibility.cs index 21322a1b6..2d1745902 100644 --- a/Projects/UOContent/Spells/Sixth/Invisibility.cs +++ b/Projects/UOContent/Spells/Sixth/Invisibility.cs @@ -9,7 +9,7 @@ namespace Server.Spells.Sixth { public class InvisibilitySpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Invisibility", "An Lor Xen", 206, @@ -18,7 +18,7 @@ namespace Server.Spells.Sixth Reagent.Nightshade ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public InvisibilitySpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Sixth/Mark.cs b/Projects/UOContent/Spells/Sixth/Mark.cs index aa1c4a7a9..076998990 100644 --- a/Projects/UOContent/Spells/Sixth/Mark.cs +++ b/Projects/UOContent/Spells/Sixth/Mark.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Sixth { public class MarkSpell : MagerySpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mark", "Kal Por Ylem", 218, diff --git a/Projects/UOContent/Spells/Sixth/MassCurse.cs b/Projects/UOContent/Spells/Sixth/MassCurse.cs index 31f7e7e98..3130a9817 100644 --- a/Projects/UOContent/Spells/Sixth/MassCurse.cs +++ b/Projects/UOContent/Spells/Sixth/MassCurse.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Sixth { public class MassCurseSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Mass Curse", "Vas Des Sanct", 218, diff --git a/Projects/UOContent/Spells/Sixth/ParalyzeField.cs b/Projects/UOContent/Spells/Sixth/ParalyzeField.cs index 21d259b07..c3e51029a 100644 --- a/Projects/UOContent/Spells/Sixth/ParalyzeField.cs +++ b/Projects/UOContent/Spells/Sixth/ParalyzeField.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Sixth { public class ParalyzeFieldSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Paralyze Field", "In Ex Grav", 230, diff --git a/Projects/UOContent/Spells/Sixth/Reveal.cs b/Projects/UOContent/Spells/Sixth/Reveal.cs index 2d00c52de..86576fa0b 100644 --- a/Projects/UOContent/Spells/Sixth/Reveal.cs +++ b/Projects/UOContent/Spells/Sixth/Reveal.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Sixth { public class RevealSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Reveal", "Wis Quas", 206, diff --git a/Projects/UOContent/Spells/Spellweaving/ArcaneCircle.cs b/Projects/UOContent/Spells/Spellweaving/ArcaneCircle.cs index b2f12f671..13b2b87f0 100644 --- a/Projects/UOContent/Spells/Spellweaving/ArcaneCircle.cs +++ b/Projects/UOContent/Spells/Spellweaving/ArcaneCircle.cs @@ -8,7 +8,7 @@ namespace Server.Spells.Spellweaving { public class ArcaneCircleSpell : ArcanistSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Arcane Circle", "Myrshalee", -1 diff --git a/Projects/UOContent/Spells/Spellweaving/AttuneWeapon.cs b/Projects/UOContent/Spells/Spellweaving/AttuneWeapon.cs index 93f4f30bc..79e9f5b4f 100644 --- a/Projects/UOContent/Spells/Spellweaving/AttuneWeapon.cs +++ b/Projects/UOContent/Spells/Spellweaving/AttuneWeapon.cs @@ -5,13 +5,13 @@ namespace Server.Spells.Spellweaving { public class AttuneWeaponSpell : ArcanistSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Attune Weapon", "Haeldril", -1 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public AttuneWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Spellweaving/EssenceOfWind.cs b/Projects/UOContent/Spells/Spellweaving/EssenceOfWind.cs index aa390cfb7..b22be1f91 100644 --- a/Projects/UOContent/Spells/Spellweaving/EssenceOfWind.cs +++ b/Projects/UOContent/Spells/Spellweaving/EssenceOfWind.cs @@ -5,9 +5,9 @@ namespace Server.Spells.Spellweaving { public class EssenceOfWindSpell : ArcanistSpell { - private static readonly SpellInfo m_Info = new SpellInfo("Essence of Wind", "Anathrae", -1); + private static readonly SpellInfo m_Info = new("Essence of Wind", "Anathrae", -1); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public EssenceOfWindSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Spellweaving/EtherealVoyage.cs b/Projects/UOContent/Spells/Spellweaving/EtherealVoyage.cs index d43acee2e..8d7926fd3 100644 --- a/Projects/UOContent/Spells/Spellweaving/EtherealVoyage.cs +++ b/Projects/UOContent/Spells/Spellweaving/EtherealVoyage.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Spellweaving { public class EtherealVoyageSpell : ArcaneForm { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Ethereal Voyage", "Orlavdra", -1 diff --git a/Projects/UOContent/Spells/Spellweaving/GiftOfLife.cs b/Projects/UOContent/Spells/Spellweaving/GiftOfLife.cs index 8ffac26ae..3ec45eab2 100644 --- a/Projects/UOContent/Spells/Spellweaving/GiftOfLife.cs +++ b/Projects/UOContent/Spells/Spellweaving/GiftOfLife.cs @@ -8,13 +8,13 @@ namespace Server.Spells.Spellweaving { public class GiftOfLifeSpell : ArcanistSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Gift of Life", "Illorae", -1 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public GiftOfLifeSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) @@ -121,7 +121,7 @@ namespace Server.Spells.Spellweaving { var friends = pet.Friends; - for (var i = 0; friends != null && i < friends.Count; i++) + for (var i = 0; i < friends?.Count; i++) { var friend = friends[i]; diff --git a/Projects/UOContent/Spells/Spellweaving/GiftOfRenewal.cs b/Projects/UOContent/Spells/Spellweaving/GiftOfRenewal.cs index 4e8b554ec..ed03a435d 100644 --- a/Projects/UOContent/Spells/Spellweaving/GiftOfRenewal.cs +++ b/Projects/UOContent/Spells/Spellweaving/GiftOfRenewal.cs @@ -6,13 +6,13 @@ namespace Server.Spells.Spellweaving { public class GiftOfRenewalSpell : ArcanistSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Gift of Renewal", "Olorisstra", -1 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public GiftOfRenewalSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Spellweaving/ImmolatingWeapon.cs b/Projects/UOContent/Spells/Spellweaving/ImmolatingWeapon.cs index 5a58e62d7..597ba87b7 100644 --- a/Projects/UOContent/Spells/Spellweaving/ImmolatingWeapon.cs +++ b/Projects/UOContent/Spells/Spellweaving/ImmolatingWeapon.cs @@ -6,14 +6,14 @@ namespace Server.Spells.Spellweaving { public class ImmolatingWeaponSpell : ArcanistSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Immolating Weapon", "Thalshara", -1 ); private static readonly Dictionary m_WeaponDamageTable = - new Dictionary(); + new(); public ImmolatingWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Spellweaving/NatureFury.cs b/Projects/UOContent/Spells/Spellweaving/NatureFury.cs index 748280cb6..4216be3e1 100644 --- a/Projects/UOContent/Spells/Spellweaving/NatureFury.cs +++ b/Projects/UOContent/Spells/Spellweaving/NatureFury.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Spellweaving { public class NatureFurySpell : ArcanistSpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Nature's Fury", "Rauvvrae", -1, diff --git a/Projects/UOContent/Spells/Spellweaving/ReaperForm.cs b/Projects/UOContent/Spells/Spellweaving/ReaperForm.cs index 3c94e2233..a98eeeb66 100644 --- a/Projects/UOContent/Spells/Spellweaving/ReaperForm.cs +++ b/Projects/UOContent/Spells/Spellweaving/ReaperForm.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Spellweaving { public class ReaperFormSpell : ArcaneForm { - private static readonly SpellInfo m_Info = new SpellInfo("Reaper Form", "Tarisstree", -1); + private static readonly SpellInfo m_Info = new("Reaper Form", "Tarisstree", -1); public ReaperFormSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Spellweaving/SummonFey.cs b/Projects/UOContent/Spells/Spellweaving/SummonFey.cs index d5cc55f3f..5e2b13f3f 100644 --- a/Projects/UOContent/Spells/Spellweaving/SummonFey.cs +++ b/Projects/UOContent/Spells/Spellweaving/SummonFey.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Spellweaving { public class SummonFeySpell : ArcaneSummon { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Summon Fey", "Alalithra", -1 diff --git a/Projects/UOContent/Spells/Spellweaving/SummonFiend.cs b/Projects/UOContent/Spells/Spellweaving/SummonFiend.cs index 752c0716f..a4341304d 100644 --- a/Projects/UOContent/Spells/Spellweaving/SummonFiend.cs +++ b/Projects/UOContent/Spells/Spellweaving/SummonFiend.cs @@ -6,7 +6,7 @@ namespace Server.Spells.Spellweaving { public class SummonFiendSpell : ArcaneSummon { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Summon Fiend", "Nylisstra", -1 diff --git a/Projects/UOContent/Spells/Spellweaving/Thunderstorm.cs b/Projects/UOContent/Spells/Spellweaving/Thunderstorm.cs index 9103e10b3..775a7c356 100644 --- a/Projects/UOContent/Spells/Spellweaving/Thunderstorm.cs +++ b/Projects/UOContent/Spells/Spellweaving/Thunderstorm.cs @@ -5,13 +5,13 @@ namespace Server.Spells.Spellweaving { public class ThunderstormSpell : ArcanistSpell { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Thunderstorm", "Erelonia", -1 ); - private static readonly Dictionary m_Table = new Dictionary(); + private static readonly Dictionary m_Table = new(); public ThunderstormSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) diff --git a/Projects/UOContent/Spells/Spellweaving/WordOfDeath.cs b/Projects/UOContent/Spells/Spellweaving/WordOfDeath.cs index ebe4e7336..bed32e92f 100644 --- a/Projects/UOContent/Spells/Spellweaving/WordOfDeath.cs +++ b/Projects/UOContent/Spells/Spellweaving/WordOfDeath.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Spellweaving { public class WordOfDeathSpell : ArcanistSpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo("Word of Death", "Nyraxle", -1); + private static readonly SpellInfo m_Info = new("Word of Death", "Nyraxle", -1); public WordOfDeathSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info) { diff --git a/Projects/UOContent/Spells/Third/Bless.cs b/Projects/UOContent/Spells/Third/Bless.cs index 90323054f..89862201e 100644 --- a/Projects/UOContent/Spells/Third/Bless.cs +++ b/Projects/UOContent/Spells/Third/Bless.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Third { public class BlessSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Bless", "Rel Sanct", 203, diff --git a/Projects/UOContent/Spells/Third/Fireball.cs b/Projects/UOContent/Spells/Third/Fireball.cs index 0df5e4bc0..4c650115d 100644 --- a/Projects/UOContent/Spells/Third/Fireball.cs +++ b/Projects/UOContent/Spells/Third/Fireball.cs @@ -4,7 +4,7 @@ namespace Server.Spells.Third { public class FireballSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Fireball", "Vas Flam", 203, diff --git a/Projects/UOContent/Spells/Third/MagicLock.cs b/Projects/UOContent/Spells/Third/MagicLock.cs index d72a8b2f1..13a7ca597 100644 --- a/Projects/UOContent/Spells/Third/MagicLock.cs +++ b/Projects/UOContent/Spells/Third/MagicLock.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Third { public class MagicLockSpell : MagerySpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Magic Lock", "An Por", 215, diff --git a/Projects/UOContent/Spells/Third/Poison.cs b/Projects/UOContent/Spells/Third/Poison.cs index bcc4e9f0d..24180f5cb 100644 --- a/Projects/UOContent/Spells/Third/Poison.cs +++ b/Projects/UOContent/Spells/Third/Poison.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Third { public class PoisonSpell : MagerySpell, ISpellTargetingMobile { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Poison", "In Nox", 203, diff --git a/Projects/UOContent/Spells/Third/Telekinesis.cs b/Projects/UOContent/Spells/Third/Telekinesis.cs index fb836c19f..94728d372 100644 --- a/Projects/UOContent/Spells/Third/Telekinesis.cs +++ b/Projects/UOContent/Spells/Third/Telekinesis.cs @@ -5,7 +5,7 @@ namespace Server.Spells.Third { public class TelekinesisSpell : MagerySpell, ISpellTargetingItem { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Telekinesis", "Ort Por Ylem", 203, diff --git a/Projects/UOContent/Spells/Third/Teleport.cs b/Projects/UOContent/Spells/Third/Teleport.cs index 527ef7f86..2ea13dfa7 100644 --- a/Projects/UOContent/Spells/Third/Teleport.cs +++ b/Projects/UOContent/Spells/Third/Teleport.cs @@ -11,7 +11,7 @@ namespace Server.Spells.Third { public class TeleportSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Teleport", "Rel Por", 215, diff --git a/Projects/UOContent/Spells/Third/Unlock.cs b/Projects/UOContent/Spells/Third/Unlock.cs index 8f3e94b25..284e6693a 100644 --- a/Projects/UOContent/Spells/Third/Unlock.cs +++ b/Projects/UOContent/Spells/Third/Unlock.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Third { public class UnlockSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Unlock Spell", "Ex Por", 215, diff --git a/Projects/UOContent/Spells/Third/WallOfStone.cs b/Projects/UOContent/Spells/Third/WallOfStone.cs index fc64f78dd..39e24611e 100644 --- a/Projects/UOContent/Spells/Third/WallOfStone.cs +++ b/Projects/UOContent/Spells/Third/WallOfStone.cs @@ -7,7 +7,7 @@ namespace Server.Spells.Third { public class WallOfStoneSpell : MagerySpell, ISpellTargetingPoint3D { - private static readonly SpellInfo m_Info = new SpellInfo( + private static readonly SpellInfo m_Info = new( "Wall of Stone", "In Sanct Ylem", 227,