From 33f5e77a24e1675c562234cda424ec1c6bb6cccd Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 14 Sep 2018 08:46:14 -0700 Subject: [PATCH] Fixes body expression style. --- Scripts/Accounting/Account.cs | 63 +- Scripts/Accounting/AccountAttackLimiter.cs | 17 +- Scripts/Accounting/AccountComment.cs | 12 +- Scripts/Accounting/AccountHandler.cs | 4 +- Scripts/Accounting/AccountTag.cs | 8 +- Scripts/Accounting/Firewall.cs | 8 +- Scripts/Commands/Attributes.cs | 6 +- Scripts/Commands/Batch.cs | 21 +- Scripts/Commands/Decorate.cs | 4 +- Scripts/Commands/DecorateMag.cs | 4 +- Scripts/Commands/GenCategorization.cs | 18 +- .../Commands/Generic/Commands/BaseCommand.cs | 28 +- Scripts/Commands/Generic/Commands/Commands.cs | 2 +- .../Generic/Extensions/BaseExtension.cs | 50 +- .../Compilers/ConditionalCompiler.cs | 20 +- .../Extensions/Compilers/SortCompiler.cs | 14 +- .../Generic/Extensions/DistinctExtension.cs | 5 +- .../Generic/Extensions/LimitExtension.cs | 10 +- .../Generic/Extensions/SortExtension.cs | 5 +- .../Generic/Extensions/WhereExtension.cs | 10 +- .../Implementors/AreaCommandImplementor.cs | 5 +- .../Implementors/BaseCommandImplementor.cs | 29 +- .../Generic/Implementors/ObjectConditional.cs | 20 +- .../Implementors/RangeCommandImplementor.cs | 5 +- Scripts/Commands/Logging.cs | 6 +- Scripts/Commands/Properties.cs | 30 +- Scripts/Engines/BulkOrders/Books/BOBFilter.cs | 21 +- .../Engines/BulkOrders/Books/BOBLargeEntry.cs | 14 +- .../BulkOrders/Books/BOBLargeSubEntry.cs | 8 +- .../Engines/BulkOrders/Books/BOBSmallEntry.cs | 20 +- .../Engines/BulkOrders/Books/BulkOrderBook.cs | 20 +- Scripts/Engines/BulkOrders/LargeBOD.cs | 12 +- Scripts/Engines/BulkOrders/LargeBulkEntry.cs | 119 +- Scripts/Engines/BulkOrders/Rewards.cs | 18 +- Scripts/Engines/BulkOrders/SmallBOD.cs | 25 +- Scripts/Engines/BulkOrders/SmallBulkEntry.cs | 26 +- Scripts/Engines/CannedEvil/ChampionSkull.cs | 3 +- .../CannedEvil/ChampionSkullBrazier.cs | 8 +- Scripts/Engines/CannedEvil/ChampionSpawn.cs | 113 +- Scripts/Engines/Chat/Channel.cs | 33 +- Scripts/Engines/Chat/Chat.cs | 4 +- Scripts/Engines/Chat/ChatActionHandler.cs | 6 +- Scripts/Engines/Chat/ChatUser.cs | 70 +- Scripts/Engines/ConPVP/AcceptDuelGump.cs | 4 +- Scripts/Engines/ConPVP/Arena.cs | 120 +- Scripts/Engines/ConPVP/ArenaGump.cs | 5 +- Scripts/Engines/ConPVP/DuelContext.cs | 48 +- Scripts/Engines/ConPVP/DuelContextGump.cs | 4 +- Scripts/Engines/ConPVP/Games/BombingRun.cs | 89 +- Scripts/Engines/ConPVP/Games/CTF.cs | 113 +- Scripts/Engines/ConPVP/Games/DoubleDom.cs | 98 +- Scripts/Engines/ConPVP/Games/KingOfTheHill.cs | 129 +- Scripts/Engines/ConPVP/Ladder.cs | 31 +- Scripts/Engines/ConPVP/LadderGump.cs | 9 +- Scripts/Engines/ConPVP/Participant.cs | 23 +- Scripts/Engines/ConPVP/ParticipantGump.cs | 6 +- Scripts/Engines/ConPVP/Preferences.cs | 18 +- Scripts/Engines/ConPVP/Ruleset.cs | 16 +- Scripts/Engines/ConPVP/RulesetLayout.cs | 22 +- Scripts/Engines/ConPVP/Tournament.cs | 156 +- Scripts/Engines/ConPVP/Trophy.cs | 13 +- Scripts/Engines/Craft/Core/CraftContext.cs | 20 +- Scripts/Engines/Craft/Core/CraftGroup.cs | 15 +- Scripts/Engines/Craft/Core/CraftItem.cs | 88 +- .../Craft/Core/CraftItemIDAttribute.cs | 2 +- Scripts/Engines/Craft/Core/CraftRes.cs | 30 +- Scripts/Engines/Craft/Core/CraftSkill.cs | 15 +- Scripts/Engines/Craft/Core/CraftSubRes.cs | 30 +- Scripts/Engines/Craft/Core/CraftSubResCol.cs | 16 +- Scripts/Engines/Craft/Core/CraftSystem.cs | 22 +- Scripts/Engines/Craft/Core/CustomCraft.cs | 12 +- Scripts/Engines/Craft/Core/Recipes.cs | 15 +- Scripts/Engines/Craft/DefAlchemy.cs | 10 +- Scripts/Engines/Craft/DefBlacksmithy.cs | 10 +- Scripts/Engines/Craft/DefBowFletching.cs | 10 +- Scripts/Engines/Craft/DefCarpentry.cs | 10 +- Scripts/Engines/Craft/DefCartography.cs | 10 +- Scripts/Engines/Craft/DefCooking.cs | 10 +- Scripts/Engines/Craft/DefGlassblowing.cs | 10 +- Scripts/Engines/Craft/DefInscription.cs | 10 +- Scripts/Engines/Craft/DefMasonry.cs | 10 +- Scripts/Engines/Craft/DefTailoring.cs | 10 +- Scripts/Engines/Craft/DefTinkering.cs | 12 +- Scripts/Engines/Doom/GauntletSpawner.cs | 39 +- .../Doom/LeverPuzzle/LeverPuzzleController.cs | 14 +- .../Doom/LeverPuzzle/LeverPuzzleItems.cs | 5 +- Scripts/Engines/Ethics/Core/Ethic.cs | 10 +- Scripts/Engines/Ethics/Core/Persistance.cs | 5 +- Scripts/Engines/Ethics/Core/Player.cs | 16 +- Scripts/Engines/Factions/Core/Election.cs | 33 +- Scripts/Engines/Factions/Core/Faction.cs | 43 +- Scripts/Engines/Factions/Core/FactionItem.cs | 6 +- Scripts/Engines/Factions/Core/FactionState.cs | 32 +- Scripts/Engines/Factions/Core/GuardList.cs | 4 +- .../Engines/Factions/Core/MerchantTitles.cs | 12 +- Scripts/Engines/Factions/Core/Persistance.cs | 7 +- Scripts/Engines/Factions/Core/PlayerState.cs | 32 +- .../Engines/Factions/Core/SilverGivenEntry.cs | 6 +- .../Engines/Factions/Core/StrongholdRegion.cs | 4 +- Scripts/Engines/Factions/Core/Town.cs | 57 +- Scripts/Engines/Factions/Core/TownState.cs | 28 +- Scripts/Engines/Factions/Core/VendorList.cs | 2 +- .../Factions/Definitions/FactionDefinition.cs | 48 +- .../Definitions/FactionItemDefinition.cs | 4 +- .../Factions/Definitions/GuardDefinition.cs | 14 +- .../Factions/Definitions/RankDefinition.cs | 8 +- .../Definitions/StrongholdDefintion.cs | 8 +- .../Factions/Definitions/TownDefinition.cs | 26 +- .../Factions/Definitions/VendorDefinition.cs | 16 +- Scripts/Engines/Factions/Gumps/FactionGump.cs | 2 +- .../Instances/Factions/CouncilOfMages.cs | 2 +- .../Factions/Instances/Factions/Minax.cs | 2 +- .../Instances/Factions/Shadowlords.cs | 2 +- .../Instances/Factions/TrueBritannians.cs | 2 +- .../Engines/Factions/Items/BaseMonolith.cs | 10 +- .../Factions/Items/BaseSystemController.cs | 4 +- .../Engines/Factions/Items/FactionStone.cs | 2 +- Scripts/Engines/Factions/Items/JoinStone.cs | 2 +- .../Items/Power Faction Items/BloodRose.cs | 6 +- .../Power Faction Items/ClarityPotion.cs | 6 +- .../Power Faction Items/GemOfEmpowerment.cs | 6 +- .../Power Faction Items/PowerFactionItem.cs | 12 +- .../Items/Power Faction Items/StormsEye.cs | 6 +- .../Power Faction Items/UrnOfAscension.cs | 6 +- Scripts/Engines/Factions/Items/Sigil.cs | 48 +- Scripts/Engines/Factions/Items/Silver.cs | 5 +- Scripts/Engines/Factions/Items/TownStone.cs | 2 +- .../Factions/Items/Traps/BaseFactionTrap.cs | 29 +- .../Items/Traps/BaseFactionTrapDeed.cs | 2 +- .../Items/Traps/FactionTrapRemovalKit.cs | 4 +- .../Factions/Mobiles/FactionWarHorse.cs | 2 +- .../Mobiles/Guards/BaseFactionGuard.cs | 23 +- .../Factions/Mobiles/Guards/GuardAI.cs | 20 +- .../Engines/Factions/Mobiles/Guards/Orders.cs | 16 +- .../Mobiles/Vendors/BaseFactionVendor.cs | 6 +- .../Mobiles/Vendors/FactionBottleVendor.cs | 5 +- .../Mobiles/Vendors/FactionHorseVendor.cs | 5 +- .../Mobiles/Vendors/FactionReagentVendor.cs | 5 +- .../Harvest/Core/BonusHarvestResource.cs | 12 +- Scripts/Engines/Harvest/Core/HarvestBank.cs | 10 +- .../Engines/Harvest/Core/HarvestDefinition.cs | 124 +- .../Engines/Harvest/Core/HarvestResource.cs | 18 +- Scripts/Engines/Harvest/Core/HarvestVein.cs | 16 +- Scripts/Engines/Harvest/Fishing.cs | 5 +- Scripts/Engines/Harvest/Lumberjacking.cs | 5 +- Scripts/Engines/Harvest/Mining.cs | 10 +- Scripts/Engines/Help/PageQueue.cs | 74 +- Scripts/Engines/Help/PageQueueGump.cs | 8 +- Scripts/Engines/Help/SpeechLog.cs | 8 +- Scripts/Engines/Help/StuckMenu.cs | 4 +- .../Engines/Khaldun/KhaldunPitTeleporter.cs | 12 +- Scripts/Engines/Khaldun/PuzzleChest.cs | 45 +- Scripts/Engines/Khaldun/RaisableItem.cs | 19 +- Scripts/Engines/Khaldun/RaiseSwitch.cs | 6 +- .../Definitions/NewHavenSkillTraining.cs | 4 +- .../Engines/MLQuests/Items/QuestGiverItem.cs | 4 +- Scripts/Engines/MLQuests/Items/Teleporters.cs | 12 +- Scripts/Engines/MLQuests/MLQuest.cs | 80 +- Scripts/Engines/MLQuests/MLQuestContext.cs | 36 +- Scripts/Engines/MLQuests/MLQuestEntry.cs | 45 +- .../Engines/MLQuests/MLQuestPersistence.cs | 5 +- Scripts/Engines/MLQuests/MLQuestSystem.cs | 15 +- .../MLQuests/Objectives/BaseObjective.cs | 18 +- .../MLQuests/Objectives/CollectObjective.cs | 21 +- .../MLQuests/Objectives/DeliverObjective.cs | 28 +- .../MLQuests/Objectives/EscortObjective.cs | 8 +- .../MLQuests/Objectives/GainSkillObjective.cs | 20 +- .../MLQuests/Objectives/KillObjective.cs | 24 +- Scripts/Engines/MLQuests/QuestArea.cs | 12 +- .../Engines/MLQuests/Rewards/BaseReward.cs | 6 +- .../Engines/MLQuests/Rewards/DummyReward.cs | 2 +- .../Engines/MyRunUO/DatabaseCommandQueue.cs | 5 +- Scripts/Engines/MyRunUO/LayerComparer.cs | 5 +- Scripts/Engines/Party/Party.cs | 13 +- Scripts/Engines/Party/PartyMemberInfo.cs | 6 +- Scripts/Engines/Pathing/Movement.cs | 16 +- Scripts/Engines/Pathing/MovementPath.cs | 14 +- Scripts/Engines/Pathing/PathFollower.cs | 9 +- .../Engines/Plants/MiscItems/GreenThorns.cs | 5 +- .../Engines/Plants/MiscItems/OrangePetals.cs | 7 +- Scripts/Engines/Plants/MiscItems/RedLeaves.cs | 5 +- Scripts/Engines/Plants/PlantItem.cs | 29 +- Scripts/Engines/Plants/PlantSystem.cs | 80 +- Scripts/Engines/Plants/PlantType.cs | 2 +- Scripts/Engines/Plants/Seed.cs | 6 +- .../AmbitiousQueenQuest.cs | 43 +- .../Ambitious Solen Queen/Conversations.cs | 133 +- .../Ambitious Solen Queen/Objectives.cs | 52 +- .../Quests/Collector/CollectorQuest.cs | 35 +- .../Engines/Quests/Collector/Conversations.cs | 549 +------- .../Quests/Collector/Items/ImageType.cs | 2 +- .../Quests/Collector/Items/Obsidian.cs | 4 +- .../Quests/Collector/Items/PaintedImage.cs | 2 +- .../Engines/Quests/Collector/Objectives.cs | 136 +- Scripts/Engines/Quests/Core/BaseQuester.cs | 5 +- .../Quests/Core/Items/DynamicTeleporter.cs | 3 +- .../Quests/Core/Items/HornOfRetreat.cs | 10 +- .../Engines/Quests/Core/QuestConversation.cs | 12 +- Scripts/Engines/Quests/Core/QuestItemInfo.cs | 8 +- Scripts/Engines/Quests/Core/QuestObjective.cs | 28 +- .../Engines/Quests/Core/QuestRestartInfo.cs | 8 +- Scripts/Engines/Quests/Core/QuestSystem.cs | 12 +- .../Quests/Core/Regions/CancelQuestRegion.cs | 2 +- .../Regions/QuestCompleteObjectiveRegion.cs | 4 +- .../Quests/Core/Regions/QuestNoEntryRegion.cs | 8 +- .../Quests/Core/Regions/QuestOfferRegion.cs | 2 +- .../Quests/Dark Tides/Conversations.cs | 358 +---- .../Quests/Dark Tides/DarkTidesQuest.cs | 51 +- .../Quests/Dark Tides/Items/MaabusCoffin.cs | 6 +- .../Engines/Quests/Dark Tides/Objectives.cs | 214 +-- .../Emino's Undertaking/Conversations.cs | 380 +---- .../EminosUndertakingQuest.cs | 18 +- .../Emino's Undertaking/Mobiles/Emino.cs | 2 +- .../Mobiles/HiddenFigure.cs | 4 +- .../Emino's Undertaking/Mobiles/Zoel.cs | 2 +- .../Quests/Emino's Undertaking/Objectives.cs | 143 +- .../Quests/Haochi's Trials/Conversations.cs | 244 +--- .../Haochi's Trials/HaochisTrialsQuest.cs | 29 +- .../Quests/Haochi's Trials/Mobiles/Haochi.cs | 2 +- .../Mobiles/HaochisGuardsman.cs | 2 +- .../Quests/Haochi's Trials/Mobiles/Relnia.cs | 2 +- .../Quests/Haochi's Trials/Objectives.cs | 188 +-- .../Quests/Solen Matriarch/Conversations.cs | 106 +- .../Quests/Solen Matriarch/Objectives.cs | 56 +- .../Solen Matriarch/SolenMatriarchQuest.cs | 11 +- .../Study of the Solen Hive/Conversations.cs | 137 +- .../Study of the Solen Hive/NestArea.cs | 2 +- .../Study of the Solen Hive/Objectives.cs | 28 +- .../StudyOfSolenQuest.cs | 47 +- .../Terrible Hatchlings/Conversations.cs | 62 +- .../Quests/Terrible Hatchlings/Objectives.cs | 40 +- .../TerribleHatchlingsQuest.cs | 25 +- .../Quests/The Summoning/Conversations.cs | 31 +- .../The Summoning/Items/BellOfTheDead.cs | 12 +- .../The Summoning/Items/SummoningAltar.cs | 2 +- .../Quests/The Summoning/Mobiles/Chyloth.cs | 8 +- .../Quests/The Summoning/Objectives.cs | 25 +- .../Quests/The Summoning/TheSummoningQuest.cs | 51 +- .../Quests/Uzeraan Turmoil/Conversations.cs | 277 +--- .../Quests/Uzeraan Turmoil/Items/Cannon.cs | 6 +- .../Mobiles/MilitiaCanoneer.cs | 4 +- .../Quests/Uzeraan Turmoil/Objectives.cs | 158 +-- .../Uzeraan Turmoil/UzeraanTurmoilQuest.cs | 36 +- .../Quests/Witch Apprentice/Conversations.cs | 348 +---- .../Quests/Witch Apprentice/Ingredient.cs | 6 +- .../Quests/Witch Apprentice/Items/Cauldron.cs | 5 +- .../Witch Apprentice/Items/HangoverCure.cs | 4 +- .../Quests/Witch Apprentice/Objectives.cs | 82 +- .../Witch Apprentice/WitchApprenticeQuest.cs | 52 +- .../Engines/RemoteAdmin/RemoteAdminLogging.cs | 4 +- .../Reports/Objects/Charts/BarGraph.cs | 28 +- .../Engines/Reports/Objects/Charts/Chart.cs | 10 +- .../Reports/Objects/Charts/ChartItem.cs | 8 +- .../Objects/Charts/ChartItemCollection.cs | 12 +- .../Reports/Objects/Charts/PieChart.cs | 4 +- .../Reports/Objects/Reports/ItemValue.cs | 8 +- .../Objects/Reports/ItemValueCollection.cs | 10 +- .../Engines/Reports/Objects/Reports/Report.cs | 12 +- .../Reports/Objects/Reports/ReportColumn.cs | 12 +- .../Objects/Reports/ReportColumnCollection.cs | 10 +- .../Reports/Objects/Reports/ReportItem.cs | 2 +- .../Objects/Reports/ReportItemCollection.cs | 12 +- .../Reports/Objects/Snapshots/Snapshot.cs | 8 +- .../Objects/Snapshots/SnapshotCollection.cs | 10 +- .../Objects/Snapshots/SnapshotHistory.cs | 4 +- .../Engines/Reports/Objects/Staffing/Info.cs | 12 +- .../Reports/Objects/Staffing/PageInfo.cs | 33 +- .../Objects/Staffing/PageInfoCollection.cs | 10 +- .../Reports/Objects/Staffing/QueueStatus.cs | 8 +- .../Objects/Staffing/QueueStatusCollection.cs | 10 +- .../Reports/Objects/Staffing/ResponseInfo.cs | 12 +- .../Staffing/ResponseInfoCollection.cs | 10 +- .../Reports/Objects/Staffing/StaffHistory.cs | 16 +- .../PersistableObjectCollection.cs | 10 +- .../Reports/Persistance/PersistableType.cs | 4 +- .../Reports/Persistance/PersistanceReader.cs | 8 +- .../Reports/Rendering/BarGraphRenderer.cs | 40 +- .../Reports/Rendering/ChartRenderer.cs | 4 +- Scripts/Engines/Reports/Rendering/DataItem.cs | 28 +- .../Reports/Rendering/PieChartRenderer.cs | 4 +- Scripts/Engines/Reports/Reports.cs | 2 +- Scripts/Engines/Spawner/ProximitySpawner.cs | 17 +- Scripts/Engines/Spawner/Spawner.cs | 69 +- .../BasePigmentsOfTokuno.cs | 12 +- .../Treasures of Tokuno/GreaterArtifacts.cs | 2 +- .../Treasures of Tokuno/LesserArtifacts.cs | 10 +- .../Treasures of Tokuno/TreasuresOfTokuno.cs | 39 +- .../TreasuresOfTokunoPersistance.cs | 7 +- .../Character Statue Maker/CharacterStatue.cs | 28 +- .../CharacterStatueMaker.cs | 4 +- .../CharacterStatuePlinth.cs | 2 +- .../Engines/VeteranRewards/RewardCategory.cs | 4 +- Scripts/Engines/VeteranRewards/RewardEntry.cs | 16 +- Scripts/Engines/VeteranRewards/RewardList.cs | 4 +- .../VeteranRewards/RewardOptionGump.cs | 4 +- Scripts/Engines/Virtues/Honor.cs | 14 +- Scripts/Gumps/BaseConfirmGump.cs | 9 +- Scripts/Gumps/BaseGridGump.cs | 33 +- Scripts/Gumps/BaseImageTileButtonsGump.cs | 22 +- Scripts/Gumps/CategorizedAddGump.cs | 14 +- Scripts/Gumps/Go/ChildNode.cs | 24 +- Scripts/Gumps/Go/LocationTree.cs | 24 +- Scripts/Gumps/Go/ParentNode.cs | 24 +- .../Guilds/New Guild System/BaseGuildGump.cs | 4 +- .../New Guild System/BaseGuildListGump.cs | 6 +- .../Guilds/New Guild System/DiplomacyGump.cs | 3 +- Scripts/Gumps/PlayerVendorGumps.cs | 22 +- Scripts/Gumps/PolymorphGump.cs | 4 +- Scripts/Gumps/RunebookGump.cs | 2 +- Scripts/Gumps/SkillsGump.cs | 9 +- .../Christmas/2010/Addons/FireFliesDeed.cs | 2 +- .../Halloween/2011/Items/BasePaintedMask.cs | 2 +- .../Halloween/2012/Engines/PlayerZombies.cs | 4 +- .../Halloween/HolidaySettings.cs | 10 +- .../Valentine/2011/Items/StValentinesBears.cs | 22 +- .../Valentine/2012/Items/CupidsArrow.cs | 9 +- Scripts/Items/Addons/AddonComponent.cs | 31 +- .../Items/Addons/AddonContainerComponent.cs | 10 +- Scripts/Items/Addons/ArcheryButteAddon.cs | 32 +- Scripts/Items/Addons/BallotBox.cs | 15 +- Scripts/Items/Addons/BaseAddon.cs | 26 +- Scripts/Items/Addons/BaseAddonContainer.cs | 17 +- .../Items/Addons/BaseAddonContainerDeed.cs | 2 +- Scripts/Items/Addons/BaseAddonDeed.cs | 2 +- Scripts/Items/Addons/DartBoard.cs | 2 +- .../Addons/ElvenSpinningwheelEastAddon.cs | 2 +- .../Addons/ElvenSpinningwheelSouthAddon.cs | 2 +- Scripts/Items/Addons/FireColumnAddon.cs | 5 +- Scripts/Items/Addons/FlourMillEastAddon.cs | 22 +- Scripts/Items/Addons/FlourMillSouthAddon.cs | 22 +- Scripts/Items/Addons/JackOLantern.cs | 5 +- Scripts/Items/Addons/LoomEastAddon.cs | 4 +- Scripts/Items/Addons/LoomSouthAddon.cs | 4 +- Scripts/Items/Addons/PickpocketDips.cs | 13 +- Scripts/Items/Addons/PyramidAddon.cs | 5 +- Scripts/Items/Addons/SHTeleporter.cs | 17 +- .../Items/Addons/SpinningwheelEastAddon.cs | 2 +- .../Items/Addons/SpinningwheelSouthAddon.cs | 2 +- Scripts/Items/Addons/TrainingDummies.cs | 13 +- Scripts/Items/Addons/WaterTroughEastAddon.cs | 2 +- Scripts/Items/Addons/WaterTroughSouthAddon.cs | 2 +- Scripts/Items/Aquarium/Aquarium.cs | 34 +- Scripts/Items/Aquarium/AquariumState.cs | 14 +- Scripts/Items/Aquarium/BaseFish.cs | 5 +- Scripts/Items/Aquarium/FishBowl.cs | 5 +- Scripts/Items/Armor/BaseArmor.cs | 157 +-- Scripts/Items/Armor/Glasses/ElvenGlasses.cs | 2 +- Scripts/Items/Armor/Leather/LeafGloves.cs | 9 +- Scripts/Items/Armor/Leather/LeatherGloves.cs | 9 +- Scripts/Items/Body Parts/Head.cs | 8 +- Scripts/Items/Books/BaseBook.cs | 40 +- Scripts/Items/Books/Defined/BookContent.cs | 6 +- .../Shared/DetectiveBoots.cs | 2 +- Scripts/Items/Clothing/BaseClothing.cs | 65 +- Scripts/Items/Clothing/Cloaks.cs | 15 +- Scripts/Items/Clothing/Hats.cs | 9 +- Scripts/Items/Clothing/OuterTorso.cs | 26 +- Scripts/Items/Clothing/Shoes.cs | 9 +- Scripts/Items/Construction/Ankhs.cs | 8 +- Scripts/Items/Construction/Doors/BaseDoor.cs | 82 +- .../Items/Construction/Doors/HouseDoors.cs | 8 +- .../Items/Construction/Signs/LocalizedSign.cs | 3 +- .../Items/Construction/Signs/SubtextSign.cs | 2 +- Scripts/Items/Containers/BaseTreasureChest.cs | 37 +- .../Items/Containers/FillableContainers.cs | 8 +- Scripts/Items/Containers/LockableContainer.cs | 77 +- Scripts/Items/Containers/MarkContainer.cs | 23 +- Scripts/Items/Containers/Strongbox.cs | 13 +- .../Items/Containers/TrappableContainer.cs | 32 +- Scripts/Items/Containers/TreasureMapChest.cs | 19 +- .../SEDecorationArtifacts.cs | 4 +- .../StealableArtifactsSpawner.cs | 29 +- Scripts/Items/Deeds/BarkeepContract.cs | 5 +- Scripts/Items/Deeds/ClothingBlessDeed.cs | 5 +- Scripts/Items/Deeds/CommodityDeed.cs | 8 +- Scripts/Items/Deeds/DragonBardingDeed.cs | 9 +- Scripts/Items/Deeds/NameChangeDeed.cs | 5 +- Scripts/Items/Deeds/NewPlayerTicket.cs | 4 +- Scripts/Items/Deeds/VendorRentalContract.cs | 12 +- Scripts/Items/Food/Beverage.cs | 29 +- Scripts/Items/Food/CookableFood.cs | 20 +- Scripts/Items/Food/Cooking.cs | 2 +- Scripts/Items/Food/Food.cs | 32 +- Scripts/Items/Games/BaseBoard.cs | 4 +- Scripts/Items/Games/BasePiece.cs | 4 +- Scripts/Items/Games/CheckersPieces.cs | 10 +- Scripts/Items/Games/ChessPieces.cs | 60 +- .../Games/Mahjong/MahjongDealerIndicator.cs | 5 +- Scripts/Items/Games/Mahjong/MahjongGame.cs | 8 +- Scripts/Items/Games/Mahjong/MahjongTile.cs | 10 +- .../Mahjong/MahjongWallBreakIndicator.cs | 5 +- Scripts/Items/Gems/Amber.cs | 5 +- Scripts/Items/Gems/Amethyst.cs | 5 +- Scripts/Items/Gems/Citrine.cs | 5 +- Scripts/Items/Gems/Diamond.cs | 5 +- Scripts/Items/Gems/Emerald.cs | 5 +- Scripts/Items/Gems/Ruby.cs | 5 +- Scripts/Items/Gems/Sapphire.cs | 5 +- Scripts/Items/Gems/StarSapphire.cs | 5 +- Scripts/Items/Gems/Tourmaline.cs | 5 +- Scripts/Items/Guilds/Guildstone.cs | 29 +- Scripts/Items/Jewels/BaseJewel.cs | 25 +- Scripts/Items/Lights/BaseLight.cs | 12 +- Scripts/Items/Lights/Candelabra.cs | 4 +- Scripts/Items/Maps/MapItem.cs | 21 +- Scripts/Items/Maps/PresetMap.cs | 10 +- Scripts/Items/Maps/TreasureMap.cs | 19 +- .../Items/Minor Artifacts/ML/AegisOfGrace.cs | 8 +- Scripts/Items/Misc/ArcaneGem.cs | 5 +- Scripts/Items/Misc/BankCheck.cs | 2 +- Scripts/Items/Misc/BulletinBoards.cs | 26 +- Scripts/Items/Misc/ClockworkAssembly.cs | 5 +- Scripts/Items/Misc/CommunicationCrystals.cs | 22 +- Scripts/Items/Misc/Corpses/Corpse.cs | 90 +- .../Items/Misc/Corpses/CorpseNameAttribute.cs | 5 +- Scripts/Items/Misc/DeceitBrazier.cs | 8 +- Scripts/Items/Misc/EffectController.cs | 225 +-- Scripts/Items/Misc/EffectItem.cs | 8 +- Scripts/Items/Misc/Firebomb.cs | 5 +- Scripts/Items/Misc/FlippableAddonAttribute.cs | 5 +- Scripts/Items/Misc/FlippableAttribute.cs | 5 +- Scripts/Items/Misc/Gold.cs | 5 +- Scripts/Items/Misc/HairDye.cs | 24 +- Scripts/Items/Misc/InteriorDecorator.cs | 3 +- Scripts/Items/Misc/Key.cs | 30 +- Scripts/Items/Misc/LOSBlocker.cs | 5 +- Scripts/Items/Misc/Moonstone.cs | 5 +- Scripts/Items/Misc/MorphItem.cs | 14 +- Scripts/Items/Misc/OilCloth.cs | 5 +- Scripts/Items/Misc/PlayerBulletinBoards.cs | 29 +- Scripts/Items/Misc/PowerCrystal.cs | 5 +- Scripts/Items/Misc/PowerGenerator.cs | 17 +- Scripts/Items/Misc/PublicMoongate.cs | 48 +- Scripts/Items/Misc/SerpentPillar.cs | 12 +- Scripts/Items/Misc/SpecialBeardDye.cs | 24 +- Scripts/Items/Misc/SpecialHairDye.cs | 29 +- Scripts/Items/Misc/Static.cs | 2 +- Scripts/Items/Misc/SwarmOfFlies.cs | 5 +- Scripts/Items/Misc/Teleporter.cs | 85 +- Scripts/Items/Misc/TrashBarrel.cs | 5 +- Scripts/Items/Misc/TrashChest.cs | 5 +- Scripts/Items/Misc/UnholyBone.cs | 5 +- Scripts/Items/Misc/WarningItem.cs | 24 +- Scripts/Items/Misc/Waypoint.cs | 10 +- Scripts/Items/Misc/WindChimes.cs | 7 +- Scripts/Items/Quivers/BaseQuiver.cs | 19 +- Scripts/Items/Resources/Arrows/Arrow.cs | 9 +- Scripts/Items/Resources/Arrows/Bolt.cs | 9 +- Scripts/Items/Resources/Arrows/Feather.cs | 9 +- Scripts/Items/Resources/Arrows/Shaft.cs | 9 +- .../Items/Resources/Blacksmithing/Ingots.cs | 13 +- Scripts/Items/Resources/Blacksmithing/Ore.cs | 2 +- .../Items/Resources/Blacksmithing/Scales.cs | 11 +- Scripts/Items/Resources/Fishing/BigFish.cs | 2 +- Scripts/Items/Resources/Fishing/MagicFish.cs | 9 +- Scripts/Items/Resources/Masonry/Granite.cs | 7 +- .../Items/Resources/Reagents/BaseReagent.cs | 5 +- Scripts/Items/Resources/Reagents/BatWing.cs | 4 +- .../Items/Resources/Reagents/BlackPearl.cs | 4 +- Scripts/Items/Resources/Reagents/Bloodmoss.cs | 4 +- .../Items/Resources/Reagents/DaemonBlood.cs | 4 +- .../Items/Resources/Reagents/DaemonBone.cs | 5 +- Scripts/Items/Resources/Reagents/DeadWood.cs | 4 +- .../Items/Resources/Reagents/DragonsBlood.cs | 4 +- Scripts/Items/Resources/Reagents/Garlic.cs | 4 +- Scripts/Items/Resources/Reagents/Ginseng.cs | 4 +- Scripts/Items/Resources/Reagents/GraveDust.cs | 4 +- .../Items/Resources/Reagents/MandrakeRoot.cs | 4 +- .../Items/Resources/Reagents/Nightshade.cs | 4 +- .../Items/Resources/Reagents/NoxCrystal.cs | 4 +- Scripts/Items/Resources/Reagents/PigIron.cs | 4 +- .../Items/Resources/Reagents/SpidersSilk.cs | 4 +- .../Items/Resources/Reagents/SulfurousAsh.cs | 4 +- Scripts/Items/Resources/Tailor/BoltOfCloth.cs | 4 +- Scripts/Items/Resources/Tailor/Bone.cs | 4 +- Scripts/Items/Resources/Tailor/Cloth.cs | 9 +- Scripts/Items/Resources/Tailor/Hides.cs | 6 +- Scripts/Items/Resources/Tailor/Leathers.cs | 6 +- Scripts/Items/Resources/Tailor/UncutCloth.cs | 9 +- Scripts/Items/Skill Items/Camping/Campfire.cs | 20 +- .../Skill Items/Carpenter Items/Board.cs | 4 +- .../Carpenter Items/TaxidermyKit.cs | 47 +- .../Fishing/Misc/MessageInABottle.cs | 8 +- Scripts/Items/Skill Items/Fishing/Misc/SOS.cs | 30 +- .../Fishing/Misc/ShipwreckedItem.cs | 5 +- .../Fishing/Misc/SpecialFishingNet.cs | 4 +- .../Harvest Tools/BaseHarvestTool.cs | 9 +- .../Harvest Tools/ProspectorsTool.cs | 5 +- Scripts/Items/Skill Items/Lumberjack/Log.cs | 6 +- .../Skill Items/Magical/Misc/BlankScroll.cs | 4 +- .../Items/Skill Items/Magical/Misc/Bottle.cs | 4 +- .../Skill Items/Magical/Misc/Moongate.cs | 60 +- .../Skill Items/Magical/Misc/PotionKeg.cs | 10 +- .../Skill Items/Magical/Misc/RecallRune.cs | 25 +- .../Skill Items/Magical/Potions/BasePotion.cs | 11 +- .../BaseConflagrationPotion.cs | 7 +- .../BaseConfusionBlastPotion.cs | 5 +- .../Potions/Cure Potions/BaseCurePotion.cs | 10 +- .../Explosion Potions/BaseExplosionPotion.cs | 5 +- Scripts/Items/Skill Items/Magical/Runebook.cs | 75 +- .../Magical/Scrolls/SpellScroll.cs | 12 +- .../Items/Skill Items/Magical/Spellbook.cs | 33 +- Scripts/Items/Skill Items/Misc/Bandage.cs | 15 +- .../Items/Skill Items/Misc/RecipeScroll.cs | 2 +- Scripts/Items/Skill Items/Misc/RepairDeed.cs | 8 +- .../Musical Instruments/BaseInstrument.cs | 26 +- Scripts/Items/Skill Items/Ninjitsu/EggBomb.cs | 7 +- Scripts/Items/Skill Items/Ninjitsu/Fukiya.cs | 11 +- .../Items/Skill Items/Ninjitsu/FukiyaDarts.cs | 9 +- .../Skill Items/Ninjitsu/LeatherNinjaBelt.cs | 11 +- .../Items/Skill Items/Ninjitsu/Shuriken.cs | 9 +- .../Specialized/GlassblowingBook.cs | 5 +- .../Skill Items/Specialized/MasonryBook.cs | 5 +- Scripts/Items/Skill Items/Specialized/Sand.cs | 4 +- .../Skill Items/Specialized/SandMiningBook.cs | 5 +- .../Specialized/StoneMiningBook.cs | 5 +- .../Tailor Items/Dyetubs/CustomHuePicker.cs | 14 +- .../Tailor Items/Dyetubs/DyeTub.cs | 56 +- .../Tailor Items/Dyetubs/FurnitureDyeTub.cs | 4 +- .../Tailor Items/Dyetubs/LeatherDyeTub.cs | 4 +- .../Tailor Items/Dyetubs/RewardBlackDyeTub.cs | 4 +- .../Tailor Items/Dyetubs/RunebookDyeTub.cs | 4 +- .../Tailor Items/Dyetubs/SpecialDyeTub.cs | 4 +- .../Tailor Items/Dyetubs/StatuetteDyeTub.cs | 4 +- .../Items/Skill Items/Thief/DisguiseKit.cs | 5 +- .../Skill Items/Thief/DisguisePersistance.cs | 7 +- Scripts/Items/Skill Items/Tinkering/Clocks.cs | 5 +- .../Items/Skill Items/Tools/BaseRunicTool.cs | 2 +- Scripts/Items/Skill Items/Tools/BaseTool.cs | 9 +- .../11th Year promo/EarringsOfProtection.cs | 24 +- .../Dawn's Music Box/DawnsMusicBox.cs | 9 +- .../Dawn's Music Box/DawnsMusicGear.cs | 19 +- .../Dawn's Music Box/DawnsMusicInfo.cs | 10 +- .../8th Anniversary Items/FountainOfLife.cs | 11 +- .../Blacksmithy/AncientSmithyHammer.cs | 5 +- .../Blacksmithy/GlovesOfMining.cs | 5 +- .../Blacksmithy/PowderOfTemperament.cs | 5 +- .../AwesomeDisturbingPortrait.cs | 2 +- Scripts/Items/Special/Gifts/RoseOfTrinsic.cs | 6 +- .../Items/Special/Gifts/TapestryOfSosaria.cs | 4 +- .../Items/Special/Heritage Items/Curtains.cs | 4 +- .../Special/Heritage Items/FruitTrees.cs | 2 +- .../Special/Holiday/Christmas/HolidayTree.cs | 9 +- Scripts/Items/Special/Holiday/HolidayBell.cs | 11 +- Scripts/Items/Special/Holiday/HolidayFoods.cs | 8 +- .../Items/Special/Holiday/HolidayGiftBoxes.cs | 4 +- .../Items/Special/Holiday/PKHolidayStuff.cs | 5 +- Scripts/Items/Special/Holiday/SnowGlobes.cs | 6 +- Scripts/Items/Special/Holiday/Snowman.cs | 2 +- Scripts/Items/Special/Holiday/Wreath.cs | 5 +- .../Special/House Raffle/HouseRaffleDeed.cs | 23 +- .../Special/House Raffle/HouseRaffleStone.cs | 52 +- Scripts/Items/Special/MiniHouses.cs | 8 +- Scripts/Items/Special/MonsterStatuette.cs | 24 +- .../Special/Mutation Core/PlagueBeastBlood.cs | 10 +- .../Mutation Core/PlagueBeastInnard.cs | 19 +- .../Mutation Core/PlagueBeastMutationCore.cs | 4 +- .../Mutation Core/PlagueBeastOrgans.cs | 18 +- .../Special/Mutation Core/PlagueBeastVein.cs | 5 +- .../Rares/Containers/BaseWaterContainer.cs | 9 +- .../Items/Special/Solen Items/BagOfSending.cs | 12 +- .../Special/Solen Items/BallOfSummoning.cs | 20 +- .../Special/Solen Items/BraceletOfBinding.cs | 14 +- .../Items/Special/Solen Items/ZoogiFungus.cs | 4 +- Scripts/Items/Special/SoulStone.cs | 33 +- .../Special/Special Scrolls/SpecialScroll.cs | 14 +- .../Special/Valentines/2007/ValentinesCard.cs | 8 +- .../Veteran Rewards/AnkhOfSacrifice.cs | 4 +- .../Items/Special/Veteran Rewards/Banner.cs | 9 +- .../Veteran Rewards/BloodyPentagram.cs | 4 +- .../Items/Special/Veteran Rewards/Brazier.cs | 4 +- .../Items/Special/Veteran Rewards/Cannon.cs | 13 +- .../Veteran Rewards/CommodityDeedBox.cs | 2 +- .../Veteran Rewards/ContestMiniHouse.cs | 4 +- .../Veteran Rewards/DecorativeShield.cs | 4 +- .../Special/Veteran Rewards/FlamingHead.cs | 4 +- .../Veteran Rewards/HangingSkeleton.cs | 4 +- .../Special/Veteran Rewards/MiningCart.cs | 27 +- .../Special/Veteran Rewards/MinotaurStatue.cs | 4 +- .../Special/Veteran Rewards/PottedCactus.cs | 4 +- .../Special/Veteran Rewards/StoneAnkh.cs | 4 +- .../Special/Veteran Rewards/TreeStump.cs | 8 +- .../Special/Veteran Rewards/WallBanner.cs | 6 +- .../Veteran Rewards/WeaponEngravingTool.cs | 6 +- Scripts/Items/Suits/BaseSuit.cs | 4 +- Scripts/Items/Talismans/BaseTalisman.cs | 30 +- Scripts/Items/Talismans/TalismanAttribute.cs | 22 +- Scripts/Items/Traps/BaseTrap.cs | 8 +- Scripts/Items/Traps/FireColumnTrap.cs | 12 +- Scripts/Items/Traps/GasTrap.cs | 9 +- Scripts/Items/Traps/SawTrap.cs | 5 +- Scripts/Items/Traps/SpikeTrap.cs | 2 +- Scripts/Items/Traps/StoneFaceTrap.cs | 2 +- .../TreasureChests/TreasureChestLevel1.cs | 5 +- .../TreasureChests/TreasureChestLevel2.cs | 5 +- .../TreasureChests/TreasureChestLevel3.cs | 5 +- .../TreasureChests/TreasureChestLevel4.cs | 5 +- Scripts/Items/Wands/BaseWand.cs | 6 +- .../Items/Weapons/Abilities/WeaponAbility.cs | 12 +- Scripts/Items/Weapons/Axes/BaseAxe.cs | 6 +- Scripts/Items/Weapons/BaseWeapon.cs | 178 ++- .../Items/Weapons/Knives/ThrowingDagger.cs | 5 +- Scripts/Items/Weapons/Maces/FireworksWand.cs | 2 +- Scripts/Items/Weapons/PoleArms/BasePoleArm.cs | 6 +- Scripts/Items/Weapons/Ranged/BaseRanged.cs | 4 +- Scripts/Items/Weapons/Ranged/JukaBow.cs | 5 +- Scripts/Items/Weapons/SlayerEntry.cs | 8 +- Scripts/Items/Weapons/SlayerGroup.cs | 26 +- .../Weapons/SpearsAndForks/TribalSpear.cs | 5 +- Scripts/Misc/AOS.cs | 298 ++-- Scripts/Misc/AutoRestart.cs | 5 +- Scripts/Misc/AutoSave.cs | 4 +- Scripts/Misc/ClientVerification.cs | 50 +- Scripts/Misc/Emitter.cs | 20 +- Scripts/Misc/Geometry.cs | 8 +- .../Winter2004/LightOfTheWinterSolstice.cs | 4 +- Scripts/Misc/Gifts/Winter2004/Mistletoe.cs | 5 +- Scripts/Misc/Guild.cs | 257 +--- Scripts/Misc/HardwareInfo.cs | 52 +- Scripts/Misc/InhumanSpeech.cs | 22 +- Scripts/Misc/LanguageStatistics.cs | 14 +- Scripts/Misc/LightCycle.cs | 2 +- Scripts/Misc/Loot.cs | 89 +- Scripts/Misc/LootPack.cs | 59 +- Scripts/Misc/NameList.cs | 4 +- Scripts/Misc/Poison.cs | 4 +- Scripts/Misc/ProfanityProtection.cs | 6 +- Scripts/Misc/ResourceInfo.cs | 128 +- Scripts/Misc/ShardPoller.cs | 40 +- Scripts/Misc/TextDefinition.cs | 2 +- Scripts/Misc/ToggleItem.cs | 12 +- Scripts/Misc/Weather.cs | 39 +- Scripts/Misc/WeightOverloading.cs | 4 +- Scripts/Mobiles/AI/AIControlMobileTarget.cs | 6 +- Scripts/Mobiles/AI/BaseAI.cs | 11 +- Scripts/Mobiles/AI/MageAI.cs | 10 +- Scripts/Mobiles/AI/OppositionGroup.cs | 17 +- Scripts/Mobiles/AI/SpeedInfo.cs | 12 +- Scripts/Mobiles/Animals/Cows/Cow.cs | 8 +- Scripts/Mobiles/Animals/Misc/Sheep.cs | 2 +- Scripts/Mobiles/Animals/Mounts/BaseMount.cs | 33 +- Scripts/Mobiles/Animals/Mounts/Beetle.cs | 2 +- Scripts/Mobiles/Animals/Mounts/Ethereals.cs | 42 +- Scripts/Mobiles/Animals/Mounts/Kirin.cs | 5 +- Scripts/Mobiles/Animals/Mounts/SwampDragon.cs | 15 +- Scripts/Mobiles/Animals/Mounts/Unicorn.cs | 5 +- Scripts/Mobiles/BaseCreature.cs | 671 ++++----- Scripts/Mobiles/Guards/ArcherGuard.cs | 5 +- Scripts/Mobiles/Guards/WarriorGuard.cs | 5 +- Scripts/Mobiles/Healers/BaseHealer.cs | 4 +- Scripts/Mobiles/Healers/PricedHealer.cs | 4 +- Scripts/Mobiles/Monsters/AOS/ShadowKnight.cs | 5 +- Scripts/Mobiles/Monsters/AOS/Treefellow.cs | 5 +- .../Mobiles/Monsters/Ants/BlackSolenQueen.cs | 2 +- .../Monsters/Ants/BlackSolenWarrior.cs | 2 +- .../Mobiles/Monsters/Ants/RedSolenQueen.cs | 2 +- .../Mobiles/Monsters/Ants/RedSolenWarrior.cs | 2 +- .../Arachnid/Magic/TerathanAvenger.cs | 5 +- .../Arachnid/Magic/TerathanMatriarch.cs | 5 +- .../Monsters/Arachnid/Melee/TerathanDrone.cs | 5 +- .../Arachnid/Melee/TerathanWarrior.cs | 5 +- .../Monsters/Humanoid/Magic/AncientLich.cs | 5 +- .../Mobiles/Monsters/Humanoid/Magic/Bogle.cs | 5 +- .../Monsters/Humanoid/Magic/BoneMagi.cs | 5 +- .../Mobiles/Monsters/Humanoid/Magic/Lich.cs | 5 +- .../Monsters/Humanoid/Magic/LichLord.cs | 5 +- .../Monsters/Humanoid/Magic/OrcishMage.cs | 5 +- .../Monsters/Humanoid/Magic/SavageShaman.cs | 5 +- .../Mobiles/Monsters/Humanoid/Magic/Shade.cs | 5 +- .../Monsters/Humanoid/Magic/SkeletalMage.cs | 5 +- .../Monsters/Humanoid/Magic/Spectre.cs | 5 +- .../Mobiles/Monsters/Humanoid/Magic/Wraith.cs | 5 +- .../Monsters/Humanoid/Melee/BoneKnight.cs | 5 +- .../Mobiles/Monsters/Humanoid/Melee/Ghoul.cs | 5 +- .../Mobiles/Monsters/Humanoid/Melee/Mummy.cs | 5 +- .../Mobiles/Monsters/Humanoid/Melee/Orc.cs | 5 +- .../Monsters/Humanoid/Melee/OrcBomber.cs | 5 +- .../Monsters/Humanoid/Melee/OrcBrute.cs | 5 +- .../Monsters/Humanoid/Melee/OrcCaptain.cs | 5 +- .../Monsters/Humanoid/Melee/OrcishLord.cs | 5 +- .../Monsters/Humanoid/Melee/RottingCorpse.cs | 5 +- .../Mobiles/Monsters/Humanoid/Melee/Savage.cs | 5 +- .../Monsters/Humanoid/Melee/SavageRider.cs | 5 +- .../Monsters/Humanoid/Melee/SkeletalKnight.cs | 5 +- .../Monsters/Humanoid/Melee/Skeleton.cs | 5 +- .../Mobiles/Monsters/Humanoid/Melee/Zombie.cs | 5 +- .../Monsters/LBR/Exodus/ExodusMinion.cs | 5 +- .../Monsters/LBR/Exodus/ExodusOverseer.cs | 5 +- .../Monsters/ML/Humanoid/Magic/MLDryad.cs | 5 +- .../Monsters/ML/Humanoid/Magic/Satyr.cs | 5 +- .../ML/Humanoid/Melee/FerelTreefellow.cs | 5 +- .../Mobiles/Monsters/ML/Special/Ilhenir.cs | 4 +- Scripts/Mobiles/Monsters/ML/Special/Twaulo.cs | 5 +- .../Monsters/ML/Twisted Weald/Changeling.cs | 2 +- .../Mobiles/Monsters/Misc/Magic/DarkWisp.cs | 5 +- .../Monsters/Misc/Magic/EtherealWarrior.cs | 5 +- Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs | 5 +- .../Mobiles/Monsters/Misc/Magic/ShadowWisp.cs | 5 +- Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs | 5 +- .../Mobiles/Monsters/Misc/Melee/Centaur.cs | 5 +- .../Monsters/Misc/Melee/PlagueBeast.cs | 13 +- .../Monsters/Misc/Melee/PlagueBeastLord.cs | 14 +- .../Monsters/Misc/Melee/PlagueSpawn.cs | 8 +- .../Ore Elementals/AgapiteElemental.cs | 2 +- .../Monsters/Reptile/Magic/Leviathan.cs | 4 +- .../Reptile/Magic/OphidianArchmage.cs | 5 +- .../Monsters/Reptile/Magic/OphidianMage.cs | 5 +- .../Reptile/Magic/OphidianMatriarch.cs | 5 +- .../Monsters/Reptile/Melee/OphidianKnight.cs | 5 +- .../Monsters/Reptile/Melee/OphidianWarrior.cs | 5 +- Scripts/Mobiles/Monsters/SE/BakeKitsune.cs | 2 +- Scripts/Mobiles/Monsters/SE/FireBeetle.cs | 2 +- Scripts/Mobiles/PlayerMobile.cs | 414 +++--- Scripts/Mobiles/Special/Barracoon.cs | 9 +- Scripts/Mobiles/Special/BaseChampion.cs | 2 +- Scripts/Mobiles/Special/DarkGuardian.cs | 5 +- Scripts/Mobiles/Special/Harrower.cs | 16 +- Scripts/Mobiles/Special/HarrowerTentacles.cs | 10 +- Scripts/Mobiles/Special/LordOaks.cs | 26 +- Scripts/Mobiles/Special/Neira.cs | 12 +- Scripts/Mobiles/Special/Rikktor.cs | 17 +- Scripts/Mobiles/Special/Serado.cs | 11 +- Scripts/Mobiles/Special/Silvani.cs | 5 +- Scripts/Mobiles/Townfolk/Banker.cs | 2 +- Scripts/Mobiles/Townfolk/BaseEscortable.cs | 22 +- Scripts/Mobiles/Townfolk/TownCrier.cs | 23 +- Scripts/Mobiles/Vendors/AnimalBuy.cs | 8 +- Scripts/Mobiles/Vendors/BaseVendor.cs | 29 +- Scripts/Mobiles/Vendors/GenericBuy.cs | 39 +- Scripts/Mobiles/Vendors/NPC/Alchemist.cs | 7 +- Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Architect.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Armorer.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Baker.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Bard.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Barkeeper.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Beekeeper.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Blacksmith.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Bowyer.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Butcher.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Carpenter.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Cobbler.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Cook.cs | 7 +- .../Mobiles/Vendors/NPC/CustomHairstylist.cs | 31 +- Scripts/Mobiles/Vendors/NPC/Farmer.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Fisherman.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Furtrader.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Glassblower.cs | 2 +- Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs | 2 +- .../NPC/Guildmasters/BaseGuildmaster.cs | 12 +- .../NPC/Guildmasters/BlacksmithGuildmaster.cs | 5 +- .../NPC/Guildmasters/HealerGuildmaster.cs | 5 +- .../NPC/Guildmasters/MageGuildmaster.cs | 5 +- .../Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs | 5 +- Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs | 2 +- Scripts/Mobiles/Vendors/NPC/HairStylist.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Herbalist.cs | 7 +- Scripts/Mobiles/Vendors/NPC/HolyMage.cs | 2 +- Scripts/Mobiles/Vendors/NPC/InnKeeper.cs | 7 +- Scripts/Mobiles/Vendors/NPC/IronWorker.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Jeweler.cs | 2 +- .../Mobiles/Vendors/NPC/KeeperOfChivalry.cs | 2 +- Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Mage.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Mapmaker.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Miller.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Miner.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Monk.cs | 4 +- Scripts/Mobiles/Vendors/NPC/Provisioner.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Rancher.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Ranger.cs | 2 +- .../Mobiles/Vendors/NPC/RealEstateBroker.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Scribe.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Shipwright.cs | 2 +- Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Tailor.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Tanner.cs | 2 +- Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Thief.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Tinker.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Vagabond.cs | 2 +- Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Veterinarian.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Waiter.cs | 2 +- Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs | 7 +- Scripts/Mobiles/Vendors/NPC/Weaver.cs | 7 +- Scripts/Mobiles/Vendors/PlayerBarkeeper.cs | 22 +- Scripts/Mobiles/Vendors/PlayerVendor.cs | 41 +- Scripts/Mobiles/Vendors/RentedVendor.cs | 39 +- Scripts/Mobiles/Vendors/VendorInventory.cs | 30 +- Scripts/Multis/BaseHouse.cs | 179 ++- Scripts/Multis/Boats/BaseBoat.cs | 85 +- Scripts/Multis/Boats/BaseBoatDeed.cs | 8 +- Scripts/Multis/Boats/BaseDockedBoat.cs | 11 +- Scripts/Multis/Boats/Hold.cs | 5 +- Scripts/Multis/Boats/Plank.cs | 20 +- Scripts/Multis/Camps/BaseCamp.cs | 7 +- Scripts/Multis/Camps/BrigandCamp.cs | 6 +- Scripts/Multis/Camps/LizardmenCamp.cs | 4 +- Scripts/Multis/Camps/OrcCamp.cs | 2 +- Scripts/Multis/Camps/RatCamp.cs | 2 +- Scripts/Multis/ComponentVerification.cs | 8 +- Scripts/Multis/Deeds.cs | 20 +- Scripts/Multis/DynamicDecay.cs | 10 +- Scripts/Multis/HouseFoundation.cs | 34 +- Scripts/Multis/HousePlacementTool.cs | 28 +- Scripts/Multis/HouseSign.cs | 23 +- Scripts/Multis/HouseTeleporter.cs | 8 +- Scripts/Multis/MovingCrate.cs | 14 +- Scripts/Regions/BaseRegion.cs | 18 +- Scripts/Regions/DungeonRegion.cs | 8 +- Scripts/Regions/GuardedRegion.cs | 6 +- Scripts/Regions/HouseRegion.cs | 8 +- Scripts/Regions/NoHousingRegion.cs | 2 +- Scripts/Regions/Spawning/SpawnDefinition.cs | 16 +- Scripts/Regions/Spawning/SpawnEntry.cs | 36 +- Scripts/Regions/Spawning/SpawnPersistence.cs | 7 +- Scripts/Skills/AnimalTaming.cs | 4 +- Scripts/Skills/Hiding.cs | 4 +- Scripts/Skills/Stealing.cs | 10 +- Scripts/Skills/Stealth.cs | 2 +- Scripts/SpecialSystems/Engines/GiftGiving.cs | 2 +- Scripts/SpecialSystems/Engines/TestCenter.cs | 2 +- .../Items/Resurrection/ResGate.cs | 5 +- .../Items/Stones/AlchemyStone.cs | 5 +- .../Items/Stones/GamblingStone.cs | 10 +- .../SpecialSystems/Items/Stones/IngotStone.cs | 5 +- .../SpecialSystems/Items/Stones/RegStone.cs | 5 +- .../Items/Stones/ScribeStone.cs | 5 +- .../SpecialSystems/Items/Stones/SmithStone.cs | 5 +- .../Items/Stones/TailorStone.cs | 5 +- .../Items/SupplyBags/AlchemyBag.cs | 5 +- .../Items/SupplyBags/ScribeBag.cs | 5 +- .../Items/SupplyBags/TailorBag.cs | 5 +- Scripts/Spells/Base/MagerySpell.cs | 8 +- Scripts/Spells/Base/SpecialMove.cs | 18 +- Scripts/Spells/Base/Spell.cs | 50 +- Scripts/Spells/Base/SpellHelper.cs | 4 +- Scripts/Spells/Base/SpellInfo.cs | 32 +- Scripts/Spells/First/CreateFood.cs | 8 +- .../Gargoyle/SpellDefinitions/FlySpell.cs | 38 +- Scripts/Spells/Necromancy/SummonFamiliar.cs | 12 +- .../Spells/Necromancy/TransformationSpell.cs | 14 +- Scripts/Spells/Ninjitsu/AnimalForm.cs | 2 +- Scripts/Spells/Ninjitsu/MirrorImage.cs | 2 +- Scripts/Spells/Reagent.cs | 73 +- Scripts/Spells/Spellweaving/ArcaneForm.cs | 5 +- Scripts/Spells/Spellweaving/ArcanistSpell.cs | 5 +- Scripts/Spells/Spellweaving/GiftOfLife.cs | 2 +- .../Spells/Spellweaving/Items/ArcaneFocus.cs | 4 +- .../Spellweaving/Items/TransientItem.cs | 8 +- Scripts/Spells/Spellweaving/ReaperForm.cs | 4 +- Server/AggressorInfo.cs | 4 +- Server/Attributes.cs | 48 +- Server/BaseVendor.cs | 112 +- Server/Body.cs | 176 +-- Server/ClientVersion.cs | 48 +- Server/Commands.cs | 86 +- Server/ContextMenus/ContextMenu.cs | 15 +- Server/ContextMenus/ContextMenuEntry.cs | 29 +- Server/Diagnostics/BaseProfile.cs | 30 +- Server/Diagnostics/GumpProfile.cs | 6 +- Server/Diagnostics/PacketProfile.cs | 24 +- Server/Diagnostics/TargetProfile.cs | 6 +- Server/Diagnostics/TimerProfile.cs | 30 +- Server/Effects.cs | 4 +- Server/EventSink.cs | 240 ++-- Server/ExpansionInfo.cs | 2 +- Server/Geometry.cs | 154 +- Server/Guild.cs | 18 +- Server/Gumps/Gump.cs | 48 +- Server/Gumps/GumpAlphaRegion.cs | 40 +- Server/Gumps/GumpBackground.cs | 50 +- Server/Gumps/GumpButton.cs | 65 +- Server/Gumps/GumpCheck.cs | 60 +- Server/Gumps/GumpEntry.cs | 5 +- Server/Gumps/GumpGroup.cs | 10 +- Server/Gumps/GumpHtml.cs | 70 +- Server/Gumps/GumpHtmlLocalized.cs | 95 +- Server/Gumps/GumpImage.cs | 40 +- Server/Gumps/GumpImageTileButton.cs | 115 +- Server/Gumps/GumpImageTiled.cs | 50 +- Server/Gumps/GumpItem.cs | 40 +- Server/Gumps/GumpItemProperty.cs | 10 +- Server/Gumps/GumpLabel.cs | 40 +- Server/Gumps/GumpLabelCropped.cs | 60 +- Server/Gumps/GumpPage.cs | 10 +- Server/Gumps/GumpRadio.cs | 60 +- Server/Gumps/GumpTextEntry.cs | 70 +- Server/Gumps/GumpTextEntryLimited.cs | 64 +- Server/Gumps/GumpTooltip.cs | 10 +- Server/Gumps/RelayInfo.cs | 40 +- Server/HuePicker.cs | 16 +- Server/IEntity.cs | 42 +- Server/Insensitive.cs | 5 +- Server/Item.cs | 230 +-- Server/ItemBounds.cs | 8 +- Server/Items/BaseMulti.cs | 17 +- Server/Items/Container.cs | 69 +- Server/Items/Containers.cs | 33 +- Server/Items/SecureTradeContainer.cs | 8 +- Server/Items/VirtualCheck.cs | 4 +- Server/Items/VirtualHair.cs | 8 +- Server/KeywordList.cs | 8 +- Server/Main.cs | 115 +- Server/Map.cs | 27 +- Server/Menus/ItemListMenu.cs | 58 +- Server/Menus/QuestionMenu.cs | 34 +- Server/Mobile.cs | 1254 +++++------------ Server/Movement.cs | 4 +- Server/MultiData.cs | 18 +- Server/Network/BufferPool.cs | 4 +- Server/Network/ByteQueue.cs | 2 +- Server/Network/Compression.cs | 24 +- Server/Network/EncodedPacketHandler.cs | 24 +- Server/Network/EncodedReader.cs | 8 +- Server/Network/Listener.cs | 4 +- Server/Network/MessagePump.cs | 4 +- Server/Network/NetState.cs | 246 +--- Server/Network/PacketHandler.cs | 36 +- Server/Network/PacketHandlers.cs | 17 +- Server/Network/PacketReader.cs | 16 +- Server/Network/PacketWriter.cs | 26 +- Server/Network/Packets.cs | 212 +-- Server/Network/SendQueue.cs | 40 +- Server/Notoriety.cs | 8 +- Server/ObjectPropertyList.cs | 16 +- Server/Party.cs | 4 +- Server/Persistence/BinaryMemoryWriter.cs | 4 +- Server/Persistence/FileOperations.cs | 36 +- Server/Persistence/FileQueue.cs | 24 +- Server/Persistence/QueuedMemoryWriter.cs | 5 +- Server/Persistence/SequentialFileWriter.cs | 8 +- Server/Persistence/StandardSaveStrategy.cs | 6 +- Server/Point3DList.cs | 21 +- Server/Poison.cs | 20 +- Server/Prompt.cs | 8 +- Server/QuestArrow.cs | 24 +- Server/Race.cs | 58 +- Server/Region.cs | 46 +- Server/ScriptCompiler.cs | 16 +- Server/Sector.cs | 28 +- Server/SecureTrade.cs | 14 +- Server/Serial.cs | 36 +- Server/Serialization.cs | 39 +- Server/Skills.cs | 412 +++--- Server/Targeting/LandTarget.cs | 56 +- Server/Targeting/MultiTarget.cs | 20 +- Server/Targeting/StaticTarget.cs | 56 +- Server/Targeting/Target.cs | 74 +- Server/TileData.cs | 58 +- Server/TileList.cs | 8 +- Server/TileMatrix.cs | 104 +- Server/TileMatrixPatch.cs | 10 +- Server/Timer.cs | 36 +- Server/VirtueInfo.cs | 40 +- Server/World.cs | 108 +- 957 files changed, 7424 insertions(+), 15973 deletions(-) diff --git a/Scripts/Accounting/Account.cs b/Scripts/Accounting/Account.cs index f694f2648..189dd3ba4 100644 --- a/Scripts/Accounting/Account.cs +++ b/Scripts/Accounting/Account.cs @@ -65,8 +65,8 @@ namespace Server.Accounting /// public HardwareInfo HardwareInfo { - get { return m_HardwareInfo; } - set { m_HardwareInfo = value; } + get => m_HardwareInfo; + set => m_HardwareInfo = value; } /// @@ -74,8 +74,8 @@ namespace Server.Accounting /// public string[] IPRestrictions { - get { return m_IPRestrictions; } - set { m_IPRestrictions = value; } + get => m_IPRestrictions; + set => m_IPRestrictions = value; } /// @@ -83,8 +83,8 @@ namespace Server.Accounting /// public IPAddress[] LoginIPs { - get { return m_LoginIPs; } - set { m_LoginIPs = value; } + get => m_LoginIPs; + set => m_LoginIPs = value; } /// @@ -108,8 +108,8 @@ namespace Server.Accounting /// public string Username { - get { return m_Username; } - set { m_Username = value; } + get => m_Username; + set => m_Username = value; } /// @@ -117,8 +117,8 @@ namespace Server.Accounting /// public string Email { - get { return m_Email; } - set { m_Email = value; } + get => m_Email; + set => m_Email = value; } /// @@ -126,8 +126,8 @@ namespace Server.Accounting /// public string PlainPassword { - get { return m_PlainPassword; } - set { m_PlainPassword = value; } + get => m_PlainPassword; + set => m_PlainPassword = value; } /// @@ -135,8 +135,8 @@ namespace Server.Accounting /// public string CryptPassword { - get { return m_CryptPassword; } - set { m_CryptPassword = value; } + get => m_CryptPassword; + set => m_CryptPassword = value; } /// @@ -144,8 +144,8 @@ namespace Server.Accounting /// public string NewCryptPassword { - get { return m_NewCryptPassword; } - set { m_NewCryptPassword = value; } + get => m_NewCryptPassword; + set => m_NewCryptPassword = value; } /// @@ -153,8 +153,8 @@ namespace Server.Accounting /// public AccessLevel AccessLevel { - get { return m_AccessLevel; } - set { m_AccessLevel = value; } + get => m_AccessLevel; + set => m_AccessLevel = value; } /// @@ -162,8 +162,8 @@ namespace Server.Accounting /// public int Flags { - get { return m_Flags; } - set { m_Flags = value; } + get => m_Flags; + set => m_Flags = value; } /// @@ -193,7 +193,7 @@ namespace Server.Accounting return true; } - set { SetFlag( 0, value ); } + set => SetFlag( 0, value ); } /// @@ -201,7 +201,7 @@ namespace Server.Accounting /// public bool Young { - get { return !GetFlag( 1 ); } + get => !GetFlag( 1 ); set { SetFlag( 1, !value ); @@ -217,18 +217,15 @@ namespace Server.Accounting /// /// The date and time of when this account was created. /// - public DateTime Created - { - get { return m_Created; } - } + public DateTime Created => m_Created; /// /// Gets or sets the date and time when this account was last accessed. /// public DateTime LastLogin { - get { return m_LastLogin; } - set { m_LastLogin = value; } + get => m_LastLogin; + set => m_LastLogin = value; } /// @@ -1127,18 +1124,12 @@ namespace Server.Accounting /// /// Gets the maximum amount of characters allowed to be created on this account. Values other than 1, 5, 6, or 7 are not supported by the client. /// - public int Limit - { - get { return ( Core.SA ? 7 : Core.AOS ? 6 : 5 ); } - } + public int Limit => ( Core.SA ? 7 : Core.AOS ? 6 : 5 ); /// /// Gets the maximum amount of characters that this account can hold. /// - public int Length - { - get { return m_Mobiles.Length; } - } + public int Length => m_Mobiles.Length; /// /// Gets or sets the character at a specified index for this account. Out of bound index values are handled; null returned for get, ignored for set. diff --git a/Scripts/Accounting/AccountAttackLimiter.cs b/Scripts/Accounting/AccountAttackLimiter.cs index f1ef1803b..43924eff0 100644 --- a/Scripts/Accounting/AccountAttackLimiter.cs +++ b/Scripts/Accounting/AccountAttackLimiter.cs @@ -110,25 +110,22 @@ namespace Server.Accounting public IPAddress Address { - get{ return m_Address; } - set{ m_Address = value; } + get => m_Address; + set => m_Address = value; } public DateTime LastAccessTime { - get{ return m_LastAccessTime; } - set{ m_LastAccessTime = value; } + get => m_LastAccessTime; + set => m_LastAccessTime = value; } - public bool HasExpired - { - get{ return ( DateTime.UtcNow >= ( m_LastAccessTime + TimeSpan.FromHours( 1.0 ) ) ); } - } + public bool HasExpired => ( DateTime.UtcNow >= ( m_LastAccessTime + TimeSpan.FromHours( 1.0 ) ) ); public int Counts { - get{ return m_Counts; } - set{ m_Counts = value; } + get => m_Counts; + set => m_Counts = value; } public void RefreshAccessTime() diff --git a/Scripts/Accounting/AccountComment.cs b/Scripts/Accounting/AccountComment.cs index 3571ef3b8..c9cc78123 100644 --- a/Scripts/Accounting/AccountComment.cs +++ b/Scripts/Accounting/AccountComment.cs @@ -12,27 +12,21 @@ namespace Server.Accounting /// /// A string representing who added this comment. /// - public string AddedBy - { - get{ return m_AddedBy; } - } + public string AddedBy => m_AddedBy; /// /// Gets or sets the body of this comment. Setting this value will reset LastModified. /// public string Content { - get{ return m_Content; } + get => m_Content; set{ m_Content = value; m_LastModified = DateTime.UtcNow; } } /// /// The date and time when this account was last modified -or- the comment creation time, if never modified. /// - public DateTime LastModified - { - get{ return m_LastModified; } - } + public DateTime LastModified => m_LastModified; /// /// Constructs a new AccountComment instance. diff --git a/Scripts/Accounting/AccountHandler.cs b/Scripts/Accounting/AccountHandler.cs index 093d380db..97f6dc28f 100644 --- a/Scripts/Accounting/AccountHandler.cs +++ b/Scripts/Accounting/AccountHandler.cs @@ -30,8 +30,8 @@ namespace Server.Misc public static AccessLevel LockdownLevel { - get{ return m_LockdownLevel; } - set{ m_LockdownLevel = value; } + get => m_LockdownLevel; + set => m_LockdownLevel = value; } private static CityInfo[] StartingCities = new CityInfo[] diff --git a/Scripts/Accounting/AccountTag.cs b/Scripts/Accounting/AccountTag.cs index 7aa979f52..a5760e074 100644 --- a/Scripts/Accounting/AccountTag.cs +++ b/Scripts/Accounting/AccountTag.cs @@ -11,8 +11,8 @@ namespace Server.Accounting /// public string Name { - get{ return m_Name; } - set{ m_Name = value; } + get => m_Name; + set => m_Name = value; } /// @@ -20,8 +20,8 @@ namespace Server.Accounting /// public string Value { - get{ return m_Value; } - set{ m_Value = value; } + get => m_Value; + set => m_Value = value; } /// diff --git a/Scripts/Accounting/Firewall.cs b/Scripts/Accounting/Firewall.cs index 09f5b48a7..ff37321c9 100644 --- a/Scripts/Accounting/Firewall.cs +++ b/Scripts/Accounting/Firewall.cs @@ -184,13 +184,7 @@ namespace Server } } - public static List List - { - get - { - return m_Blocked; - } - } + public static List List => m_Blocked; public static IFirewallEntry ToFirewallEntry( object entry ) { diff --git a/Scripts/Commands/Attributes.cs b/Scripts/Commands/Attributes.cs index 7891dde1f..6d05aca85 100644 --- a/Scripts/Commands/Attributes.cs +++ b/Scripts/Commands/Attributes.cs @@ -6,7 +6,7 @@ namespace Server { private string m_Usage; - public string Usage{ get{ return m_Usage; } } + public string Usage => m_Usage; public UsageAttribute( string usage ) { @@ -18,7 +18,7 @@ namespace Server { private string m_Description; - public string Description{ get{ return m_Description; } } + public string Description => m_Description; public DescriptionAttribute( string description ) { @@ -30,7 +30,7 @@ namespace Server { private string[] m_Aliases; - public string[] Aliases{ get{ return m_Aliases; } } + public string[] Aliases => m_Aliases; public AliasesAttribute( params string[] aliases ) { diff --git a/Scripts/Commands/Batch.cs b/Scripts/Commands/Batch.cs index 2c3752076..5fa9ff596 100644 --- a/Scripts/Commands/Batch.cs +++ b/Scripts/Commands/Batch.cs @@ -15,20 +15,17 @@ namespace Server.Commands public BaseCommandImplementor Scope { - get{ return m_Scope; } - set{ m_Scope = value; } + get => m_Scope; + set => m_Scope = value; } public string Condition { - get{ return m_Condition; } - set{ m_Condition = value; } + get => m_Condition; + set => m_Condition = value; } - public ArrayList BatchCommands - { - get{ return m_BatchCommands; } - } + public ArrayList BatchCommands => m_BatchCommands; public Batch() { @@ -200,14 +197,14 @@ namespace Server.Commands public string Command { - get{ return m_Command; } - set{ m_Command = value; } + get => m_Command; + set => m_Command = value; } public string Object { - get{ return m_Object; } - set{ m_Object = value; } + get => m_Object; + set => m_Object = value; } public void GetDetails( out string command, out string argString, out string[] args ) diff --git a/Scripts/Commands/Decorate.cs b/Scripts/Commands/Decorate.cs index c9cd1152c..589ecb5c0 100644 --- a/Scripts/Commands/Decorate.cs +++ b/Scripts/Commands/Decorate.cs @@ -1109,8 +1109,8 @@ namespace Server.Commands private Point3D m_Location; private string m_Extra; - public Point3D Location{ get{ return m_Location; } } - public string Extra{ get{ return m_Extra; } } + public Point3D Location => m_Location; + public string Extra => m_Extra; public DecorationEntry( string line ) { diff --git a/Scripts/Commands/DecorateMag.cs b/Scripts/Commands/DecorateMag.cs index 688624062..ba7c8d0fa 100644 --- a/Scripts/Commands/DecorateMag.cs +++ b/Scripts/Commands/DecorateMag.cs @@ -1106,8 +1106,8 @@ namespace Server.Commands private Point3D m_Location; private string m_Extra; - public Point3D Location{ get{ return m_Location; } } - public string Extra{ get{ return m_Extra; } } + public Point3D Location => m_Location; + public string Extra => m_Extra; public DecorationEntryMag( string line ) { diff --git a/Scripts/Commands/GenCategorization.cs b/Scripts/Commands/GenCategorization.cs index a1d18faa0..7740f03d7 100644 --- a/Scripts/Commands/GenCategorization.cs +++ b/Scripts/Commands/GenCategorization.cs @@ -272,8 +272,8 @@ namespace Server.Commands private Type m_Type; private object m_Object; - public Type Type{ get{ return m_Type; } } - public object Object{ get{ return m_Object; } } + public Type Type => m_Type; + public object Object => m_Object; public CategoryTypeEntry( Type type ) { @@ -290,11 +290,11 @@ namespace Server.Commands private CategoryEntry m_Parent; private ArrayList m_Matched; - public string Title{ get{ return m_Title; } } - public Type[] Matches{ get{ return m_Matches; } } - public CategoryEntry Parent{ get{ return m_Parent; } } - public CategoryEntry[] SubCategories{ get{ return m_SubCategories; } } - public ArrayList Matched{ get{ return m_Matched; } } + public string Title => m_Title; + public Type[] Matches => m_Matches; + public CategoryEntry Parent => m_Parent; + public CategoryEntry[] SubCategories => m_SubCategories; + public ArrayList Matched => m_Matched; public CategoryEntry() { @@ -378,8 +378,8 @@ namespace Server.Commands private int m_Indentation; private string m_Text; - public int Indentation{ get{ return m_Indentation; } } - public string Text{ get{ return m_Text; } } + public int Indentation => m_Indentation; + public string Text => m_Text; public CategoryLine( string input ) { diff --git a/Scripts/Commands/Generic/Commands/BaseCommand.cs b/Scripts/Commands/Generic/Commands/BaseCommand.cs index 2897bf520..e8a11d839 100644 --- a/Scripts/Commands/Generic/Commands/BaseCommand.cs +++ b/Scripts/Commands/Generic/Commands/BaseCommand.cs @@ -24,44 +24,44 @@ namespace Server.Commands.Generic public bool ListOptimized { - get{ return m_ListOptimized; } - set{ m_ListOptimized = value; } + get => m_ListOptimized; + set => m_ListOptimized = value; } public string[] Commands { - get{ return m_Commands; } - set{ m_Commands = value; } + get => m_Commands; + set => m_Commands = value; } public string Usage { - get{ return m_Usage; } - set{ m_Usage = value; } + get => m_Usage; + set => m_Usage = value; } public string Description { - get{ return m_Description; } - set{ m_Description = value; } + get => m_Description; + set => m_Description = value; } public AccessLevel AccessLevel { - get{ return m_AccessLevel; } - set{ m_AccessLevel = value; } + get => m_AccessLevel; + set => m_AccessLevel = value; } public ObjectTypes ObjectTypes { - get{ return m_ObjectTypes; } - set{ m_ObjectTypes = value; } + get => m_ObjectTypes; + set => m_ObjectTypes = value; } public CommandSupport Supports { - get{ return m_Implementors; } - set{ m_Implementors = value; } + get => m_Implementors; + set => m_Implementors = value; } public BaseCommand() diff --git a/Scripts/Commands/Generic/Commands/Commands.cs b/Scripts/Commands/Generic/Commands/Commands.cs index ecc694d1f..445aaa7fb 100644 --- a/Scripts/Commands/Generic/Commands/Commands.cs +++ b/Scripts/Commands/Generic/Commands/Commands.cs @@ -60,7 +60,7 @@ namespace Server.Commands.Generic private static List m_AllCommands = new List(); - public static List AllCommands{ get{ return m_AllCommands; } } + public static List AllCommands => m_AllCommands; public static void Register( BaseCommand command ) { diff --git a/Scripts/Commands/Generic/Extensions/BaseExtension.cs b/Scripts/Commands/Generic/Extensions/BaseExtension.cs index 37384b5ae..72de1da0b 100644 --- a/Scripts/Commands/Generic/Extensions/BaseExtension.cs +++ b/Scripts/Commands/Generic/Extensions/BaseExtension.cs @@ -10,10 +10,7 @@ namespace Server.Commands.Generic { private static Dictionary m_Table = new Dictionary( StringComparer.InvariantCultureIgnoreCase ); - public static Dictionary Table - { - get { return m_Table; } - } + public static Dictionary Table => m_Table; public static void Register( ExtensionInfo ext ) { @@ -27,30 +24,15 @@ namespace Server.Commands.Generic private ExtensionConstructor m_Constructor; - public int Order - { - get { return m_Order; } - } + public int Order => m_Order; - public string Name - { - get { return m_Name; } - } + public string Name => m_Name; - public int Size - { - get { return m_Size; } - } + public int Size => m_Size; - public bool IsFixedSize - { - get { return ( m_Size >= 0 ); } - } + public bool IsFixedSize => ( m_Size >= 0 ); - public ExtensionConstructor Constructor - { - get { return m_Constructor; } - } + public ExtensionConstructor Constructor => m_Constructor; public ExtensionInfo( int order, string name, int size, ExtensionConstructor constructor ) { @@ -141,25 +123,13 @@ namespace Server.Commands.Generic { public abstract ExtensionInfo Info { get; } - public string Name - { - get { return Info.Name; } - } + public string Name => Info.Name; - public int Size - { - get { return Info.Size; } - } + public int Size => Info.Size; - public bool IsFixedSize - { - get { return Info.IsFixedSize; } - } + public bool IsFixedSize => Info.IsFixedSize; - public int Order - { - get { return Info.Order; } - } + public int Order => Info.Order; public virtual void Optimize( Mobile from, Type baseType, ref AssemblyEmitter assembly ) { diff --git a/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs b/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs index dcb5f2530..000125aed 100644 --- a/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs +++ b/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs @@ -44,25 +44,13 @@ namespace Server.Commands.Generic private object m_Value; private FieldInfo m_Field; - public Type Type - { - get { return m_Type; } - } + public Type Type => m_Type; - public object Value - { - get { return m_Value; } - } + public object Value => m_Value; - public FieldInfo Field - { - get { return m_Field; } - } + public FieldInfo Field => m_Field; - public bool HasField - { - get { return ( m_Field != null ); } - } + public bool HasField => ( m_Field != null ); public PropertyValue( Type type, object value ) { diff --git a/Scripts/Commands/Generic/Extensions/Compilers/SortCompiler.cs b/Scripts/Commands/Generic/Extensions/Compilers/SortCompiler.cs index af5fcf6cf..d9d756544 100644 --- a/Scripts/Commands/Generic/Extensions/Compilers/SortCompiler.cs +++ b/Scripts/Commands/Generic/Extensions/Compilers/SortCompiler.cs @@ -12,25 +12,25 @@ namespace Server.Commands.Generic public Property Property { - get { return m_Property; } - set { m_Property = value; } + get => m_Property; + set => m_Property = value; } public bool IsAscending { - get { return ( m_Order > 0 ); } - set { m_Order = ( value ? +1 : -1 ); } + get => ( m_Order > 0 ); + set => m_Order = ( value ? +1 : -1 ); } public bool IsDescending { - get { return ( m_Order < 0 ); } - set { m_Order = ( value ? -1 : +1 ); } + get => ( m_Order < 0 ); + set => m_Order = ( value ? -1 : +1 ); } public int Sign { - get { return Math.Sign( m_Order ); } + get => Math.Sign( m_Order ); set { m_Order = Math.Sign( value ); diff --git a/Scripts/Commands/Generic/Extensions/DistinctExtension.cs b/Scripts/Commands/Generic/Extensions/DistinctExtension.cs index 45b34b908..925863dd0 100644 --- a/Scripts/Commands/Generic/Extensions/DistinctExtension.cs +++ b/Scripts/Commands/Generic/Extensions/DistinctExtension.cs @@ -13,10 +13,7 @@ namespace Server.Commands.Generic ExtensionInfo.Register( ExtInfo ); } - public override ExtensionInfo Info - { - get { return ExtInfo; } - } + public override ExtensionInfo Info => ExtInfo; private List m_Properties; diff --git a/Scripts/Commands/Generic/Extensions/LimitExtension.cs b/Scripts/Commands/Generic/Extensions/LimitExtension.cs index 7be53a0c5..bce7aa9c0 100644 --- a/Scripts/Commands/Generic/Extensions/LimitExtension.cs +++ b/Scripts/Commands/Generic/Extensions/LimitExtension.cs @@ -12,17 +12,11 @@ namespace Server.Commands.Generic ExtensionInfo.Register( ExtInfo ); } - public override ExtensionInfo Info - { - get { return ExtInfo; } - } + public override ExtensionInfo Info => ExtInfo; private int m_Limit; - public int Limit - { - get { return m_Limit; } - } + public int Limit => m_Limit; public LimitExtension() { diff --git a/Scripts/Commands/Generic/Extensions/SortExtension.cs b/Scripts/Commands/Generic/Extensions/SortExtension.cs index dcf0a3cd7..2c8231cf6 100644 --- a/Scripts/Commands/Generic/Extensions/SortExtension.cs +++ b/Scripts/Commands/Generic/Extensions/SortExtension.cs @@ -13,10 +13,7 @@ namespace Server.Commands.Generic ExtensionInfo.Register( ExtInfo ); } - public override ExtensionInfo Info - { - get { return ExtInfo; } - } + public override ExtensionInfo Info => ExtInfo; private List m_Orders; diff --git a/Scripts/Commands/Generic/Extensions/WhereExtension.cs b/Scripts/Commands/Generic/Extensions/WhereExtension.cs index 27a06cb07..c755a452c 100644 --- a/Scripts/Commands/Generic/Extensions/WhereExtension.cs +++ b/Scripts/Commands/Generic/Extensions/WhereExtension.cs @@ -11,17 +11,11 @@ namespace Server.Commands.Generic ExtensionInfo.Register( ExtInfo ); } - public override ExtensionInfo Info - { - get { return ExtInfo; } - } + public override ExtensionInfo Info => ExtInfo; private ObjectConditional m_Conditional; - public ObjectConditional Conditional - { - get { return m_Conditional; } - } + public ObjectConditional Conditional => m_Conditional; public WhereExtension() { diff --git a/Scripts/Commands/Generic/Implementors/AreaCommandImplementor.cs b/Scripts/Commands/Generic/Implementors/AreaCommandImplementor.cs index 8dcf74115..51b687c5b 100644 --- a/Scripts/Commands/Generic/Implementors/AreaCommandImplementor.cs +++ b/Scripts/Commands/Generic/Implementors/AreaCommandImplementor.cs @@ -7,10 +7,7 @@ namespace Server.Commands.Generic { private static AreaCommandImplementor m_Instance; - public static AreaCommandImplementor Instance - { - get { return m_Instance; } - } + public static AreaCommandImplementor Instance => m_Instance; public AreaCommandImplementor() { diff --git a/Scripts/Commands/Generic/Implementors/BaseCommandImplementor.cs b/Scripts/Commands/Generic/Implementors/BaseCommandImplementor.cs index ec06027e3..30eafe8f6 100644 --- a/Scripts/Commands/Generic/Implementors/BaseCommandImplementor.cs +++ b/Scripts/Commands/Generic/Implementors/BaseCommandImplementor.cs @@ -57,44 +57,41 @@ namespace Server.Commands.Generic public bool SupportsConditionals { - get{ return m_SupportsConditionals; } - set{ m_SupportsConditionals = value; } + get => m_SupportsConditionals; + set => m_SupportsConditionals = value; } public string[] Accessors { - get{ return m_Accessors; } - set{ m_Accessors = value; } + get => m_Accessors; + set => m_Accessors = value; } public string Usage { - get{ return m_Usage; } - set{ m_Usage = value; } + get => m_Usage; + set => m_Usage = value; } public string Description { - get{ return m_Description; } - set{ m_Description = value; } + get => m_Description; + set => m_Description = value; } public AccessLevel AccessLevel { - get{ return m_AccessLevel; } - set{ m_AccessLevel = value; } + get => m_AccessLevel; + set => m_AccessLevel = value; } public CommandSupport SupportRequirement { - get{ return m_SupportRequirement; } - set{ m_SupportRequirement = value; } + get => m_SupportRequirement; + set => m_SupportRequirement = value; } - public Dictionary Commands - { - get{ return m_Commands; } - } + public Dictionary Commands => m_Commands; public BaseCommandImplementor() { diff --git a/Scripts/Commands/Generic/Implementors/ObjectConditional.cs b/Scripts/Commands/Generic/Implementors/ObjectConditional.cs index 7df673eff..c3c565048 100644 --- a/Scripts/Commands/Generic/Implementors/ObjectConditional.cs +++ b/Scripts/Commands/Generic/Implementors/ObjectConditional.cs @@ -15,27 +15,15 @@ namespace Server.Commands.Generic private IConditional[] m_Conditionals; - public Type Type - { - get { return m_ObjectType; } - } + public Type Type => m_ObjectType; - public bool IsItem - { - get { return ( m_ObjectType == null || m_ObjectType == typeofItem || m_ObjectType.IsSubclassOf( typeofItem ) ); } - } + public bool IsItem => ( m_ObjectType == null || m_ObjectType == typeofItem || m_ObjectType.IsSubclassOf( typeofItem ) ); - public bool IsMobile - { - get { return ( m_ObjectType == null || m_ObjectType == typeofMobile || m_ObjectType.IsSubclassOf( typeofMobile ) ); } - } + public bool IsMobile => ( m_ObjectType == null || m_ObjectType == typeofMobile || m_ObjectType.IsSubclassOf( typeofMobile ) ); public static readonly ObjectConditional Empty = new ObjectConditional( null, null ); - public bool HasCompiled - { - get { return ( m_Conditionals != null ); } - } + public bool HasCompiled => ( m_Conditionals != null ); public void Compile( ref AssemblyEmitter emitter ) { diff --git a/Scripts/Commands/Generic/Implementors/RangeCommandImplementor.cs b/Scripts/Commands/Generic/Implementors/RangeCommandImplementor.cs index 8cfc75891..891862b6a 100644 --- a/Scripts/Commands/Generic/Implementors/RangeCommandImplementor.cs +++ b/Scripts/Commands/Generic/Implementors/RangeCommandImplementor.cs @@ -4,10 +4,7 @@ namespace Server.Commands.Generic { private static RangeCommandImplementor m_Instance; - public static RangeCommandImplementor Instance - { - get { return m_Instance; } - } + public static RangeCommandImplementor Instance => m_Instance; public RangeCommandImplementor() { diff --git a/Scripts/Commands/Logging.cs b/Scripts/Commands/Logging.cs index ff9b94786..1ba77837e 100644 --- a/Scripts/Commands/Logging.cs +++ b/Scripts/Commands/Logging.cs @@ -9,9 +9,11 @@ namespace Server.Commands private static StreamWriter m_Output; private static bool m_Enabled = true; - public static bool Enabled{ get{ return m_Enabled; } set{ m_Enabled = value; } } + public static bool Enabled{ get => m_Enabled; + set => m_Enabled = value; + } - public static StreamWriter Output{ get{ return m_Output; } } + public static StreamWriter Output => m_Output; public static void Initialize() { diff --git a/Scripts/Commands/Properties.cs b/Scripts/Commands/Properties.cs index 9bf68ebdd..5ffd8c09b 100644 --- a/Scripts/Commands/Properties.cs +++ b/Scripts/Commands/Properties.cs @@ -579,10 +579,7 @@ namespace Server { protected Property m_Property; - public Property Property - { - get { return m_Property; } - } + public Property Property => m_Property; public PropertyException( Property property, string message ) : base( message ) @@ -660,15 +657,9 @@ namespace Server protected AccessLevel m_PlayerAccess; protected AccessLevel m_NeededAccess; - public AccessLevel PlayerAccess - { - get { return m_PlayerAccess; } - } + public AccessLevel PlayerAccess => m_PlayerAccess; - public AccessLevel NeededAccess - { - get { return m_NeededAccess; } - } + public AccessLevel NeededAccess => m_NeededAccess; public ClearanceException( Property property, AccessLevel playerAccess, AccessLevel neededAccess, string accessType ) : base( property, string.Format( @@ -703,20 +694,11 @@ namespace Server private PropertyInfo[] m_Chain; private PropertyAccess m_Access; - public string Binding - { - get { return m_Binding; } - } + public string Binding => m_Binding; - public bool IsBound - { - get { return ( m_Chain != null ); } - } + public bool IsBound => ( m_Chain != null ); - public PropertyAccess Access - { - get { return m_Access; } - } + public PropertyAccess Access => m_Access; public PropertyInfo[] Chain { diff --git a/Scripts/Engines/BulkOrders/Books/BOBFilter.cs b/Scripts/Engines/BulkOrders/Books/BOBFilter.cs index a1d8da31e..acad09af0 100644 --- a/Scripts/Engines/BulkOrders/Books/BOBFilter.cs +++ b/Scripts/Engines/BulkOrders/Books/BOBFilter.cs @@ -7,10 +7,7 @@ namespace Server.Engines.BulkOrders private int m_Material; private int m_Quantity; - public bool IsDefault - { - get{ return ( m_Type == 0 && m_Quality == 0 && m_Material == 0 && m_Quantity == 0 ); } - } + public bool IsDefault => ( m_Type == 0 && m_Quality == 0 && m_Material == 0 && m_Quantity == 0 ); public void Clear() { @@ -22,26 +19,26 @@ namespace Server.Engines.BulkOrders public int Type { - get{ return m_Type; } - set{ m_Type = value; } + get => m_Type; + set => m_Type = value; } public int Quality { - get{ return m_Quality; } - set{ m_Quality = value; } + get => m_Quality; + set => m_Quality = value; } public int Material { - get{ return m_Material; } - set{ m_Material = value; } + get => m_Material; + set => m_Material = value; } public int Quantity { - get{ return m_Quantity; } - set{ m_Quantity = value; } + get => m_Quantity; + set => m_Quantity = value; } public BOBFilter() diff --git a/Scripts/Engines/BulkOrders/Books/BOBLargeEntry.cs b/Scripts/Engines/BulkOrders/Books/BOBLargeEntry.cs index b7f2e524a..b9f8af055 100644 --- a/Scripts/Engines/BulkOrders/Books/BOBLargeEntry.cs +++ b/Scripts/Engines/BulkOrders/Books/BOBLargeEntry.cs @@ -9,12 +9,14 @@ namespace Server.Engines.BulkOrders private int m_Price; private BOBLargeSubEntry[] m_Entries; - public bool RequireExceptional{ get{ return m_RequireExceptional; } } - public BODType DeedType{ get{ return m_DeedType; } } - public BulkMaterialType Material{ get{ return m_Material; } } - public int AmountMax{ get{ return m_AmountMax; } } - public int Price{ get{ return m_Price; } set{ m_Price = value; } } - public BOBLargeSubEntry[] Entries{ get{ return m_Entries; } } + public bool RequireExceptional => m_RequireExceptional; + public BODType DeedType => m_DeedType; + public BulkMaterialType Material => m_Material; + public int AmountMax => m_AmountMax; + public int Price{ get => m_Price; + set => m_Price = value; + } + public BOBLargeSubEntry[] Entries => m_Entries; public Item Reconstruct() { diff --git a/Scripts/Engines/BulkOrders/Books/BOBLargeSubEntry.cs b/Scripts/Engines/BulkOrders/Books/BOBLargeSubEntry.cs index 715154eb3..f6e19c1ad 100644 --- a/Scripts/Engines/BulkOrders/Books/BOBLargeSubEntry.cs +++ b/Scripts/Engines/BulkOrders/Books/BOBLargeSubEntry.cs @@ -9,10 +9,10 @@ namespace Server.Engines.BulkOrders private int m_Number; private int m_Graphic; - public Type ItemType{ get{ return m_ItemType; } } - public int AmountCur{ get{ return m_AmountCur; } } - public int Number{ get{ return m_Number; } } - public int Graphic{ get{ return m_Graphic; } } + public Type ItemType => m_ItemType; + public int AmountCur => m_AmountCur; + public int Number => m_Number; + public int Graphic => m_Graphic; public BOBLargeSubEntry( LargeBulkEntry lbe ) { diff --git a/Scripts/Engines/BulkOrders/Books/BOBSmallEntry.cs b/Scripts/Engines/BulkOrders/Books/BOBSmallEntry.cs index 7f3b76550..7e67a4393 100644 --- a/Scripts/Engines/BulkOrders/Books/BOBSmallEntry.cs +++ b/Scripts/Engines/BulkOrders/Books/BOBSmallEntry.cs @@ -13,15 +13,17 @@ namespace Server.Engines.BulkOrders private int m_Graphic; private int m_Price; - public Type ItemType{ get{ return m_ItemType; } } - public bool RequireExceptional{ get{ return m_RequireExceptional; } } - public BODType DeedType{ get{ return m_DeedType; } } - public BulkMaterialType Material{ get{ return m_Material; } } - public int AmountCur{ get{ return m_AmountCur; } } - public int AmountMax{ get{ return m_AmountMax; } } - public int Number{ get{ return m_Number; } } - public int Graphic{ get{ return m_Graphic; } } - public int Price{ get{ return m_Price; } set{ m_Price = value; } } + public Type ItemType => m_ItemType; + public bool RequireExceptional => m_RequireExceptional; + public BODType DeedType => m_DeedType; + public BulkMaterialType Material => m_Material; + public int AmountCur => m_AmountCur; + public int AmountMax => m_AmountMax; + public int Number => m_Number; + public int Graphic => m_Graphic; + public int Price{ get => m_Price; + set => m_Price = value; + } public Item Reconstruct() { diff --git a/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs b/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs index caf19f6c2..6fcef484c 100644 --- a/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs +++ b/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs @@ -21,31 +21,25 @@ namespace Server.Engines.BulkOrders [CommandProperty( AccessLevel.GameMaster )] public string BookName { - get{ return m_BookName; } + get => m_BookName; set{ m_BookName = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } - public ArrayList Entries - { - get{ return m_Entries; } - } + public ArrayList Entries => m_Entries; - public BOBFilter Filter - { - get{ return m_Filter; } - } + public BOBFilter Filter => m_Filter; public int ItemCount { - get{ return m_ItemCount; } - set{ m_ItemCount = value; } + get => m_ItemCount; + set => m_ItemCount = value; } [Constructible] diff --git a/Scripts/Engines/BulkOrders/LargeBOD.cs b/Scripts/Engines/BulkOrders/LargeBOD.cs index 03ff92e6d..2133f37e8 100644 --- a/Scripts/Engines/BulkOrders/LargeBOD.cs +++ b/Scripts/Engines/BulkOrders/LargeBOD.cs @@ -12,15 +12,19 @@ namespace Server.Engines.BulkOrders private LargeBulkEntry[] m_Entries; [CommandProperty( AccessLevel.GameMaster )] - public int AmountMax{ get{ return m_AmountMax; } set{ m_AmountMax = value; InvalidateProperties(); } } + public int AmountMax{ get => m_AmountMax; + set{ m_AmountMax = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool RequireExceptional{ get{ return m_RequireExceptional; } set{ m_RequireExceptional = value; InvalidateProperties(); } } + public bool RequireExceptional{ get => m_RequireExceptional; + set{ m_RequireExceptional = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public BulkMaterialType Material{ get{ return m_Material; } set{ m_Material = value; InvalidateProperties(); } } + public BulkMaterialType Material{ get => m_Material; + set{ m_Material = value; InvalidateProperties(); } } - public LargeBulkEntry[] Entries{ get{ return m_Entries; } set{ m_Entries = value; InvalidateProperties(); } } + public LargeBulkEntry[] Entries{ get => m_Entries; + set{ m_Entries = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool Complete diff --git a/Scripts/Engines/BulkOrders/LargeBulkEntry.cs b/Scripts/Engines/BulkOrders/LargeBulkEntry.cs index 86710fcf0..43567cb02 100644 --- a/Scripts/Engines/BulkOrders/LargeBulkEntry.cs +++ b/Scripts/Engines/BulkOrders/LargeBulkEntry.cs @@ -9,120 +9,57 @@ namespace Server.Engines.BulkOrders private int m_Amount; private SmallBulkEntry m_Details; - public LargeBOD Owner{ get{ return m_Owner; } set{ m_Owner = value; } } - public int Amount{ get{ return m_Amount; } set{ m_Amount = value; if ( m_Owner != null ) m_Owner.InvalidateProperties(); } } - public SmallBulkEntry Details{ get{ return m_Details; } } - - public static SmallBulkEntry[] LargeRing - { - get{ return GetEntries( "Blacksmith", "largering" ); } + public LargeBOD Owner{ get => m_Owner; + set => m_Owner = value; } + public int Amount{ get => m_Amount; + set{ m_Amount = value; if ( m_Owner != null ) m_Owner.InvalidateProperties(); } } + public SmallBulkEntry Details => m_Details; - public static SmallBulkEntry[] LargePlate - { - get{ return GetEntries( "Blacksmith", "largeplate" ); } - } + public static SmallBulkEntry[] LargeRing => GetEntries( "Blacksmith", "largering" ); - public static SmallBulkEntry[] LargeChain - { - get{ return GetEntries( "Blacksmith", "largechain" ); } - } + public static SmallBulkEntry[] LargePlate => GetEntries( "Blacksmith", "largeplate" ); - public static SmallBulkEntry[] LargeAxes - { - get{ return GetEntries( "Blacksmith", "largeaxes" ); } - } + public static SmallBulkEntry[] LargeChain => GetEntries( "Blacksmith", "largechain" ); - public static SmallBulkEntry[] LargeFencing - { - get{ return GetEntries( "Blacksmith", "largefencing" ); } - } + public static SmallBulkEntry[] LargeAxes => GetEntries( "Blacksmith", "largeaxes" ); - public static SmallBulkEntry[] LargeMaces - { - get{ return GetEntries( "Blacksmith", "largemaces" ); } - } + public static SmallBulkEntry[] LargeFencing => GetEntries( "Blacksmith", "largefencing" ); - public static SmallBulkEntry[] LargePolearms - { - get{ return GetEntries( "Blacksmith", "largepolearms" ); } - } + public static SmallBulkEntry[] LargeMaces => GetEntries( "Blacksmith", "largemaces" ); - public static SmallBulkEntry[] LargeSwords - { - get{ return GetEntries( "Blacksmith", "largeswords" ); } - } + public static SmallBulkEntry[] LargePolearms => GetEntries( "Blacksmith", "largepolearms" ); + + public static SmallBulkEntry[] LargeSwords => GetEntries( "Blacksmith", "largeswords" ); - public static SmallBulkEntry[] BoneSet - { - get{ return GetEntries( "Tailoring", "boneset" ); } - } + public static SmallBulkEntry[] BoneSet => GetEntries( "Tailoring", "boneset" ); - public static SmallBulkEntry[] Farmer - { - get{ return GetEntries( "Tailoring", "farmer" ); } - } + public static SmallBulkEntry[] Farmer => GetEntries( "Tailoring", "farmer" ); - public static SmallBulkEntry[] FemaleLeatherSet - { - get{ return GetEntries( "Tailoring", "femaleleatherset" ); } - } + public static SmallBulkEntry[] FemaleLeatherSet => GetEntries( "Tailoring", "femaleleatherset" ); - public static SmallBulkEntry[] FisherGirl - { - get{ return GetEntries( "Tailoring", "fishergirl" ); } - } + public static SmallBulkEntry[] FisherGirl => GetEntries( "Tailoring", "fishergirl" ); - public static SmallBulkEntry[] Gypsy - { - get{ return GetEntries( "Tailoring", "gypsy" ); } - } + public static SmallBulkEntry[] Gypsy => GetEntries( "Tailoring", "gypsy" ); - public static SmallBulkEntry[] HatSet - { - get{ return GetEntries( "Tailoring", "hatset" ); } - } + public static SmallBulkEntry[] HatSet => GetEntries( "Tailoring", "hatset" ); - public static SmallBulkEntry[] Jester - { - get{ return GetEntries( "Tailoring", "jester" ); } - } + public static SmallBulkEntry[] Jester => GetEntries( "Tailoring", "jester" ); - public static SmallBulkEntry[] Lady - { - get{ return GetEntries( "Tailoring", "lady" ); } - } + public static SmallBulkEntry[] Lady => GetEntries( "Tailoring", "lady" ); - public static SmallBulkEntry[] MaleLeatherSet - { - get{ return GetEntries( "Tailoring", "maleleatherset" ); } - } + public static SmallBulkEntry[] MaleLeatherSet => GetEntries( "Tailoring", "maleleatherset" ); - public static SmallBulkEntry[] Pirate - { - get{ return GetEntries( "Tailoring", "pirate" ); } - } + public static SmallBulkEntry[] Pirate => GetEntries( "Tailoring", "pirate" ); - public static SmallBulkEntry[] ShoeSet - { - get{ return GetEntries( "Tailoring", "shoeset" ); } - } + public static SmallBulkEntry[] ShoeSet => GetEntries( "Tailoring", "shoeset" ); - public static SmallBulkEntry[] StuddedSet - { - get{ return GetEntries( "Tailoring", "studdedset" ); } - } + public static SmallBulkEntry[] StuddedSet => GetEntries( "Tailoring", "studdedset" ); - public static SmallBulkEntry[] TownCrier - { - get{ return GetEntries( "Tailoring", "towncrier" ); } - } + public static SmallBulkEntry[] TownCrier => GetEntries( "Tailoring", "towncrier" ); - public static SmallBulkEntry[] Wizard - { - get{ return GetEntries( "Tailoring", "wizard" ); } - } + public static SmallBulkEntry[] Wizard => GetEntries( "Tailoring", "wizard" ); private static Dictionary> m_Cache; diff --git a/Scripts/Engines/BulkOrders/Rewards.cs b/Scripts/Engines/BulkOrders/Rewards.cs index 917d12ccd..4c2403bf9 100644 --- a/Scripts/Engines/BulkOrders/Rewards.cs +++ b/Scripts/Engines/BulkOrders/Rewards.cs @@ -10,8 +10,8 @@ namespace Server.Engines.BulkOrders private int m_Points; private Type[] m_Types; - public int Points{ get{ return m_Points; } } - public Type[] Types{ get{ return m_Types; } } + public int Points => m_Points; + public Type[] Types => m_Types; public RewardType( int points, params Type[] types ) { @@ -37,9 +37,9 @@ namespace Server.Engines.BulkOrders private ConstructCallback m_Constructor; private int m_Type; - public int Weight{ get{ return m_Weight; } } - public ConstructCallback Constructor{ get{ return m_Constructor; } } - public int Type{ get{ return m_Type; } } + public int Weight => m_Weight; + public ConstructCallback Constructor => m_Constructor; + public int Type => m_Type; public RewardItem( int weight, ConstructCallback constructor ) : this( weight, constructor, 0 ) { @@ -64,8 +64,8 @@ namespace Server.Engines.BulkOrders private int m_Points; private RewardItem[] m_Items; - public int Points{ get{ return m_Points; } } - public RewardItem[] Items{ get{ return m_Items; } } + public int Points => m_Points; + public RewardItem[] Items => m_Items; public RewardGroup( int points, params RewardItem[] items ) { @@ -105,7 +105,9 @@ namespace Server.Engines.BulkOrders { private RewardGroup[] m_Groups; - public RewardGroup[] Groups{ get{ return m_Groups; } set{ m_Groups = value; } } + public RewardGroup[] Groups{ get => m_Groups; + set => m_Groups = value; + } public abstract int ComputePoints( int quantity, bool exceptional, BulkMaterialType material, int itemCount, Type type ); public abstract int ComputeGold( int quantity, bool exceptional, BulkMaterialType material, int itemCount, Type type ); diff --git a/Scripts/Engines/BulkOrders/SmallBOD.cs b/Scripts/Engines/BulkOrders/SmallBOD.cs index 2e0b2726b..c5cd4af36 100644 --- a/Scripts/Engines/BulkOrders/SmallBOD.cs +++ b/Scripts/Engines/BulkOrders/SmallBOD.cs @@ -16,28 +16,37 @@ namespace Server.Engines.BulkOrders private BulkMaterialType m_Material; [CommandProperty( AccessLevel.GameMaster )] - public int AmountCur{ get{ return m_AmountCur; } set{ m_AmountCur = value; InvalidateProperties(); } } + public int AmountCur{ get => m_AmountCur; + set{ m_AmountCur = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int AmountMax{ get{ return m_AmountMax; } set{ m_AmountMax = value; InvalidateProperties(); } } + public int AmountMax{ get => m_AmountMax; + set{ m_AmountMax = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Type Type{ get{ return m_Type; } set{ m_Type = value; } } + public Type Type{ get => m_Type; + set => m_Type = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Number{ get{ return m_Number; } set{ m_Number = value; InvalidateProperties(); } } + public int Number{ get => m_Number; + set{ m_Number = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int Graphic{ get{ return m_Graphic; } set{ m_Graphic = value; } } + public int Graphic{ get => m_Graphic; + set => m_Graphic = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool RequireExceptional{ get{ return m_RequireExceptional; } set{ m_RequireExceptional = value; InvalidateProperties(); } } + public bool RequireExceptional{ get => m_RequireExceptional; + set{ m_RequireExceptional = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public BulkMaterialType Material{ get{ return m_Material; } set{ m_Material = value; InvalidateProperties(); } } + public BulkMaterialType Material{ get => m_Material; + set{ m_Material = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool Complete{ get{ return ( m_AmountCur == m_AmountMax ); } } + public bool Complete => ( m_AmountCur == m_AmountMax ); public override int LabelNumber => 1045151; // a bulk order deed diff --git a/Scripts/Engines/BulkOrders/SmallBulkEntry.cs b/Scripts/Engines/BulkOrders/SmallBulkEntry.cs index 95b075767..c04fde623 100644 --- a/Scripts/Engines/BulkOrders/SmallBulkEntry.cs +++ b/Scripts/Engines/BulkOrders/SmallBulkEntry.cs @@ -10,9 +10,9 @@ namespace Server.Engines.BulkOrders private int m_Number; private int m_Graphic; - public Type Type{ get{ return m_Type; } } - public int Number{ get{ return m_Number; } } - public int Graphic{ get{ return m_Graphic; } } + public Type Type => m_Type; + public int Number => m_Number; + public int Graphic => m_Graphic; public SmallBulkEntry( Type type, int number, int graphic ) { @@ -21,25 +21,13 @@ namespace Server.Engines.BulkOrders m_Graphic = graphic; } - public static SmallBulkEntry[] BlacksmithWeapons - { - get{ return GetEntries( "Blacksmith", "weapons" ); } - } + public static SmallBulkEntry[] BlacksmithWeapons => GetEntries( "Blacksmith", "weapons" ); - public static SmallBulkEntry[] BlacksmithArmor - { - get{ return GetEntries( "Blacksmith", "armor" ); } - } + public static SmallBulkEntry[] BlacksmithArmor => GetEntries( "Blacksmith", "armor" ); - public static SmallBulkEntry[] TailorCloth - { - get{ return GetEntries( "Tailoring", "cloth" ); } - } + public static SmallBulkEntry[] TailorCloth => GetEntries( "Tailoring", "cloth" ); - public static SmallBulkEntry[] TailorLeather - { - get{ return GetEntries( "Tailoring", "leather" ); } - } + public static SmallBulkEntry[] TailorLeather => GetEntries( "Tailoring", "leather" ); private static Dictionary> m_Cache; diff --git a/Scripts/Engines/CannedEvil/ChampionSkull.cs b/Scripts/Engines/CannedEvil/ChampionSkull.cs index ae41e38a8..0c75fceb2 100644 --- a/Scripts/Engines/CannedEvil/ChampionSkull.cs +++ b/Scripts/Engines/CannedEvil/ChampionSkull.cs @@ -7,7 +7,8 @@ namespace Server.Items private ChampionSkullType m_Type; [CommandProperty( AccessLevel.GameMaster )] - public ChampionSkullType Type{ get{ return m_Type; } set{ m_Type = value; InvalidateProperties(); } } + public ChampionSkullType Type{ get => m_Type; + set{ m_Type = value; InvalidateProperties(); } } public override int LabelNumber => 1049479 + (int)m_Type; diff --git a/Scripts/Engines/CannedEvil/ChampionSkullBrazier.cs b/Scripts/Engines/CannedEvil/ChampionSkullBrazier.cs index 883e9240a..19c867bc9 100644 --- a/Scripts/Engines/CannedEvil/ChampionSkullBrazier.cs +++ b/Scripts/Engines/CannedEvil/ChampionSkullBrazier.cs @@ -11,13 +11,15 @@ namespace Server.Engines.CannedEvil private Item m_Skull; [CommandProperty( AccessLevel.GameMaster )] - public ChampionSkullPlatform Platform{ get{ return m_Platform; } } + public ChampionSkullPlatform Platform => m_Platform; [CommandProperty( AccessLevel.GameMaster )] - public ChampionSkullType Type{ get{ return m_Type; } set{ m_Type = value; InvalidateProperties(); } } + public ChampionSkullType Type{ get => m_Type; + set{ m_Type = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Item Skull{ get{ return m_Skull; } set{ m_Skull = value; if ( m_Platform != null ) m_Platform.Validate(); } } + public Item Skull{ get => m_Skull; + set{ m_Skull = value; if ( m_Platform != null ) m_Platform.Validate(); } } public override int LabelNumber => 1049489 + (int)m_Type; diff --git a/Scripts/Engines/CannedEvil/ChampionSpawn.cs b/Scripts/Engines/CannedEvil/ChampionSpawn.cs index 9eebc023f..c9f135671 100644 --- a/Scripts/Engines/CannedEvil/ChampionSpawn.cs +++ b/Scripts/Engines/CannedEvil/ChampionSpawn.cs @@ -12,14 +12,8 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public int SpawnSzMod { - get - { - return ( m_SPawnSzMod < 1 || m_SPawnSzMod > 12 ) ? 12 : m_SPawnSzMod; - } - set - { - m_SPawnSzMod = ( value < 1 || value > 12 ) ? 12 : value; - } + get => ( m_SPawnSzMod < 1 || m_SPawnSzMod > 12 ) ? 12 : m_SPawnSzMod; + set => m_SPawnSzMod = ( value < 1 || value > 12 ) ? 12 : value; } private int m_SPawnSzMod; @@ -56,15 +50,15 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public bool ConfinedRoaming { - get { return m_ConfinedRoaming; } - set { m_ConfinedRoaming = value; } + get => m_ConfinedRoaming; + set => m_ConfinedRoaming = value; } [CommandProperty( AccessLevel.GameMaster )] public bool HasBeenAdvanced { - get { return m_HasBeenAdvanced; } - set { m_HasBeenAdvanced = value; } + get => m_HasBeenAdvanced; + set => m_HasBeenAdvanced = value; } [Constructible] @@ -123,17 +117,14 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public bool RandomizeType { - get { return m_RandomizeType; } - set { m_RandomizeType = value; } + get => m_RandomizeType; + set => m_RandomizeType = value; } [CommandProperty( AccessLevel.GameMaster )] public int Kills { - get - { - return m_Kills; - } + get => m_Kills; set { m_Kills = value; @@ -144,10 +135,7 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public Rectangle2D SpawnArea { - get - { - return m_SpawnArea; - } + get => m_SpawnArea; set { m_SpawnArea = value; @@ -159,58 +147,31 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public TimeSpan RestartDelay { - get - { - return m_RestartDelay; - } - set - { - m_RestartDelay = value; - } + get => m_RestartDelay; + set => m_RestartDelay = value; } [CommandProperty( AccessLevel.GameMaster )] - public DateTime RestartTime - { - get - { - return m_RestartTime; - } - } + public DateTime RestartTime => m_RestartTime; [CommandProperty( AccessLevel.GameMaster )] public TimeSpan ExpireDelay { - get - { - return m_ExpireDelay; - } - set - { - m_ExpireDelay = value; - } + get => m_ExpireDelay; + set => m_ExpireDelay = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime ExpireTime { - get - { - return m_ExpireTime; - } - set - { - m_ExpireTime = value; - } + get => m_ExpireTime; + set => m_ExpireTime = value; } [CommandProperty( AccessLevel.GameMaster )] public ChampionSpawnType Type { - get - { - return m_Type; - } + get => m_Type; set { m_Type = value; @@ -221,10 +182,7 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get - { - return m_Active; - } + get => m_Active; set { if ( value ) @@ -239,23 +197,14 @@ namespace Server.Engines.CannedEvil [CommandProperty( AccessLevel.GameMaster )] public Mobile Champion { - get - { - return m_Champion; - } - set - { - m_Champion = value; - } + get => m_Champion; + set => m_Champion = value; } [CommandProperty( AccessLevel.GameMaster )] public int Level { - get - { - return m_RedSkulls.Count; - } + get => m_RedSkulls.Count; set { for( int i = m_RedSkulls.Count - 1; i >= value; --i ) @@ -281,13 +230,7 @@ namespace Server.Engines.CannedEvil } } - public int MaxKills - { - get - { - return ( m_SPawnSzMod * ( 250 / 12 ) ) - ( Level * m_SPawnSzMod ); - } - } + public int MaxKills => ( m_SPawnSzMod * ( 250 / 12 ) ) - ( Level * m_SPawnSzMod ); public bool IsChampionSpawn( Mobile m ) { @@ -1254,10 +1197,7 @@ namespace Server.Engines.CannedEvil private ChampionSpawn m_Spawn; - public ChampionSpawn ChampionSpawn - { - get { return m_Spawn; } - } + public ChampionSpawn ChampionSpawn => m_Spawn; public ChampionSpawnRegion( ChampionSpawn spawn ) : base( null, spawn.Map, Region.Find( spawn.Location, spawn.Map ), spawn.SpawnArea ) { @@ -1282,10 +1222,7 @@ namespace Server.Engines.CannedEvil public ChampionSpawn Spawn => m_Spawn; - public override string DefaultName - { - get { return "Idol of the Champion"; } - } + public override string DefaultName => "Idol of the Champion"; public IdolOfTheChampion( ChampionSpawn spawn ): base( 0x1F18 ) diff --git a/Scripts/Engines/Chat/Channel.cs b/Scripts/Engines/Chat/Channel.cs index 54ae49889..fb8ff43e5 100644 --- a/Scripts/Engines/Chat/Channel.cs +++ b/Scripts/Engines/Chat/Channel.cs @@ -28,10 +28,7 @@ namespace Server.Engines.Chat public string Name { - get - { - return m_Name; - } + get => m_Name; set { SendCommand( ChatCommand.RemoveChannel, m_Name ); @@ -43,10 +40,7 @@ namespace Server.Engines.Chat public string Password { - get - { - return m_Password; - } + get => m_Password; set { string newValue = null; @@ -238,10 +232,7 @@ namespace Server.Engines.Chat public bool VoiceRestricted { - get - { - return m_VoiceRestricted; - } + get => m_VoiceRestricted; set { m_VoiceRestricted = value; @@ -255,14 +246,8 @@ namespace Server.Engines.Chat public bool AlwaysAvailable { - get - { - return m_AlwaysAvailable; - } - set - { - m_AlwaysAvailable = value; - } + get => m_AlwaysAvailable; + set => m_AlwaysAvailable = value; } public void AddVoiced( ChatUser user ) @@ -461,13 +446,7 @@ namespace Server.Engines.Chat private static List m_Channels = new List(); - public static List Channels - { - get - { - return m_Channels; - } - } + public static List Channels => m_Channels; public static void SendChannelsTo( ChatUser user ) { diff --git a/Scripts/Engines/Chat/Chat.cs b/Scripts/Engines/Chat/Chat.cs index 446a02693..21bd8d120 100644 --- a/Scripts/Engines/Chat/Chat.cs +++ b/Scripts/Engines/Chat/Chat.cs @@ -11,8 +11,8 @@ namespace Server.Engines.Chat public static bool Enabled { - get{ return m_Enabled; } - set{ m_Enabled = value; } + get => m_Enabled; + set => m_Enabled = value; } public static void Initialize() diff --git a/Scripts/Engines/Chat/ChatActionHandler.cs b/Scripts/Engines/Chat/ChatActionHandler.cs index d4e8ef1f3..dbaa19f91 100644 --- a/Scripts/Engines/Chat/ChatActionHandler.cs +++ b/Scripts/Engines/Chat/ChatActionHandler.cs @@ -8,9 +8,9 @@ namespace Server.Engines.Chat private bool m_RequireConference; private OnChatAction m_Callback; - public bool RequireModerator{ get{ return m_RequireModerator; } } - public bool RequireConference{ get{ return m_RequireConference; } } - public OnChatAction Callback{ get{ return m_Callback; } } + public bool RequireModerator => m_RequireModerator; + public bool RequireConference => m_RequireConference; + public OnChatAction Callback => m_Callback; public ChatActionHandler( bool requireModerator, bool requireConference, OnChatAction callback ) { diff --git a/Scripts/Engines/Chat/ChatUser.cs b/Scripts/Engines/Chat/ChatUser.cs index 025f28a9e..840e8fbe6 100644 --- a/Scripts/Engines/Chat/ChatUser.cs +++ b/Scripts/Engines/Chat/ChatUser.cs @@ -18,29 +18,11 @@ namespace Server.Engines.Chat m_Ignoring = new List(); } - public Mobile Mobile - { - get - { - return m_Mobile; - } - } + public Mobile Mobile => m_Mobile; - public List Ignored - { - get - { - return m_Ignored; - } - } + public List Ignored => m_Ignored; - public List Ignoring - { - get - { - return m_Ignoring; - } - } + public List Ignoring => m_Ignoring; public string Username { @@ -60,46 +42,22 @@ namespace Server.Engines.Chat public Channel CurrentChannel { - get - { - return m_Channel; - } - set - { - m_Channel = value; - } + get => m_Channel; + set => m_Channel = value; } - public bool IsOnline - { - get - { - return ( m_Mobile.NetState != null ); - } - } + public bool IsOnline => ( m_Mobile.NetState != null ); public bool Anonymous { - get - { - return m_Anonymous; - } - set - { - m_Anonymous = value; - } + get => m_Anonymous; + set => m_Anonymous = value; } public bool IgnorePrivateMessage { - get - { - return m_IgnorePrivateMessage; - } - set - { - m_IgnorePrivateMessage = value; - } + get => m_IgnorePrivateMessage; + set => m_IgnorePrivateMessage = value; } public const char NormalColorCharacter = '0'; @@ -153,13 +111,7 @@ namespace Server.Engines.Chat return m_Ignored.Contains( check ); } - public bool IsModerator - { - get - { - return ( m_Channel != null && m_Channel.IsModerator( this ) ); - } - } + public bool IsModerator => ( m_Channel != null && m_Channel.IsModerator( this ) ); public void AddIgnored( ChatUser user ) { diff --git a/Scripts/Engines/ConPVP/AcceptDuelGump.cs b/Scripts/Engines/ConPVP/AcceptDuelGump.cs index 2814a72b2..43d2dd285 100644 --- a/Scripts/Engines/ConPVP/AcceptDuelGump.cs +++ b/Scripts/Engines/ConPVP/AcceptDuelGump.cs @@ -120,8 +120,8 @@ namespace Server.Engines.ConPVP public Mobile m_Ignored; public DateTime m_Expire; - public Mobile Ignored{ get{ return m_Ignored; } } - public bool Expired{ get{ return ( DateTime.UtcNow >= m_Expire ); } } + public Mobile Ignored => m_Ignored; + public bool Expired => ( DateTime.UtcNow >= m_Expire ); private static TimeSpan ExpireDelay = TimeSpan.FromMinutes( 15.0 ); diff --git a/Scripts/Engines/ConPVP/Arena.cs b/Scripts/Engines/ConPVP/Arena.cs index f74a470cf..3ae052a95 100644 --- a/Scripts/Engines/ConPVP/Arena.cs +++ b/Scripts/Engines/ConPVP/Arena.cs @@ -10,16 +10,16 @@ namespace Server.Engines.ConPVP private bool m_IsPrivate; [CommandProperty( AccessLevel.GameMaster )] - public Arena Arena{ get{ return m_Arena; } set{} } + public Arena Arena{ get => m_Arena; + set{} } [CommandProperty( AccessLevel.GameMaster )] - public bool IsPrivate{ get{ return m_IsPrivate; } set{ m_IsPrivate = value; } } - - public override string DefaultName - { - get { return "arena controller"; } + public bool IsPrivate{ get => m_IsPrivate; + set => m_IsPrivate = value; } + public override string DefaultName => "arena controller"; + [Constructible] public ArenaController() : base( 0x1B7A ) { @@ -86,7 +86,9 @@ namespace Server.Engines.ConPVP private static List m_Instances = new List(); - public static List Instances{ get{ return m_Instances; } set{ m_Instances = value; } } + public static List Instances{ get => m_Instances; + set => m_Instances = value; + } } [PropertyObject] @@ -94,31 +96,47 @@ namespace Server.Engines.ConPVP { private Point3D[] m_Points; - public Point3D[] Points{ get{ return m_Points; } } + public Point3D[] Points => m_Points; [CommandProperty( AccessLevel.GameMaster )] - public Point3D EdgeWest{ get{ return m_Points[0]; } set{ m_Points[0] = value; } } + public Point3D EdgeWest{ get => m_Points[0]; + set => m_Points[0] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D EdgeEast{ get{ return m_Points[1]; } set{ m_Points[1] = value; } } + public Point3D EdgeEast{ get => m_Points[1]; + set => m_Points[1] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D EdgeNorth{ get{ return m_Points[2]; } set{ m_Points[2] = value; } } + public Point3D EdgeNorth{ get => m_Points[2]; + set => m_Points[2] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D EdgeSouth{ get{ return m_Points[3]; } set{ m_Points[3] = value; } } + public Point3D EdgeSouth{ get => m_Points[3]; + set => m_Points[3] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D CornerNW{ get{ return m_Points[4]; } set{ m_Points[4] = value; } } + public Point3D CornerNW{ get => m_Points[4]; + set => m_Points[4] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D CornerSE{ get{ return m_Points[5]; } set{ m_Points[5] = value; } } + public Point3D CornerSE{ get => m_Points[5]; + set => m_Points[5] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D CornerSW{ get{ return m_Points[6]; } set{ m_Points[6] = value; } } + public Point3D CornerSW{ get => m_Points[6]; + set => m_Points[6] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D CornerNE{ get{ return m_Points[7]; } set{ m_Points[7] = value; } } + public Point3D CornerNE{ get => m_Points[7]; + set => m_Points[7] = value; + } public override string ToString() { @@ -179,14 +197,14 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public LadderController Ladder { - get{ return m_Ladder; } - set{ m_Ladder = value; } + get => m_Ladder; + set => m_Ladder = value; } [CommandProperty( AccessLevel.GameMaster )] public bool IsGuarded { - get{ return m_IsGuarded; } + get => m_IsGuarded; set { m_IsGuarded = value; @@ -207,7 +225,7 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public TournamentController Tournament { - get{ return m_Tournament; } + get => m_Tournament; set { if ( m_Tournament != null ) @@ -223,21 +241,21 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public Mobile Announcer { - get{ return m_Announcer; } - set{ m_Announcer = value; } + get => m_Announcer; + set => m_Announcer = value; } [CommandProperty( AccessLevel.GameMaster )] public string Name { - get{ return m_Name; } + get => m_Name; set{ m_Name = value; if ( m_Active ) m_Arenas.Sort(); } } [CommandProperty( AccessLevel.GameMaster )] public Map Facet { - get{ return m_Facet; } + get => m_Facet; set { m_Facet = value; @@ -256,7 +274,9 @@ namespace Server.Engines.ConPVP } [CommandProperty( AccessLevel.GameMaster )] - public Rectangle2D Bounds{ get{ return m_Bounds; } set{ m_Bounds = value; } } + public Rectangle2D Bounds{ get => m_Bounds; + set => m_Bounds = value; + } private SafeZone m_Region; @@ -279,7 +299,7 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public Rectangle2D Zone { - get{ return m_Zone; } + get => m_Zone; set { m_Zone = value; @@ -302,31 +322,41 @@ namespace Server.Engines.ConPVP } [CommandProperty( AccessLevel.GameMaster )] - public Point3D Outside{ get{ return m_Outside; } set{ m_Outside = value; } } + public Point3D Outside{ get => m_Outside; + set => m_Outside = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D GateIn{ get{ return m_GateIn; } set{ m_GateIn = value; } } + public Point3D GateIn{ get => m_GateIn; + set => m_GateIn = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D GateOut{ get{ return m_GateOut; } set{ m_GateOut = value; if ( m_Teleporter != null ) m_Teleporter.Location = m_GateOut; } } + public Point3D GateOut{ get => m_GateOut; + set{ m_GateOut = value; if ( m_Teleporter != null ) m_Teleporter.Location = m_GateOut; } } [CommandProperty( AccessLevel.GameMaster )] - public Point3D Wall{ get{ return m_Wall; } set{ m_Wall = value; } } + public Point3D Wall{ get => m_Wall; + set => m_Wall = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool IsOccupied{ get{ return ( m_Players.Count > 0 ); } } + public bool IsOccupied => ( m_Players.Count > 0 ); [CommandProperty( AccessLevel.GameMaster )] - public ArenaStartPoints Points{ get{ return m_Points; } set{} } + public ArenaStartPoints Points{ get => m_Points; + set{} } - public Item Teleporter{ get{ return m_Teleporter; } set{ m_Teleporter = value; } } + public Item Teleporter{ get => m_Teleporter; + set => m_Teleporter = value; + } - public List Players{ get{ return m_Players; } } + public List Players => m_Players; [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get{ return m_Active; } + get => m_Active; set { if ( m_Active == value ) @@ -567,7 +597,8 @@ namespace Server.Engines.ConPVP } [CommandProperty( AccessLevel.Administrator, AccessLevel.Administrator )] - public bool ForceEvict{ get{ return false; } set{ if ( value ) Evict(); } } + public bool ForceEvict{ get => false; + set{ if ( value ) Evict(); } } public void Evict() { @@ -662,7 +693,7 @@ namespace Server.Engines.ConPVP private static List m_Arenas = new List(); - public static List Arenas{ get{ return m_Arenas; } } + public static List Arenas => m_Arenas; public static Arena FindArena( List players ) { @@ -765,20 +796,7 @@ namespace Server.Engines.ConPVP public int m_VotesFor; public int m_VotesAgainst; - public int Value - { - get - { - return m_VotesFor; - - /*if ( m_VotesFor > m_VotesAgainst ) - return m_VotesFor - m_VotesAgainst; - else if ( m_VotesFor > 0 ) - return 1; - else - return 0;*/ - } - } + public int Value => m_VotesFor; public ArenaEntry( Arena arena ) { diff --git a/Scripts/Engines/ConPVP/ArenaGump.cs b/Scripts/Engines/ConPVP/ArenaGump.cs index 82d534094..c50a301fb 100644 --- a/Scripts/Engines/ConPVP/ArenaGump.cs +++ b/Scripts/Engines/ConPVP/ArenaGump.cs @@ -9,10 +9,7 @@ namespace Server.Engines.ConPVP { public class ArenasMoongate : Item { - public override string DefaultName - { - get { return "arena moongate"; } - } + public override string DefaultName => "arena moongate"; [Constructible] public ArenasMoongate() : base( 0x1FD4 ) diff --git a/Scripts/Engines/ConPVP/DuelContext.cs b/Scripts/Engines/ConPVP/DuelContext.cs index efe24c9bd..d83f65909 100644 --- a/Scripts/Engines/ConPVP/DuelContext.cs +++ b/Scripts/Engines/ConPVP/DuelContext.cs @@ -34,19 +34,19 @@ namespace Server.Engines.ConPVP private bool m_Rematch; - public bool Rematch{ get{ return m_Rematch; } } + public bool Rematch => m_Rematch; - public bool ReadyWait{ get{ return m_ReadyWait; } } - public int ReadyCount{ get{ return m_ReadyCount; } } + public bool ReadyWait => m_ReadyWait; + public int ReadyCount => m_ReadyCount; - public bool Registered{ get{ return m_Registered; } } - public bool Finished{ get{ return m_Finished; } } - public bool Started{ get{ return m_Started; } } + public bool Registered => m_Registered; + public bool Finished => m_Finished; + public bool Started => m_Started; - public Mobile Initiator{ get{ return m_Initiator; } } - public ArrayList Participants{ get{ return m_Participants; } } - public Ruleset Ruleset{ get{ return m_Ruleset; } } - public Arena Arena{ get{ return m_Arena; } } + public Mobile Initiator => m_Initiator; + public ArrayList Participants => m_Participants; + public Ruleset Ruleset => m_Ruleset; + public Arena Arena => m_Arena; private bool CantDoAnything( Mobile mob ) { @@ -896,11 +896,13 @@ namespace Server.Engines.ConPVP private Timer m_AutoTieTimer; private bool m_Tied; - public bool Tied{ get{ return m_Tied; } } + public bool Tied => m_Tied; private bool m_IsSuddenDeath; - public bool IsSuddenDeath{ get{ return m_IsSuddenDeath; } set{ m_IsSuddenDeath = value; } } + public bool IsSuddenDeath{ get => m_IsSuddenDeath; + set => m_IsSuddenDeath = value; + } private Timer m_SDWarnTimer, m_SDActivateTimer; @@ -1664,8 +1666,8 @@ namespace Server.Engines.ConPVP private bool m_StartedBeginCountdown; private bool m_StartedReadyCountdown; - public bool StartedBeginCountdown{ get{ return m_StartedBeginCountdown; } } - public bool StartedReadyCountdown{ get{ return m_StartedReadyCountdown; } } + public bool StartedBeginCountdown => m_StartedBeginCountdown; + public bool StartedReadyCountdown => m_StartedReadyCountdown; private class InternalWall : Item { @@ -2000,9 +2002,9 @@ namespace Server.Engines.ConPVP private Map m_Facet; private DateTime m_Expire; - public Mobile Mobile{ get{ return m_Mobile; } } - public Point3D Location{ get{ return m_Location; } } - public Map Facet{ get{ return m_Facet; } } + public Mobile Mobile => m_Mobile; + public Point3D Location => m_Location; + public Map Facet => m_Facet; public void Return() { @@ -2036,7 +2038,7 @@ namespace Server.Engines.ConPVP m_Expire = DateTime.UtcNow + TimeSpan.FromMinutes( 30.0 ); } - public bool Expired{ get{ return ( DateTime.UtcNow >= m_Expire ); } } + public bool Expired => ( DateTime.UtcNow >= m_Expire ); public void Update() { @@ -2059,10 +2061,7 @@ namespace Server.Engines.ConPVP { private ArrayList m_Entries; - public override string DefaultName - { - get { return "return teleporter"; } - } + public override string DefaultName => "return teleporter"; public ExitTeleporter() : base( 0x1822 ) { @@ -2183,10 +2182,7 @@ namespace Server.Engines.ConPVP { private ExitTeleporter m_Teleporter; - public override string DefaultName - { - get { return "spectator moongate"; } - } + public override string DefaultName => "spectator moongate"; public ArenaMoongate( Point3D target, Map map, ExitTeleporter tp ) : base( target, map ) { diff --git a/Scripts/Engines/ConPVP/DuelContextGump.cs b/Scripts/Engines/ConPVP/DuelContextGump.cs index 6b65e39fa..0e6816e12 100644 --- a/Scripts/Engines/ConPVP/DuelContextGump.cs +++ b/Scripts/Engines/ConPVP/DuelContextGump.cs @@ -9,8 +9,8 @@ namespace Server.Engines.ConPVP private Mobile m_From; private DuelContext m_Context; - public Mobile From{ get{ return m_From; } } - public DuelContext Context{ get{ return m_Context; } } + public Mobile From => m_From; + public DuelContext Context => m_Context; public string Center( string text ) { diff --git a/Scripts/Engines/ConPVP/Games/BombingRun.cs b/Scripts/Engines/ConPVP/Games/BombingRun.cs index a7e685eed..bd148a9e8 100644 --- a/Scripts/Engines/ConPVP/Games/BombingRun.cs +++ b/Scripts/Engines/ConPVP/Games/BombingRun.cs @@ -788,7 +788,8 @@ namespace Server.Engines.ConPVP private bool m_North = false; [CommandProperty( AccessLevel.GameMaster )] - public bool North { get { return m_North; } set { m_North = value; Remake(); } } + public bool North { get => m_North; + set { m_North = value; Remake(); } } private static AddonComponent SetHue( AddonComponent ac, int hue ) { @@ -908,7 +909,7 @@ namespace Server.Engines.ConPVP public BRTeamInfo Team { - get { return m_Team; } + get => m_Team; set { m_Team = value; @@ -1190,17 +1191,11 @@ namespace Server.Engines.ConPVP return res; } - public string Name - { - get { return m_Player.Name; } - } + public string Name => m_Player.Name; public int Kills { - get - { - return m_Kills; - } + get => m_Kills; set { m_TeamInfo.Kills += ( value - m_Kills ); @@ -1210,10 +1205,7 @@ namespace Server.Engines.ConPVP public int Captures { - get - { - return m_Captures; - } + get => m_Captures; set { m_TeamInfo.Captures += ( value - m_Captures ); @@ -1223,10 +1215,7 @@ namespace Server.Engines.ConPVP public int Score { - get - { - return m_Score; - } + get => m_Score; set { m_TeamInfo.Score += ( value - m_Score ); @@ -1277,38 +1266,40 @@ namespace Server.Engines.ConPVP return res; } - public string Name - { - get { return String.Format( "{0} Team", m_Name ); } - } + public string Name => String.Format( "{0} Team", m_Name ); - public BRGame Game { get { return m_Game; } set { m_Game = value; } } + public BRGame Game { get => m_Game; + set => m_Game = value; + } public int TeamID => m_TeamID; - public int Kills { get { return m_Kills; } set { m_Kills = value; } } - public int Captures { get { return m_Captures; } set { m_Captures = value; } } + public int Kills { get => m_Kills; + set => m_Kills = value; + } + public int Captures { get => m_Captures; + set => m_Captures = value; + } - public int Score { get { return m_Score; } set { m_Score = value; } } + public int Score { get => m_Score; + set => m_Score = value; + } private BRPlayerInfo m_Leader; public BRPlayerInfo Leader { - get { return m_Leader; } - set { m_Leader = value; } + get => m_Leader; + set => m_Leader = value; } [CommandProperty( AccessLevel.GameMaster )] public BRBoard Board { - get { return m_Board; } - set { m_Board = value; } + get => m_Board; + set => m_Board = value; } - public Hashtable Players - { - get { return m_Players; } - } + public Hashtable Players => m_Players; public BRPlayerInfo this[Mobile mob] { @@ -1327,21 +1318,21 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public int Color { - get { return m_Color; } - set { m_Color = value; } + get => m_Color; + set => m_Color = value; } [CommandProperty( AccessLevel.GameMaster )] public string TeamName { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } [CommandProperty( AccessLevel.GameMaster )] public BRGoal Goal { - get { return m_Goal; } + get => m_Goal; set { m_Goal = value; @@ -1423,29 +1414,33 @@ namespace Server.Engines.ConPVP public BRTeamInfo[] TeamInfo => m_TeamInfo; [CommandProperty( AccessLevel.GameMaster )] - public BRTeamInfo Team1 { get { return m_TeamInfo[0]; } set { } } + public BRTeamInfo Team1 { get => m_TeamInfo[0]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public BRTeamInfo Team2 { get { return m_TeamInfo[1]; } set { } } + public BRTeamInfo Team2 { get => m_TeamInfo[1]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public BRTeamInfo Team3 { get { return m_TeamInfo[2]; } set { } } + public BRTeamInfo Team3 { get => m_TeamInfo[2]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public BRTeamInfo Team4 { get { return m_TeamInfo[3]; } set { } } + public BRTeamInfo Team4 { get => m_TeamInfo[3]; + set { } } [CommandProperty( AccessLevel.GameMaster )] public TimeSpan Duration { - get { return m_Duration; } - set { m_Duration = value; } + get => m_Duration; + set => m_Duration = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D BombHome { - get { return m_BombHome; } - set { m_BombHome = value; } + get => m_BombHome; + set => m_BombHome = value; } public override string Title => "Bombing Run"; diff --git a/Scripts/Engines/ConPVP/Games/CTF.cs b/Scripts/Engines/ConPVP/Games/CTF.cs index fd1249775..513dacaf3 100644 --- a/Scripts/Engines/ConPVP/Games/CTF.cs +++ b/Scripts/Engines/ConPVP/Games/CTF.cs @@ -13,10 +13,7 @@ namespace Server.Engines.ConPVP { public CTFTeamInfo m_TeamInfo; - public override string DefaultName - { - get { return "scoreboard"; } - } + public override string DefaultName => "scoreboard"; [Constructible] public CTFBoard() @@ -233,10 +230,7 @@ namespace Server.Engines.ConPVP { public CTFTeamInfo m_TeamInfo; - public override string DefaultName - { - get { return "old people cookies"; } - } + public override string DefaultName => "old people cookies"; public Mobile m_Fragger; public DateTime m_FragTime; @@ -548,17 +542,11 @@ namespace Server.Engines.ConPVP public Mobile Player => m_Player; - string IRankedCTF.Name - { - get { return m_Player.Name; } - } + string IRankedCTF.Name => m_Player.Name; public int Kills { - get - { - return m_Kills; - } + get => m_Kills; set { m_TeamInfo.Kills += ( value - m_Kills ); @@ -568,10 +556,7 @@ namespace Server.Engines.ConPVP public int Captures { - get - { - return m_Captures; - } + get => m_Captures; set { m_TeamInfo.Captures += ( value - m_Captures ); @@ -581,10 +566,7 @@ namespace Server.Engines.ConPVP public int Score { - get - { - return m_Score; - } + get => m_Score; set { m_TeamInfo.Score += ( value - m_Score ); @@ -623,38 +605,40 @@ namespace Server.Engines.ConPVP private Dictionary m_Players; - string IRankedCTF.Name - { - get { return String.Format( "{0} Team", m_Name ); } - } + string IRankedCTF.Name => String.Format( "{0} Team", m_Name ); - public CTFGame Game { get { return m_Game; } set { m_Game = value; } } + public CTFGame Game { get => m_Game; + set => m_Game = value; + } public int TeamID => m_TeamID; - public int Kills { get { return m_Kills; } set { m_Kills = value; } } - public int Captures { get { return m_Captures; } set { m_Captures = value; } } + public int Kills { get => m_Kills; + set => m_Kills = value; + } + public int Captures { get => m_Captures; + set => m_Captures = value; + } - public int Score { get { return m_Score; } set { m_Score = value; } } + public int Score { get => m_Score; + set => m_Score = value; + } private CTFPlayerInfo m_Leader; public CTFPlayerInfo Leader { - get { return m_Leader; } - set { m_Leader = value; } + get => m_Leader; + set => m_Leader = value; } [CommandProperty( AccessLevel.GameMaster )] public CTFBoard Board { - get { return m_Board; } - set { m_Board = value; } + get => m_Board; + set => m_Board = value; } - public Dictionary Players - { - get { return m_Players; } - } + public Dictionary Players => m_Players; public CTFPlayerInfo this[Mobile mob] { @@ -673,29 +657,29 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public int Color { - get { return m_Color; } - set { m_Color = value; } + get => m_Color; + set => m_Color = value; } [CommandProperty( AccessLevel.GameMaster )] public string Name { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } [CommandProperty( AccessLevel.GameMaster )] public CTFFlag Flag { - get { return m_Flag; } - set { m_Flag = value; } + get => m_Flag; + set => m_Flag = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D Origin { - get { return m_Origin; } - set { m_Origin = value; } + get => m_Origin; + set => m_Origin = value; } public CTFTeamInfo( int teamID ) @@ -787,40 +771,45 @@ namespace Server.Engines.ConPVP public CTFTeamInfo[] TeamInfo => m_TeamInfo; [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team1 { get { return m_TeamInfo[0]; } set { } } + public CTFTeamInfo Team1 { get => m_TeamInfo[0]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team2 { get { return m_TeamInfo[1]; } set { } } + public CTFTeamInfo Team2 { get => m_TeamInfo[1]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team3 { get { return m_TeamInfo[2]; } set { } } + public CTFTeamInfo Team3 { get => m_TeamInfo[2]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team4 { get { return m_TeamInfo[3]; } set { } } + public CTFTeamInfo Team4 { get => m_TeamInfo[3]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team5 { get { return m_TeamInfo[4]; } set { } } + public CTFTeamInfo Team5 { get => m_TeamInfo[4]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team6 { get { return m_TeamInfo[5]; } set { } } + public CTFTeamInfo Team6 { get => m_TeamInfo[5]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team7 { get { return m_TeamInfo[6]; } set { } } + public CTFTeamInfo Team7 { get => m_TeamInfo[6]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public CTFTeamInfo Team8 { get { return m_TeamInfo[7]; } set { } } + public CTFTeamInfo Team8 { get => m_TeamInfo[7]; + set { } } [CommandProperty( AccessLevel.GameMaster )] public TimeSpan Duration { - get { return m_Duration; } - set { m_Duration = value; } + get => m_Duration; + set => m_Duration = value; } - public override string Title - { - get { return "CTF"; } - } + public override string Title => "CTF"; public override string GetTeamName( int teamID ) { diff --git a/Scripts/Engines/ConPVP/Games/DoubleDom.cs b/Scripts/Engines/ConPVP/Games/DoubleDom.cs index 76f371da6..63ab67ad4 100644 --- a/Scripts/Engines/ConPVP/Games/DoubleDom.cs +++ b/Scripts/Engines/ConPVP/Games/DoubleDom.cs @@ -11,10 +11,7 @@ namespace Server.Engines.ConPVP { public DDTeamInfo m_TeamInfo; - public override string DefaultName - { - get { return "scoreboard"; } - } + public override string DefaultName => "scoreboard"; [Constructible] public DDBoard() @@ -238,17 +235,11 @@ namespace Server.Engines.ConPVP public Mobile Player => m_Player; - public string Name - { - get { return m_Player.Name; } - } + public string Name => m_Player.Name; public int Kills { - get - { - return m_Kills; - } + get => m_Kills; set { m_TeamInfo.Kills += ( value - m_Kills ); @@ -258,10 +249,7 @@ namespace Server.Engines.ConPVP public int Captures { - get - { - return m_Captures; - } + get => m_Captures; set { m_TeamInfo.Captures += ( value - m_Captures ); @@ -271,10 +259,7 @@ namespace Server.Engines.ConPVP public int Score { - get - { - return m_Score; - } + get => m_Score; set { m_TeamInfo.Score += ( value - m_Score ); @@ -312,38 +297,40 @@ namespace Server.Engines.ConPVP private Dictionary m_Players; - public string Name - { - get { return String.Format( "{0} Team", m_Name ); } - } + public string Name => String.Format( "{0} Team", m_Name ); - public DDGame Game { get { return m_Game; } set { m_Game = value; } } + public DDGame Game { get => m_Game; + set => m_Game = value; + } public int TeamID => m_TeamID; - public int Kills { get { return m_Kills; } set { m_Kills = value; } } - public int Captures { get { return m_Captures; } set { m_Captures = value; } } + public int Kills { get => m_Kills; + set => m_Kills = value; + } + public int Captures { get => m_Captures; + set => m_Captures = value; + } - public int Score { get { return m_Score; } set { m_Score = value; } } + public int Score { get => m_Score; + set => m_Score = value; + } private DDPlayerInfo m_Leader; public DDPlayerInfo Leader { - get { return m_Leader; } - set { m_Leader = value; } + get => m_Leader; + set => m_Leader = value; } [CommandProperty( AccessLevel.GameMaster )] public DDBoard Board { - get { return m_Board; } - set { m_Board = value; } + get => m_Board; + set => m_Board = value; } - public Dictionary Players - { - get { return m_Players; } - } + public Dictionary Players => m_Players; public DDPlayerInfo this[Mobile mob] { @@ -362,22 +349,22 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public int Color { - get { return m_Color; } - set { m_Color = value; } + get => m_Color; + set => m_Color = value; } [CommandProperty( AccessLevel.GameMaster )] public string TeamName { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D Origin { - get { return m_Origin; } - set { m_Origin = value; } + get => m_Origin; + set => m_Origin = value; } public DDTeamInfo( int teamID ) @@ -446,30 +433,33 @@ namespace Server.Engines.ConPVP public DDTeamInfo[] TeamInfo => m_TeamInfo; [CommandProperty( AccessLevel.GameMaster )] - public DDTeamInfo Team1 { get { return m_TeamInfo[0]; } set { } } + public DDTeamInfo Team1 { get => m_TeamInfo[0]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public DDTeamInfo Team2 { get { return m_TeamInfo[1]; } set { } } + public DDTeamInfo Team2 { get => m_TeamInfo[1]; + set { } } [CommandProperty( AccessLevel.GameMaster )] - public DDWayPoint PointA { get { return m_PointA; } set { m_PointA = value; } } + public DDWayPoint PointA { get => m_PointA; + set => m_PointA = value; + } [CommandProperty( AccessLevel.GameMaster )] - public DDWayPoint PointB { get { return m_PointB; } set { m_PointB = value; } } + public DDWayPoint PointB { get => m_PointB; + set => m_PointB = value; + } private DDWayPoint m_PointA, m_PointB; [CommandProperty( AccessLevel.GameMaster )] public TimeSpan Duration { - get { return m_Duration; } - set { m_Duration = value; } + get => m_Duration; + set => m_Duration = value; } - public override string Title - { - get { return "DoubleDom"; } - } + public override string Title => "DoubleDom"; public override string GetTeamName( int teamID ) { @@ -1109,7 +1099,7 @@ namespace Server.Engines.ConPVP public DDGame Game { - get{ return m_Game; } + get => m_Game; set { m_Game = value; @@ -1124,7 +1114,7 @@ namespace Server.Engines.ConPVP public DDTeamInfo TeamOwner { - get{ return m_TeamOwner; } + get => m_TeamOwner; set { m_TeamOwner = value; diff --git a/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs b/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs index 626221dc2..bf1be1e3c 100644 --- a/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs +++ b/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs @@ -58,18 +58,12 @@ namespace Server.Engines.ConPVP writer.WriteEncodedInt(m_ScoreInterval); } - public Mobile King - { - get - { - return m_King; - } - } + public Mobile King => m_King; - public KHGame Game + public KHGame Game { - get { return m_Game; } - set + get => m_Game; + set { if (m_Game != value) { @@ -82,7 +76,9 @@ namespace Server.Engines.ConPVP } [CommandProperty(AccessLevel.GameMaster)] - public int ScoreInterval { get { return m_ScoreInterval; } set { m_ScoreInterval = value; } } + public int ScoreInterval { get => m_ScoreInterval; + set => m_ScoreInterval = value; + } public int CapturesSoFar { @@ -307,8 +303,8 @@ namespace Server.Engines.ConPVP [CommandProperty(AccessLevel.GameMaster)] public KHController Controller { - get { return m_Controller; } - set + get => m_Controller; + set { if (m_Controller != value) { @@ -563,11 +559,8 @@ namespace Server.Engines.ConPVP public int Kills { - get - { - return m_Kills; - } - set + get => m_Kills; + set { m_TeamInfo.Kills += (value - m_Kills); m_Kills = value; @@ -576,11 +569,8 @@ namespace Server.Engines.ConPVP public int Captures { - get - { - return m_Captures; - } - set + get => m_Captures; + set { m_TeamInfo.Captures += (value - m_Captures); m_Captures = value; @@ -589,11 +579,8 @@ namespace Server.Engines.ConPVP public int Score { - get - { - return m_Score; - } - set + get => m_Score; + set { m_TeamInfo.Score += (value - m_Score); m_Score = value; @@ -644,27 +631,32 @@ namespace Server.Engines.ConPVP } } - public KHGame Game { get { return m_Game; } set { m_Game = value; } } + public KHGame Game { get => m_Game; + set => m_Game = value; + } public int TeamID => m_TeamID; - public int Kills { get { return m_Kills; } set { m_Kills = value; } } - public int Captures { get { return m_Captures; } set { m_Captures = value; } } - public int Score { get { return m_Score; } set { m_Score = value; } } + public int Kills { get => m_Kills; + set => m_Kills = value; + } + public int Captures { get => m_Captures; + set => m_Captures = value; + } + public int Score { get => m_Score; + set => m_Score = value; + } private KHPlayerInfo m_Leader; public KHPlayerInfo Leader { - get { return m_Leader; } - set { m_Leader = value; } + get => m_Leader; + set => m_Leader = value; } - public Hashtable Players - { - get { return m_Players; } - } + public Hashtable Players => m_Players; - public KHPlayerInfo this[Mobile mob] + public KHPlayerInfo this[Mobile mob] { get { @@ -681,15 +673,15 @@ namespace Server.Engines.ConPVP [CommandProperty(AccessLevel.GameMaster)] public int Color { - get { return m_Color; } - set { m_Color = value; } + get => m_Color; + set => m_Color = value; } [CommandProperty(AccessLevel.GameMaster)] public string TeamName { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } public KHTeamInfo(int teamID) @@ -755,58 +747,71 @@ namespace Server.Engines.ConPVP public KHTeamInfo[] TeamInfo => m_TeamInfo; [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team1_W { get { return m_TeamInfo[0]; } set { } } + public KHTeamInfo Team1_W { get => m_TeamInfo[0]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team2_E { get { return m_TeamInfo[1]; } set { } } + public KHTeamInfo Team2_E { get => m_TeamInfo[1]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team3_N { get { return m_TeamInfo[2]; } set { } } + public KHTeamInfo Team3_N { get => m_TeamInfo[2]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team4_S { get { return m_TeamInfo[3]; } set { } } + public KHTeamInfo Team4_S { get => m_TeamInfo[3]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team5_NW { get { return m_TeamInfo[4]; } set { } } + public KHTeamInfo Team5_NW { get => m_TeamInfo[4]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team6_SE { get { return m_TeamInfo[5]; } set { } } + public KHTeamInfo Team6_SE { get => m_TeamInfo[5]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team7_SW { get { return m_TeamInfo[6]; } set { } } + public KHTeamInfo Team7_SW { get => m_TeamInfo[6]; + set { } } [CommandProperty(AccessLevel.GameMaster)] - public KHTeamInfo Team8_NE { get { return m_TeamInfo[7]; } set { } } + public KHTeamInfo Team8_NE { get => m_TeamInfo[7]; + set { } } public HillOfTheKing[] Hills => m_Hills; [CommandProperty(AccessLevel.GameMaster)] - public HillOfTheKing Hill1 { get { return m_Hills[0]; } set { m_Hills[0] = value; } } + public HillOfTheKing Hill1 { get => m_Hills[0]; + set => m_Hills[0] = value; + } [CommandProperty(AccessLevel.GameMaster)] - public HillOfTheKing Hill2 { get { return m_Hills[1]; } set { m_Hills[1] = value; } } + public HillOfTheKing Hill2 { get => m_Hills[1]; + set => m_Hills[1] = value; + } [CommandProperty(AccessLevel.GameMaster)] - public HillOfTheKing Hill3 { get { return m_Hills[2]; } set { m_Hills[2] = value; } } + public HillOfTheKing Hill3 { get => m_Hills[2]; + set => m_Hills[2] = value; + } [CommandProperty(AccessLevel.GameMaster)] - public HillOfTheKing Hill4 { get { return m_Hills[3]; } set { m_Hills[3] = value; } } + public HillOfTheKing Hill4 { get => m_Hills[3]; + set => m_Hills[3] = value; + } public ArrayList Boards => m_Boards; [CommandProperty(AccessLevel.GameMaster)] public TimeSpan Duration { - get { return m_Duration; } - set { m_Duration = value; } + get => m_Duration; + set => m_Duration = value; } - public override string Title - { - get { return "King of the Hill"; } - } + public override string Title => "King of the Hill"; - public override string GetTeamName(int teamID) + public override string GetTeamName(int teamID) { return m_TeamInfo[teamID % m_TeamInfo.Length].Name; } diff --git a/Scripts/Engines/ConPVP/Ladder.cs b/Scripts/Engines/ConPVP/Ladder.cs index 60ea219e9..4d9fc24f5 100644 --- a/Scripts/Engines/ConPVP/Ladder.cs +++ b/Scripts/Engines/ConPVP/Ladder.cs @@ -8,12 +8,10 @@ namespace Server.Engines.ConPVP private Ladder m_Ladder; //[CommandProperty( AccessLevel.GameMaster )] - public Ladder Ladder{ get{ return m_Ladder; } set{} } + public Ladder Ladder{ get => m_Ladder; + set{} } - public override string DefaultName - { - get { return "ladder controller"; } - } + public override string DefaultName => "ladder controller"; [Constructible] public LadderController() : base( 0x1B7A ) @@ -251,7 +249,9 @@ namespace Server.Engines.ConPVP private static Ladder m_Instance; - public static Ladder Instance{ get{ return m_Instance; } set{ m_Instance = value; } } + public static Ladder Instance{ get => m_Instance; + set => m_Instance = value; + } public Ladder() { @@ -322,21 +322,28 @@ namespace Server.Engines.ConPVP private int m_Index; private Ladder m_Ladder; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public int Experience{ get{ return m_Experience; } set{ m_Experience = value; m_Ladder.UpdateEntry(this); } } + public int Experience{ get => m_Experience; + set{ m_Experience = value; m_Ladder.UpdateEntry(this); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public int Wins{ get{ return m_Wins; } set{ m_Wins = value; } } + public int Wins{ get => m_Wins; + set => m_Wins = value; + } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public int Losses{ get{ return m_Losses; } set{ m_Losses = value; } } + public int Losses{ get => m_Losses; + set => m_Losses = value; + } - public int Index{ get{ return m_Index; } set{ m_Index = value; } } + public int Index{ get => m_Index; + set => m_Index = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Rank{ get{ return m_Index; } } + public int Rank => m_Index; public LadderEntry( Mobile mob, Ladder ladder ) { diff --git a/Scripts/Engines/ConPVP/LadderGump.cs b/Scripts/Engines/ConPVP/LadderGump.cs index 247511b6a..a4048211b 100644 --- a/Scripts/Engines/ConPVP/LadderGump.cs +++ b/Scripts/Engines/ConPVP/LadderGump.cs @@ -12,14 +12,11 @@ namespace Server.Engines.ConPVP [CommandProperty( AccessLevel.GameMaster )] public LadderController Ladder { - get{ return m_Ladder; } - set{ m_Ladder = value; } + get => m_Ladder; + set => m_Ladder = value; } - public override string DefaultName - { - get { return "1v1 leaderboard"; } - } + public override string DefaultName => "1v1 leaderboard"; [Constructible] public LadderItem() : base( 0x117F ) diff --git a/Scripts/Engines/ConPVP/Participant.cs b/Scripts/Engines/ConPVP/Participant.cs index ee32f5629..0961bdf3b 100644 --- a/Scripts/Engines/ConPVP/Participant.cs +++ b/Scripts/Engines/ConPVP/Participant.cs @@ -10,10 +10,12 @@ namespace Server.Engines.ConPVP private DuelPlayer[] m_Players; private TournyParticipant m_TournyPart; - public int Count{ get{ return m_Players.Length; } } - public DuelPlayer[] Players{ get{ return m_Players; } } - public DuelContext Context{ get{ return m_Context; } } - public TournyParticipant TournyPart{ get{ return m_TournyPart; } set{ m_TournyPart = value; } } + public int Count => m_Players.Length; + public DuelPlayer[] Players => m_Players; + public DuelContext Context => m_Context; + public TournyParticipant TournyPart{ get => m_TournyPart; + set => m_TournyPart = value; + } public DuelPlayer Find( Mobile mob ) { @@ -215,10 +217,15 @@ namespace Server.Engines.ConPVP private bool m_Ready; private Participant m_Participant; - public Mobile Mobile{ get{ return m_Mobile; } } - public bool Ready{ get{ return m_Ready; } set{ m_Ready = value; } } - public bool Eliminated{ get{ return m_Eliminated; } set{ m_Eliminated = value; if ( m_Participant.Context.m_Tournament != null && m_Eliminated ){ m_Participant.Context.m_Tournament.OnEliminated( this ); m_Mobile.SendEverything(); } } } - public Participant Participant{ get{ return m_Participant; } set{ m_Participant = value; } } + public Mobile Mobile => m_Mobile; + public bool Ready{ get => m_Ready; + set => m_Ready = value; + } + public bool Eliminated{ get => m_Eliminated; + set{ m_Eliminated = value; if ( m_Participant.Context.m_Tournament != null && m_Eliminated ){ m_Participant.Context.m_Tournament.OnEliminated( this ); m_Mobile.SendEverything(); } } } + public Participant Participant{ get => m_Participant; + set => m_Participant = value; + } public DuelPlayer( Mobile mob, Participant p ) { diff --git a/Scripts/Engines/ConPVP/ParticipantGump.cs b/Scripts/Engines/ConPVP/ParticipantGump.cs index fb71edde8..b16d3454e 100644 --- a/Scripts/Engines/ConPVP/ParticipantGump.cs +++ b/Scripts/Engines/ConPVP/ParticipantGump.cs @@ -12,9 +12,9 @@ namespace Server.Engines.ConPVP private DuelContext m_Context; private Participant m_Participant; - public Mobile From{ get{ return m_From; } } - public DuelContext Context{ get{ return m_Context; } } - public Participant Participant{ get{ return m_Participant; } } + public Mobile From => m_From; + public DuelContext Context => m_Context; + public Participant Participant => m_Participant; public string Center( string text ) { diff --git a/Scripts/Engines/ConPVP/Preferences.cs b/Scripts/Engines/ConPVP/Preferences.cs index e725d6222..ccdf16ced 100644 --- a/Scripts/Engines/ConPVP/Preferences.cs +++ b/Scripts/Engines/ConPVP/Preferences.cs @@ -11,12 +11,10 @@ namespace Server.Engines.ConPVP private Preferences m_Preferences; //[CommandProperty( AccessLevel.GameMaster )] - public Preferences Preferences{ get{ return m_Preferences; } set{} } + public Preferences Preferences{ get => m_Preferences; + set{} } - public override string DefaultName - { - get { return "preferences controller"; } - } + public override string DefaultName => "preferences controller"; [Constructible] public PreferencesController() : base( 0x1B7A ) @@ -74,7 +72,7 @@ namespace Server.Engines.ConPVP private ArrayList m_Entries; private Hashtable m_Table; - public ArrayList Entries{ get{ return m_Entries; } } + public ArrayList Entries => m_Entries; public PreferencesEntry Find( Mobile mob ) { @@ -91,7 +89,9 @@ namespace Server.Engines.ConPVP private static Preferences m_Instance; - public static Preferences Instance{ get{ return m_Instance; } set{ m_Instance = value; } } + public static Preferences Instance{ get => m_Instance; + set => m_Instance = value; + } public Preferences() { @@ -145,8 +145,8 @@ namespace Server.Engines.ConPVP private ArrayList m_Disliked; private Preferences m_Preferences; - public Mobile Mobile{ get{ return m_Mobile; } } - public ArrayList Disliked{ get{ return m_Disliked; } } + public Mobile Mobile => m_Mobile; + public ArrayList Disliked => m_Disliked; public PreferencesEntry( Mobile mob, Preferences prefs ) { diff --git a/Scripts/Engines/ConPVP/Ruleset.cs b/Scripts/Engines/ConPVP/Ruleset.cs index 00e5dedd0..53e50e033 100644 --- a/Scripts/Engines/ConPVP/Ruleset.cs +++ b/Scripts/Engines/ConPVP/Ruleset.cs @@ -12,13 +12,17 @@ namespace Server.Engines.ConPVP private ArrayList m_Flavors = new ArrayList(); private bool m_Changed; - public RulesetLayout Layout{ get{ return m_Layout; } } - public BitArray Options{ get{ return m_Options; } } - public string Title{ get{ return m_Title; } set{ m_Title = value; } } + public RulesetLayout Layout => m_Layout; + public BitArray Options => m_Options; + public string Title{ get => m_Title; + set => m_Title = value; + } - public Ruleset Base{ get{ return m_Base; } } - public ArrayList Flavors{ get{ return m_Flavors; } } - public bool Changed{ get{ return m_Changed; } set{ m_Changed = value; } } + public Ruleset Base => m_Base; + public ArrayList Flavors => m_Flavors; + public bool Changed{ get => m_Changed; + set => m_Changed = value; + } public void ApplyDefault( Ruleset newDefault ) { diff --git a/Scripts/Engines/ConPVP/RulesetLayout.cs b/Scripts/Engines/ConPVP/RulesetLayout.cs index 775563521..9c5cc18ed 100644 --- a/Scripts/Engines/ConPVP/RulesetLayout.cs +++ b/Scripts/Engines/ConPVP/RulesetLayout.cs @@ -660,18 +660,22 @@ namespace Server.Engines.ConPVP private RulesetLayout m_Parent; private RulesetLayout[] m_Children; - public string Title{ get{ return m_Title; } } - public string Description{ get{ return m_Description; } } - public string[] Options{ get{ return m_Options; } } + public string Title => m_Title; + public string Description => m_Description; + public string[] Options => m_Options; - public int Offset{ get{ return m_Offset; } } - public int TotalLength{ get{ return m_TotalLength; } } + public int Offset => m_Offset; + public int TotalLength => m_TotalLength; - public RulesetLayout Parent{ get{ return m_Parent; } } - public RulesetLayout[] Children{ get{ return m_Children; } } + public RulesetLayout Parent => m_Parent; + public RulesetLayout[] Children => m_Children; - public Ruleset[] Defaults{ get{ return m_Defaults; } set{ m_Defaults = value; } } - public Ruleset[] Flavors{ get{ return m_Flavors; } set{ m_Flavors = value; } } + public Ruleset[] Defaults{ get => m_Defaults; + set => m_Defaults = value; + } + public Ruleset[] Flavors{ get => m_Flavors; + set => m_Flavors = value; + } public RulesetLayout FindByTitle( string title ) { diff --git a/Scripts/Engines/ConPVP/Tournament.cs b/Scripts/Engines/ConPVP/Tournament.cs index 26eaea289..b8d830ab1 100644 --- a/Scripts/Engines/ConPVP/Tournament.cs +++ b/Scripts/Engines/ConPVP/Tournament.cs @@ -41,7 +41,9 @@ namespace Server.Engines.ConPVP private TournamentController m_Tournament; [CommandProperty( AccessLevel.GameMaster )] - public TournamentController Tournament{ get{ return m_Tournament; } set{ m_Tournament = value; } } + public TournamentController Tournament{ get => m_Tournament; + set => m_Tournament = value; + } [Constructible] public TournamentRegistrar() @@ -138,16 +140,17 @@ namespace Server.Engines.ConPVP private Mobile m_Registrar; [CommandProperty( AccessLevel.GameMaster )] - public TournamentController Tournament{ get{ return m_Tournament; } set{ m_Tournament = value; } } + public TournamentController Tournament{ get => m_Tournament; + set => m_Tournament = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Registrar{ get{ return m_Registrar; } set{ m_Registrar = value; } } - - public override string DefaultName - { - get { return "tournament signup book"; } + public Mobile Registrar{ get => m_Registrar; + set => m_Registrar = value; } + public override string DefaultName => "tournament signup book"; + [Constructible] public TournamentSignupItem() : base( 4029 ) { @@ -1186,7 +1189,8 @@ namespace Server.Engines.ConPVP private Tournament m_Tournament; [CommandProperty( AccessLevel.GameMaster )] - public Tournament Tournament{ get{ return m_Tournament; } set{} } + public Tournament Tournament{ get => m_Tournament; + set{} } private static ArrayList m_Instances = new ArrayList(); @@ -1206,10 +1210,7 @@ namespace Server.Engines.ConPVP } } - public override string DefaultName - { - get { return "tournament controller"; } - } + public override string DefaultName => "tournament controller"; [Constructible] public TournamentController() : base( 0x1B7A ) @@ -1360,139 +1361,132 @@ namespace Server.Engines.ConPVP private EventController m_EventController; - public bool IsNotoRestricted { get { return ( m_TournyType != TournyType.Standard ); } } + public bool IsNotoRestricted => ( m_TournyType != TournyType.Standard ); [CommandProperty( AccessLevel.GameMaster )] public EventController EventController { - get { return m_EventController; } - set { m_EventController = value; } + get => m_EventController; + set => m_EventController = value; } [CommandProperty( AccessLevel.GameMaster )] public int SuddenDeathRounds { - get{ return m_SuddenDeathRounds; } - set{ m_SuddenDeathRounds = value; } + get => m_SuddenDeathRounds; + set => m_SuddenDeathRounds = value; } [CommandProperty( AccessLevel.GameMaster )] public TournyType TournyType { - get{ return m_TournyType; } - set{ m_TournyType = value; } + get => m_TournyType; + set => m_TournyType = value; } [CommandProperty( AccessLevel.GameMaster )] public GroupingType GroupType { - get{ return m_GroupType; } - set{ m_GroupType = value; } + get => m_GroupType; + set => m_GroupType = value; } [CommandProperty( AccessLevel.GameMaster )] public TieType TieType { - get{ return m_TieType; } - set{ m_TieType = value; } + get => m_TieType; + set => m_TieType = value; } [CommandProperty( AccessLevel.GameMaster )] public TimeSpan SuddenDeath { - get{ return m_SuddenDeath; } - set{ m_SuddenDeath = value; } + get => m_SuddenDeath; + set => m_SuddenDeath = value; } public Ruleset Ruleset { - get{ return m_Ruleset; } - set{ m_Ruleset = value; } + get => m_Ruleset; + set => m_Ruleset = value; } [CommandProperty( AccessLevel.GameMaster )] public int ParticipantsPerMatch { - get{ return m_ParticipantsPerMatch; } + get => m_ParticipantsPerMatch; set{ if ( value < 2 ) value = 2; else if ( value > 10 ) value = 10; m_ParticipantsPerMatch = value; } } [CommandProperty( AccessLevel.GameMaster )] public int PlayersPerParticipant { - get{ return m_PlayersPerParticipant; } + get => m_PlayersPerParticipant; set{ if ( value < 1 ) value = 1; else if ( value > 10 ) value = 10; m_PlayersPerParticipant = value; } } [CommandProperty( AccessLevel.GameMaster )] public int LevelRequirement { - get{ return m_LevelRequirement; } - set{ m_LevelRequirement = value; } + get => m_LevelRequirement; + set => m_LevelRequirement = value; } [CommandProperty( AccessLevel.GameMaster )] public bool FactionRestricted { - get{ return m_FactionRestricted; } - set{ m_FactionRestricted = value; } + get => m_FactionRestricted; + set => m_FactionRestricted = value; } [CommandProperty( AccessLevel.GameMaster )] public TimeSpan SignupPeriod { - get{ return m_SignupPeriod; } - set{ m_SignupPeriod = value; } + get => m_SignupPeriod; + set => m_SignupPeriod = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime SignupStart { - get{ return m_SignupStart; } - set{ m_SignupStart = value; } + get => m_SignupStart; + set => m_SignupStart = value; } [CommandProperty( AccessLevel.GameMaster )] - public TournamentStage CurrentStage - { - get{ return m_Stage; } - } + public TournamentStage CurrentStage => m_Stage; public TournamentStage Stage { - get{ return m_Stage; } - set{ m_Stage = value; } + get => m_Stage; + set => m_Stage = value; } public TournyPyramid Pyramid { - get{ return m_Pyramid; } - set{ m_Pyramid = value; } + get => m_Pyramid; + set => m_Pyramid = value; } public ArrayList Arenas { - get{ return m_Arenas; } - set{ m_Arenas = value; } + get => m_Arenas; + set => m_Arenas = value; } public ArrayList Participants { - get{ return m_Participants; } - set{ m_Participants = value; } + get => m_Participants; + set => m_Participants = value; } public ArrayList Undefeated { - get{ return m_Undefeated; } - set{ m_Undefeated = value; } + get => m_Undefeated; + set => m_Undefeated = value; } - public bool IsFactionRestricted { - get { - return ( m_FactionRestricted || m_TournyType == TournyType.Faction ); - } - } + public bool IsFactionRestricted => ( m_FactionRestricted || m_TournyType == TournyType.Faction ); public bool HasParticipant( Mobile mob ) { @@ -2255,8 +2249,8 @@ namespace Server.Engines.ConPVP public ArrayList Levels { - get{ return m_Levels; } - set{ m_Levels = value; } + get => m_Levels; + set => m_Levels = value; } public TournyPyramid() @@ -2443,14 +2437,14 @@ namespace Server.Engines.ConPVP public ArrayList Matches { - get{ return m_Matches; } - set{ m_Matches = value; } + get => m_Matches; + set => m_Matches = value; } public TournyParticipant FreeAdvance { - get{ return m_FreeAdvance; } - set{ m_FreeAdvance = value; } + get => m_FreeAdvance; + set => m_FreeAdvance = value; } public PyramidLevel() @@ -2467,26 +2461,23 @@ namespace Server.Engines.ConPVP public ArrayList Participants { - get{ return m_Participants; } - set{ m_Participants = value; } + get => m_Participants; + set => m_Participants = value; } public TournyParticipant Winner { - get{ return m_Winner; } - set{ m_Winner = value; } + get => m_Winner; + set => m_Winner = value; } public DuelContext Context { - get{ return m_Context; } - set{ m_Context = value; } + get => m_Context; + set => m_Context = value; } - public bool InProgress - { - get{ return ( m_Context != null && m_Context.Registered ); } - } + public bool InProgress => ( m_Context != null && m_Context.Registered ); public void Start( Arena arena, Tournament tourny ) { @@ -2601,20 +2592,20 @@ namespace Server.Engines.ConPVP public ArrayList Players { - get{ return m_Players; } - set{ m_Players = value; } + get => m_Players; + set => m_Players = value; } public ArrayList Log { - get{ return m_Log; } - set{ m_Log = value; } + get => m_Log; + set => m_Log = value; } public int FreeAdvances { - get{ return m_FreeAdvances; } - set{ m_FreeAdvances = value; } + get => m_FreeAdvances; + set => m_FreeAdvances = value; } public int TotalLadderXP @@ -3520,13 +3511,12 @@ namespace Server.Engines.ConPVP private TournamentController m_Tournament; [CommandProperty( AccessLevel.GameMaster )] - public TournamentController Tournament{ get{ return m_Tournament; } set{ m_Tournament = value; } } - - public override string DefaultName - { - get { return "tournament bracket"; } + public TournamentController Tournament{ get => m_Tournament; + set => m_Tournament = value; } + public override string DefaultName => "tournament bracket"; + [Constructible] public TournamentBracketItem() : base( 3774 ) { diff --git a/Scripts/Engines/ConPVP/Trophy.cs b/Scripts/Engines/ConPVP/Trophy.cs index 0181c2eed..3a4c72bbe 100644 --- a/Scripts/Engines/ConPVP/Trophy.cs +++ b/Scripts/Engines/ConPVP/Trophy.cs @@ -18,16 +18,21 @@ namespace Server.Items private DateTime m_Date; [CommandProperty( AccessLevel.GameMaster )] - public string Title{ get{ return m_Title; } set{ m_Title = value; } } + public string Title{ get => m_Title; + set => m_Title = value; + } [CommandProperty( AccessLevel.GameMaster )] - public TrophyRank Rank{ get{ return m_Rank; } set{ m_Rank = value; UpdateStyle(); } } + public TrophyRank Rank{ get => m_Rank; + set{ m_Rank = value; UpdateStyle(); } } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Owner{ get{ return m_Owner; } set{ m_Owner = value; } } + public Mobile Owner{ get => m_Owner; + set => m_Owner = value; + } [CommandProperty( AccessLevel.GameMaster )] - public DateTime Date{ get{ return m_Date; } } + public DateTime Date => m_Date; [Constructible] public Trophy( string title, TrophyRank rank ) : base( 5020 ) diff --git a/Scripts/Engines/Craft/Core/CraftContext.cs b/Scripts/Engines/Craft/Core/CraftContext.cs index cf19206d8..2310016dd 100644 --- a/Scripts/Engines/Craft/Core/CraftContext.cs +++ b/Scripts/Engines/Craft/Core/CraftContext.cs @@ -19,11 +19,21 @@ namespace Server.Engines.Craft private CraftMarkOption m_MarkOption; public List Items => m_Items; - public int LastResourceIndex{ get{ return m_LastResourceIndex; } set{ m_LastResourceIndex = value; } } - public int LastResourceIndex2{ get{ return m_LastResourceIndex2; } set{ m_LastResourceIndex2 = value; } } - public int LastGroupIndex{ get{ return m_LastGroupIndex; } set{ m_LastGroupIndex = value; } } - public bool DoNotColor{ get{ return m_DoNotColor; } set{ m_DoNotColor = value; } } - public CraftMarkOption MarkOption{ get{ return m_MarkOption; } set{ m_MarkOption = value; } } + public int LastResourceIndex{ get => m_LastResourceIndex; + set => m_LastResourceIndex = value; + } + public int LastResourceIndex2{ get => m_LastResourceIndex2; + set => m_LastResourceIndex2 = value; + } + public int LastGroupIndex{ get => m_LastGroupIndex; + set => m_LastGroupIndex = value; + } + public bool DoNotColor{ get => m_DoNotColor; + set => m_DoNotColor = value; + } + public CraftMarkOption MarkOption{ get => m_MarkOption; + set => m_MarkOption = value; + } public CraftContext() { diff --git a/Scripts/Engines/Craft/Core/CraftGroup.cs b/Scripts/Engines/Craft/Core/CraftGroup.cs index 2eb95e63d..c79398817 100644 --- a/Scripts/Engines/Craft/Core/CraftGroup.cs +++ b/Scripts/Engines/Craft/Core/CraftGroup.cs @@ -19,19 +19,10 @@ namespace Server.Engines.Craft m_arCraftItem.Add( craftItem ); } - public CraftItemCol CraftItems - { - get { return m_arCraftItem; } - } + public CraftItemCol CraftItems => m_arCraftItem; - public string NameString - { - get { return m_NameString; } - } + public string NameString => m_NameString; - public int NameNumber - { - get { return m_NameNumber; } - } + public int NameNumber => m_NameNumber; } } \ No newline at end of file diff --git a/Scripts/Engines/Craft/Core/CraftItem.cs b/Scripts/Engines/Craft/Core/CraftItem.cs index 52bb3a180..44aafc5dd 100644 --- a/Scripts/Engines/Craft/Core/CraftItem.cs +++ b/Scripts/Engines/Craft/Core/CraftItem.cs @@ -49,24 +49,21 @@ namespace Server.Engines.Craft public bool ForceNonExceptional { - get { return m_ForceNonExceptional; } - set { m_ForceNonExceptional = value; } + get => m_ForceNonExceptional; + set => m_ForceNonExceptional = value; } private Expansion m_RequiredExpansion; public Expansion RequiredExpansion { - get { return m_RequiredExpansion; } - set { m_RequiredExpansion = value; } + get => m_RequiredExpansion; + set => m_RequiredExpansion = value; } private Recipe m_Recipe; - public Recipe Recipe - { - get { return m_Recipe; } - } + public Recipe Recipe => m_Recipe; public void AddRecipe( int id, CraftSystem system ) { @@ -148,8 +145,8 @@ namespace Server.Engines.Craft public BeverageType RequiredBeverage { - get { return m_RequiredBeverage; } - set { m_RequiredBeverage = value; } + get => m_RequiredBeverage; + set => m_RequiredBeverage = value; } public void AddRes( Type type, TextDefinition name, int amount ) @@ -172,92 +169,71 @@ namespace Server.Engines.Craft public int Mana { - get { return m_Mana; } - set { m_Mana = value; } + get => m_Mana; + set => m_Mana = value; } public int Hits { - get { return m_Hits; } - set { m_Hits = value; } + get => m_Hits; + set => m_Hits = value; } public int Stam { - get { return m_Stam; } - set { m_Stam = value; } + get => m_Stam; + set => m_Stam = value; } public bool UseSubRes2 { - get { return m_UseSubRes2; } - set { m_UseSubRes2 = value; } + get => m_UseSubRes2; + set => m_UseSubRes2 = value; } public bool UseAllRes { - get { return m_UseAllRes; } - set { m_UseAllRes = value; } + get => m_UseAllRes; + set => m_UseAllRes = value; } public bool NeedHeat { - get { return m_NeedHeat; } - set { m_NeedHeat = value; } + get => m_NeedHeat; + set => m_NeedHeat = value; } public bool NeedOven { - get { return m_NeedOven; } - set { m_NeedOven = value; } + get => m_NeedOven; + set => m_NeedOven = value; } public bool NeedMill { - get { return m_NeedMill; } - set { m_NeedMill = value; } + get => m_NeedMill; + set => m_NeedMill = value; } - public Type ItemType - { - get { return m_Type; } - } + public Type ItemType => m_Type; public int ItemHue { - get { return m_ItemHue; } - set { m_ItemHue = value; } + get => m_ItemHue; + set => m_ItemHue = value; } - public string GroupNameString - { - get { return m_GroupNameString; } - } + public string GroupNameString => m_GroupNameString; - public int GroupNameNumber - { - get { return m_GroupNameNumber; } - } + public int GroupNameNumber => m_GroupNameNumber; - public string NameString - { - get { return m_NameString; } - } + public string NameString => m_NameString; - public int NameNumber - { - get { return m_NameNumber; } - } + public int NameNumber => m_NameNumber; - public CraftResCol Resources - { - get { return m_arCraftRes; } - } + public CraftResCol Resources => m_arCraftRes; - public CraftSkillCol Skills - { - get { return m_arCraftSkill; } - } + public CraftSkillCol Skills => m_arCraftSkill; public bool ConsumeAttributes( Mobile from, ref object message, bool consume ) { diff --git a/Scripts/Engines/Craft/Core/CraftItemIDAttribute.cs b/Scripts/Engines/Craft/Core/CraftItemIDAttribute.cs index 497f914da..1d7498678 100644 --- a/Scripts/Engines/Craft/Core/CraftItemIDAttribute.cs +++ b/Scripts/Engines/Craft/Core/CraftItemIDAttribute.cs @@ -7,7 +7,7 @@ namespace Server.Engines.Craft { private int m_ItemID; - public int ItemID{ get{ return m_ItemID; } } + public int ItemID => m_ItemID; public CraftItemIDAttribute( int itemID ) { diff --git a/Scripts/Engines/Craft/Core/CraftRes.cs b/Scripts/Engines/Craft/Core/CraftRes.cs index 00ed12e54..4b3e2a6ae 100644 --- a/Scripts/Engines/Craft/Core/CraftRes.cs +++ b/Scripts/Engines/Craft/Core/CraftRes.cs @@ -38,34 +38,16 @@ namespace Server.Engines.Craft from.SendLocalizedMessage( 502925 ); // You don't have the resources required to make that item. } - public Type ItemType - { - get { return m_Type; } - } + public Type ItemType => m_Type; - public string MessageString - { - get { return m_MessageString; } - } + public string MessageString => m_MessageString; - public int MessageNumber - { - get { return m_MessageNumber; } - } + public int MessageNumber => m_MessageNumber; - public string NameString - { - get { return m_NameString; } - } + public string NameString => m_NameString; - public int NameNumber - { - get { return m_NameNumber; } - } + public int NameNumber => m_NameNumber; - public int Amount - { - get { return m_Amount; } - } + public int Amount => m_Amount; } } diff --git a/Scripts/Engines/Craft/Core/CraftSkill.cs b/Scripts/Engines/Craft/Core/CraftSkill.cs index ed099b70c..c256bf796 100644 --- a/Scripts/Engines/Craft/Core/CraftSkill.cs +++ b/Scripts/Engines/Craft/Core/CraftSkill.cs @@ -13,19 +13,10 @@ namespace Server.Engines.Craft m_MaxSkill = maxSkill; } - public SkillName SkillToMake - { - get { return m_SkillToMake; } - } + public SkillName SkillToMake => m_SkillToMake; - public double MinSkill - { - get { return m_MinSkill; } - } + public double MinSkill => m_MinSkill; - public double MaxSkill - { - get { return m_MaxSkill; } - } + public double MaxSkill => m_MaxSkill; } } \ No newline at end of file diff --git a/Scripts/Engines/Craft/Core/CraftSubRes.cs b/Scripts/Engines/Craft/Core/CraftSubRes.cs index acef6a6e4..e6c0d2f1e 100644 --- a/Scripts/Engines/Craft/Core/CraftSubRes.cs +++ b/Scripts/Engines/Craft/Core/CraftSubRes.cs @@ -25,34 +25,16 @@ namespace Server.Engines.Craft m_Message = message; } - public Type ItemType - { - get { return m_Type; } - } + public Type ItemType => m_Type; - public string NameString - { - get { return m_NameString; } - } + public string NameString => m_NameString; - public int NameNumber - { - get { return m_NameNumber; } - } + public int NameNumber => m_NameNumber; - public int GenericNameNumber - { - get { return m_GenericNameNumber; } - } + public int GenericNameNumber => m_GenericNameNumber; - public object Message - { - get { return m_Message; } - } + public object Message => m_Message; - public double RequiredSkill - { - get { return m_ReqSkill; } - } + public double RequiredSkill => m_ReqSkill; } } \ No newline at end of file diff --git a/Scripts/Engines/Craft/Core/CraftSubResCol.cs b/Scripts/Engines/Craft/Core/CraftSubResCol.cs index 2ffb18993..d70350c18 100644 --- a/Scripts/Engines/Craft/Core/CraftSubResCol.cs +++ b/Scripts/Engines/Craft/Core/CraftSubResCol.cs @@ -11,26 +11,26 @@ namespace Server.Engines.Craft public bool Init { - get { return m_Init; } - set { m_Init = value; } + get => m_Init; + set => m_Init = value; } public Type ResType { - get { return m_Type; } - set { m_Type = value; } + get => m_Type; + set => m_Type = value; } public string NameString { - get { return m_NameString; } - set { m_NameString = value; } + get => m_NameString; + set => m_NameString = value; } public int NameNumber { - get { return m_NameNumber; } - set { m_NameNumber = value; } + get => m_NameNumber; + set => m_NameNumber = value; } public CraftSubResCol() diff --git a/Scripts/Engines/Craft/Core/CraftSystem.cs b/Scripts/Engines/Craft/Core/CraftSystem.cs index 40bac5cd9..e86b229c4 100644 --- a/Scripts/Engines/Craft/Core/CraftSystem.cs +++ b/Scripts/Engines/Craft/Core/CraftSystem.cs @@ -40,10 +40,10 @@ namespace Server.Engines.Craft public abstract SkillName MainSkill{ get; } - public virtual int GumpTitleNumber{ get{ return 0; } } - public virtual string GumpTitleString{ get{ return ""; } } + public virtual int GumpTitleNumber => 0; + public virtual string GumpTitleString => ""; - public virtual CraftECA ECA{ get{ return CraftECA.ChanceMinusSixty; } } + public virtual CraftECA ECA => CraftECA.ChanceMinusSixty; private Dictionary m_ContextTable = new Dictionary(); @@ -83,26 +83,26 @@ namespace Server.Engines.Craft public bool Resmelt { - get { return m_Resmelt; } - set { m_Resmelt = value; } + get => m_Resmelt; + set => m_Resmelt = value; } public bool Repair { - get{ return m_Repair; } - set{ m_Repair = value; } + get => m_Repair; + set => m_Repair = value; } public bool MarkOption { - get{ return m_MarkOption; } - set{ m_MarkOption = value; } + get => m_MarkOption; + set => m_MarkOption = value; } public bool CanEnhance { - get{ return m_CanEnhance; } - set{ m_CanEnhance = value; } + get => m_CanEnhance; + set => m_CanEnhance = value; } public CraftSystem( int minCraftEffect, int maxCraftEffect, double delay ) diff --git a/Scripts/Engines/Craft/Core/CustomCraft.cs b/Scripts/Engines/Craft/Core/CustomCraft.cs index 7c8527ca5..8fd585816 100644 --- a/Scripts/Engines/Craft/Core/CustomCraft.cs +++ b/Scripts/Engines/Craft/Core/CustomCraft.cs @@ -12,12 +12,12 @@ namespace Server.Engines.Craft private BaseTool m_Tool; private int m_Quality; - public Mobile From{ get{ return m_From; } } - public CraftItem CraftItem{ get{ return m_CraftItem; } } - public CraftSystem CraftSystem{ get{ return m_CraftSystem; } } - public Type TypeRes{ get{ return m_TypeRes; } } - public BaseTool Tool{ get{ return m_Tool; } } - public int Quality{ get{ return m_Quality; } } + public Mobile From => m_From; + public CraftItem CraftItem => m_CraftItem; + public CraftSystem CraftSystem => m_CraftSystem; + public Type TypeRes => m_TypeRes; + public BaseTool Tool => m_Tool; + public int Quality => m_Quality; public CustomCraft( Mobile from, CraftItem craftItem, CraftSystem craftSystem, Type typeRes, BaseTool tool, int quality ) { diff --git a/Scripts/Engines/Craft/Core/Recipes.cs b/Scripts/Engines/Craft/Core/Recipes.cs index c7b133b6c..82a864c9c 100644 --- a/Scripts/Engines/Craft/Core/Recipes.cs +++ b/Scripts/Engines/Craft/Core/Recipes.cs @@ -68,30 +68,27 @@ namespace Server.Engines.Craft public static Dictionary Recipes => m_Recipes; private static int m_LargestRecipeID; - public static int LargestRecipeID{ get{ return m_LargestRecipeID; } } + public static int LargestRecipeID => m_LargestRecipeID; private CraftSystem m_System; public CraftSystem CraftSystem { - get { return m_System; } - set { m_System = value; } + get => m_System; + set => m_System = value; } private CraftItem m_CraftItem; public CraftItem CraftItem { - get { return m_CraftItem; } - set { m_CraftItem = value; } + get => m_CraftItem; + set => m_CraftItem = value; } private int m_ID; - public int ID - { - get { return m_ID; } - } + public int ID => m_ID; private TextDefinition m_TD; public TextDefinition TextDefinition diff --git a/Scripts/Engines/Craft/DefAlchemy.cs b/Scripts/Engines/Craft/DefAlchemy.cs index b43826f7a..5699bf87d 100644 --- a/Scripts/Engines/Craft/DefAlchemy.cs +++ b/Scripts/Engines/Craft/DefAlchemy.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefAlchemy : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Alchemy; } - } + public override SkillName MainSkill => SkillName.Alchemy; - public override int GumpTitleNumber - { - get { return 1044001; } //
ALCHEMY MENU
- } + public override int GumpTitleNumber => 1044001; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefBlacksmithy.cs b/Scripts/Engines/Craft/DefBlacksmithy.cs index 0bae49319..364225438 100644 --- a/Scripts/Engines/Craft/DefBlacksmithy.cs +++ b/Scripts/Engines/Craft/DefBlacksmithy.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefBlacksmithy : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Blacksmith; } - } + public override SkillName MainSkill => SkillName.Blacksmith; - public override int GumpTitleNumber - { - get { return 1044002; } //
BLACKSMITHY MENU
- } + public override int GumpTitleNumber => 1044002; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefBowFletching.cs b/Scripts/Engines/Craft/DefBowFletching.cs index 88d3f216d..61e86f81e 100644 --- a/Scripts/Engines/Craft/DefBowFletching.cs +++ b/Scripts/Engines/Craft/DefBowFletching.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefBowFletching : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Fletching; } - } + public override SkillName MainSkill => SkillName.Fletching; - public override int GumpTitleNumber - { - get { return 1044006; } //
BOWCRAFT AND FLETCHING MENU
- } + public override int GumpTitleNumber => 1044006; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefCarpentry.cs b/Scripts/Engines/Craft/DefCarpentry.cs index 444414b8e..39e9e5dc9 100644 --- a/Scripts/Engines/Craft/DefCarpentry.cs +++ b/Scripts/Engines/Craft/DefCarpentry.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefCarpentry : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Carpentry; } - } + public override SkillName MainSkill => SkillName.Carpentry; - public override int GumpTitleNumber - { - get { return 1044004; } //
CARPENTRY MENU
- } + public override int GumpTitleNumber => 1044004; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefCartography.cs b/Scripts/Engines/Craft/DefCartography.cs index 4800ef5e1..ef8099d11 100644 --- a/Scripts/Engines/Craft/DefCartography.cs +++ b/Scripts/Engines/Craft/DefCartography.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefCartography : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Cartography; } - } + public override SkillName MainSkill => SkillName.Cartography; - public override int GumpTitleNumber - { - get { return 1044008; } //
CARTOGRAPHY MENU
- } + public override int GumpTitleNumber => 1044008; public override double GetChanceAtMin( CraftItem item ) { diff --git a/Scripts/Engines/Craft/DefCooking.cs b/Scripts/Engines/Craft/DefCooking.cs index c559f5292..0ba335a11 100644 --- a/Scripts/Engines/Craft/DefCooking.cs +++ b/Scripts/Engines/Craft/DefCooking.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefCooking : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Cooking; } - } + public override SkillName MainSkill => SkillName.Cooking; - public override int GumpTitleNumber - { - get { return 1044003; } //
COOKING MENU
- } + public override int GumpTitleNumber => 1044003; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefGlassblowing.cs b/Scripts/Engines/Craft/DefGlassblowing.cs index 3ff6585d8..b42207510 100644 --- a/Scripts/Engines/Craft/DefGlassblowing.cs +++ b/Scripts/Engines/Craft/DefGlassblowing.cs @@ -6,15 +6,9 @@ namespace Server.Engines.Craft { public class DefGlassblowing : CraftSystem { - public override SkillName MainSkill - { - get{ return SkillName.Alchemy; } - } + public override SkillName MainSkill => SkillName.Alchemy; - public override int GumpTitleNumber - { - get{ return 1044622; } //
Glassblowing MENU
- } + public override int GumpTitleNumber => 1044622; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefInscription.cs b/Scripts/Engines/Craft/DefInscription.cs index 2b2fdef67..e08061978 100644 --- a/Scripts/Engines/Craft/DefInscription.cs +++ b/Scripts/Engines/Craft/DefInscription.cs @@ -6,15 +6,9 @@ namespace Server.Engines.Craft { public class DefInscription : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Inscribe; } - } + public override SkillName MainSkill => SkillName.Inscribe; - public override int GumpTitleNumber - { - get { return 1044009; } //
INSCRIPTION MENU
- } + public override int GumpTitleNumber => 1044009; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefMasonry.cs b/Scripts/Engines/Craft/DefMasonry.cs index feb0fd583..1da1743a9 100644 --- a/Scripts/Engines/Craft/DefMasonry.cs +++ b/Scripts/Engines/Craft/DefMasonry.cs @@ -6,15 +6,9 @@ namespace Server.Engines.Craft { public class DefMasonry : CraftSystem { - public override SkillName MainSkill - { - get{ return SkillName.Carpentry; } - } + public override SkillName MainSkill => SkillName.Carpentry; - public override int GumpTitleNumber - { - get{ return 1044500; } //
MASONRY MENU
- } + public override int GumpTitleNumber => 1044500; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefTailoring.cs b/Scripts/Engines/Craft/DefTailoring.cs index 219ad59d5..1622d0c45 100644 --- a/Scripts/Engines/Craft/DefTailoring.cs +++ b/Scripts/Engines/Craft/DefTailoring.cs @@ -5,15 +5,9 @@ namespace Server.Engines.Craft { public class DefTailoring : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Tailoring; } - } + public override SkillName MainSkill => SkillName.Tailoring; - public override int GumpTitleNumber - { - get { return 1044005; } //
TAILORING MENU
- } + public override int GumpTitleNumber => 1044005; private static CraftSystem m_CraftSystem; diff --git a/Scripts/Engines/Craft/DefTinkering.cs b/Scripts/Engines/Craft/DefTinkering.cs index b563f28f5..47eb9da9d 100644 --- a/Scripts/Engines/Craft/DefTinkering.cs +++ b/Scripts/Engines/Craft/DefTinkering.cs @@ -7,15 +7,9 @@ namespace Server.Engines.Craft { public class DefTinkering : CraftSystem { - public override SkillName MainSkill - { - get { return SkillName.Tinkering; } - } + public override SkillName MainSkill => SkillName.Tinkering; - public override int GumpTitleNumber - { - get { return 1044007; } //
TINKERING MENU
- } + public override int GumpTitleNumber => 1044007; private static CraftSystem m_CraftSystem; @@ -388,7 +382,7 @@ namespace Server.Engines.Craft { private LockableContainer m_Container; - public LockableContainer Container{ get{ return m_Container; } } + public LockableContainer Container => m_Container; public abstract TrapType TrapType{ get; } diff --git a/Scripts/Engines/Doom/GauntletSpawner.cs b/Scripts/Engines/Doom/GauntletSpawner.cs index 2b3418f49..c2a58476d 100644 --- a/Scripts/Engines/Doom/GauntletSpawner.cs +++ b/Scripts/Engines/Doom/GauntletSpawner.cs @@ -38,29 +38,29 @@ namespace Server.Engines.Doom [CommandProperty( AccessLevel.GameMaster )] public string TypeName { - get{ return m_TypeName; } - set{ m_TypeName = value; } + get => m_TypeName; + set => m_TypeName = value; } [CommandProperty( AccessLevel.GameMaster )] public BaseDoor Door { - get{ return m_Door; } - set{ m_Door = value; } + get => m_Door; + set => m_Door = value; } [CommandProperty( AccessLevel.GameMaster )] public BaseAddon Addon { - get{ return m_Addon; } - set{ m_Addon = value; } + get => m_Addon; + set => m_Addon = value; } [CommandProperty( AccessLevel.GameMaster )] public GauntletSpawner Sequence { - get{ return m_Sequence; } - set{ m_Sequence = value; } + get => m_Sequence; + set => m_Sequence = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -86,14 +86,14 @@ namespace Server.Engines.Doom [CommandProperty( AccessLevel.GameMaster )] public Rectangle2D RegionBounds { - get{ return m_RegionBounds; } - set{ m_RegionBounds = value; } + get => m_RegionBounds; + set => m_RegionBounds = value; } [CommandProperty( AccessLevel.GameMaster )] public GauntletSpawnerState State { - get{ return m_State; } + get => m_State; set { if ( m_State == value ) @@ -163,20 +163,20 @@ namespace Server.Engines.Doom public List Creatures { - get{ return m_Creatures; } - set{ m_Creatures = value; } + get => m_Creatures; + set => m_Creatures = value; } public List Traps { - get{ return m_Traps; } - set{ m_Traps = value; } + get => m_Traps; + set => m_Traps = value; } public Region Region { - get{ return m_Region; } - set{ m_Region = value; } + get => m_Region; + set => m_Region = value; } public virtual void CreateRegion() @@ -380,10 +380,7 @@ namespace Server.Engines.Doom } } - public override string DefaultName - { - get { return "doom spawner"; } - } + public override string DefaultName => "doom spawner"; [Constructible] public GauntletSpawner() : this( null ) diff --git a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs index 31f675ab5..0b0f92be7 100644 --- a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs +++ b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs @@ -58,15 +58,21 @@ namespace Server.Engines.Doom } [CommandProperty( AccessLevel.GameMaster )] - public UInt16 MyKey { get{ return m_MyKey; } set{ m_MyKey = value; } } + public UInt16 MyKey { get => m_MyKey; + set => m_MyKey = value; + } [CommandProperty( AccessLevel.GameMaster )] - public UInt16 TheirKey { get{ return m_TheirKey; } set{ m_TheirKey = value; } } + public UInt16 TheirKey { get => m_TheirKey; + set => m_TheirKey = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool Enabled { get{ return m_Enabled; } set{ m_Enabled = value; } } + public bool Enabled { get => m_Enabled; + set => m_Enabled = value; + } - public Mobile Successful { get{ return m_Successful; } } + public Mobile Successful => m_Successful; public bool CircleComplete { diff --git a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs index f699d5504..c093fb021 100644 --- a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs +++ b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs @@ -99,10 +99,7 @@ namespace Server.Engines.Doom private LeverPuzzleController m_Controller; [CommandProperty( AccessLevel.GameMaster )] - public UInt16 Code - { - get{ return m_Code; } - } + public UInt16 Code => m_Code; public LeverPuzzleLever( UInt16 code, LeverPuzzleController controller ) : base( 0x108E ) { diff --git a/Scripts/Engines/Ethics/Core/Ethic.cs b/Scripts/Engines/Ethics/Core/Ethic.cs index a068583a6..a929d5fb6 100644 --- a/Scripts/Engines/Ethics/Core/Ethic.cs +++ b/Scripts/Engines/Ethics/Core/Ethic.cs @@ -159,15 +159,9 @@ namespace Server.Ethics protected PlayerCollection m_Players; - public EthicDefinition Definition - { - get { return m_Definition; } - } + public EthicDefinition Definition => m_Definition; - public PlayerCollection Players - { - get { return m_Players; } - } + public PlayerCollection Players => m_Players; public static Ethic Find( Mobile mob ) { diff --git a/Scripts/Engines/Ethics/Core/Persistance.cs b/Scripts/Engines/Ethics/Core/Persistance.cs index dfc0bc90c..7f2347744 100644 --- a/Scripts/Engines/Ethics/Core/Persistance.cs +++ b/Scripts/Engines/Ethics/Core/Persistance.cs @@ -6,10 +6,7 @@ namespace Server.Ethics public static EthicsPersistance Instance => m_Instance; - public override string DefaultName - { - get { return "Ethics Persistance - Internal"; } - } + public override string DefaultName => "Ethics Persistance - Internal"; [Constructible] public EthicsPersistance() diff --git a/Scripts/Engines/Ethics/Core/Player.cs b/Scripts/Engines/Ethics/Core/Player.cs index aba82ec37..34de7aa72 100644 --- a/Scripts/Engines/Ethics/Core/Player.cs +++ b/Scripts/Engines/Ethics/Core/Player.cs @@ -56,16 +56,24 @@ namespace Server.Ethics public Mobile Mobile => m_Mobile; [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public int Power { get { return m_Power; } set { m_Power = value; } } + public int Power { get => m_Power; + set => m_Power = value; + } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public int History { get { return m_History; } set { m_History = value; } } + public int History { get => m_History; + set => m_History = value; + } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public Mobile Steed { get { return m_Steed; } set { m_Steed = value; } } + public Mobile Steed { get => m_Steed; + set => m_Steed = value; + } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] - public Mobile Familiar { get { return m_Familiar; } set { m_Familiar = value; } } + public Mobile Familiar { get => m_Familiar; + set => m_Familiar = value; + } [CommandProperty( AccessLevel.GameMaster )] public bool IsShielded diff --git a/Scripts/Engines/Factions/Core/Election.cs b/Scripts/Engines/Factions/Core/Election.cs index b64fd8ced..35292e7d6 100644 --- a/Scripts/Engines/Factions/Core/Election.cs +++ b/Scripts/Engines/Factions/Core/Election.cs @@ -20,15 +20,16 @@ namespace Server.Factions private ElectionState m_State; private DateTime m_LastStateTime; - public Faction Faction{ get{ return m_Faction; } } + public Faction Faction => m_Faction; public List Candidates => m_Candidates; - public ElectionState State{ get{ return m_State; } set{ m_State = value; m_LastStateTime = DateTime.UtcNow; } } - public DateTime LastStateTime{ get{ return m_LastStateTime; } } + public ElectionState State{ get => m_State; + set{ m_State = value; m_LastStateTime = DateTime.UtcNow; } } + public DateTime LastStateTime => m_LastStateTime; [CommandProperty( AccessLevel.GameMaster )] - public ElectionState CurrentState{ get{ return m_State; } } + public ElectionState CurrentState => m_State; [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public TimeSpan NextStateTime @@ -383,25 +384,13 @@ namespace Server.Factions private IPAddress m_Address; private DateTime m_Time; - public Mobile From - { - get{ return m_From; } - } + public Mobile From => m_From; - public Mobile Candidate - { - get{ return m_Candidate; } - } + public Mobile Candidate => m_Candidate; - public IPAddress Address - { - get{ return m_Address; } - } + public IPAddress Address => m_Address; - public DateTime Time - { - get{ return m_Time; } - } + public DateTime Time => m_Time; public object[] AcquireFields() { @@ -480,10 +469,10 @@ namespace Server.Factions private Mobile m_Mobile; private List m_Voters; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public List Voters => m_Voters; - public int Votes{ get{ return m_Voters.Count; } } + public int Votes => m_Voters.Count; public void CleanMuleVotes() { diff --git a/Scripts/Engines/Factions/Core/Faction.cs b/Scripts/Engines/Factions/Core/Faction.cs index 0fde7f86c..eb0083cd3 100644 --- a/Scripts/Engines/Factions/Core/Faction.cs +++ b/Scripts/Engines/Factions/Core/Faction.cs @@ -23,13 +23,13 @@ namespace Server.Factions public StrongholdRegion StrongholdRegion { - get{ return m_StrongholdRegion; } - set{ m_StrongholdRegion = value; } + get => m_StrongholdRegion; + set => m_StrongholdRegion = value; } public FactionDefinition Definition { - get{ return m_Definition; } + get => m_Definition; set { m_Definition = value; @@ -39,46 +39,43 @@ namespace Server.Factions public FactionState State { - get{ return m_State; } - set{ m_State = value; } + get => m_State; + set => m_State = value; } public Election Election { - get{ return m_State.Election; } - set{ m_State.Election = value; } + get => m_State.Election; + set => m_State.Election = value; } public Mobile Commander { - get{ return m_State.Commander; } - set{ m_State.Commander = value; } + get => m_State.Commander; + set => m_State.Commander = value; } public int Tithe { - get{ return m_State.Tithe; } - set{ m_State.Tithe = value; } + get => m_State.Tithe; + set => m_State.Tithe = value; } public int Silver { - get{ return m_State.Silver; } - set{ m_State.Silver = value; } + get => m_State.Silver; + set => m_State.Silver = value; } public List Members { - get{ return m_State.Members; } - set{ m_State.Members = value; } + get => m_State.Members; + set => m_State.Members = value; } public static readonly TimeSpan LeavePeriod = TimeSpan.FromDays( 3.0 ); - public bool FactionMessageReady - { - get{ return m_State.FactionMessageReady; } - } + public bool FactionMessageReady => m_State.FactionMessageReady; public void Broadcast( string text ) { @@ -948,12 +945,12 @@ namespace Server.Factions return silver; } - public virtual int MaximumTraps{ get{ return 15; } } + public virtual int MaximumTraps => 15; public List Traps { - get{ return m_State.Traps; } - set{ m_State.Traps = value; } + get => m_State.Traps; + set => m_State.Traps = value; } public const int StabilityFactor = 300; // 300% greater (3 times) than smallest faction @@ -1219,7 +1216,7 @@ namespace Server.Factions writer.WriteEncodedInt( (int) (idx + 1) ); } - public static List Factions{ get{ return Reflector.Factions; } } + public static List Factions => Reflector.Factions; public static Faction ReadReference( GenericReader reader ) { diff --git a/Scripts/Engines/Factions/Core/FactionItem.cs b/Scripts/Engines/Factions/Core/FactionItem.cs index 88623d01b..e86115c02 100644 --- a/Scripts/Engines/Factions/Core/FactionItem.cs +++ b/Scripts/Engines/Factions/Core/FactionItem.cs @@ -15,9 +15,9 @@ namespace Server.Factions private Faction m_Faction; private DateTime m_Expiration; - public Item Item{ get{ return m_Item; } } - public Faction Faction{ get{ return m_Faction; } } - public DateTime Expiration{ get{ return m_Expiration; } } + public Item Item => m_Item; + public Faction Faction => m_Faction; + public DateTime Expiration => m_Expiration; public bool HasExpired { diff --git a/Scripts/Engines/Factions/Core/FactionState.cs b/Scripts/Engines/Factions/Core/FactionState.cs index 6eb830e39..2c9f6f16d 100644 --- a/Scripts/Engines/Factions/Core/FactionState.cs +++ b/Scripts/Engines/Factions/Core/FactionState.cs @@ -20,7 +20,9 @@ namespace Server.Factions private DateTime[] m_LastBroadcasts = new DateTime[BroadcastsPerPeriod]; - public DateTime LastAtrophy{ get{ return m_LastAtrophy; } set{ m_LastAtrophy = value; } } + public DateTime LastAtrophy{ get => m_LastAtrophy; + set => m_LastAtrophy = value; + } public bool FactionMessageReady { @@ -36,7 +38,7 @@ namespace Server.Factions } } - public bool IsAtrophyReady{ get{ return DateTime.UtcNow >= (m_LastAtrophy + TimeSpan.FromHours( 47.0 )); } } + public bool IsAtrophyReady => DateTime.UtcNow >= (m_LastAtrophy + TimeSpan.FromHours( 47.0 )); public int CheckAtrophy() { @@ -82,25 +84,25 @@ namespace Server.Factions public List FactionItems { - get{ return m_FactionItems; } - set{ m_FactionItems = value; } + get => m_FactionItems; + set => m_FactionItems = value; } public List Traps { - get{ return m_FactionTraps; } - set{ m_FactionTraps = value; } + get => m_FactionTraps; + set => m_FactionTraps = value; } public Election Election { - get{ return m_Election; } - set{ m_Election = value; } + get => m_Election; + set => m_Election = value; } public Mobile Commander { - get{ return m_Commander; } + get => m_Commander; set { if ( m_Commander != null ) @@ -127,20 +129,20 @@ namespace Server.Factions public int Tithe { - get{ return m_Tithe; } - set{ m_Tithe = value; } + get => m_Tithe; + set => m_Tithe = value; } public int Silver { - get{ return m_Silver; } - set{ m_Silver = value; } + get => m_Silver; + set => m_Silver = value; } public List Members { - get{ return m_Members; } - set{ m_Members = value; } + get => m_Members; + set => m_Members = value; } public FactionState( Faction faction ) diff --git a/Scripts/Engines/Factions/Core/GuardList.cs b/Scripts/Engines/Factions/Core/GuardList.cs index 2794daed7..caa3cd8ea 100644 --- a/Scripts/Engines/Factions/Core/GuardList.cs +++ b/Scripts/Engines/Factions/Core/GuardList.cs @@ -8,8 +8,8 @@ namespace Server.Factions private GuardDefinition m_Definition; private List m_Guards; - public GuardDefinition Definition{ get{ return m_Definition; } } - public List Guards{ get{ return m_Guards; } } + public GuardDefinition Definition => m_Definition; + public List Guards => m_Guards; public BaseFactionGuard Construct() { diff --git a/Scripts/Engines/Factions/Core/MerchantTitles.cs b/Scripts/Engines/Factions/Core/MerchantTitles.cs index c30e1b656..6e97c867d 100644 --- a/Scripts/Engines/Factions/Core/MerchantTitles.cs +++ b/Scripts/Engines/Factions/Core/MerchantTitles.cs @@ -18,11 +18,11 @@ namespace Server.Factions private TextDefinition m_Label; private TextDefinition m_Assigned; - public SkillName Skill{ get{ return m_Skill; } } - public double Requirement{ get{ return m_Requirement; } } - public TextDefinition Title{ get{ return m_Title; } } - public TextDefinition Label{ get{ return m_Label; } } - public TextDefinition Assigned{ get{ return m_Assigned; } } + public SkillName Skill => m_Skill; + public double Requirement => m_Requirement; + public TextDefinition Title => m_Title; + public TextDefinition Label => m_Label; + public TextDefinition Assigned => m_Assigned; public MerchantTitleInfo( SkillName skill, double requirement, TextDefinition title, TextDefinition label, TextDefinition assigned ) { @@ -46,7 +46,7 @@ namespace Server.Factions new MerchantTitleInfo( SkillName.Tailoring, 90.0, new TextDefinition( 1022982, "Tailor" ), new TextDefinition( 1018300, "TAILOR" ), new TextDefinition( 1042162, "You now have the faction title of Tailor" ) ), }; - public static MerchantTitleInfo[] Info{ get{ return m_Info; } } + public static MerchantTitleInfo[] Info => m_Info; public static MerchantTitleInfo GetInfo( MerchantTitle title ) { diff --git a/Scripts/Engines/Factions/Core/Persistance.cs b/Scripts/Engines/Factions/Core/Persistance.cs index 240d5e7be..78d46ccac 100644 --- a/Scripts/Engines/Factions/Core/Persistance.cs +++ b/Scripts/Engines/Factions/Core/Persistance.cs @@ -6,12 +6,9 @@ namespace Server.Factions { private static FactionPersistance m_Instance; - public static FactionPersistance Instance{ get{ return m_Instance; } } + public static FactionPersistance Instance => m_Instance; - public override string DefaultName - { - get { return "Faction Persistance - Internal"; } - } + public override string DefaultName => "Faction Persistance - Internal"; public FactionPersistance() : base( 1 ) { diff --git a/Scripts/Engines/Factions/Core/PlayerState.cs b/Scripts/Engines/Factions/Core/PlayerState.cs index 1281a9924..a93fc6b91 100644 --- a/Scripts/Engines/Factions/Core/PlayerState.cs +++ b/Scripts/Engines/Factions/Core/PlayerState.cs @@ -21,16 +21,19 @@ namespace Server.Factions private DateTime m_LastHonorTime; - public Mobile Mobile{ get{ return m_Mobile; } } - public Faction Faction{ get{ return m_Faction; } } + public Mobile Mobile => m_Mobile; + public Faction Faction => m_Faction; public List Owner => m_Owner; - public MerchantTitle MerchantTitle{ get{ return m_MerchantTitle; } set{ m_MerchantTitle = value; Invalidate(); } } - public Town Sheriff{ get{ return m_Sheriff; } set{ m_Sheriff = value; Invalidate(); } } - public Town Finance{ get{ return m_Finance; } set{ m_Finance = value; Invalidate(); } } + public MerchantTitle MerchantTitle{ get => m_MerchantTitle; + set{ m_MerchantTitle = value; Invalidate(); } } + public Town Sheriff{ get => m_Sheriff; + set{ m_Sheriff = value; Invalidate(); } } + public Town Finance{ get => m_Finance; + set{ m_Finance = value; Invalidate(); } } public List SilverGiven => m_SilverGiven; public int KillPoints { - get { return m_KillPoints; } + get => m_KillPoints; set { if ( m_KillPoints != value ) { if ( value > m_KillPoints ) { @@ -102,7 +105,8 @@ namespace Server.Factions private bool m_InvalidateRank = true; private int m_RankIndex = -1; - public int RankIndex { get { return m_RankIndex; } set { if ( m_RankIndex != value ) { m_RankIndex = value; m_InvalidateRank = true; } } } + public int RankIndex { get => m_RankIndex; + set { if ( m_RankIndex != value ) { m_RankIndex = value; m_InvalidateRank = true; } } } public RankDefinition Rank { get { @@ -134,11 +138,17 @@ namespace Server.Factions } } - public DateTime LastHonorTime{ get{ return m_LastHonorTime; } set{ m_LastHonorTime = value; } } - public DateTime Leaving{ get{ return m_Leaving; } set{ m_Leaving = value; } } - public bool IsLeaving{ get{ return ( m_Leaving > DateTime.MinValue ); } } + public DateTime LastHonorTime{ get => m_LastHonorTime; + set => m_LastHonorTime = value; + } + public DateTime Leaving{ get => m_Leaving; + set => m_Leaving = value; + } + public bool IsLeaving => ( m_Leaving > DateTime.MinValue ); - public bool IsActive{ get{ return m_IsActive; } set{ m_IsActive = value; } } + public bool IsActive{ get => m_IsActive; + set => m_IsActive = value; + } public bool CanGiveSilverTo( Mobile mob ) { diff --git a/Scripts/Engines/Factions/Core/SilverGivenEntry.cs b/Scripts/Engines/Factions/Core/SilverGivenEntry.cs index 4e9283569..c6bb28296 100644 --- a/Scripts/Engines/Factions/Core/SilverGivenEntry.cs +++ b/Scripts/Engines/Factions/Core/SilverGivenEntry.cs @@ -9,10 +9,10 @@ namespace Server.Factions private Mobile m_GivenTo; private DateTime m_TimeOfGift; - public Mobile GivenTo{ get{ return m_GivenTo; } } - public DateTime TimeOfGift{ get{ return m_TimeOfGift; } } + public Mobile GivenTo => m_GivenTo; + public DateTime TimeOfGift => m_TimeOfGift; - public bool IsExpired{ get{ return ( m_TimeOfGift + ExpirePeriod ) < DateTime.UtcNow; } } + public bool IsExpired => ( m_TimeOfGift + ExpirePeriod ) < DateTime.UtcNow; public SilverGivenEntry( Mobile givenTo ) { diff --git a/Scripts/Engines/Factions/Core/StrongholdRegion.cs b/Scripts/Engines/Factions/Core/StrongholdRegion.cs index 5a2e6b9ee..bf5a42dbd 100644 --- a/Scripts/Engines/Factions/Core/StrongholdRegion.cs +++ b/Scripts/Engines/Factions/Core/StrongholdRegion.cs @@ -9,8 +9,8 @@ namespace Server.Factions public Faction Faction { - get{ return m_Faction; } - set{ m_Faction = value; } + get => m_Faction; + set => m_Faction = value; } public StrongholdRegion( Faction faction ) : base( faction.Definition.FriendlyName, Faction.Facet, Region.DefaultPriority, faction.Definition.Stronghold.Area ) diff --git a/Scripts/Engines/Factions/Core/Town.cs b/Scripts/Engines/Factions/Core/Town.cs index 90ca6cf7d..04a535664 100644 --- a/Scripts/Engines/Factions/Core/Town.cs +++ b/Scripts/Engines/Factions/Core/Town.cs @@ -14,59 +14,56 @@ namespace Server.Factions public TownDefinition Definition { - get{ return m_Definition; } - set{ m_Definition = value; } + get => m_Definition; + set => m_Definition = value; } public TownState State { - get{ return m_State; } + get => m_State; set{ m_State = value; ConstructGuardLists(); } } public int Silver { - get{ return m_State.Silver; } - set{ m_State.Silver = value; } + get => m_State.Silver; + set => m_State.Silver = value; } public Faction Owner { - get{ return m_State.Owner; } - set{ Capture( value ); } + get => m_State.Owner; + set => Capture( value ); } public Mobile Sheriff { - get{ return m_State.Sheriff; } - set{ m_State.Sheriff = value; } + get => m_State.Sheriff; + set => m_State.Sheriff = value; } public Mobile Finance { - get{ return m_State.Finance; } - set{ m_State.Finance = value; } + get => m_State.Finance; + set => m_State.Finance = value; } public int Tax { - get{ return m_State.Tax; } - set{ m_State.Tax = value; } + get => m_State.Tax; + set => m_State.Tax = value; } public DateTime LastTaxChange { - get{ return m_State.LastTaxChange; } - set{ m_State.LastTaxChange = value; } + get => m_State.LastTaxChange; + set => m_State.LastTaxChange = value; } public static readonly TimeSpan TaxChangePeriod = TimeSpan.FromHours( 12.0 ); public static readonly TimeSpan IncomePeriod = TimeSpan.FromDays( 1.0 ); - public bool TaxChangeReady - { - get{ return ( m_State.LastTaxChange + TaxChangePeriod ) < DateTime.UtcNow; } - } + public bool TaxChangeReady => ( m_State.LastTaxChange + TaxChangePeriod ) < DateTime.UtcNow; public static Town FromRegion( Region reg ) { @@ -114,15 +111,9 @@ namespace Server.Factions } } - public int DailyIncome - { - get{ return (10000 * (100 + m_State.Tax)) / 100; } - } + public int DailyIncome => (10000 * (100 + m_State.Tax)) / 100; - public int NetCashFlow - { - get{ return DailyIncome - FinanceUpkeep - SheriffUpkeep; } - } + public int NetCashFlow => DailyIncome - FinanceUpkeep - SheriffUpkeep; public TownMonolith Monolith { @@ -142,8 +133,8 @@ namespace Server.Factions public DateTime LastIncome { - get{ return m_State.LastIncome; } - set{ m_State.LastIncome = value; } + get => m_State.LastIncome; + set => m_State.LastIncome = value; } public void BeginOrderFiring( Mobile from ) @@ -258,14 +249,14 @@ namespace Server.Factions public List VendorLists { - get{ return m_VendorLists; } - set{ m_VendorLists = value; } + get => m_VendorLists; + set => m_VendorLists = value; } public List GuardLists { - get{ return m_GuardLists; } - set{ m_GuardLists = value; } + get => m_GuardLists; + set => m_GuardLists = value; } public void ConstructGuardLists() diff --git a/Scripts/Engines/Factions/Core/TownState.cs b/Scripts/Engines/Factions/Core/TownState.cs index eb3eb8ce1..8cae343b7 100644 --- a/Scripts/Engines/Factions/Core/TownState.cs +++ b/Scripts/Engines/Factions/Core/TownState.cs @@ -18,19 +18,19 @@ namespace Server.Factions public Town Town { - get{ return m_Town; } - set{ m_Town = value; } + get => m_Town; + set => m_Town = value; } public Faction Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } public Mobile Sheriff { - get{ return m_Sheriff; } + get => m_Sheriff; set { if ( m_Sheriff != null ) @@ -55,7 +55,7 @@ namespace Server.Factions public Mobile Finance { - get{ return m_Finance; } + get => m_Finance; set { if ( m_Finance != null ) @@ -80,26 +80,26 @@ namespace Server.Factions public int Silver { - get{ return m_Silver; } - set{ m_Silver = value; } + get => m_Silver; + set => m_Silver = value; } public int Tax { - get{ return m_Tax; } - set{ m_Tax = value; } + get => m_Tax; + set => m_Tax = value; } public DateTime LastTaxChange { - get{ return m_LastTaxChange; } - set{ m_LastTaxChange = value; } + get => m_LastTaxChange; + set => m_LastTaxChange = value; } public DateTime LastIncome { - get{ return m_LastIncome; } - set{ m_LastIncome = value; } + get => m_LastIncome; + set => m_LastIncome = value; } public TownState( Town town ) diff --git a/Scripts/Engines/Factions/Core/VendorList.cs b/Scripts/Engines/Factions/Core/VendorList.cs index f43219e94..d2130d521 100644 --- a/Scripts/Engines/Factions/Core/VendorList.cs +++ b/Scripts/Engines/Factions/Core/VendorList.cs @@ -8,7 +8,7 @@ namespace Server.Factions private VendorDefinition m_Definition; private List m_Vendors; - public VendorDefinition Definition{ get{ return m_Definition; } } + public VendorDefinition Definition => m_Definition; public List Vendors => m_Vendors; public BaseFactionVendor Construct( Town town, Faction faction ) diff --git a/Scripts/Engines/Factions/Definitions/FactionDefinition.cs b/Scripts/Engines/Factions/Definitions/FactionDefinition.cs index 1396f1401..f6a3115da 100644 --- a/Scripts/Engines/Factions/Definitions/FactionDefinition.cs +++ b/Scripts/Engines/Factions/Definitions/FactionDefinition.cs @@ -33,38 +33,38 @@ namespace Server.Factions private RankDefinition[] m_Ranks; private GuardDefinition[] m_Guards; - public int Sort{ get{ return m_Sort; } } + public int Sort => m_Sort; - public int HuePrimary{ get{ return m_HuePrimary; } } - public int HueSecondary{ get{ return m_HueSecondary; } } - public int HueJoin{ get{ return m_HueJoin; } } - public int HueBroadcast{ get{ return m_HueBroadcast; } } + public int HuePrimary => m_HuePrimary; + public int HueSecondary => m_HueSecondary; + public int HueJoin => m_HueJoin; + public int HueBroadcast => m_HueBroadcast; - public int WarHorseBody{ get{ return m_WarHorseBody; } } - public int WarHorseItem{ get{ return m_WarHorseItem; } } + public int WarHorseBody => m_WarHorseBody; + public int WarHorseItem => m_WarHorseItem; - public string FriendlyName{ get{ return m_FriendlyName; } } - public string Keyword{ get{ return m_Keyword; } } + public string FriendlyName => m_FriendlyName; + public string Keyword => m_Keyword; public string Abbreviation => m_Abbreviation; - public TextDefinition Name{ get{ return m_Name; } } - public TextDefinition PropName{ get{ return m_PropName; } } - public TextDefinition Header{ get{ return m_Header; } } - public TextDefinition About{ get{ return m_About; } } - public TextDefinition CityControl{ get{ return m_CityControl; } } - public TextDefinition SigilControl{ get{ return m_SigilControl; } } - public TextDefinition SignupName{ get{ return m_SignupName; } } - public TextDefinition FactionStoneName{ get{ return m_FactionStoneName; } } - public TextDefinition OwnerLabel{ get{ return m_OwnerLabel; } } + public TextDefinition Name => m_Name; + public TextDefinition PropName => m_PropName; + public TextDefinition Header => m_Header; + public TextDefinition About => m_About; + public TextDefinition CityControl => m_CityControl; + public TextDefinition SigilControl => m_SigilControl; + public TextDefinition SignupName => m_SignupName; + public TextDefinition FactionStoneName => m_FactionStoneName; + public TextDefinition OwnerLabel => m_OwnerLabel; - public TextDefinition GuardIgnore{ get{ return m_GuardIgnore; } } - public TextDefinition GuardWarn{ get{ return m_GuardWarn; } } - public TextDefinition GuardAttack{ get{ return m_GuardAttack; } } + public TextDefinition GuardIgnore => m_GuardIgnore; + public TextDefinition GuardWarn => m_GuardWarn; + public TextDefinition GuardAttack => m_GuardAttack; - public StrongholdDefinition Stronghold{ get{ return m_Stronghold; } } + public StrongholdDefinition Stronghold => m_Stronghold; - public RankDefinition[] Ranks{ get{ return m_Ranks; } } - public GuardDefinition[] Guards{ get{ return m_Guards; } } + public RankDefinition[] Ranks => m_Ranks; + public GuardDefinition[] Guards => m_Guards; public FactionDefinition( int sort, int huePrimary, int hueSecondary, int hueJoin, int hueBroadcast, int warHorseBody, int warHorseItem, string friendlyName, string keyword, string abbreviation, TextDefinition name, TextDefinition propName, TextDefinition header, TextDefinition about, TextDefinition cityControl, TextDefinition sigilControl, TextDefinition signupName, TextDefinition factionStoneName, TextDefinition ownerLabel, TextDefinition guardIgnore, TextDefinition guardWarn, TextDefinition guardAttack, StrongholdDefinition stronghold, RankDefinition[] ranks, GuardDefinition[] guards ) { diff --git a/Scripts/Engines/Factions/Definitions/FactionItemDefinition.cs b/Scripts/Engines/Factions/Definitions/FactionItemDefinition.cs index f08df6f8c..fe74d0663 100644 --- a/Scripts/Engines/Factions/Definitions/FactionItemDefinition.cs +++ b/Scripts/Engines/Factions/Definitions/FactionItemDefinition.cs @@ -9,8 +9,8 @@ namespace Server.Factions private int m_SilverCost; private Type m_VendorType; - public int SilverCost{ get{ return m_SilverCost; } } - public Type VendorType{ get{ return m_VendorType; } } + public int SilverCost => m_SilverCost; + public Type VendorType => m_VendorType; public FactionItemDefinition( int silverCost, Type vendorType ) { diff --git a/Scripts/Engines/Factions/Definitions/GuardDefinition.cs b/Scripts/Engines/Factions/Definitions/GuardDefinition.cs index 4126c94c1..9f5ee7894 100644 --- a/Scripts/Engines/Factions/Definitions/GuardDefinition.cs +++ b/Scripts/Engines/Factions/Definitions/GuardDefinition.cs @@ -15,15 +15,15 @@ namespace Server.Factions private TextDefinition m_Header; private TextDefinition m_Label; - public Type Type{ get{ return m_Type; } } + public Type Type => m_Type; - public int Price{ get{ return m_Price; } } - public int Upkeep{ get{ return m_Upkeep; } } - public int Maximum{ get{ return m_Maximum; } } - public int ItemID{ get{ return m_ItemID; } } + public int Price => m_Price; + public int Upkeep => m_Upkeep; + public int Maximum => m_Maximum; + public int ItemID => m_ItemID; - public TextDefinition Header{ get{ return m_Header; } } - public TextDefinition Label{ get{ return m_Label; } } + public TextDefinition Header => m_Header; + public TextDefinition Label => m_Label; public GuardDefinition( Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header, TextDefinition label ) { diff --git a/Scripts/Engines/Factions/Definitions/RankDefinition.cs b/Scripts/Engines/Factions/Definitions/RankDefinition.cs index 2e8a791eb..8332ec5d7 100644 --- a/Scripts/Engines/Factions/Definitions/RankDefinition.cs +++ b/Scripts/Engines/Factions/Definitions/RankDefinition.cs @@ -7,10 +7,10 @@ namespace Server.Factions private int m_MaxWearables; private TextDefinition m_Title; - public int Rank{ get{ return m_Rank; } } - public int Required{ get{ return m_Required; } } - public int MaxWearables{ get{ return m_MaxWearables; } } - public TextDefinition Title{ get{ return m_Title; } } + public int Rank => m_Rank; + public int Required => m_Required; + public int MaxWearables => m_MaxWearables; + public TextDefinition Title => m_Title; public RankDefinition( int rank, int required, int maxWearables, TextDefinition title ) { diff --git a/Scripts/Engines/Factions/Definitions/StrongholdDefintion.cs b/Scripts/Engines/Factions/Definitions/StrongholdDefintion.cs index 585247a40..a882f5867 100644 --- a/Scripts/Engines/Factions/Definitions/StrongholdDefintion.cs +++ b/Scripts/Engines/Factions/Definitions/StrongholdDefintion.cs @@ -7,12 +7,12 @@ namespace Server.Factions private Point3D m_FactionStone; private Point3D[] m_Monoliths; - public Rectangle2D[] Area{ get{ return m_Area; } } + public Rectangle2D[] Area => m_Area; - public Point3D JoinStone{ get{ return m_JoinStone; } } - public Point3D FactionStone{ get{ return m_FactionStone; } } + public Point3D JoinStone => m_JoinStone; + public Point3D FactionStone => m_FactionStone; - public Point3D[] Monoliths{ get{ return m_Monoliths; } } + public Point3D[] Monoliths => m_Monoliths; public StrongholdDefinition( Rectangle2D[] area, Point3D joinStone, Point3D factionStone, Point3D[] monoliths ) { diff --git a/Scripts/Engines/Factions/Definitions/TownDefinition.cs b/Scripts/Engines/Factions/Definitions/TownDefinition.cs index aee966b54..73a9e0d56 100644 --- a/Scripts/Engines/Factions/Definitions/TownDefinition.cs +++ b/Scripts/Engines/Factions/Definitions/TownDefinition.cs @@ -20,22 +20,22 @@ namespace Server.Factions private Point3D m_Monolith; private Point3D m_TownStone; - public int Sort{ get{ return m_Sort; } } - public int SigilID{ get{ return m_SigilID; } } + public int Sort => m_Sort; + public int SigilID => m_SigilID; - public string Region{ get{ return m_Region; } } - public string FriendlyName{ get{ return m_FriendlyName; } } + public string Region => m_Region; + public string FriendlyName => m_FriendlyName; - public TextDefinition TownName{ get{ return m_TownName; } } - public TextDefinition TownStoneHeader{ get{ return m_TownStoneHeader; } } - public TextDefinition StrongholdMonolithName{ get{ return m_StrongholdMonolithName; } } - public TextDefinition TownMonolithName{ get{ return m_TownMonolithName; } } - public TextDefinition TownStoneName{ get{ return m_TownStoneName; } } - public TextDefinition SigilName{ get{ return m_SigilName; } } - public TextDefinition CorruptedSigilName{ get{ return m_CorruptedSigilName; } } + public TextDefinition TownName => m_TownName; + public TextDefinition TownStoneHeader => m_TownStoneHeader; + public TextDefinition StrongholdMonolithName => m_StrongholdMonolithName; + public TextDefinition TownMonolithName => m_TownMonolithName; + public TextDefinition TownStoneName => m_TownStoneName; + public TextDefinition SigilName => m_SigilName; + public TextDefinition CorruptedSigilName => m_CorruptedSigilName; - public Point3D Monolith{ get{ return m_Monolith; } } - public Point3D TownStone{ get{ return m_TownStone; } } + public Point3D Monolith => m_Monolith; + public Point3D TownStone => m_TownStone; public TownDefinition( int sort, int sigilID, string region, string friendlyName, TextDefinition townName, TextDefinition townStoneHeader, TextDefinition strongholdMonolithName, TextDefinition townMonolithName, TextDefinition townStoneName, TextDefinition sigilName, TextDefinition corruptedSigilName, Point3D monolith, Point3D townStone ) { diff --git a/Scripts/Engines/Factions/Definitions/VendorDefinition.cs b/Scripts/Engines/Factions/Definitions/VendorDefinition.cs index 47b0dec03..1e14f9230 100644 --- a/Scripts/Engines/Factions/Definitions/VendorDefinition.cs +++ b/Scripts/Engines/Factions/Definitions/VendorDefinition.cs @@ -15,15 +15,15 @@ namespace Server.Factions private TextDefinition m_Header; private TextDefinition m_Label; - public Type Type{ get{ return m_Type; } } + public Type Type => m_Type; - public int Price{ get{ return m_Price; } } - public int Upkeep{ get{ return m_Upkeep; } } - public int Maximum{ get{ return m_Maximum; } } - public int ItemID{ get{ return m_ItemID; } } + public int Price => m_Price; + public int Upkeep => m_Upkeep; + public int Maximum => m_Maximum; + public int ItemID => m_ItemID; - public TextDefinition Header{ get{ return m_Header; } } - public TextDefinition Label{ get{ return m_Label; } } + public TextDefinition Header => m_Header; + public TextDefinition Label => m_Label; public VendorDefinition( Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header, TextDefinition label ) { @@ -77,6 +77,6 @@ namespace Server.Factions ) }; - public static VendorDefinition[] Definitions{ get{ return m_Definitions; } } + public static VendorDefinition[] Definitions => m_Definitions; } } \ No newline at end of file diff --git a/Scripts/Engines/Factions/Gumps/FactionGump.cs b/Scripts/Engines/Factions/Gumps/FactionGump.cs index 81d32057a..21071222b 100644 --- a/Scripts/Engines/Factions/Gumps/FactionGump.cs +++ b/Scripts/Engines/Factions/Gumps/FactionGump.cs @@ -4,7 +4,7 @@ namespace Server.Factions { public abstract class FactionGump : Gump { - public virtual int ButtonTypes{ get{ return 10; } } + public virtual int ButtonTypes => 10; public int ToButtonID( int type, int index ) { diff --git a/Scripts/Engines/Factions/Instances/Factions/CouncilOfMages.cs b/Scripts/Engines/Factions/Instances/Factions/CouncilOfMages.cs index 4995a66a9..79f7dca50 100644 --- a/Scripts/Engines/Factions/Instances/Factions/CouncilOfMages.cs +++ b/Scripts/Engines/Factions/Instances/Factions/CouncilOfMages.cs @@ -4,7 +4,7 @@ namespace Server.Factions { private static Faction m_Instance; - public static Faction Instance{ get{ return m_Instance; } } + public static Faction Instance => m_Instance; public CouncilOfMages() { diff --git a/Scripts/Engines/Factions/Instances/Factions/Minax.cs b/Scripts/Engines/Factions/Instances/Factions/Minax.cs index 9649f4d1a..124d35d14 100644 --- a/Scripts/Engines/Factions/Instances/Factions/Minax.cs +++ b/Scripts/Engines/Factions/Instances/Factions/Minax.cs @@ -4,7 +4,7 @@ namespace Server.Factions { private static Faction m_Instance; - public static Faction Instance{ get{ return m_Instance; } } + public static Faction Instance => m_Instance; public Minax() { diff --git a/Scripts/Engines/Factions/Instances/Factions/Shadowlords.cs b/Scripts/Engines/Factions/Instances/Factions/Shadowlords.cs index 99bc7d633..ea61b6dd5 100644 --- a/Scripts/Engines/Factions/Instances/Factions/Shadowlords.cs +++ b/Scripts/Engines/Factions/Instances/Factions/Shadowlords.cs @@ -4,7 +4,7 @@ namespace Server.Factions { private static Faction m_Instance; - public static Faction Instance{ get{ return m_Instance; } } + public static Faction Instance => m_Instance; public Shadowlords() { diff --git a/Scripts/Engines/Factions/Instances/Factions/TrueBritannians.cs b/Scripts/Engines/Factions/Instances/Factions/TrueBritannians.cs index 1ce54d3b5..eb6eb2d60 100644 --- a/Scripts/Engines/Factions/Instances/Factions/TrueBritannians.cs +++ b/Scripts/Engines/Factions/Instances/Factions/TrueBritannians.cs @@ -4,7 +4,7 @@ namespace Server.Factions { private static Faction m_Instance; - public static Faction Instance{ get{ return m_Instance; } } + public static Faction Instance => m_Instance; public TrueBritannians() { diff --git a/Scripts/Engines/Factions/Items/BaseMonolith.cs b/Scripts/Engines/Factions/Items/BaseMonolith.cs index b4dbab21e..77f481db9 100644 --- a/Scripts/Engines/Factions/Items/BaseMonolith.cs +++ b/Scripts/Engines/Factions/Items/BaseMonolith.cs @@ -11,7 +11,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Sigil Sigil { - get{ return m_Sigil; } + get => m_Sigil; set { if ( m_Sigil == value ) @@ -32,7 +32,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Town Town { - get{ return m_Town; } + get => m_Town; set { m_Town = value; @@ -43,7 +43,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set { m_Faction = value; @@ -128,8 +128,8 @@ namespace Server.Factions public static List Monoliths { - get{ return m_Monoliths; } - set{ m_Monoliths = value; } + get => m_Monoliths; + set => m_Monoliths = value; } } } \ No newline at end of file diff --git a/Scripts/Engines/Factions/Items/BaseSystemController.cs b/Scripts/Engines/Factions/Items/BaseSystemController.cs index 88c965e09..70d9aacfd 100644 --- a/Scripts/Engines/Factions/Items/BaseSystemController.cs +++ b/Scripts/Engines/Factions/Items/BaseSystemController.cs @@ -4,8 +4,8 @@ namespace Server.Factions { private int m_LabelNumber; - public virtual int DefaultLabelNumber{ get{ return base.LabelNumber; } } - public new virtual string DefaultName{ get{ return null; } } + public virtual int DefaultLabelNumber => base.LabelNumber; + public new virtual string DefaultName => null; public override int LabelNumber { diff --git a/Scripts/Engines/Factions/Items/FactionStone.cs b/Scripts/Engines/Factions/Items/FactionStone.cs index 9c0a7a478..c47c12792 100644 --- a/Scripts/Engines/Factions/Items/FactionStone.cs +++ b/Scripts/Engines/Factions/Items/FactionStone.cs @@ -10,7 +10,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set { m_Faction = value; diff --git a/Scripts/Engines/Factions/Items/JoinStone.cs b/Scripts/Engines/Factions/Items/JoinStone.cs index f9038303d..be58120ea 100644 --- a/Scripts/Engines/Factions/Items/JoinStone.cs +++ b/Scripts/Engines/Factions/Items/JoinStone.cs @@ -10,7 +10,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set { m_Faction = value; diff --git a/Scripts/Engines/Factions/Items/Power Faction Items/BloodRose.cs b/Scripts/Engines/Factions/Items/Power Faction Items/BloodRose.cs index 64075f36d..ca7b1222a 100644 --- a/Scripts/Engines/Factions/Items/Power Faction Items/BloodRose.cs +++ b/Scripts/Engines/Factions/Items/Power Faction Items/BloodRose.cs @@ -2,11 +2,7 @@ using System; namespace Server { public sealed class BloodRose : PowerFactionItem { - public override string DefaultName { - get { - return "blood rose"; - } - } + public override string DefaultName => "blood rose"; public BloodRose() : base( Utility.RandomList( 6378, 9035 ) ) { diff --git a/Scripts/Engines/Factions/Items/Power Faction Items/ClarityPotion.cs b/Scripts/Engines/Factions/Items/Power Faction Items/ClarityPotion.cs index 646be21ab..20ff5aae0 100644 --- a/Scripts/Engines/Factions/Items/Power Faction Items/ClarityPotion.cs +++ b/Scripts/Engines/Factions/Items/Power Faction Items/ClarityPotion.cs @@ -2,11 +2,7 @@ using System; namespace Server { public sealed class ClarityPotion : PowerFactionItem { - public override string DefaultName { - get { - return "clarity potion"; - } - } + public override string DefaultName => "clarity potion"; public ClarityPotion() : base( 3628 ) { diff --git a/Scripts/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs b/Scripts/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs index 3640dd0c3..7c4dfaedd 100644 --- a/Scripts/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs +++ b/Scripts/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs @@ -2,11 +2,7 @@ using Server.Factions; namespace Server { public sealed class GemOfEmpowerment : PowerFactionItem { - public override string DefaultName { - get { - return "gem of empowerment"; - } - } + public override string DefaultName => "gem of empowerment"; public GemOfEmpowerment() : base( 7955 ) { diff --git a/Scripts/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs b/Scripts/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs index 287284cbe..a5f89ac35 100644 --- a/Scripts/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs +++ b/Scripts/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs @@ -35,17 +35,9 @@ namespace Server { private int _weight; private Type _type; - public int Weight { - get { - return _weight; - } - } + public int Weight => _weight; - public Type Type { - get { - return _type; - } - } + public Type Type => _type; public WeightedItem( int weight, Type type ) { _weight = weight; diff --git a/Scripts/Engines/Factions/Items/Power Faction Items/StormsEye.cs b/Scripts/Engines/Factions/Items/Power Faction Items/StormsEye.cs index 45e8f824f..a57275dab 100644 --- a/Scripts/Engines/Factions/Items/Power Faction Items/StormsEye.cs +++ b/Scripts/Engines/Factions/Items/Power Faction Items/StormsEye.cs @@ -5,11 +5,7 @@ using Server.Factions; namespace Server { public sealed class StormsEye : PowerFactionItem { - public override string DefaultName { - get { - return "storms eye"; - } - } + public override string DefaultName => "storms eye"; public StormsEye() : base( 3967 ) { diff --git a/Scripts/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs b/Scripts/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs index 7f93eb981..52f67ff4a 100644 --- a/Scripts/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs +++ b/Scripts/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs @@ -4,11 +4,7 @@ using Server.Factions; namespace Server { public sealed class UrnOfAscension : PowerFactionItem { - public override string DefaultName { - get { - return "urn of ascension"; - } - } + public override string DefaultName => "urn of ascension"; public UrnOfAscension() : base( 9246 ) { diff --git a/Scripts/Engines/Factions/Items/Sigil.cs b/Scripts/Engines/Factions/Items/Sigil.cs index ac00a6af6..9db4111ea 100644 --- a/Scripts/Engines/Factions/Items/Sigil.cs +++ b/Scripts/Engines/Factions/Items/Sigil.cs @@ -36,82 +36,70 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public DateTime LastStolen { - get{ return m_LastStolen; } - set{ m_LastStolen = value; } + get => m_LastStolen; + set => m_LastStolen = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public DateTime GraceStart { - get{ return m_GraceStart; } - set{ m_GraceStart = value; } + get => m_GraceStart; + set => m_GraceStart = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public DateTime CorruptionStart { - get{ return m_CorruptionStart; } - set{ m_CorruptionStart = value; } + get => m_CorruptionStart; + set => m_CorruptionStart = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public DateTime PurificationStart { - get{ return m_PurificationStart; } - set{ m_PurificationStart = value; } + get => m_PurificationStart; + set => m_PurificationStart = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Town Town { - get{ return m_Town; } + get => m_Town; set{ m_Town = value; Update(); } } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Faction Corrupted { - get{ return m_Corrupted; } + get => m_Corrupted; set{ m_Corrupted = value; Update(); } } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Faction Corrupting { - get{ return m_Corrupting; } + get => m_Corrupting; set{ m_Corrupting = value; Update(); } } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public BaseMonolith LastMonolith { - get{ return m_LastMonolith; } - set{ m_LastMonolith = value; } + get => m_LastMonolith; + set => m_LastMonolith = value; } [CommandProperty( AccessLevel.Counselor )] - public bool IsBeingCorrupted - { - get{ return ( m_LastMonolith is StrongholdMonolith && m_LastMonolith.Faction == m_Corrupting && m_Corrupting != null ); } - } + public bool IsBeingCorrupted => ( m_LastMonolith is StrongholdMonolith && m_LastMonolith.Faction == m_Corrupting && m_Corrupting != null ); [CommandProperty( AccessLevel.Counselor )] - public bool IsCorrupted - { - get{ return ( m_Corrupted != null ); } - } + public bool IsCorrupted => ( m_Corrupted != null ); [CommandProperty( AccessLevel.Counselor )] - public bool IsPurifying - { - get{ return ( m_PurificationStart != DateTime.MinValue ); } - } + public bool IsPurifying => ( m_PurificationStart != DateTime.MinValue ); [CommandProperty( AccessLevel.Counselor )] - public bool IsCorrupting - { - get{ return ( m_Corrupting != null && m_Corrupting != m_Corrupted ); } - } + public bool IsCorrupting => ( m_Corrupting != null && m_Corrupting != m_Corrupted ); public void Update() { @@ -456,6 +444,6 @@ namespace Server.Factions private static List m_Sigils = new List(); - public static List Sigils{ get{ return m_Sigils; } } + public static List Sigils => m_Sigils; } } diff --git a/Scripts/Engines/Factions/Items/Silver.cs b/Scripts/Engines/Factions/Items/Silver.cs index e8f1cb795..9cd7b0c3f 100644 --- a/Scripts/Engines/Factions/Items/Silver.cs +++ b/Scripts/Engines/Factions/Items/Silver.cs @@ -2,10 +2,7 @@ namespace Server.Factions { public class Silver : Item { - public override double DefaultWeight - { - get { return 0.02; } - } + public override double DefaultWeight => 0.02; [Constructible] public Silver() : this( 1 ) diff --git a/Scripts/Engines/Factions/Items/TownStone.cs b/Scripts/Engines/Factions/Items/TownStone.cs index ebad9304b..764fda584 100644 --- a/Scripts/Engines/Factions/Items/TownStone.cs +++ b/Scripts/Engines/Factions/Items/TownStone.cs @@ -9,7 +9,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Town Town { - get{ return m_Town; } + get => m_Town; set { m_Town = value; diff --git a/Scripts/Engines/Factions/Items/Traps/BaseFactionTrap.cs b/Scripts/Engines/Factions/Items/Traps/BaseFactionTrap.cs index f24bd9540..a50349756 100644 --- a/Scripts/Engines/Factions/Items/Traps/BaseFactionTrap.cs +++ b/Scripts/Engines/Factions/Items/Traps/BaseFactionTrap.cs @@ -24,39 +24,36 @@ namespace Server.Factions [CommandProperty( AccessLevel.GameMaster )] public Faction Faction { - get{ return m_Faction; } - set{ m_Faction = value; } + get => m_Faction; + set => m_Faction = value; } [CommandProperty( AccessLevel.GameMaster )] public Mobile Placer { - get{ return m_Placer; } - set{ m_Placer = value; } + get => m_Placer; + set => m_Placer = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime TimeOfPlacement { - get{ return m_TimeOfPlacement; } - set{ m_TimeOfPlacement = value; } + get => m_TimeOfPlacement; + set => m_TimeOfPlacement = value; } - public virtual int EffectSound{ get{ return 0; } } + public virtual int EffectSound => 0; - public virtual int SilverFromDisarm{ get{ return 100; } } + public virtual int SilverFromDisarm => 100; - public virtual int MessageHue{ get{ return 0; } } + public virtual int MessageHue => 0; - public virtual int AttackMessage{ get{ return 0; } } - public virtual int DisarmMessage{ get{ return 0; } } + public virtual int AttackMessage => 0; + public virtual int DisarmMessage => 0; - public virtual AllowedPlacing AllowedPlacing{ get{ return AllowedPlacing.Everywhere; } } + public virtual AllowedPlacing AllowedPlacing => AllowedPlacing.Everywhere; - public virtual TimeSpan ConcealPeriod - { - get{ return TimeSpan.FromMinutes( 1.0 ); } - } + public virtual TimeSpan ConcealPeriod => TimeSpan.FromMinutes( 1.0 ); public virtual TimeSpan DecayPeriod { diff --git a/Scripts/Engines/Factions/Items/Traps/BaseFactionTrapDeed.cs b/Scripts/Engines/Factions/Items/Traps/BaseFactionTrapDeed.cs index d8d13031c..cee378c49 100644 --- a/Scripts/Engines/Factions/Items/Traps/BaseFactionTrapDeed.cs +++ b/Scripts/Engines/Factions/Items/Traps/BaseFactionTrapDeed.cs @@ -13,7 +13,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.GameMaster )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set { m_Faction = value; diff --git a/Scripts/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs b/Scripts/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs index 19b0ce512..8f9257a98 100644 --- a/Scripts/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs +++ b/Scripts/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs @@ -7,8 +7,8 @@ namespace Server.Factions [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } - set{ m_Charges = value; } + get => m_Charges; + set => m_Charges = value; } public override int LabelNumber => 1041508; // a faction trap removal kit diff --git a/Scripts/Engines/Factions/Mobiles/FactionWarHorse.cs b/Scripts/Engines/Factions/Mobiles/FactionWarHorse.cs index 89b7f197d..6f173efce 100644 --- a/Scripts/Engines/Factions/Mobiles/FactionWarHorse.cs +++ b/Scripts/Engines/Factions/Mobiles/FactionWarHorse.cs @@ -10,7 +10,7 @@ namespace Server.Factions [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set { m_Faction = value; diff --git a/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs b/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs index 5e7559e19..19746db32 100644 --- a/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs +++ b/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs @@ -18,19 +18,16 @@ namespace Server.Factions [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set{ Unregister(); m_Faction = value; Register(); } } - public Orders Orders - { - get{ return m_Orders; } - } + public Orders Orders => m_Orders; [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public Town Town { - get{ return m_Town; } + get => m_Town; set{ Unregister(); m_Town = value; Register(); } } @@ -48,10 +45,7 @@ namespace Server.Factions public abstract GuardAI GuardAI{ get; } - protected override BaseAI ForcedAI - { - get { return new FactionGuardAI( this ); } - } + protected override BaseAI ForcedAI => new FactionGuardAI( this ); public override TimeSpan ReacquireDelay => TimeSpan.FromSeconds( 2.0 ); @@ -442,7 +436,7 @@ namespace Server.Factions public Mobile Rider { - get{ return m_Item.Rider; } + get => m_Item.Rider; set{} } @@ -461,7 +455,7 @@ namespace Server.Factions private Mobile m_Rider; private VirtualMount m_Mount; - public Mobile Rider{ get{ return m_Rider; } } + public Mobile Rider => m_Rider; public VirtualMountItem( Mobile mob ) : base( 0x3EA0 ) { @@ -471,10 +465,7 @@ namespace Server.Factions m_Mount = new VirtualMount( this ); } - public IMount Mount - { - get{ return m_Mount; } - } + public IMount Mount => m_Mount; public VirtualMountItem( Serial serial ) : base( serial ) { diff --git a/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs b/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs index ae5d379aa..134e11b84 100644 --- a/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs +++ b/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs @@ -30,9 +30,9 @@ namespace Server.Factions private TimeSpan m_Hold; private int m_Chance; - public Type Spell{ get{ return m_Spell; } } - public TimeSpan Hold{ get{ return m_Hold; } } - public int Chance{ get{ return m_Chance; } } + public Type Spell => m_Spell; + public TimeSpan Hold => m_Hold; + public int Chance => m_Chance; public ComboEntry( Type spell ) : this( spell, 100, TimeSpan.Zero ) { @@ -55,8 +55,8 @@ namespace Server.Factions private int m_Mana; private ComboEntry[] m_Entries; - public int Mana{ get{ return m_Mana; } } - public ComboEntry[] Entries{ get{ return m_Entries; } } + public int Mana => m_Mana; + public ComboEntry[] Entries => m_Entries; public SpellCombo( int mana, params ComboEntry[] entries ) { @@ -121,15 +121,9 @@ namespace Server.Factions return ( ( m_Guard.GuardAI & flag ) == flag ); } - public bool IsDamaged - { - get{ return ( m_Guard.Hits < m_Guard.HitsMax ); } - } + public bool IsDamaged => ( m_Guard.Hits < m_Guard.HitsMax ); - public bool IsPoisoned - { - get{ return m_Guard.Poisoned; } - } + public bool IsPoisoned => m_Guard.Poisoned; public TimeSpan TimeUntilBandage { diff --git a/Scripts/Engines/Factions/Mobiles/Guards/Orders.cs b/Scripts/Engines/Factions/Mobiles/Guards/Orders.cs index 3edf94871..3b2481fdf 100644 --- a/Scripts/Engines/Factions/Mobiles/Guards/Orders.cs +++ b/Scripts/Engines/Factions/Mobiles/Guards/Orders.cs @@ -21,8 +21,10 @@ namespace Server.Factions.AI private Faction m_Faction; private ReactionType m_Type; - public Faction Faction{ get{ return m_Faction; } } - public ReactionType Type{ get{ return m_Type; } set{ m_Type = value; } } + public Faction Faction => m_Faction; + public ReactionType Type{ get => m_Type; + set => m_Type = value; + } public Reaction( Faction faction, ReactionType type ) { @@ -63,10 +65,14 @@ namespace Server.Factions.AI private MovementType m_Movement; private Mobile m_Follow; - public BaseFactionGuard Guard{ get{ return m_Guard; } } + public BaseFactionGuard Guard => m_Guard; - public MovementType Movement{ get{ return m_Movement; } set{ m_Movement = value; } } - public Mobile Follow{ get{ return m_Follow; } set{ m_Follow = value; } } + public MovementType Movement{ get => m_Movement; + set => m_Movement = value; + } + public Mobile Follow{ get => m_Follow; + set => m_Follow = value; + } public Reaction GetReaction( Faction faction ) { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs index cff4a1129..92d6dbfdb 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs @@ -11,14 +11,14 @@ namespace Server.Factions [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Town Town { - get{ return m_Town; } + get => m_Town; set{ Unregister(); m_Town = value; Register(); } } [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public Faction Faction { - get{ return m_Faction; } + get => m_Faction; set{ Unregister(); m_Faction = value; Register(); } } @@ -43,7 +43,7 @@ namespace Server.Factions } private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override void InitSBInfo() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs index cb75246df..cefdb6381 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs @@ -17,10 +17,7 @@ namespace Server.Factions SBInfos.Add( new SBFactionBottle() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs index 07eb04cca..ec7ff6627 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs @@ -18,10 +18,7 @@ namespace Server.Factions { } - public override VendorShoeType ShoeType - { - get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } - } + public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; public override int GetShoeHue() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs index ed4edd9b1..4f0a41bfd 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs @@ -21,10 +21,7 @@ namespace Server.Factions SBInfos.Add( new SBFactionReagent() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Engines/Harvest/Core/BonusHarvestResource.cs b/Scripts/Engines/Harvest/Core/BonusHarvestResource.cs index 8f3e2065f..f3f5df85c 100644 --- a/Scripts/Engines/Harvest/Core/BonusHarvestResource.cs +++ b/Scripts/Engines/Harvest/Core/BonusHarvestResource.cs @@ -8,9 +8,15 @@ namespace Server.Engines.Harvest private double m_ReqSkill, m_Chance; private TextDefinition m_SuccessMessage; - public Type Type { get { return m_Type; } set { m_Type = value; } } - public double ReqSkill { get { return m_ReqSkill; } set { m_ReqSkill = value; } } - public double Chance { get { return m_Chance; } set { m_Chance = value; } } + public Type Type { get => m_Type; + set => m_Type = value; + } + public double ReqSkill { get => m_ReqSkill; + set => m_ReqSkill = value; + } + public double Chance { get => m_Chance; + set => m_Chance = value; + } public TextDefinition SuccessMessage => m_SuccessMessage; diff --git a/Scripts/Engines/Harvest/Core/HarvestBank.cs b/Scripts/Engines/Harvest/Core/HarvestBank.cs index 09280cf65..0a48dbe3a 100644 --- a/Scripts/Engines/Harvest/Core/HarvestBank.cs +++ b/Scripts/Engines/Harvest/Core/HarvestBank.cs @@ -11,10 +11,7 @@ namespace Server.Engines.Harvest HarvestDefinition m_Definition; - public HarvestDefinition Definition - { - get { return m_Definition; } - } + public HarvestDefinition Definition => m_Definition; public int Current { @@ -32,10 +29,7 @@ namespace Server.Engines.Harvest CheckRespawn(); return m_Vein; } - set - { - m_Vein = value; - } + set => m_Vein = value; } public HarvestVein DefaultVein diff --git a/Scripts/Engines/Harvest/Core/HarvestDefinition.cs b/Scripts/Engines/Harvest/Core/HarvestDefinition.cs index 61a855d90..8bf07476c 100644 --- a/Scripts/Engines/Harvest/Core/HarvestDefinition.cs +++ b/Scripts/Engines/Harvest/Core/HarvestDefinition.cs @@ -26,40 +26,102 @@ namespace Server.Engines.Harvest private bool m_RaceBonus; private bool m_RandomizeVeins; - public int BankWidth{ get{ return m_BankWidth; } set{ m_BankWidth = value; } } - public int BankHeight{ get{ return m_BankHeight; } set{ m_BankHeight = value; } } - public int MinTotal{ get{ return m_MinTotal; } set{ m_MinTotal = value; } } - public int MaxTotal{ get{ return m_MaxTotal; } set{ m_MaxTotal = value; } } - public int[] Tiles{ get{ return m_Tiles; } set{ m_Tiles = value; } } - public bool RangedTiles{ get{ return m_RangedTiles; } set{ m_RangedTiles = value; } } - public TimeSpan MinRespawn{ get{ return m_MinRespawn; } set{ m_MinRespawn = value; } } - public TimeSpan MaxRespawn{ get{ return m_MaxRespawn; } set{ m_MaxRespawn = value; } } - public int MaxRange{ get{ return m_MaxRange; } set{ m_MaxRange = value; } } - public int ConsumedPerHarvest{ get{ return m_ConsumedPerHarvest; } set{ m_ConsumedPerHarvest = value; } } - public int ConsumedPerFeluccaHarvest{ get{ return m_ConsumedPerFeluccaHarvest; } set{ m_ConsumedPerFeluccaHarvest = value; } } - public bool PlaceAtFeetIfFull{ get{ return m_PlaceAtFeetIfFull; } set{ m_PlaceAtFeetIfFull = value; } } - public SkillName Skill{ get{ return m_Skill; } set{ m_Skill = value; } } - public int[] EffectActions{ get{ return m_EffectActions; } set{ m_EffectActions = value; } } - public int[] EffectCounts{ get{ return m_EffectCounts; } set{ m_EffectCounts = value; } } - public int[] EffectSounds{ get{ return m_EffectSounds; } set{ m_EffectSounds = value; } } - public TimeSpan EffectSoundDelay{ get{ return m_EffectSoundDelay; } set{ m_EffectSoundDelay = value; } } - public TimeSpan EffectDelay{ get{ return m_EffectDelay; } set{ m_EffectDelay = value; } } - public object NoResourcesMessage{ get{ return m_NoResourcesMessage; } set{ m_NoResourcesMessage = value; } } - public object OutOfRangeMessage{ get{ return m_OutOfRangeMessage; } set{ m_OutOfRangeMessage = value; } } - public object TimedOutOfRangeMessage{ get{ return m_TimedOutOfRangeMessage; } set{ m_TimedOutOfRangeMessage = value; } } - public object DoubleHarvestMessage{ get{ return m_DoubleHarvestMessage; } set{ m_DoubleHarvestMessage = value; } } - public object FailMessage{ get{ return m_FailMessage; } set{ m_FailMessage = value; } } - public object PackFullMessage{ get{ return m_PackFullMessage; } set{ m_PackFullMessage = value; } } - public object ToolBrokeMessage{ get{ return m_ToolBrokeMessage; } set{ m_ToolBrokeMessage = value; } } - public HarvestResource[] Resources{ get{ return m_Resources; } set{ m_Resources = value; } } - public HarvestVein[] Veins{ get{ return m_Veins; } set{ m_Veins = value; } } - public BonusHarvestResource[] BonusResources{ get { return m_BonusResources; } set { m_BonusResources = value; } } - public bool RaceBonus { get { return m_RaceBonus; } set { m_RaceBonus = value; } } - public bool RandomizeVeins { get { return m_RandomizeVeins; } set { m_RandomizeVeins = value; } } + public int BankWidth{ get => m_BankWidth; + set => m_BankWidth = value; + } + public int BankHeight{ get => m_BankHeight; + set => m_BankHeight = value; + } + public int MinTotal{ get => m_MinTotal; + set => m_MinTotal = value; + } + public int MaxTotal{ get => m_MaxTotal; + set => m_MaxTotal = value; + } + public int[] Tiles{ get => m_Tiles; + set => m_Tiles = value; + } + public bool RangedTiles{ get => m_RangedTiles; + set => m_RangedTiles = value; + } + public TimeSpan MinRespawn{ get => m_MinRespawn; + set => m_MinRespawn = value; + } + public TimeSpan MaxRespawn{ get => m_MaxRespawn; + set => m_MaxRespawn = value; + } + public int MaxRange{ get => m_MaxRange; + set => m_MaxRange = value; + } + public int ConsumedPerHarvest{ get => m_ConsumedPerHarvest; + set => m_ConsumedPerHarvest = value; + } + public int ConsumedPerFeluccaHarvest{ get => m_ConsumedPerFeluccaHarvest; + set => m_ConsumedPerFeluccaHarvest = value; + } + public bool PlaceAtFeetIfFull{ get => m_PlaceAtFeetIfFull; + set => m_PlaceAtFeetIfFull = value; + } + public SkillName Skill{ get => m_Skill; + set => m_Skill = value; + } + public int[] EffectActions{ get => m_EffectActions; + set => m_EffectActions = value; + } + public int[] EffectCounts{ get => m_EffectCounts; + set => m_EffectCounts = value; + } + public int[] EffectSounds{ get => m_EffectSounds; + set => m_EffectSounds = value; + } + public TimeSpan EffectSoundDelay{ get => m_EffectSoundDelay; + set => m_EffectSoundDelay = value; + } + public TimeSpan EffectDelay{ get => m_EffectDelay; + set => m_EffectDelay = value; + } + public object NoResourcesMessage{ get => m_NoResourcesMessage; + set => m_NoResourcesMessage = value; + } + public object OutOfRangeMessage{ get => m_OutOfRangeMessage; + set => m_OutOfRangeMessage = value; + } + public object TimedOutOfRangeMessage{ get => m_TimedOutOfRangeMessage; + set => m_TimedOutOfRangeMessage = value; + } + public object DoubleHarvestMessage{ get => m_DoubleHarvestMessage; + set => m_DoubleHarvestMessage = value; + } + public object FailMessage{ get => m_FailMessage; + set => m_FailMessage = value; + } + public object PackFullMessage{ get => m_PackFullMessage; + set => m_PackFullMessage = value; + } + public object ToolBrokeMessage{ get => m_ToolBrokeMessage; + set => m_ToolBrokeMessage = value; + } + public HarvestResource[] Resources{ get => m_Resources; + set => m_Resources = value; + } + public HarvestVein[] Veins{ get => m_Veins; + set => m_Veins = value; + } + public BonusHarvestResource[] BonusResources{ get => m_BonusResources; + set => m_BonusResources = value; + } + public bool RaceBonus { get => m_RaceBonus; + set => m_RaceBonus = value; + } + public bool RandomizeVeins { get => m_RandomizeVeins; + set => m_RandomizeVeins = value; + } private Dictionary> m_BanksByMap; - public Dictionary> Banks{ get{ return m_BanksByMap; } set{ m_BanksByMap = value; } } + public Dictionary> Banks{ get => m_BanksByMap; + set => m_BanksByMap = value; + } public void SendMessageTo( Mobile from, object message ) { diff --git a/Scripts/Engines/Harvest/Core/HarvestResource.cs b/Scripts/Engines/Harvest/Core/HarvestResource.cs index 029a42dbe..a16d5a596 100644 --- a/Scripts/Engines/Harvest/Core/HarvestResource.cs +++ b/Scripts/Engines/Harvest/Core/HarvestResource.cs @@ -8,11 +8,19 @@ namespace Server.Engines.Harvest private double m_ReqSkill, m_MinSkill, m_MaxSkill; private object m_SuccessMessage; - public Type[] Types{ get{ return m_Types; } set{ m_Types = value; } } - public double ReqSkill{ get{ return m_ReqSkill; } set{ m_ReqSkill = value; } } - public double MinSkill{ get{ return m_MinSkill; } set{ m_MinSkill = value; } } - public double MaxSkill{ get{ return m_MaxSkill; } set{ m_MaxSkill = value; } } - public object SuccessMessage{ get{ return m_SuccessMessage; } } + public Type[] Types{ get => m_Types; + set => m_Types = value; + } + public double ReqSkill{ get => m_ReqSkill; + set => m_ReqSkill = value; + } + public double MinSkill{ get => m_MinSkill; + set => m_MinSkill = value; + } + public double MaxSkill{ get => m_MaxSkill; + set => m_MaxSkill = value; + } + public object SuccessMessage => m_SuccessMessage; public void SendSuccessTo( Mobile m ) { diff --git a/Scripts/Engines/Harvest/Core/HarvestVein.cs b/Scripts/Engines/Harvest/Core/HarvestVein.cs index b0b55dc9a..c6f619440 100644 --- a/Scripts/Engines/Harvest/Core/HarvestVein.cs +++ b/Scripts/Engines/Harvest/Core/HarvestVein.cs @@ -7,10 +7,18 @@ namespace Server.Engines.Harvest private HarvestResource m_PrimaryResource; private HarvestResource m_FallbackResource; - public double VeinChance{ get{ return m_VeinChance; } set{ m_VeinChance = value; } } - public double ChanceToFallback{ get{ return m_ChanceToFallback; } set{ m_ChanceToFallback = value; } } - public HarvestResource PrimaryResource{ get{ return m_PrimaryResource; } set{ m_PrimaryResource = value; } } - public HarvestResource FallbackResource{ get{ return m_FallbackResource; } set{ m_FallbackResource = value; } } + public double VeinChance{ get => m_VeinChance; + set => m_VeinChance = value; + } + public double ChanceToFallback{ get => m_ChanceToFallback; + set => m_ChanceToFallback = value; + } + public HarvestResource PrimaryResource{ get => m_PrimaryResource; + set => m_PrimaryResource = value; + } + public HarvestResource FallbackResource{ get => m_FallbackResource; + set => m_FallbackResource = value; + } public HarvestVein( double veinChance, double chanceToFallback, HarvestResource primaryResource, HarvestResource fallbackResource ) { diff --git a/Scripts/Engines/Harvest/Fishing.cs b/Scripts/Engines/Harvest/Fishing.cs index 98189f5eb..ecf558358 100644 --- a/Scripts/Engines/Harvest/Fishing.cs +++ b/Scripts/Engines/Harvest/Fishing.cs @@ -25,10 +25,7 @@ namespace Server.Engines.Harvest private HarvestDefinition m_Definition; - public HarvestDefinition Definition - { - get{ return m_Definition; } - } + public HarvestDefinition Definition => m_Definition; private Fishing() { diff --git a/Scripts/Engines/Harvest/Lumberjacking.cs b/Scripts/Engines/Harvest/Lumberjacking.cs index a906903d5..277774a47 100644 --- a/Scripts/Engines/Harvest/Lumberjacking.cs +++ b/Scripts/Engines/Harvest/Lumberjacking.cs @@ -21,10 +21,7 @@ namespace Server.Engines.Harvest private HarvestDefinition m_Definition; - public HarvestDefinition Definition - { - get{ return m_Definition; } - } + public HarvestDefinition Definition => m_Definition; private Lumberjacking() { diff --git a/Scripts/Engines/Harvest/Mining.cs b/Scripts/Engines/Harvest/Mining.cs index 5aeb5dae8..6fcd10ea4 100644 --- a/Scripts/Engines/Harvest/Mining.cs +++ b/Scripts/Engines/Harvest/Mining.cs @@ -22,15 +22,9 @@ namespace Server.Engines.Harvest private HarvestDefinition m_OreAndStone, m_Sand; - public HarvestDefinition OreAndStone - { - get{ return m_OreAndStone; } - } + public HarvestDefinition OreAndStone => m_OreAndStone; - public HarvestDefinition Sand - { - get{ return m_Sand; } - } + public HarvestDefinition Sand => m_Sand; private Mining() { diff --git a/Scripts/Engines/Help/PageQueue.cs b/Scripts/Engines/Help/PageQueue.cs index 60969f517..2431ab2a3 100644 --- a/Scripts/Engines/Help/PageQueue.cs +++ b/Scripts/Engines/Help/PageQueue.cs @@ -43,25 +43,13 @@ namespace Server.Engines.Help private PageInfo m_PageInfo; - public PageInfo PageInfo - { - get{ return m_PageInfo; } - } + public PageInfo PageInfo => m_PageInfo; - public Mobile Sender - { - get - { - return m_Sender; - } - } + public Mobile Sender => m_Sender; public Mobile Handler { - get - { - return m_Handler; - } + get => m_Handler; set { PageQueue.OnHandlerChanged( m_Handler, value, this ); @@ -69,53 +57,17 @@ namespace Server.Engines.Help } } - public DateTime Sent - { - get - { - return m_Sent; - } - } + public DateTime Sent => m_Sent; - public string Message - { - get - { - return m_Message; - } - } + public string Message => m_Message; - public PageType Type - { - get - { - return m_Type; - } - } + public PageType Type => m_Type; - public Point3D PageLocation - { - get - { - return m_PageLocation; - } - } + public Point3D PageLocation => m_PageLocation; - public Map PageMap - { - get - { - return m_PageMap; - } - } + public Map PageMap => m_PageMap; - public List SpeechLog - { - get - { - return m_SpeechLog; - } - } + public List SpeechLog => m_SpeechLog; private Timer m_Timer; @@ -311,13 +263,7 @@ namespace Server.Engines.Help Remove( GetEntry( sender ) ); } - public static ArrayList List - { - get - { - return m_List; - } - } + public static ArrayList List => m_List; public static void Enqueue( PageEntry entry ) { diff --git a/Scripts/Engines/Help/PageQueueGump.cs b/Scripts/Engines/Help/PageQueueGump.cs index 25ade36ef..578baf0d3 100644 --- a/Scripts/Engines/Help/PageQueueGump.cs +++ b/Scripts/Engines/Help/PageQueueGump.cs @@ -128,8 +128,12 @@ namespace Server.Engines.Help private string m_Title; private string m_Message; - public string Title{ get{ return m_Title; } set{ m_Title = value; } } - public string Message{ get{ return m_Message; } set{ m_Message = value; } } + public string Title{ get => m_Title; + set => m_Title = value; + } + public string Message{ get => m_Message; + set => m_Message = value; + } public PredefinedResponse( string title, string message ) { diff --git a/Scripts/Engines/Help/SpeechLog.cs b/Scripts/Engines/Help/SpeechLog.cs index 6695bb369..6ae1577b8 100644 --- a/Scripts/Engines/Help/SpeechLog.cs +++ b/Scripts/Engines/Help/SpeechLog.cs @@ -66,7 +66,7 @@ namespace Server.Engines.Help private Queue m_Queue; - public int Count{ get{ return m_Queue.Count; } } + public int Count => m_Queue.Count; public SpeechLog() { @@ -131,9 +131,9 @@ namespace Server.Engines.Help private string m_Speech; private DateTime m_Created; - public Mobile From{ get{ return m_From; } } - public string Speech{ get{ return m_Speech; } } - public DateTime Created{ get{ return m_Created; } } + public Mobile From => m_From; + public string Speech => m_Speech; + public DateTime Created => m_Created; public SpeechLogEntry( Mobile from, string speech ) { diff --git a/Scripts/Engines/Help/StuckMenu.cs b/Scripts/Engines/Help/StuckMenu.cs index acefcad70..c09a5c5dd 100644 --- a/Scripts/Engines/Help/StuckMenu.cs +++ b/Scripts/Engines/Help/StuckMenu.cs @@ -10,8 +10,8 @@ namespace Server.Menus.Questions private int m_Name; private Point3D[] m_Locations; - public int Name{ get{ return m_Name; } } - public Point3D[] Locations{ get{ return m_Locations; } } + public int Name => m_Name; + public Point3D[] Locations => m_Locations; public StuckMenuEntry( int name, Point3D[] locations ) { diff --git a/Scripts/Engines/Khaldun/KhaldunPitTeleporter.cs b/Scripts/Engines/Khaldun/KhaldunPitTeleporter.cs index 1085048a6..104410a44 100644 --- a/Scripts/Engines/Khaldun/KhaldunPitTeleporter.cs +++ b/Scripts/Engines/Khaldun/KhaldunPitTeleporter.cs @@ -9,22 +9,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get { return m_Active; } - set { m_Active = value; } + get => m_Active; + set => m_Active = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D PointDest { - get { return m_PointDest; } - set { m_PointDest = value; } + get => m_PointDest; + set => m_PointDest = value; } [CommandProperty( AccessLevel.GameMaster )] public Map MapDest { - get { return m_MapDest; } - set { m_MapDest = value; } + get => m_MapDest; + set => m_MapDest = value; } public override int LabelNumber => 1016511; // the floor of the cavern seems to have collapsed here - a faint light is visible at the bottom of the pit diff --git a/Scripts/Engines/Khaldun/PuzzleChest.cs b/Scripts/Engines/Khaldun/PuzzleChest.cs index 6a3ba2221..52782ac00 100644 --- a/Scripts/Engines/Khaldun/PuzzleChest.cs +++ b/Scripts/Engines/Khaldun/PuzzleChest.cs @@ -24,13 +24,23 @@ namespace Server.Items private PuzzleChestCylinder[] m_Cylinders = new PuzzleChestCylinder[Length]; - public PuzzleChestCylinder[] Cylinders{ get{ return m_Cylinders; } } + public PuzzleChestCylinder[] Cylinders => m_Cylinders; - public PuzzleChestCylinder First{ get{ return m_Cylinders[0]; } set{ m_Cylinders[0] = value; } } - public PuzzleChestCylinder Second{ get{ return m_Cylinders[1]; } set{ m_Cylinders[1] = value; } } - public PuzzleChestCylinder Third{ get{ return m_Cylinders[2]; } set{ m_Cylinders[2] = value; } } - public PuzzleChestCylinder Fourth{ get{ return m_Cylinders[3]; } set{ m_Cylinders[3] = value; } } - public PuzzleChestCylinder Fifth{ get{ return m_Cylinders[4]; } set{ m_Cylinders[4] = value; } } + public PuzzleChestCylinder First{ get => m_Cylinders[0]; + set => m_Cylinders[0] = value; + } + public PuzzleChestCylinder Second{ get => m_Cylinders[1]; + set => m_Cylinders[1] = value; + } + public PuzzleChestCylinder Third{ get => m_Cylinders[2]; + set => m_Cylinders[2] = value; + } + public PuzzleChestCylinder Fourth{ get => m_Cylinders[3]; + set => m_Cylinders[3] = value; + } + public PuzzleChestCylinder Fifth{ get => m_Cylinders[4]; + set => m_Cylinders[4] = value; + } public static PuzzleChestCylinder RandomCylinder() { @@ -149,7 +159,7 @@ namespace Server.Items { private DateTime m_When; - public DateTime When{ get{ return m_When; } } + public DateTime When => m_When; public PuzzleChestSolutionAndTime( DateTime when, PuzzleChestSolution solution ) : base( solution ) { @@ -184,7 +194,7 @@ namespace Server.Items public PuzzleChestSolution Solution { - get{ return m_Solution; } + get => m_Solution; set { m_Solution = value; @@ -192,16 +202,19 @@ namespace Server.Items } } - public PuzzleChestCylinder[] Hints{ get{ return m_Hints; } } + public PuzzleChestCylinder[] Hints => m_Hints; - public PuzzleChestCylinder FirstHint{ get{ return m_Hints[0]; } set{ m_Hints[0] = value; } } - public PuzzleChestCylinder SecondHint{ get{ return m_Hints[1]; } set{ m_Hints[1] = value; } } - public PuzzleChestCylinder ThirdHint{ get{ return m_Hints[2]; } set{ m_Hints[2] = value; } } - - public override string DefaultName - { - get { return null; } + public PuzzleChestCylinder FirstHint{ get => m_Hints[0]; + set => m_Hints[0] = value; } + public PuzzleChestCylinder SecondHint{ get => m_Hints[1]; + set => m_Hints[1] = value; + } + public PuzzleChestCylinder ThirdHint{ get => m_Hints[2]; + set => m_Hints[2] = value; + } + + public override string DefaultName => null; public PuzzleChest( int itemID ) : base( itemID ) { diff --git a/Scripts/Engines/Khaldun/RaisableItem.cs b/Scripts/Engines/Khaldun/RaisableItem.cs index 35986de56..7ceb5763c 100644 --- a/Scripts/Engines/Khaldun/RaisableItem.cs +++ b/Scripts/Engines/Khaldun/RaisableItem.cs @@ -12,7 +12,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxElevation { - get{ return m_MaxElevation; } + get => m_MaxElevation; set { if ( value <= 0 ) @@ -25,13 +25,19 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int MoveSound{ get{ return m_MoveSound; } set{ m_MoveSound = value; } } + public int MoveSound{ get => m_MoveSound; + set => m_MoveSound = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int StopSound{ get{ return m_StopSound; } set{ m_StopSound = value; } } + public int StopSound{ get => m_StopSound; + set => m_StopSound = value; + } [CommandProperty( AccessLevel.GameMaster )] - public TimeSpan CloseDelay{ get{ return m_CloseDelay; } set{ m_CloseDelay = value; } } + public TimeSpan CloseDelay{ get => m_CloseDelay; + set => m_CloseDelay = value; + } [Constructible] public RaisableItem( int itemID ) : this( itemID, 20, -1, -1, TimeSpan.FromMinutes( 1.0 ) ) @@ -57,10 +63,7 @@ namespace Server.Items private int m_Elevation; private RaiseTimer m_RaiseTimer; - public bool IsRaisable - { - get{ return m_RaiseTimer == null; } - } + public bool IsRaisable => m_RaiseTimer == null; public void Raise() { diff --git a/Scripts/Engines/Khaldun/RaiseSwitch.cs b/Scripts/Engines/Khaldun/RaiseSwitch.cs index a7ef3b600..162cb85d5 100644 --- a/Scripts/Engines/Khaldun/RaiseSwitch.cs +++ b/Scripts/Engines/Khaldun/RaiseSwitch.cs @@ -10,8 +10,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public RaisableItem RaisableItem { - get{ return m_RaisableItem; } - set{ m_RaisableItem = value; } + get => m_RaisableItem; + set => m_RaisableItem = value; } [Constructible] @@ -146,7 +146,7 @@ namespace Server.Items public class DisappearingRaiseSwitch : RaiseSwitch { - public int CurrentRange{ get{ return Visible ? 3 : 2; } } + public int CurrentRange => Visible ? 3 : 2; [Constructible] public DisappearingRaiseSwitch() : base( 0x108F ) diff --git a/Scripts/Engines/MLQuests/Definitions/NewHavenSkillTraining.cs b/Scripts/Engines/MLQuests/Definitions/NewHavenSkillTraining.cs index 4c8439d95..8b0bcd8a8 100644 --- a/Scripts/Engines/MLQuests/Definitions/NewHavenSkillTraining.cs +++ b/Scripts/Engines/MLQuests/Definitions/NewHavenSkillTraining.cs @@ -1813,7 +1813,7 @@ namespace Server.Engines.MLQuests.Definitions public class Ryuichi : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos { get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override string DefaultName => "Ryuichi"; public override bool CanShout => true; @@ -2055,7 +2055,7 @@ namespace Server.Engines.MLQuests.Definitions public class Hamato : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos { get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override string DefaultName => "Hamato"; public override bool CanShout => true; diff --git a/Scripts/Engines/MLQuests/Items/QuestGiverItem.cs b/Scripts/Engines/MLQuests/Items/QuestGiverItem.cs index 9e7842c50..8acf77b09 100644 --- a/Scripts/Engines/MLQuests/Items/QuestGiverItem.cs +++ b/Scripts/Engines/MLQuests/Items/QuestGiverItem.cs @@ -26,7 +26,7 @@ namespace Server.Engines.MLQuests.Items } } - public bool CanGiveMLQuest { get { return ( MLQuests.Count != 0 ); } } + public bool CanGiveMLQuest => ( MLQuests.Count != 0 ); public QuestGiverItem( int itemId ) : base( itemId ) @@ -103,7 +103,7 @@ namespace Server.Engines.MLQuests.Items } } - public bool CanGiveMLQuest { get { return ( MLQuests.Count != 0 ); } } + public bool CanGiveMLQuest => ( MLQuests.Count != 0 ); public TransientQuestGiverItem( int itemId, TimeSpan lifeSpan ) : base( itemId, lifeSpan ) diff --git a/Scripts/Engines/MLQuests/Items/Teleporters.cs b/Scripts/Engines/MLQuests/Items/Teleporters.cs index f0495a18a..c8d106799 100644 --- a/Scripts/Engines/MLQuests/Items/Teleporters.cs +++ b/Scripts/Engines/MLQuests/Items/Teleporters.cs @@ -12,15 +12,15 @@ namespace Server.Engines.MLQuests.Items [CommandProperty(AccessLevel.GameMaster)] public Type QuestType { - get { return m_QuestType; } + get => m_QuestType; set { m_QuestType = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public TextDefinition Message { - get { return m_Message; } - set { m_Message = value; } + get => m_Message; + set => m_Message = value; } [Constructible] @@ -114,15 +114,15 @@ namespace Server.Engines.MLQuests.Items [CommandProperty(AccessLevel.GameMaster)] public Type TicketType { - get { return m_TicketType; } + get => m_TicketType; set { m_TicketType = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public TextDefinition Message { - get { return m_Message; } - set { m_Message = value; } + get => m_Message; + set => m_Message = value; } [Constructible] diff --git a/Scripts/Engines/MLQuests/MLQuest.cs b/Scripts/Engines/MLQuests/MLQuest.cs index 92ac7a2eb..93631356f 100644 --- a/Scripts/Engines/MLQuests/MLQuest.cs +++ b/Scripts/Engines/MLQuests/MLQuest.cs @@ -20,14 +20,14 @@ namespace Server.Engines.MLQuests public bool Deserialized { - get { return m_Deserialized; } - set { m_Deserialized = value; } + get => m_Deserialized; + set => m_Deserialized = value; } public bool SaveEnabled { - get { return m_SaveEnabled; } - set { m_SaveEnabled = value; } + get => m_SaveEnabled; + set => m_SaveEnabled = value; } private bool m_Activated; @@ -50,44 +50,44 @@ namespace Server.Engines.MLQuests public bool Activated { - get { return m_Activated; } - set { m_Activated = value; } + get => m_Activated; + set => m_Activated = value; } public List Objectives { - get { return m_Objectives; } - set { m_Objectives = value; } + get => m_Objectives; + set => m_Objectives = value; } public ObjectiveType ObjectiveType { - get { return m_ObjectiveType; } - set { m_ObjectiveType = value; } + get => m_ObjectiveType; + set => m_ObjectiveType = value; } public List Rewards { - get { return m_Rewards; } - set { m_Rewards = value; } + get => m_Rewards; + set => m_Rewards = value; } public List Instances { - get { return m_Instances; } - set { m_Instances = value; } + get => m_Instances; + set => m_Instances = value; } public bool OneTimeOnly { - get { return m_OneTimeOnly; } - set { m_OneTimeOnly = value; } + get => m_OneTimeOnly; + set => m_OneTimeOnly = value; } public bool HasRestartDelay { - get { return m_HasRestartDelay; } - set { m_HasRestartDelay = value; } + get => m_HasRestartDelay; + set => m_HasRestartDelay = value; } public bool HasObjective() where T : BaseObjective @@ -101,35 +101,35 @@ namespace Server.Engines.MLQuests return false; } - public bool IsEscort - { - get { return HasObjective(); } - } + public bool IsEscort => HasObjective(); - public bool IsSkillTrainer - { - get { return HasObjective(); } - } + public bool IsSkillTrainer => HasObjective(); - public bool RequiresCollection - { - get { return HasObjective() || HasObjective(); } - } + public bool RequiresCollection => HasObjective() || HasObjective(); - public virtual bool RecordCompletion - { - get { return ( m_OneTimeOnly || m_HasRestartDelay ); } - } + public virtual bool RecordCompletion => ( m_OneTimeOnly || m_HasRestartDelay ); public virtual bool IsChainTriggered => false; public virtual Type NextQuest => null; - public TextDefinition Title { get { return m_Title; } set { m_Title = value; } } - public TextDefinition Description { get { return m_Description; } set { m_Description = value; } } - public TextDefinition RefusalMessage { get { return m_RefuseMessage; } set { m_RefuseMessage = value; } } - public TextDefinition InProgressMessage { get { return m_InProgressMessage; } set { m_InProgressMessage = value; } } - public TextDefinition CompletionMessage { get { return m_CompletionMessage; } set { m_CompletionMessage = value; } } - public TextDefinition CompletionNotice { get { return m_CompletionNotice; } set { m_CompletionNotice = value; } } + public TextDefinition Title { get => m_Title; + set => m_Title = value; + } + public TextDefinition Description { get => m_Description; + set => m_Description = value; + } + public TextDefinition RefusalMessage { get => m_RefuseMessage; + set => m_RefuseMessage = value; + } + public TextDefinition InProgressMessage { get => m_InProgressMessage; + set => m_InProgressMessage = value; + } + public TextDefinition CompletionMessage { get => m_CompletionMessage; + set => m_CompletionMessage = value; + } + public TextDefinition CompletionNotice { get => m_CompletionNotice; + set => m_CompletionNotice = value; + } public static readonly TextDefinition CompletionNoticeDefault = new TextDefinition( 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. diff --git a/Scripts/Engines/MLQuests/MLQuestContext.cs b/Scripts/Engines/MLQuests/MLQuestContext.cs index f85a8539e..f78fb9abe 100644 --- a/Scripts/Engines/MLQuests/MLQuestContext.cs +++ b/Scripts/Engines/MLQuests/MLQuestContext.cs @@ -52,53 +52,41 @@ namespace Server.Engines.MLQuests private List m_ChainOffers; private MLQuestFlag m_Flags; - public PlayerMobile Owner - { - get { return m_Owner; } - } + public PlayerMobile Owner => m_Owner; - public List QuestInstances - { - get { return m_QuestInstances; } - } + public List QuestInstances => m_QuestInstances; - public List ChainOffers - { - get { return m_ChainOffers; } - } + public List ChainOffers => m_ChainOffers; [CommandProperty( AccessLevel.GameMaster )] - public bool IsFull - { - get { return m_QuestInstances.Count >= MLQuestSystem.MaxConcurrentQuests; } - } + public bool IsFull => m_QuestInstances.Count >= MLQuestSystem.MaxConcurrentQuests; [CommandProperty( AccessLevel.GameMaster )] public bool Spellweaving { - get { return GetFlag( MLQuestFlag.Spellweaving ); } - set { SetFlag( MLQuestFlag.Spellweaving, value ); } + get => GetFlag( MLQuestFlag.Spellweaving ); + set => SetFlag( MLQuestFlag.Spellweaving, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool SummonFey { - get { return GetFlag( MLQuestFlag.SummonFey ); } - set { SetFlag( MLQuestFlag.SummonFey, value ); } + get => GetFlag( MLQuestFlag.SummonFey ); + set => SetFlag( MLQuestFlag.SummonFey, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool SummonFiend { - get { return GetFlag( MLQuestFlag.SummonFiend ); } - set { SetFlag( MLQuestFlag.SummonFiend, value ); } + get => GetFlag( MLQuestFlag.SummonFiend ); + set => SetFlag( MLQuestFlag.SummonFiend, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool BedlamAccess { - get { return GetFlag( MLQuestFlag.BedlamAccess ); } - set { SetFlag( MLQuestFlag.BedlamAccess, value ); } + get => GetFlag( MLQuestFlag.BedlamAccess ); + set => SetFlag( MLQuestFlag.BedlamAccess, value ); } public MLQuestContext( PlayerMobile owner ) diff --git a/Scripts/Engines/MLQuests/MLQuestEntry.cs b/Scripts/Engines/MLQuests/MLQuestEntry.cs index 416f7b46f..ac12f5c32 100644 --- a/Scripts/Engines/MLQuests/MLQuestEntry.cs +++ b/Scripts/Engines/MLQuests/MLQuestEntry.cs @@ -83,13 +83,13 @@ namespace Server.Engines.MLQuests public MLQuest Quest { - get { return m_Quest; } - set { m_Quest = value; } + get => m_Quest; + set => m_Quest = value; } public IQuestGiver Quester { - get { return m_Quester; } + get => m_Quester; set { m_Quester = value; @@ -97,50 +97,44 @@ namespace Server.Engines.MLQuests } } - public Type QuesterType - { - get { return m_QuesterType; } - } + public Type QuesterType => m_QuesterType; public PlayerMobile Player { - get { return m_Player; } - set { m_Player = value; } + get => m_Player; + set => m_Player = value; } - public MLQuestContext PlayerContext - { - get { return MLQuestSystem.GetOrCreateContext( m_Player ); } - } + public MLQuestContext PlayerContext => MLQuestSystem.GetOrCreateContext( m_Player ); public DateTime Accepted { - get { return m_Accepted; } - set { m_Accepted = value; } + get => m_Accepted; + set => m_Accepted = value; } public bool ClaimReward { - get { return GetFlag( MLQuestInstanceFlags.ClaimReward ); } - set { SetFlag( MLQuestInstanceFlags.ClaimReward, value ); } + get => GetFlag( MLQuestInstanceFlags.ClaimReward ); + set => SetFlag( MLQuestInstanceFlags.ClaimReward, value ); } public bool Removed { - get { return GetFlag( MLQuestInstanceFlags.Removed ); } - set { SetFlag( MLQuestInstanceFlags.Removed, value ); } + get => GetFlag( MLQuestInstanceFlags.Removed ); + set => SetFlag( MLQuestInstanceFlags.Removed, value ); } public bool Failed { - get { return GetFlag( MLQuestInstanceFlags.Failed ); } - set { SetFlag( MLQuestInstanceFlags.Failed, value ); } + get => GetFlag( MLQuestInstanceFlags.Failed ); + set => SetFlag( MLQuestInstanceFlags.Failed, value ); } public BaseObjectiveInstance[] Objectives { - get { return m_ObjectiveInstances; } - set { m_ObjectiveInstances = value; } + get => m_ObjectiveInstances; + set => m_ObjectiveInstances = value; } public bool AllowsQuestItem( Item item, Type type ) @@ -271,10 +265,7 @@ namespace Server.Engines.MLQuests } } - public bool SkipReportBack - { - get { return TextDefinition.IsNullOrEmpty( m_Quest.CompletionMessage ); } - } + public bool SkipReportBack => TextDefinition.IsNullOrEmpty( m_Quest.CompletionMessage ); public void SendReportBackGump() { diff --git a/Scripts/Engines/MLQuests/MLQuestPersistence.cs b/Scripts/Engines/MLQuests/MLQuestPersistence.cs index a0d4b8125..c674ef8c8 100644 --- a/Scripts/Engines/MLQuests/MLQuestPersistence.cs +++ b/Scripts/Engines/MLQuests/MLQuestPersistence.cs @@ -10,10 +10,7 @@ namespace Server.Engines.MLQuests m_Instance = new MLQuestPersistence(); } - public override string DefaultName - { - get { return "ML quests persistence - Internal"; } - } + public override string DefaultName => "ML quests persistence - Internal"; private MLQuestPersistence() : base( 1 ) diff --git a/Scripts/Engines/MLQuests/MLQuestSystem.cs b/Scripts/Engines/MLQuests/MLQuestSystem.cs index 0912c3278..10bfc5422 100644 --- a/Scripts/Engines/MLQuests/MLQuestSystem.cs +++ b/Scripts/Engines/MLQuests/MLQuestSystem.cs @@ -29,20 +29,11 @@ namespace Server.Engines.MLQuests public static readonly List EmptyList = new List(); - public static Dictionary Quests - { - get { return m_Quests; } - } + public static Dictionary Quests => m_Quests; - public static Dictionary> QuestGivers - { - get { return m_QuestGivers; } - } + public static Dictionary> QuestGivers => m_QuestGivers; - public static Dictionary Contexts - { - get { return m_Contexts; } - } + public static Dictionary Contexts => m_Contexts; static MLQuestSystem() { diff --git a/Scripts/Engines/MLQuests/Objectives/BaseObjective.cs b/Scripts/Engines/MLQuests/Objectives/BaseObjective.cs index a884e22b8..96b10069e 100644 --- a/Scripts/Engines/MLQuests/Objectives/BaseObjective.cs +++ b/Scripts/Engines/MLQuests/Objectives/BaseObjective.cs @@ -32,26 +32,20 @@ namespace Server.Engines.MLQuests.Objectives private DateTime m_EndTime; private bool m_Expired; - public MLQuestInstance Instance - { - get { return m_Instance; } - } + public MLQuestInstance Instance => m_Instance; - public bool IsTimed - { - get { return ( m_EndTime != DateTime.MinValue ); } - } + public bool IsTimed => ( m_EndTime != DateTime.MinValue ); public DateTime EndTime { - get { return m_EndTime; } - set { m_EndTime = value; } + get => m_EndTime; + set => m_EndTime = value; } public bool Expired { - get { return m_Expired; } - set { m_Expired = value; } + get => m_Expired; + set => m_Expired = value; } public BaseObjectiveInstance( MLQuestInstance instance, BaseObjective obj ) diff --git a/Scripts/Engines/MLQuests/Objectives/CollectObjective.cs b/Scripts/Engines/MLQuests/Objectives/CollectObjective.cs index 8e9198ed0..19930bf3b 100644 --- a/Scripts/Engines/MLQuests/Objectives/CollectObjective.cs +++ b/Scripts/Engines/MLQuests/Objectives/CollectObjective.cs @@ -13,26 +13,23 @@ namespace Server.Engines.MLQuests.Objectives public int DesiredAmount { - get { return m_DesiredAmount; } - set { m_DesiredAmount = value; } + get => m_DesiredAmount; + set => m_DesiredAmount = value; } public Type AcceptedType { - get { return m_AcceptedType; } - set { m_AcceptedType = value; } + get => m_AcceptedType; + set => m_AcceptedType = value; } public TextDefinition Name { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } - public virtual bool ShowDetailed - { - get { return true; } - } + public virtual bool ShowDetailed => true; public CollectObjective() : this( 0, null, null ) @@ -132,8 +129,8 @@ namespace Server.Engines.MLQuests.Objectives public CollectObjective Objective { - get { return m_Objective; } - set { m_Objective = value; } + get => m_Objective; + set => m_Objective = value; } public CollectObjectiveInstance( CollectObjective objective, MLQuestInstance instance ) diff --git a/Scripts/Engines/MLQuests/Objectives/DeliverObjective.cs b/Scripts/Engines/MLQuests/Objectives/DeliverObjective.cs index b1240e69b..377f8abd9 100644 --- a/Scripts/Engines/MLQuests/Objectives/DeliverObjective.cs +++ b/Scripts/Engines/MLQuests/Objectives/DeliverObjective.cs @@ -16,32 +16,32 @@ namespace Server.Engines.MLQuests.Objectives public Type Delivery { - get { return m_Delivery; } - set { m_Delivery = value; } + get => m_Delivery; + set => m_Delivery = value; } public int Amount { - get { return m_Amount; } - set { m_Amount = value; } + get => m_Amount; + set => m_Amount = value; } public TextDefinition Name { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } public Type Destination { - get { return m_Destination; } - set { m_Destination = value; } + get => m_Destination; + set => m_Destination = value; } public bool SpawnsDelivery { - get { return m_SpawnsDelivery; } - set { m_SpawnsDelivery = value; } + get => m_SpawnsDelivery; + set => m_SpawnsDelivery = value; } public DeliverObjective( Type delivery, int amount, TextDefinition name, Type destination ) @@ -152,14 +152,14 @@ namespace Server.Engines.MLQuests.Objectives public DeliverObjective Objective { - get { return m_Objective; } - set { m_Objective = value; } + get => m_Objective; + set => m_Objective = value; } public bool HasCompleted { - get { return m_HasCompleted; } - set { m_HasCompleted = value; } + get => m_HasCompleted; + set => m_HasCompleted = value; } public DeliverObjectiveInstance( DeliverObjective objective, MLQuestInstance instance ) diff --git a/Scripts/Engines/MLQuests/Objectives/EscortObjective.cs b/Scripts/Engines/MLQuests/Objectives/EscortObjective.cs index 4c1981eea..92277ef72 100644 --- a/Scripts/Engines/MLQuests/Objectives/EscortObjective.cs +++ b/Scripts/Engines/MLQuests/Objectives/EscortObjective.cs @@ -11,8 +11,8 @@ namespace Server.Engines.MLQuests.Objectives public QuestArea Destination { - get { return m_Destination; } - set { m_Destination = value; } + get => m_Destination; + set => m_Destination = value; } public EscortObjective() @@ -97,8 +97,8 @@ namespace Server.Engines.MLQuests.Objectives public bool HasCompleted { - get { return m_HasCompleted; } - set { m_HasCompleted = value; } + get => m_HasCompleted; + set => m_HasCompleted = value; } public EscortObjectiveInstance( EscortObjective objective, MLQuestInstance instance ) diff --git a/Scripts/Engines/MLQuests/Objectives/GainSkillObjective.cs b/Scripts/Engines/MLQuests/Objectives/GainSkillObjective.cs index 15c58b31c..abac97c8c 100644 --- a/Scripts/Engines/MLQuests/Objectives/GainSkillObjective.cs +++ b/Scripts/Engines/MLQuests/Objectives/GainSkillObjective.cs @@ -19,26 +19,26 @@ namespace Server.Engines.MLQuests.Objectives public SkillName Skill { - get { return m_Skill; } - set { m_Skill = value; } + get => m_Skill; + set => m_Skill = value; } public int ThresholdFixed { - get { return m_ThresholdFixed; } - set { m_ThresholdFixed = value; } + get => m_ThresholdFixed; + set => m_ThresholdFixed = value; } public bool UseReal { - get { return GetFlag( GainSkillObjectiveFlags.UseReal ); } - set { SetFlag( GainSkillObjectiveFlags.UseReal, value ); } + get => GetFlag( GainSkillObjectiveFlags.UseReal ); + set => SetFlag( GainSkillObjectiveFlags.UseReal, value ); } public bool Accelerate { - get { return GetFlag( GainSkillObjectiveFlags.Accelerate ); } - set { SetFlag( GainSkillObjectiveFlags.Accelerate, value ); } + get => GetFlag( GainSkillObjectiveFlags.Accelerate ); + set => SetFlag( GainSkillObjectiveFlags.Accelerate, value ); } public GainSkillObjective() @@ -119,8 +119,8 @@ namespace Server.Engines.MLQuests.Objectives public GainSkillObjective Objective { - get { return m_Objective; } - set { m_Objective = value; } + get => m_Objective; + set => m_Objective = value; } public GainSkillObjectiveInstance( GainSkillObjective objective, MLQuestInstance instance ) diff --git a/Scripts/Engines/MLQuests/Objectives/KillObjective.cs b/Scripts/Engines/MLQuests/Objectives/KillObjective.cs index 9adafb6bf..b8c6b284c 100644 --- a/Scripts/Engines/MLQuests/Objectives/KillObjective.cs +++ b/Scripts/Engines/MLQuests/Objectives/KillObjective.cs @@ -13,26 +13,26 @@ namespace Server.Engines.MLQuests.Objectives public int DesiredAmount { - get { return m_DesiredAmount; } - set { m_DesiredAmount = value; } + get => m_DesiredAmount; + set => m_DesiredAmount = value; } public Type[] AcceptedTypes { - get { return m_AcceptedTypes; } - set { m_AcceptedTypes = value; } + get => m_AcceptedTypes; + set => m_AcceptedTypes = value; } public TextDefinition Name { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } public QuestArea Area { - get { return m_Area; } - set { m_Area = value; } + get => m_Area; + set => m_Area = value; } public KillObjective() @@ -118,14 +118,14 @@ namespace Server.Engines.MLQuests.Objectives public KillObjective Objective { - get { return m_Objective; } - set { m_Objective = value; } + get => m_Objective; + set => m_Objective = value; } public int Slain { - get { return m_Slain; } - set { m_Slain = value; } + get => m_Slain; + set => m_Slain = value; } public KillObjectiveInstance( KillObjective objective, MLQuestInstance instance ) diff --git a/Scripts/Engines/MLQuests/QuestArea.cs b/Scripts/Engines/MLQuests/QuestArea.cs index efb4d6343..82982e196 100644 --- a/Scripts/Engines/MLQuests/QuestArea.cs +++ b/Scripts/Engines/MLQuests/QuestArea.cs @@ -10,20 +10,20 @@ namespace Server.Engines.MLQuests public TextDefinition Name { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } public string RegionName { - get { return m_RegionName; } - set { m_RegionName = value; } + get => m_RegionName; + set => m_RegionName = value; } public Map ForceMap { - get { return m_ForceMap; } - set { m_ForceMap = value; } + get => m_ForceMap; + set => m_ForceMap = value; } public QuestArea( TextDefinition name, string region ) diff --git a/Scripts/Engines/MLQuests/Rewards/BaseReward.cs b/Scripts/Engines/MLQuests/Rewards/BaseReward.cs index 69ce09dee..e07e75100 100644 --- a/Scripts/Engines/MLQuests/Rewards/BaseReward.cs +++ b/Scripts/Engines/MLQuests/Rewards/BaseReward.cs @@ -10,8 +10,8 @@ namespace Server.Engines.MLQuests.Rewards public TextDefinition Name { - get { return m_Name; } - set { m_Name = value; } + get => m_Name; + set => m_Name = value; } public BaseReward( TextDefinition name ) @@ -19,7 +19,7 @@ namespace Server.Engines.MLQuests.Rewards m_Name = name; } - protected virtual int LabelHeight { get { return 16; } } + protected virtual int LabelHeight => 16; public void WriteToGump( Gump g, int x, ref int y ) { diff --git a/Scripts/Engines/MLQuests/Rewards/DummyReward.cs b/Scripts/Engines/MLQuests/Rewards/DummyReward.cs index 7a60450d7..58c73ec6f 100644 --- a/Scripts/Engines/MLQuests/Rewards/DummyReward.cs +++ b/Scripts/Engines/MLQuests/Rewards/DummyReward.cs @@ -10,7 +10,7 @@ namespace Server.Engines.MLQuests.Rewards { } - protected override int LabelHeight { get { return 180; } } + protected override int LabelHeight => 180; public override void AddRewardItems( PlayerMobile pm, List rewards ) { diff --git a/Scripts/Engines/MyRunUO/DatabaseCommandQueue.cs b/Scripts/Engines/MyRunUO/DatabaseCommandQueue.cs index efb25326a..650fba371 100644 --- a/Scripts/Engines/MyRunUO/DatabaseCommandQueue.cs +++ b/Scripts/Engines/MyRunUO/DatabaseCommandQueue.cs @@ -16,10 +16,7 @@ namespace Server.Engines.MyRunUO private string m_CompletionString; private string m_ConnectionString; - public bool HasCompleted - { - get{ return m_HasCompleted; } - } + public bool HasCompleted => m_HasCompleted; public void Enqueue( object obj ) { diff --git a/Scripts/Engines/MyRunUO/LayerComparer.cs b/Scripts/Engines/MyRunUO/LayerComparer.cs index 77cae5c4e..4c7f56985 100644 --- a/Scripts/Engines/MyRunUO/LayerComparer.cs +++ b/Scripts/Engines/MyRunUO/LayerComparer.cs @@ -38,10 +38,7 @@ namespace Server.Engines.MyRunUO private static int[] m_TranslationTable; - public static int[] TranslationTable - { - get{ return m_TranslationTable; } - } + public static int[] TranslationTable => m_TranslationTable; static LayerComparer() { diff --git a/Scripts/Engines/Party/Party.cs b/Scripts/Engines/Party/Party.cs index 716ef326d..7ca970381 100644 --- a/Scripts/Engines/Party/Party.cs +++ b/Scripts/Engines/Party/Party.cs @@ -454,13 +454,14 @@ namespace Server.Engines.PartySystem } } - public int Count{ get{ return m_Members.Count; } } - public bool Active{ get{ return m_Members.Count > 1; } } - public Mobile Leader{ get{ return m_Leader; } } - public List Members{ get{ return m_Members; } } - public List Candidates => m_Candidates; + public int Count => m_Members.Count; + public bool Active => m_Members.Count > 1; + public Mobile Leader => m_Leader; + public List Members => m_Members; + public List Candidates => m_Candidates; + + public PartyMemberInfo this[int index] => m_Members[index]; - public PartyMemberInfo this[int index]{ get{ return m_Members[index]; } } public PartyMemberInfo this[Mobile m] { get diff --git a/Scripts/Engines/Party/PartyMemberInfo.cs b/Scripts/Engines/Party/PartyMemberInfo.cs index ffd0885c8..b7eb55be4 100644 --- a/Scripts/Engines/Party/PartyMemberInfo.cs +++ b/Scripts/Engines/Party/PartyMemberInfo.cs @@ -5,8 +5,10 @@ namespace Server.Engines.PartySystem private Mobile m_Mobile; private bool m_CanLoot; - public Mobile Mobile{ get{ return m_Mobile; } } - public bool CanLoot{ get{ return m_CanLoot; } set{ m_CanLoot = value; } } + public Mobile Mobile => m_Mobile; + public bool CanLoot{ get => m_CanLoot; + set => m_CanLoot = value; + } public PartyMemberInfo( Mobile m ) { diff --git a/Scripts/Engines/Pathing/Movement.cs b/Scripts/Engines/Pathing/Movement.cs index 5ddff3ee7..ecd822907 100644 --- a/Scripts/Engines/Pathing/Movement.cs +++ b/Scripts/Engines/Pathing/Movement.cs @@ -17,10 +17,18 @@ namespace Server.Movement private static bool m_IgnoreSpellFields; private static Point3D m_Goal; - public static bool AlwaysIgnoreDoors{ get{ return m_AlwaysIgnoreDoors; } set{ m_AlwaysIgnoreDoors = value; } } - public static bool IgnoreMovableImpassables{ get{ return m_IgnoreMovableImpassables; } set{ m_IgnoreMovableImpassables = value; } } - public static bool IgnoreSpellFields{ get{ return m_IgnoreSpellFields; } set{ m_IgnoreSpellFields = value; } } - public static Point3D Goal{ get{ return m_Goal; } set{ m_Goal = value; } } + public static bool AlwaysIgnoreDoors{ get => m_AlwaysIgnoreDoors; + set => m_AlwaysIgnoreDoors = value; + } + public static bool IgnoreMovableImpassables{ get => m_IgnoreMovableImpassables; + set => m_IgnoreMovableImpassables = value; + } + public static bool IgnoreSpellFields{ get => m_IgnoreSpellFields; + set => m_IgnoreSpellFields = value; + } + public static Point3D Goal{ get => m_Goal; + set => m_Goal = value; + } public static void Configure() { diff --git a/Scripts/Engines/Pathing/MovementPath.cs b/Scripts/Engines/Pathing/MovementPath.cs index 36dadc513..9b71662ee 100644 --- a/Scripts/Engines/Pathing/MovementPath.cs +++ b/Scripts/Engines/Pathing/MovementPath.cs @@ -14,11 +14,11 @@ namespace Server private Point3D m_Goal; private Direction[] m_Directions; - public Map Map{ get{ return m_Map; } } - public Point3D Start{ get{ return m_Start; } } - public Point3D Goal{ get{ return m_Goal; } } - public Direction[] Directions{ get{ return m_Directions; } } - public bool Success{ get{ return ( m_Directions != null && m_Directions.Length > 0 ); } } + public Map Map => m_Map; + public Point3D Start => m_Start; + public Point3D Goal => m_Goal; + public Direction[] Directions => m_Directions; + public bool Success => ( m_Directions != null && m_Directions.Length > 0 ); public static void Initialize() { @@ -118,8 +118,8 @@ namespace Server public static PathAlgorithm OverrideAlgorithm { - get{ return m_OverrideAlgorithm; } - set{ m_OverrideAlgorithm = value; } + get => m_OverrideAlgorithm; + set => m_OverrideAlgorithm = value; } public MovementPath( Mobile m, Point3D goal ) diff --git a/Scripts/Engines/Pathing/PathFollower.cs b/Scripts/Engines/Pathing/PathFollower.cs index b1722282b..5aebaec54 100644 --- a/Scripts/Engines/Pathing/PathFollower.cs +++ b/Scripts/Engines/Pathing/PathFollower.cs @@ -18,14 +18,11 @@ namespace Server public MoveMethod Mover { - get{ return m_Mover; } - set{ m_Mover = value; } + get => m_Mover; + set => m_Mover = value; } - public IPoint3D Goal - { - get{ return m_Goal; } - } + public IPoint3D Goal => m_Goal; public PathFollower( Mobile from, IPoint3D goal ) { diff --git a/Scripts/Engines/Plants/MiscItems/GreenThorns.cs b/Scripts/Engines/Plants/MiscItems/GreenThorns.cs index 20f7626f0..7a91811f1 100644 --- a/Scripts/Engines/Plants/MiscItems/GreenThorns.cs +++ b/Scripts/Engines/Plants/MiscItems/GreenThorns.cs @@ -660,10 +660,7 @@ namespace Server.Items new InternalTimer( tele ).Start(); } - public override string DefaultName - { - get { return "a hole"; } - } + public override string DefaultName => "a hole"; private GreenThornsSHTeleporter() : base( 0x913 ) { diff --git a/Scripts/Engines/Plants/MiscItems/OrangePetals.cs b/Scripts/Engines/Plants/MiscItems/OrangePetals.cs index 0e2ad4919..c85599766 100644 --- a/Scripts/Engines/Plants/MiscItems/OrangePetals.cs +++ b/Scripts/Engines/Plants/MiscItems/OrangePetals.cs @@ -8,10 +8,7 @@ namespace Server.Items { public override int LabelNumber => 1053122; // orange petals - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public OrangePetals() : this( 1 ) @@ -122,7 +119,7 @@ namespace Server.Items { private Timer m_Timer; - public Timer Timer{ get{ return m_Timer; } } + public Timer Timer => m_Timer; public OrangePetalsContext( Timer timer ) { diff --git a/Scripts/Engines/Plants/MiscItems/RedLeaves.cs b/Scripts/Engines/Plants/MiscItems/RedLeaves.cs index a3ad60aea..f41da4c41 100644 --- a/Scripts/Engines/Plants/MiscItems/RedLeaves.cs +++ b/Scripts/Engines/Plants/MiscItems/RedLeaves.cs @@ -6,10 +6,7 @@ namespace Server.Items { public override int LabelNumber => 1053123; // red leaves - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public RedLeaves() : this( 1 ) diff --git a/Scripts/Engines/Plants/PlantItem.cs b/Scripts/Engines/Plants/PlantItem.cs index 9456d5bba..afe42b36e 100644 --- a/Scripts/Engines/Plants/PlantItem.cs +++ b/Scripts/Engines/Plants/PlantItem.cs @@ -50,8 +50,8 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } public PlantSystem PlantSystem => m_PlantSystem; @@ -73,7 +73,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public PlantStatus PlantStatus { - get { return m_PlantStatus; } + get => m_PlantStatus; set { if ( m_PlantStatus == value || value < PlantStatus.BowlOfDirt || value > PlantStatus.DeadTwigs ) @@ -111,7 +111,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public PlantType PlantType { - get { return m_PlantType; } + get => m_PlantType; set { m_PlantType = value; @@ -122,7 +122,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public PlantHue PlantHue { - get { return m_PlantHue; } + get => m_PlantHue; set { m_PlantHue = value; @@ -133,7 +133,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public bool ShowType { - get { return m_ShowType; } + get => m_ShowType; set { m_ShowType = value; @@ -165,26 +165,17 @@ namespace Server.Engines.Plants } [CommandProperty( AccessLevel.GameMaster )] - public bool IsGrowable - { - get { return m_PlantStatus >= PlantStatus.BowlOfDirt && m_PlantStatus <= PlantStatus.Stage9; } - } + public bool IsGrowable => m_PlantStatus >= PlantStatus.BowlOfDirt && m_PlantStatus <= PlantStatus.Stage9; [CommandProperty( AccessLevel.GameMaster )] - public bool IsCrossable - { - get { return PlantHueInfo.IsCrossable( this.PlantHue ) && PlantTypeInfo.IsCrossable( this.PlantType ); } - } + public bool IsCrossable => PlantHueInfo.IsCrossable( this.PlantHue ) && PlantTypeInfo.IsCrossable( this.PlantType ); [CommandProperty( AccessLevel.GameMaster )] - public bool Reproduces - { - get { return PlantHueInfo.CanReproduce( this.PlantHue ) && PlantTypeInfo.CanReproduce( this.PlantType ); } - } + public bool Reproduces => PlantHueInfo.CanReproduce( this.PlantHue ) && PlantTypeInfo.CanReproduce( this.PlantType ); private static ArrayList m_Instances = new ArrayList(); - public static ArrayList Plants{ get{ return m_Instances; } } + public static ArrayList Plants => m_Instances; [Constructible] public PlantItem() : this( false ) diff --git a/Scripts/Engines/Plants/PlantSystem.cs b/Scripts/Engines/Plants/PlantSystem.cs index 89ebd1300..5eca172e2 100644 --- a/Scripts/Engines/Plants/PlantSystem.cs +++ b/Scripts/Engines/Plants/PlantSystem.cs @@ -58,24 +58,19 @@ namespace Server.Engines.Plants public bool FertileDirt { - get { return m_FertileDirt; } - set { m_FertileDirt = value; } + get => m_FertileDirt; + set => m_FertileDirt = value; } - public DateTime NextGrowth - { - get { return m_NextGrowth; } - } + public DateTime NextGrowth => m_NextGrowth; - public PlantGrowthIndicator GrowthIndicator - { - get { return m_GrowthIndicator; } - } + public PlantGrowthIndicator GrowthIndicator => m_GrowthIndicator; + + public bool IsFullWater => m_Water >= 4; - public bool IsFullWater { get { return m_Water >= 4; } } public int Water { - get { return m_Water; } + get => m_Water; set { if ( value < 0 ) @@ -91,7 +86,7 @@ namespace Server.Engines.Plants public int Hits { - get { return m_Hits; } + get => m_Hits; set { if ( m_Hits == value ) @@ -111,10 +106,7 @@ namespace Server.Engines.Plants } } - public int MaxHits - { - get { return 10 + (int)m_Plant.PlantStatus * 2; } - } + public int MaxHits => 10 + (int)m_Plant.PlantStatus * 2; public PlantHealth Health { @@ -135,7 +127,7 @@ namespace Server.Engines.Plants public int Infestation { - get { return m_Infestation; } + get => m_Infestation; set { if ( value < 0 ) @@ -149,7 +141,7 @@ namespace Server.Engines.Plants public int Fungus { - get { return m_Fungus; } + get => m_Fungus; set { if ( value < 0 ) @@ -163,7 +155,7 @@ namespace Server.Engines.Plants public int Poison { - get { return m_Poison; } + get => m_Poison; set { if ( value < 0 ) @@ -177,7 +169,7 @@ namespace Server.Engines.Plants public int Disease { - get { return m_Disease; } + get => m_Disease; set { if ( value < 0 ) @@ -189,10 +181,11 @@ namespace Server.Engines.Plants } } - public bool IsFullPoisonPotion { get { return m_PoisonPotion >= 2; } } + public bool IsFullPoisonPotion => m_PoisonPotion >= 2; + public int PoisonPotion { - get { return m_PoisonPotion; } + get => m_PoisonPotion; set { if ( value < 0 ) @@ -204,10 +197,11 @@ namespace Server.Engines.Plants } } - public bool IsFullCurePotion { get { return m_CurePotion >= 2; } } + public bool IsFullCurePotion => m_CurePotion >= 2; + public int CurePotion { - get { return m_CurePotion; } + get => m_CurePotion; set { if ( value < 0 ) @@ -219,10 +213,11 @@ namespace Server.Engines.Plants } } - public bool IsFullHealPotion { get { return m_HealPotion >= 2; } } + public bool IsFullHealPotion => m_HealPotion >= 2; + public int HealPotion { - get { return m_HealPotion; } + get => m_HealPotion; set { if ( value < 0 ) @@ -234,10 +229,11 @@ namespace Server.Engines.Plants } } - public bool IsFullStrengthPotion { get { return m_StrengthPotion >= 2; } } + public bool IsFullStrengthPotion => m_StrengthPotion >= 2; + public int StrengthPotion { - get { return m_StrengthPotion; } + get => m_StrengthPotion; set { if ( value < 0 ) @@ -249,20 +245,14 @@ namespace Server.Engines.Plants } } - public bool HasMaladies - { - get { return Infestation > 0 || Fungus > 0 || Poison > 0 || Disease > 0 || Water != 2; } - } + public bool HasMaladies => Infestation > 0 || Fungus > 0 || Poison > 0 || Disease > 0 || Water != 2; - public bool PollenProducing - { - get { return m_Plant.IsCrossable && m_Plant.PlantStatus >= PlantStatus.FullGrownPlant; } - } + public bool PollenProducing => m_Plant.IsCrossable && m_Plant.PlantStatus >= PlantStatus.FullGrownPlant; public bool Pollinated { - get { return m_Pollinated; } - set { m_Pollinated = value; } + get => m_Pollinated; + set => m_Pollinated = value; } public PlantType SeedType @@ -274,7 +264,7 @@ namespace Server.Engines.Plants else return m_Plant.PlantType; } - set { m_SeedType = value; } + set => m_SeedType = value; } public PlantHue SeedHue @@ -286,30 +276,30 @@ namespace Server.Engines.Plants else return m_Plant.PlantHue; } - set { m_SeedHue = value; } + set => m_SeedHue = value; } public int AvailableSeeds { - get { return m_AvailableSeeds; } + get => m_AvailableSeeds; set { if ( value >= 0 ) m_AvailableSeeds = value; } } public int LeftSeeds { - get { return m_LeftSeeds; } + get => m_LeftSeeds; set { if ( value >= 0 ) m_LeftSeeds = value; } } public int AvailableResources { - get { return m_AvailableResources; } + get => m_AvailableResources; set { if ( value >= 0 ) m_AvailableResources = value; } } public int LeftResources { - get { return m_LeftResources; } + get => m_LeftResources; set { if ( value >= 0 ) m_LeftResources = value; } } diff --git a/Scripts/Engines/Plants/PlantType.cs b/Scripts/Engines/Plants/PlantType.cs index d8242c2c2..201e7e342 100644 --- a/Scripts/Engines/Plants/PlantType.cs +++ b/Scripts/Engines/Plants/PlantType.cs @@ -324,7 +324,7 @@ namespace Server.Engines.Plants public int OffsetY => m_OffsetY; public PlantType PlantType => m_PlantType; public PlantCategory PlantCategory => m_PlantCategory; - public int Name { get { return ( m_ItemID < 0x4000 ) ? 1020000 + m_ItemID : 1078872 + m_ItemID; } } + public int Name => ( m_ItemID < 0x4000 ) ? 1020000 + m_ItemID : 1078872 + m_ItemID; public bool ContainsPlant => m_ContainsPlant; public bool Flowery => m_Flowery; diff --git a/Scripts/Engines/Plants/Seed.cs b/Scripts/Engines/Plants/Seed.cs index 4eb6afb92..3e9fb1e63 100644 --- a/Scripts/Engines/Plants/Seed.cs +++ b/Scripts/Engines/Plants/Seed.cs @@ -12,7 +12,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public PlantType PlantType { - get { return m_PlantType; } + get => m_PlantType; set { m_PlantType = value; @@ -23,7 +23,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public PlantHue PlantHue { - get { return m_PlantHue; } + get => m_PlantHue; set { m_PlantHue = value; @@ -35,7 +35,7 @@ namespace Server.Engines.Plants [CommandProperty( AccessLevel.GameMaster )] public bool ShowType { - get { return m_ShowType; } + get => m_ShowType; set { m_ShowType = value; diff --git a/Scripts/Engines/Quests/Ambitious Solen Queen/AmbitiousQueenQuest.cs b/Scripts/Engines/Quests/Ambitious Solen Queen/AmbitiousQueenQuest.cs index ca750f205..cecb2c07e 100644 --- a/Scripts/Engines/Quests/Ambitious Solen Queen/AmbitiousQueenQuest.cs +++ b/Scripts/Engines/Quests/Ambitious Solen Queen/AmbitiousQueenQuest.cs @@ -24,46 +24,9 @@ namespace Server.Engines.Quests.Ambitious public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // Ambitious Solen Queen Quest - return 1054146; - } - } + public override object Name => 1054146; - public override object OfferMessage - { - get - { - /* The Solen queen considers you eagerly for a moment then says,

- * - * Yes. Yes, I think you could be of use. Normally, of course, I would handle - * these things on my own, but these are busy times. Much to do, much to do. - * And besides, if I am to one day become the Matriarch, then it will be good to - * have experience trusting others to carry out various tasks for me. Yes.

- * - * That is my plan, you see - I will become the next Matriarch. Our current - * Matriarch is fine and all, but she won't be around forever. And when she steps - * down, I intend to be the next in line. Ruling others is my destiny, you see.

- * - * What I ask of you is quite simple. First, I need you to remove some of the - * - well - competition, I suppose. Though I dare say most are hardly competent to - * live up to such a title. I'm referring to the other queens of this colony, - * of course. My dear sisters, so to speak. If you could remove 5 of them, I would - * be most pleased. *sighs* By remove, I mean kill them. Don't make that face - * at me - this is how things work in a proper society, and ours has been more proper - * than most since the dawn of time. It's them or me, and whenever I give it - * any thought, I'm quite sure I'd prefer it to be them.

- * - * I also need you to gather some zoogi fungus for me - 50 should do the trick.

- * - * Will you accept my offer? - */ - return 1054060; - } - } + public override object OfferMessage => 1054060; public override TimeSpan RestartDelay => TimeSpan.Zero; public override bool IsTutorial => false; @@ -72,7 +35,7 @@ namespace Server.Engines.Quests.Ambitious private bool m_RedSolen; - public bool RedSolen{ get{ return m_RedSolen; } } + public bool RedSolen => m_RedSolen; public AmbitiousQueenQuest( PlayerMobile from, bool redSolen ) : base( from ) { diff --git a/Scripts/Engines/Quests/Ambitious Solen Queen/Conversations.cs b/Scripts/Engines/Quests/Ambitious Solen Queen/Conversations.cs index d78714519..f5e204062 100644 --- a/Scripts/Engines/Quests/Ambitious Solen Queen/Conversations.cs +++ b/Scripts/Engines/Quests/Ambitious Solen Queen/Conversations.cs @@ -2,19 +2,7 @@ namespace Server.Engines.Quests.Ambitious { public class DontOfferConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen considers you for a moment then says,

- * - * Hmmm... I could perhaps benefit from your assistance, but you seem to be - * busy with another task at the moment. Return to me when you complete whatever - * it is that you're working on and maybe I can still put you to good use. - */ - return 1054059; - } - } + public override object Message => 1054059; public override bool Logged => false; @@ -25,27 +13,7 @@ namespace Server.Engines.Quests.Ambitious public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen smiles as you decide to help her.

- * - * Excellent. We'll worry about the zoogi fungus later - start by eliminating - * 5 queens from my colony.

That part's important, by the way; they must - * be queens from my colony. Killing queens from the other solen colony does - * little to help me become Matriarch of this colony and will not count - * toward your task.

- * - * Oh, and none of those nasty infiltrator queens either. They perform a necessary - * duty, I suppose, spying on the other colony. I fail to see why that couldn't be - * left totally to the warriors, though. Nevertheless, they do not count as well.

- * - * Very well. Carry on. I'll be waiting for your return. - */ - return 1054061; - } - } + public override object Message => 1054061; public AcceptConversation() { @@ -59,23 +27,7 @@ namespace Server.Engines.Quests.Ambitious public class DuringKillQueensConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen looks up as you approach.

- * - * You're back, but you have not yet eliminated 5 queens from my colony. - * Return when you have completed this task.

- * - * Remember, by the way, that queens from the other solen colony and - * infiltrator queens do not count toward your task.

- * - * Very well. Carry on. I'll be waiting for your return. - */ - return 1054066; - } - } + public override object Message => 1054066; public override bool Logged => false; @@ -86,24 +38,7 @@ namespace Server.Engines.Quests.Ambitious public class GatherFungiConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen looks pleased to see you.

- * - * Splendid! You've done quite well in reducing my competition to become - * the next Matriarch. Now I must ask that you gather some zoogi fungus for me. - * I must practice processing it into powder of translocation.

- * - * I believe the amount we agreed upon earlier was 50. Please return when - * you have that amount and then give them to me.

- * - * Farewell for now. - */ - return 1054068; - } - } + public override object Message => 1054068; public GatherFungiConversation() { @@ -117,19 +52,7 @@ namespace Server.Engines.Quests.Ambitious public class DuringFungiGatheringConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen looks up as you approach.

- * - * Do you have the zoogi fungus?

- * - * If so, give them to me. Otherwise, go gather some and then return to me. - */ - return 1054070; - } - } + public override object Message => 1054070; public override bool Logged => false; @@ -140,23 +63,7 @@ namespace Server.Engines.Quests.Ambitious public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen smiles as she takes the zoogi fungus from you.

- * - * Wonderful! I greatly appreciate your help with these tasks. My plans are beginning - * to take shape ensuring that I will be the next Matriarch. But there is still - * much to be done until then.

- * - * You've done what I've asked of you and for that I thank you. Please accept this - * bag of sending and some powder of translocation as a reward. Oh, and I suppose - * I should give you some gold as well. Yes, yes. Of course. - */ - return 1054073; - } - } + public override object Message => 1054073; public EndConversation() { @@ -183,20 +90,7 @@ namespace Server.Engines.Quests.Ambitious public class FullBackpackConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen looks at you with a smile.

- * - * While I'd like to finish conducting our business, it seems that you're a - * bit overloaded with equipment at the moment.

- * - * Perhaps you should free some room in your backpack before we proceed. - */ - return 1054077; - } - } + public override object Message => 1054077; private bool m_Logged; private bool m_BagOfSending; @@ -246,18 +140,7 @@ namespace Server.Engines.Quests.Ambitious public class End2Conversation : QuestConversation { - public override object Message - { - get - { - /* The Solen queen looks up as you approach.

- * - * Ah good, you've returned. I will conclude our business by giving you any - * remaining rewards I owe you for aiding me. - */ - return 1054078; - } - } + public override object Message => 1054078; public End2Conversation() { diff --git a/Scripts/Engines/Quests/Ambitious Solen Queen/Objectives.cs b/Scripts/Engines/Quests/Ambitious Solen Queen/Objectives.cs index c6f22b187..70a5f84ef 100644 --- a/Scripts/Engines/Quests/Ambitious Solen Queen/Objectives.cs +++ b/Scripts/Engines/Quests/Ambitious Solen Queen/Objectives.cs @@ -5,14 +5,7 @@ namespace Server.Engines.Quests.Ambitious { public class KillQueensObjective : QuestObjective { - public override object Message - { - get - { - // Kill 5 red/black solen queens. - return ((AmbitiousQueenQuest)System).RedSolen ? 1054062 : 1054063; - } - } + public override object Message => ((AmbitiousQueenQuest)System).RedSolen ? 1054062 : 1054063; public override int MaxProgress => 5; @@ -73,16 +66,7 @@ namespace Server.Engines.Quests.Ambitious public class ReturnAfterKillsObjective : QuestObjective { - public override object Message - { - get - { - /* You've completed your task of slaying solen queens. Return to - * the ambitious queen who asked for your help. - */ - return 1054067; - } - } + public override object Message => 1054067; public ReturnAfterKillsObjective() { @@ -96,16 +80,7 @@ namespace Server.Engines.Quests.Ambitious public class GatherFungiObjective : QuestObjective { - public override object Message - { - get - { - /* Gather zoogi fungus until you have 50 of them, then give them - * to the ambitious queen you are helping. - */ - return 1054069; - } - } + public override object Message => 1054069; public GatherFungiObjective() { @@ -119,22 +94,21 @@ namespace Server.Engines.Quests.Ambitious public class GetRewardObjective : QuestObjective { - public override object Message - { - get - { - // Return to the ambitious solen queen for your reward. - return 1054148; - } - } + public override object Message => 1054148; private bool m_BagOfSending; private bool m_PowderOfTranslocation; private bool m_Gold; - public bool BagOfSending{ get{ return m_BagOfSending; } set{ m_BagOfSending = value; } } - public bool PowderOfTranslocation{ get{ return m_PowderOfTranslocation; } set{ m_PowderOfTranslocation = value; } } - public bool Gold{ get{ return m_Gold; } set{ m_Gold = value; } } + public bool BagOfSending{ get => m_BagOfSending; + set => m_BagOfSending = value; + } + public bool PowderOfTranslocation{ get => m_PowderOfTranslocation; + set => m_PowderOfTranslocation = value; + } + public bool Gold{ get => m_Gold; + set => m_Gold = value; + } public GetRewardObjective( bool bagOfSending, bool powderOfTranslocation, bool gold) { diff --git a/Scripts/Engines/Quests/Collector/CollectorQuest.cs b/Scripts/Engines/Quests/Collector/CollectorQuest.cs index a2c1406a2..7616f66ad 100644 --- a/Scripts/Engines/Quests/Collector/CollectorQuest.cs +++ b/Scripts/Engines/Quests/Collector/CollectorQuest.cs @@ -54,40 +54,9 @@ namespace Server.Engines.Quests.Collector public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - //return 1020549; // This localized message seems broken... - return "Collector's Quest"; - } - } + public override object Name => "Collector's Quest"; - public override object OfferMessage - { - get - { - /* Elwood greets you warmly, like an old friend he's not - * quite sure he ever had.

- * - * Hello. Yes. Sit down. Please. Good. Okay, stand. Up to you.

- * - * So, what brings you to these parts... hey, wait. Just had a thought. - * Would you like to do me a favor? Yes, really. You know, for old - * times sake. The good ole days. You were always one of my best - * suppliers. Or maybe you weren't, who knows any more. Anyway, - * could use some help supplementing my stock. You know me. Always - * looking for something new to add to the collection. Or sometimes - * not so new - just more of the same. But don't have to tell you that. - * You know, don't you. Yes. Just like old times. That's what it'll be. - * You and me - together again. Ah, it's been too long.

- * - * So what do you think? The fee will be the same as always. I'm a fair - * man. You know that. So what do you say? - */ - return 1055081; - } - } + public override object OfferMessage => 1055081; public override TimeSpan RestartDelay => TimeSpan.Zero; public override bool IsTutorial => false; diff --git a/Scripts/Engines/Quests/Collector/Conversations.cs b/Scripts/Engines/Quests/Collector/Conversations.cs index d6a809bd1..eaaa978e2 100644 --- a/Scripts/Engines/Quests/Collector/Conversations.cs +++ b/Scripts/Engines/Quests/Collector/Conversations.cs @@ -2,17 +2,7 @@ namespace Server.Engines.Quests.Collector { public class DontOfferConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood looks up from his ale as you greet him.

- * - * What's that? Who me? No, no. You must be looking for someone else. - */ - return 1055080; - } - } + public override object Message => 1055080; public override bool Logged => false; @@ -23,22 +13,7 @@ namespace Server.Engines.Quests.Collector public class DeclineConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood looks a bit flustered and nearly knocks over his - * bottle of ale.

- * - * Well, I see. It's like that, is it? Yes. Well then. Okay. - * You've changed. Yes. Yes, you have. Something's changed. I know - * I haven't. Not me. Not good ole Elwood.

- * - * Elwood trails off, though you can still hear him muttering softly. - */ - return 1055082; - } - } + public override object Message => 1055082; public override bool Logged => false; @@ -49,42 +24,7 @@ namespace Server.Engines.Quests.Collector public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood slaps his knee and grins at you.

- * - * Yes. Yes. That's the spirit. I knew it. Knew it when I - * first saw you. You remind me so much of your dear departed - * father. Or someone. Not sure. Maybe no one. But that's okay. - * Ah, good times.

- * - * Anyway, so as you know, I'm a collector. Got all kinds of - * interesting things laying around back at my warehouse. - * You know. You've seen it. Haven't you? Yes? No? Nevermind. - * Not important.

- * - * Right. So, always trying to add new things to my collection. - * Or sometimes just get more of something. Can't have too many. - * Right? Yeah? Sure.

- * - * Let's see. Where to start. Oh, I know. Pearls. Yes. But not - * just any pearls. Rainbow pearls. Yes. From the lake here in - * Haven. Seems all that magic Uzeraan was throwing around when - * he transformed the island had an interesting effect on some - * of the shellfish down there. Exactly, rainbow pearls. Useless - * for magic, but an item worth collecting. Trust me on this. - * Trust me.

- * - * Need you to go fish some up for me. Down at the lake. Lake Haven. - * Off ya go. Happy fishing!

- * - * Elwood turns back to his ale and now seems oblivious to you. - */ - return 1055083; - } - } + public override object Message => 1055083; public AcceptConversation() { @@ -98,19 +38,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringFishConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood looks up as you tap him on the shoulder.

- * - * Good. Good. You're back. Wait. You don't have the rainbow pearls I - * need. Taking a break? Yeah. Sure. There's no hurry. Let me know when - * you've got all those pearls, though. I'll be here. - */ - return 1055089; - } - } + public override object Message => 1055089; public override bool Logged => false; @@ -121,30 +49,7 @@ namespace Server.Engines.Quests.Collector public class ReturnPearlsConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood jumps slightly when you call his name.

- * - * What. I'm awake. Oh, It's you. Hey, look at those pearls. - * Beautiful. Wow. Where'd you get those... oh right. I sent you to get - * them. From the lake. Lake Haven. Great job. Gotta love rainbow - * pearls. Oooh, Colors.

- * - * Okay, let's see. Next. Need a painting. Go to the Colored Canvas and - * speak to Alberta. Alberta Giacco. Best painter I've ever met. Ask - * her to do a painting of you. Yes. Of you. A portrait. Never know if - * you might up and become famous one day. Need to have a painting of you - * in my collection. From now. Before all the fame. Go. Alberta awaits. - * She's in Vesper.

- * - * Elwood starts playing with the pearls you brought him and seems - * to have forgotten you're there. - */ - return 1055090; - } - } + public override object Message => 1055090; public ReturnPearlsConversation() { @@ -158,26 +63,7 @@ namespace Server.Engines.Quests.Collector public class AlbertaPaintingConversation : QuestConversation { - public override object Message - { - get - { - /* Alberta looks up from the painting she is working on and - * faces you.

- * - * Excuse me. I don't mean to be rude, but I'm in the middle - * of something, and can't... oh wait, I see. You must be the one - * Elwood sent over.

- * - * Very well. If you'll have a seat on the stool over there, we'll - * get started. This will just take a few seconds. I paint quite - * quickly, you see. I'll start once you are seated.

- * - * Alberta exchanges the painting she was working on for a blank canvas. - */ - return 1055092; - } - } + public override object Message => 1055092; public AlbertaPaintingConversation() { @@ -191,21 +77,7 @@ namespace Server.Engines.Quests.Collector public class AlbertaStoolConversation : QuestConversation { - public override object Message - { - get - { - /* Alberta looks at you sympathetically.

- * - * Don't worry, this will only take a few seconds. I realize - * that stool can be uncomfortable, and I apologize for that. - * Perhaps I should replace it with a more comfortable chair. - * But then again, it's that very discomfort that helps produce - * such wonderful facial expressions for my paintings. Ah well. - */ - return 1055096; - } - } + public override object Message => 1055096; public override bool Logged => false; @@ -216,25 +88,7 @@ namespace Server.Engines.Quests.Collector public class AlbertaEndPaintingConversation : QuestConversation { - public override object Message - { - get - { - /* Alberta stands back from the canvas and surveys her - * work.

- * - * Not too bad. Quite good even, if I do say so myself. As always, - * of course.

- * - * Oh, you're still here. Please let Elwood know that the painting - * has been completed. I'll have it sent to him once it dries.

- * - * Alberta removes the portrait from her easel and sets - * it aside to dry. - */ - return 1055098; - } - } + public override object Message => 1055098; public AlbertaEndPaintingConversation() { @@ -248,18 +102,7 @@ namespace Server.Engines.Quests.Collector public class AlbertaAfterPaintingConversation : QuestConversation { - public override object Message - { - get - { - /* Alberta stops cleaning her brushes and looks your way.

- * - * Don't worry, I'll send the painting to Elwood once it's dry. Please - * let him know that the painting has been finished. - */ - return 1055102; - } - } + public override object Message => 1055102; public override bool Logged => false; @@ -270,22 +113,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringPainting1Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood yawns and stretches, then focuses his gaze - * on you.

- * - * Hello. Do I know you? Hold on a second. Yes. Yes, I do. - * You were going to bring me some rainbow pearls. Wait. No. - * You already did that. I remember now. Right. So go get that - * portrait painted. Alberta is in Vesper. Go to her. Alberta - * Giacco. Come back when she's done. - */ - return 1055094; - } - } + public override object Message => 1055094; public override bool Logged => false; @@ -296,28 +124,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringPainting2Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood drums his fingers on the counter then looks - * up at you expectantly.

- * - * Ah, finally. I'm famished. This so-called tavern doesn't - * even serve pizza, so one must have it delivered. It's an - * outrage. Er... wait. Where's my pizza? Yes, my pizza. - * What kind of delivery is this? Didn't even bring my pizza. - * This will severely impact your tip, I'm afraid.

- * - * Hold on a moment. You were helping me with something else, - * weren't you? Ah. Yes. I've got it now. You were to have a - * portrait done. Well. Good. Yes. But let's not dawdle. - * Off you go. If you happen to see anyone with my pizza, - * please insist they hurry.

- */ - return 1055097; - } - } + public override object Message => 1055097; public override bool Logged => false; @@ -328,35 +135,7 @@ namespace Server.Engines.Quests.Collector public class ReturnPaintingConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood notices you immediately and waves you over.

- * - * You're back. Good. That's good. Hmm. You don't seem to have that - * painting yet. Don't tell me Alberta refused. That's no good. I made - * her what she is! She was living in the gutter when I found her. The - * gutter. And she has the... what's that? Oh, she finished the portrait. - * Right. Good. Can always count on Alberta. Always. Best painter in - * the land.

- * - * Just have a couple... er... wait... make that... two more task for you. - * Then our business will be concluded. For now. Old chums like us will - * always work together again. Yes. We go so far back. Right. I think.

- * - * Anyway. There's a musician. A minstrel. His name's Gabriel Piete. Quite - * the good singer. One of my favorites. Absolute favorite. What I'd like - * is his autograph. Simple. Just his autograph. You're likely to find him - * at the Conservatory of Music in Britain. He's often there. Often. Between - * performances. Hurry now. There ya go.

- * - * Elwood falls silent though his lips are still moving. It looks like - * he's quietly repeating the word, "autograph." - */ - return 1055100; - } - } + public override object Message => 1055100; public ReturnPaintingConversation() { @@ -370,30 +149,7 @@ namespace Server.Engines.Quests.Collector public class GabrielAutographConversation : QuestConversation { - public override object Message - { - get - { - /* Gabriel sighs loudly as you address him and stops whatever - * it was that he was doing.

- * - * WHAT?!? Can you not see that I'm working here? Ugh, sometimes - * I wish they'd just lock the outer doors to anyone who doesn't - * belong here. So go ahead and fawn. Get it over with, and then - * leave. Sooner you're out of here, the sooner I'm back to work.

- * - * I see. So you want an autograph. Fine. If it'll get rid of you, - * I'll give you my autograph. But I'll only sign some sheet music - * for one of my songs. Until then, please let me get back to work.

- * - * You can probably find some of my sheet music at one of the theaters - * in the land. When I perform there, they often sell it as a souvenir. - * Speak to the impresario... the theater manager. My last three - * performances were in Nujel'm, Jhelom, and here in Britian. - */ - return 1055103; - } - } + public override object Message => 1055103; public GabrielAutographConversation() { @@ -407,18 +163,7 @@ namespace Server.Engines.Quests.Collector public class GabrielNoSheetMusicConversation : QuestConversation { - public override object Message - { - get - { - /* Gabriel does not look happy to see you.

- * - * Do you have any sheet music? No. Please return when you do, - * but until then please leave me to my work. - */ - return 1055111; - } - } + public override object Message => 1055111; public override bool Logged => false; @@ -429,17 +174,7 @@ namespace Server.Engines.Quests.Collector public class NoSheetMusicConversation : QuestConversation { - public override object Message - { - get - { - /* Sheet music for a Gabriel Piete song? No, I'm sorry, but we've run out. - * We might get some more after he performs here again, but right now - * we don't have any. My apologies. - */ - return 1055106; - } - } + public override object Message => 1055106; public override bool Logged => false; @@ -450,14 +185,7 @@ namespace Server.Engines.Quests.Collector public class GetSheetMusicConversation : QuestConversation { - public override object Message - { - get - { - // The theater impresario hands you some sheet of music for one of Gabriel Piete's songs. - return 1055109; - } - } + public override object Message => 1055109; public GetSheetMusicConversation() { @@ -471,20 +199,7 @@ namespace Server.Engines.Quests.Collector public class GabrielSheetMusicConversation : QuestConversation { - public override object Message - { - get - { - /* Gabriel looks up impatiently as you approach.

- * - * Good. We can finally be done with one another. Here, let me - * sign that and have this business completed.

- * - * Gabriel takes the sheet music, autographs it, and then hands it back to you. - */ - return 1055113; - } - } + public override object Message => 1055113; public GabrielSheetMusicConversation() { @@ -498,14 +213,7 @@ namespace Server.Engines.Quests.Collector public class GabrielIgnoreConversation : QuestConversation { - public override object Message - { - get - { - // Gabriel ignores you. - return 1055118; - } - } + public override object Message => 1055118; public override bool Logged => false; @@ -516,28 +224,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringAutograph1Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood jumps and almost falls from his stool when you - * tap his shoulder.

- * - * Oh my. Don't do that. Scared me half to death. Sneaking up on - * people like that. I don't even know you. Yes, I do. I do know you. - * Ordered a pizza from you and never received it. I'm rather miffed - * about that.

- * - * No. No. Wait. Of course. Not the pizza. You're here with the - * moonfire brew I wanted. Magical moonfire brew. Not sure what it is. - * Just want some.

- * - * What's that? Oh. The autograph. Gabriel Piete. Yes. Of course. - * Do you have it? No. Well. Hmm. Don't sneak up on people like that. Not polite. - */ - return 1055105; - } - } + public override object Message => 1055105; public override bool Logged => false; @@ -548,24 +235,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringAutograph2Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood seems to be studying the bottom of his bottle of ale - * as you approach.

- * - * What's this? Strange. Quite strange. I could have sworn I was - * drinking wine.

- * - * Oh, hello. Yes. Good to see you. Any luck with that autograph? - * Bet you thought I'd forgotten. No. Not me. Mind like a steel trap. - * Can't get it open no matter how hard you try. Or something. No luck - * yet? Ah well. keep trying. I have faith in you. Whoever you are. - */ - return 1055112; - } - } + public override object Message => 1055112; public override bool Logged => false; @@ -576,19 +246,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringAutograph3Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood scratches his ear then notices you.

- * - * Good day. What brings you to the Albatross? Me? An autograph? - * You want my autograph? Well, I suppose. What's that? Oh. Yes. - * Gabriel Piete. Yes. Get his autograph and return to me. Good day. - */ - return 1055115; - } - } + public override object Message => 1055115; public override bool Logged => false; @@ -599,26 +257,7 @@ namespace Server.Engines.Quests.Collector public class ReturnAutographConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood looks up eagerly as you tell him about the autographed - * sheet music.

- * - * Quite good work. Not an easy one to deal with, that one. Gabriel Piete. - * Yes. Well done. Nice autograph.

- * - * One last task. I would like a set of toy monster figurines made by the - * famous toymaker, Tomas O'Neerlan. You'll find him in Trinsic. He's often - * at the Tinker's Guild. Try looking there.

- * - * You're doing quite well. Quite well indeed. Knew you would. Just like old - * times. Yes. Quite good. - */ - return 1055116; - } - } + public override object Message => 1055116; public ReturnAutographConversation() { @@ -632,26 +271,7 @@ namespace Server.Engines.Quests.Collector public class TomasToysConversation : QuestConversation { - public override object Message - { - get - { - /* Tomas smiles freely as you speak to him.

- * - * Ah, to be sure I can make you some toy monster figurines. - * That's my work, making toys. Worry not, we'll put together - * a good set of monsters for you and your figurines.

- * - * But I'll be needing something from you before I can begin. - * Here, take these enchanted paints. Using them, you can capture - * a set of images of the creatures you wish me to make into toys. - * It'll only work on the group of creatures I select for your - * set of figurines. Oh, and I'll be needing those enchanted paints - * back when all is said and done.

- */ - return 1055119; - } - } + public override object Message => 1055119; public TomasToysConversation() { @@ -665,20 +285,7 @@ namespace Server.Engines.Quests.Collector public class TomasDuringCollectingConversation : QuestConversation { - public override object Message - { - get - { - /* Tomas greets you warmly as you approach.

- * - * 'Tis good to see you. I see that you have not yet collected - * all of the images we need. 'Tis fine, but I'll be needing - * those before I can make the toy figurines. Return when you have - * the complete set of images.

- */ - return 1055129; - } - } + public override object Message => 1055129; public override bool Logged => false; @@ -689,22 +296,7 @@ namespace Server.Engines.Quests.Collector public class ReturnImagesConversation : QuestConversation { - public override object Message - { - get - { - /* Tomas grins as you walk toward him.

- * - * I see that you have collected all of the images we need. - * 'Tis good. I'll begin straight away on the toy figurines. - * I'll have them delivered to you when ready. Where shall I send - * them? To Elwood in Haven? Yes, I know him. We've done business - * in the past. Odd fellow.

Tomas smiles as you return his - * enchanted paints back to him.

- */ - return 1055131; - } - } + public override object Message => 1055131; public ReturnImagesConversation() { @@ -718,23 +310,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringToys1Conversation : QuestConversation { - public override object Message - { - get - { - /* You watch as Elwood spins around blissfully on his stool.

- * - * Oh. Forgive me. Didn't see you there. Whoo. Dizzy. Can't see straight. - * Have you gotten those figurines yet? No. Ah. Not to worry. Keep at it. - * No doubt you'll come through with those.

- * - * Excuse me a moment. I think I need to sit down. Wait. I am sitting down. - * Good then. Yes. Sitting down.

Elwood reaches out and takes hold - * of the counter as if to steady himself. - */ - return 1055123; - } - } + public override object Message => 1055123; public override bool Logged => false; @@ -745,25 +321,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringToys2Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood suddenly stops and beckons you over to him.

- * - * Over here. Come here. Don't be alarmed, but I think one of the - * tavernkeepers used to be a wandering healer. Said something about - * the good ole days when people would just walk up and hand gold to - * them. Piles of gold. Out of the blue. Can you imagine? Got so much - * gold, this ex-healer decided to buy a tavern and settle down. Kind - * of sad really. Can't even cure my hangover now. Nice tavern though.

- * - * Right. Anyway. Let me know when those toy figurines are ready. - * I'll be here. As always. - */ - return 1055130; - } - } + public override object Message => 1055130; public override bool Logged => false; @@ -774,22 +332,7 @@ namespace Server.Engines.Quests.Collector public class ElwoodDuringToys3Conversation : QuestConversation { - public override object Message - { - get - { - /* Elwood is singing as you greet him.

- * - * Come. Join in. It's a Gabriel Piete song. I have the sheet music - * for it. It's even autographed by Gabriel Piete himself. Yes. - * One of his songs. Brilliant.

- * - * So let me see the toys. Figurines. Let's see them. Oh. You don't - * have them yet. I see. Well. Okay. That's too bad. - */ - return 1055133; - } - } + public override object Message => 1055133; public override bool Logged => false; @@ -800,26 +343,7 @@ namespace Server.Engines.Quests.Collector public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* Elwood takes a sip of his ale as you address him.

- * - * Ah. That's the stuff. Ale. Nothing better. What's that? Toy figurines - * will be delivered. Right. Yes. Perhaps better than Ale. Tough one.

- * - * Very good work. Quite. Think we're all done now. You completed everything - * I asked. Would work with you again. Yes. We should.

- * - * Ah. Yes. your payment. The usual. I think you'll be pleased.

- * - * With that Elwood rummages around in his backpack. He eventually - * pulls out a small bag and hands it to you. - */ - return 1055134; - } - } + public override object Message => 1055134; public EndConversation() { @@ -835,20 +359,7 @@ namespace Server.Engines.Quests.Collector { private bool m_Logged; - public override object Message - { - get - { - /* Elwood stares at you as you approach.

- * - * I know you. Oh yes. You've been running some errands for me. - * We are about done. Noticed that your backpack is a bit full. - * Might want to make some room. Won't be able to hold your payment. - * Come back when you have more room, and we'll conclude our business. - */ - return 1055135; - } - } + public override object Message => 1055135; public override bool Logged => m_Logged; diff --git a/Scripts/Engines/Quests/Collector/Items/ImageType.cs b/Scripts/Engines/Quests/Collector/Items/ImageType.cs index d6ab3b910..ceaba9015 100644 --- a/Scripts/Engines/Quests/Collector/Items/ImageType.cs +++ b/Scripts/Engines/Quests/Collector/Items/ImageType.cs @@ -91,7 +91,7 @@ namespace Server.Engines.Quests.Collector public int Figurine => m_Figurine; public Type Type => m_Type; - public int Name { get { return m_Figurine < 0x4000 ? 1020000 + m_Figurine : 1078872 + m_Figurine; } } + public int Name => m_Figurine < 0x4000 ? 1020000 + m_Figurine : 1078872 + m_Figurine; public int X => m_X; public int Y => m_Y; diff --git a/Scripts/Engines/Quests/Collector/Items/Obsidian.cs b/Scripts/Engines/Quests/Collector/Items/Obsidian.cs index 3f9220299..73160c2b2 100644 --- a/Scripts/Engines/Quests/Collector/Items/Obsidian.cs +++ b/Scripts/Engines/Quests/Collector/Items/Obsidian.cs @@ -89,7 +89,7 @@ namespace Server.Engines.Quests.Collector [CommandProperty( AccessLevel.GameMaster )] public int Quantity { - get { return m_Quantity; } + get => m_Quantity; set { if ( value <= 1 ) @@ -113,7 +113,7 @@ namespace Server.Engines.Quests.Collector [CommandProperty( AccessLevel.GameMaster )] public string StatueName { - get { return m_StatueName; } + get => m_StatueName; set { m_StatueName = value; InvalidateProperties(); } } diff --git a/Scripts/Engines/Quests/Collector/Items/PaintedImage.cs b/Scripts/Engines/Quests/Collector/Items/PaintedImage.cs index 744c6b2e9..2f8f750ea 100644 --- a/Scripts/Engines/Quests/Collector/Items/PaintedImage.cs +++ b/Scripts/Engines/Quests/Collector/Items/PaintedImage.cs @@ -10,7 +10,7 @@ namespace Server.Engines.Quests.Collector [CommandProperty( AccessLevel.GameMaster )] public ImageType Image { - get { return m_Image; } + get => m_Image; set { m_Image = value; InvalidateProperties(); } } diff --git a/Scripts/Engines/Quests/Collector/Objectives.cs b/Scripts/Engines/Quests/Collector/Objectives.cs index 4259c7b8f..47ef2cf03 100644 --- a/Scripts/Engines/Quests/Collector/Objectives.cs +++ b/Scripts/Engines/Quests/Collector/Objectives.cs @@ -5,14 +5,7 @@ namespace Server.Engines.Quests.Collector { public class FishPearlsObjective : QuestObjective { - public override object Message - { - get - { - // Fish up shellfish from Lake Haven and collect rainbow pearls. - return 1055084; - } - } + public override object Message => 1055084; public override int MaxProgress => 6; @@ -45,16 +38,7 @@ namespace Server.Engines.Quests.Collector public class ReturnPearlsObjective : QuestObjective { - public override object Message - { - get - { - /* You've collected enough rainbow pearls. Speak to - * Elwood to give them to him and get your next task. - */ - return 1055088; - } - } + public override object Message => 1055088; public ReturnPearlsObjective() { @@ -68,14 +52,7 @@ namespace Server.Engines.Quests.Collector public class FindAlbertaObjective : QuestObjective { - public override object Message - { - get - { - // Go to Vesper and speak to Alberta Giacco at the Colored Canvas. - return 1055091; - } - } + public override object Message => 1055091; public FindAlbertaObjective() { @@ -94,16 +71,7 @@ namespace Server.Engines.Quests.Collector private DateTime m_Begin; - public override object Message - { - get - { - /* Sit on the stool in front of Alberta's easel so that she can - * paint your portrait. You'll need to sit there for about 30 seconds. - */ - return 1055093; - } - } + public override object Message => 1055093; public SitOnTheStoolObjective() { @@ -140,14 +108,7 @@ namespace Server.Engines.Quests.Collector public class ReturnPaintingObjective : QuestObjective { - public override object Message - { - get - { - // Return to Elwood and let him know that the painting is complete. - return 1055099; - } - } + public override object Message => 1055099; public ReturnPaintingObjective() { @@ -161,16 +122,7 @@ namespace Server.Engines.Quests.Collector public class FindGabrielObjective : QuestObjective { - public override object Message - { - get - { - /* Go to Britain and obtain the autograph of renowned - * minstrel, Gabriel Piete. He is often found at the Conservatory of Music. - */ - return 1055101; - } - } + public override object Message => 1055101; public FindGabrielObjective() { @@ -193,16 +145,7 @@ namespace Server.Engines.Quests.Collector { private Theater m_Theater; - public override object Message - { - get - { - /* Find some sheet music for one of Gabriel's songs. - * Try speaking to an impresario from one of the theaters in the land. - */ - return 1055104; - } - } + public override object Message => 1055104; public FindSheetMusicObjective( bool init ) { @@ -265,14 +208,7 @@ namespace Server.Engines.Quests.Collector public class ReturnSheetMusicObjective : QuestObjective { - public override object Message - { - get - { - // Speak to Gabriel to have him autograph the sheet music. - return 1055110; - } - } + public override object Message => 1055110; public ReturnSheetMusicObjective() { @@ -286,14 +222,7 @@ namespace Server.Engines.Quests.Collector public class ReturnAutographObjective : QuestObjective { - public override object Message - { - get - { - // Speak to Elwood to give him the autographed sheet music. - return 1055114; - } - } + public override object Message => 1055114; public ReturnAutographObjective() { @@ -307,14 +236,7 @@ namespace Server.Engines.Quests.Collector public class FindTomasObjective : QuestObjective { - public override object Message - { - get - { - // Go to Trinsic and speak to Tomas O'Neerlan, the famous toymaker. - return 1055117; - } - } + public override object Message => 1055117; public FindTomasObjective() { @@ -338,14 +260,7 @@ namespace Server.Engines.Quests.Collector private ImageType[] m_Images; private bool[] m_Done; - public override object Message - { - get - { - // Use the enchanted paints to capture the image of all of the creatures listed below. - return 1055120; - } - } + public override object Message => 1055120; public override bool Completed { @@ -477,16 +392,7 @@ namespace Server.Engines.Quests.Collector public class ReturnImagesObjective : QuestObjective { - public override object Message - { - get - { - /* You now have all of the creature images you need. - * Return to Tomas O'Neerlan so that he can make the toy figurines. - */ - return 1055128; - } - } + public override object Message => 1055128; public ReturnImagesObjective() { @@ -500,14 +406,7 @@ namespace Server.Engines.Quests.Collector public class ReturnToysObjective : QuestObjective { - public override object Message - { - get - { - // Return to Elwood with news that the toy figurines will be delivered when ready. - return 1055132; - } - } + public override object Message => 1055132; public ReturnToysObjective() { @@ -516,14 +415,7 @@ namespace Server.Engines.Quests.Collector public class MakeRoomObjective : QuestObjective { - public override object Message - { - get - { - // Return to Elwood for your reward when you have some room in your backpack. - return 1055136; - } - } + public override object Message => 1055136; public MakeRoomObjective() { diff --git a/Scripts/Engines/Quests/Core/BaseQuester.cs b/Scripts/Engines/Quests/Core/BaseQuester.cs index c14260766..ec398a483 100644 --- a/Scripts/Engines/Quests/Core/BaseQuester.cs +++ b/Scripts/Engines/Quests/Core/BaseQuester.cs @@ -26,7 +26,7 @@ namespace Server.Engines.Quests public abstract class BaseQuester : BaseVendor { protected List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override bool IsActiveVendor => false; public override bool IsInvulnerable => true; @@ -34,7 +34,8 @@ namespace Server.Engines.Quests public override bool ClickTitle => false; public override bool CanTeach => false; - public virtual int TalkNumber{ get{ return 6146; } } // Talk + public virtual int TalkNumber // Talk + => 6146; public override void InitSBInfo() { diff --git a/Scripts/Engines/Quests/Core/Items/DynamicTeleporter.cs b/Scripts/Engines/Quests/Core/Items/DynamicTeleporter.cs index 7d6c8b6dd..58fb55e13 100644 --- a/Scripts/Engines/Quests/Core/Items/DynamicTeleporter.cs +++ b/Scripts/Engines/Quests/Core/Items/DynamicTeleporter.cs @@ -18,7 +18,8 @@ namespace Server.Engines.Quests public abstract bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map ); - public virtual int NotWorkingMessage{ get{ return 500309; } } // Nothing Happens. + public virtual int NotWorkingMessage // Nothing Happens. + => 500309; public override bool OnMoveOver( Mobile m ) { diff --git a/Scripts/Engines/Quests/Core/Items/HornOfRetreat.cs b/Scripts/Engines/Quests/Core/Items/HornOfRetreat.cs index 1b2473f99..db377f4fa 100644 --- a/Scripts/Engines/Quests/Core/Items/HornOfRetreat.cs +++ b/Scripts/Engines/Quests/Core/Items/HornOfRetreat.cs @@ -12,21 +12,21 @@ namespace Server.Engines.Quests [CommandProperty( AccessLevel.GameMaster )] public Point3D DestLoc { - get{ return m_DestLoc; } - set{ m_DestLoc = value; } + get => m_DestLoc; + set => m_DestLoc = value; } [CommandProperty( AccessLevel.GameMaster )] public Map DestMap { - get{ return m_DestMap; } - set{ m_DestMap = value; } + get => m_DestMap; + set => m_DestMap = value; } [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set{ m_Charges = value; InvalidateProperties(); } } diff --git a/Scripts/Engines/Quests/Core/QuestConversation.cs b/Scripts/Engines/Quests/Core/QuestConversation.cs index b8abd52d5..b9b59924f 100644 --- a/Scripts/Engines/Quests/Core/QuestConversation.cs +++ b/Scripts/Engines/Quests/Core/QuestConversation.cs @@ -11,19 +11,19 @@ namespace Server.Engines.Quests public abstract object Message{ get; } - public virtual QuestItemInfo[] Info{ get{ return null; } } - public virtual bool Logged{ get{ return true; } } + public virtual QuestItemInfo[] Info => null; + public virtual bool Logged => true; public QuestSystem System { - get{ return m_System; } - set{ m_System = value; } + get => m_System; + set => m_System = value; } public bool HasBeenRead { - get{ return m_HasBeenRead; } - set{ m_HasBeenRead = value; } + get => m_HasBeenRead; + set => m_HasBeenRead = value; } public QuestConversation() diff --git a/Scripts/Engines/Quests/Core/QuestItemInfo.cs b/Scripts/Engines/Quests/Core/QuestItemInfo.cs index 5cd87a84a..5fd7e56da 100644 --- a/Scripts/Engines/Quests/Core/QuestItemInfo.cs +++ b/Scripts/Engines/Quests/Core/QuestItemInfo.cs @@ -9,14 +9,14 @@ namespace Server.Engines.Quests public object Name { - get{ return m_Name; } - set{ m_Name = value; } + get => m_Name; + set => m_Name = value; } public int ItemID { - get{ return m_ItemID; } - set{ m_ItemID = value; } + get => m_ItemID; + set => m_ItemID = value; } public QuestItemInfo( object name, int itemID ) diff --git a/Scripts/Engines/Quests/Core/QuestObjective.cs b/Scripts/Engines/Quests/Core/QuestObjective.cs index 31170c255..d532300f5 100644 --- a/Scripts/Engines/Quests/Core/QuestObjective.cs +++ b/Scripts/Engines/Quests/Core/QuestObjective.cs @@ -15,42 +15,36 @@ namespace Server.Engines.Quests public abstract object Message{ get; } - public virtual int MaxProgress{ get{ return 1; } } - public virtual QuestItemInfo[] Info{ get{ return null; } } + public virtual int MaxProgress => 1; + public virtual QuestItemInfo[] Info => null; public QuestSystem System { - get{ return m_System; } - set{ m_System = value; } + get => m_System; + set => m_System = value; } public bool HasBeenRead { - get{ return m_HasBeenRead; } - set{ m_HasBeenRead = value; } + get => m_HasBeenRead; + set => m_HasBeenRead = value; } public int CurProgress { - get{ return m_CurProgress; } + get => m_CurProgress; set{ m_CurProgress = value; CheckCompletionStatus(); } } public bool HasCompleted { - get{ return m_HasCompleted; } - set{ m_HasCompleted = value; } + get => m_HasCompleted; + set => m_HasCompleted = value; } - public virtual bool Completed - { - get{ return m_CurProgress >= MaxProgress; } - } + public virtual bool Completed => m_CurProgress >= MaxProgress; - public bool IsSingleObjective - { - get{ return ( MaxProgress == 1 ); } - } + public bool IsSingleObjective => ( MaxProgress == 1 ); public QuestObjective() { diff --git a/Scripts/Engines/Quests/Core/QuestRestartInfo.cs b/Scripts/Engines/Quests/Core/QuestRestartInfo.cs index cd74467bb..17151c1e4 100644 --- a/Scripts/Engines/Quests/Core/QuestRestartInfo.cs +++ b/Scripts/Engines/Quests/Core/QuestRestartInfo.cs @@ -9,14 +9,14 @@ namespace Server.Engines.Quests public Type QuestType { - get{ return m_QuestType; } - set{ m_QuestType = value; } + get => m_QuestType; + set => m_QuestType = value; } public DateTime RestartTime { - get{ return m_RestartTime; } - set{ m_RestartTime = value; } + get => m_RestartTime; + set => m_RestartTime = value; } public void Reset( TimeSpan restartDelay ) diff --git a/Scripts/Engines/Quests/Core/QuestSystem.cs b/Scripts/Engines/Quests/Core/QuestSystem.cs index b0bbc6f82..7d48fd710 100644 --- a/Scripts/Engines/Quests/Core/QuestSystem.cs +++ b/Scripts/Engines/Quests/Core/QuestSystem.cs @@ -44,20 +44,20 @@ namespace Server.Engines.Quests public PlayerMobile From { - get{ return m_From; } - set{ m_From = value; } + get => m_From; + set => m_From = value; } public ArrayList Objectives { - get{ return m_Objectives; } - set{ m_Objectives = value; } + get => m_Objectives; + set => m_Objectives = value; } public ArrayList Conversations { - get{ return m_Conversations; } - set{ m_Conversations = value; } + get => m_Conversations; + set => m_Conversations = value; } private Timer m_Timer; diff --git a/Scripts/Engines/Quests/Core/Regions/CancelQuestRegion.cs b/Scripts/Engines/Quests/Core/Regions/CancelQuestRegion.cs index 523414a11..f220ded16 100644 --- a/Scripts/Engines/Quests/Core/Regions/CancelQuestRegion.cs +++ b/Scripts/Engines/Quests/Core/Regions/CancelQuestRegion.cs @@ -9,7 +9,7 @@ namespace Server.Engines.Quests { private Type m_Quest; - public Type Quest{ get{ return m_Quest; } } + public Type Quest => m_Quest; public CancelQuestRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent ) { diff --git a/Scripts/Engines/Quests/Core/Regions/QuestCompleteObjectiveRegion.cs b/Scripts/Engines/Quests/Core/Regions/QuestCompleteObjectiveRegion.cs index 1b6481805..985845210 100644 --- a/Scripts/Engines/Quests/Core/Regions/QuestCompleteObjectiveRegion.cs +++ b/Scripts/Engines/Quests/Core/Regions/QuestCompleteObjectiveRegion.cs @@ -10,8 +10,8 @@ namespace Server.Engines.Quests private Type m_Quest; private Type m_Objective; - public Type Quest{ get{ return m_Quest ; } } - public Type Objective{ get{ return m_Objective; } } + public Type Quest => m_Quest; + public Type Objective => m_Objective; public QuestCompleteObjectiveRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent ) { diff --git a/Scripts/Engines/Quests/Core/Regions/QuestNoEntryRegion.cs b/Scripts/Engines/Quests/Core/Regions/QuestNoEntryRegion.cs index a2bcf4f16..980b9274a 100644 --- a/Scripts/Engines/Quests/Core/Regions/QuestNoEntryRegion.cs +++ b/Scripts/Engines/Quests/Core/Regions/QuestNoEntryRegion.cs @@ -12,10 +12,10 @@ namespace Server.Engines.Quests private Type m_MaxObjective; private int m_Message; - public Type Quest{ get{ return m_Quest; } } - public Type MinObjective{ get{ return m_MinObjective; } } - public Type MaxObjective{ get{ return m_MaxObjective; } } - public int Message{ get{ return m_Message; } } + public Type Quest => m_Quest; + public Type MinObjective => m_MinObjective; + public Type MaxObjective => m_MaxObjective; + public int Message => m_Message; public QuestNoEntryRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent ) { diff --git a/Scripts/Engines/Quests/Core/Regions/QuestOfferRegion.cs b/Scripts/Engines/Quests/Core/Regions/QuestOfferRegion.cs index 3bc2f0d05..ebbb2f00b 100644 --- a/Scripts/Engines/Quests/Core/Regions/QuestOfferRegion.cs +++ b/Scripts/Engines/Quests/Core/Regions/QuestOfferRegion.cs @@ -9,7 +9,7 @@ namespace Server.Engines.Quests { private Type m_Quest; - public Type Quest{ get{ return m_Quest ; } } + public Type Quest => m_Quest; public QuestOfferRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent ) { diff --git a/Scripts/Engines/Quests/Dark Tides/Conversations.cs b/Scripts/Engines/Quests/Dark Tides/Conversations.cs index 084ba669c..cdeab3414 100644 --- a/Scripts/Engines/Quests/Dark Tides/Conversations.cs +++ b/Scripts/Engines/Quests/Dark Tides/Conversations.cs @@ -4,35 +4,7 @@ namespace Server.Engines.Quests.Necro { public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Important Quest Information

- * - * During your quest, any important information that a - * NPC gives you, will appear in a - * window such as this one. You can review the information at - * any time during your quest.

Getting Help

- * - * Some of the text you will come across during your quest, will - * be underlined links to the codex of - * wisdom, or online help system. You can click on the text - * to get detailed information on the underlined subject. You - * may also access the Codex Of Wisdom by pressing "F1" or by - * clicking on the "?" on the toolbar at the top of your screen.

- * - * Context Menus

Context menus can be called up by - * single left-clicking (or Shift + single left-click, if you - * changed it) on most objects or NPCs in the world. Nearly - * everything, including your own avatar will have context menus - * available. Bringing up your avatar's context menu will give - * you options to cancel your quest and review various quest - * information.

- */ - return 1049092; - } - } + public override object Message => 1049092; public AcceptConversation() { @@ -52,49 +24,7 @@ namespace Server.Engines.Quests.Necro public class ReanimateMaabusConversation : QuestConversation { - public override object Message - { - get - { - /* Excellent choice, young apprentice of evil!

- * - * I will not waste our time with pleasantries. There is much work - * to be done � especially in light of the recent Paladin ambushes - * that we have suffered. The necromantic brotherhood is working - * towards the summoning of the elder daemon Kronus, who will rise - * from the Well of Tears to help us finally crush the Paladin forces - * that have plagued our lands for so long now.

- * - * To summon Kronus, we must energize the Well of Tears with a series - * of dark rituals. Unfortunately the rituals needed to sufficiently - * energize the Well of Tears have been lost to us. Your task will be - * to recover one of the ritual scrolls needed for the summoning.

- * - * You will need to find the corpse of the Arch Necromancer Maabus, which - * has been laid to rest in the tomb of elders. We believe his spirit may - * have memory of where we may find the scrolls needed for the summoning. - * You will need to awaken him from the slumber of death, using your - * Animate Dead spell, of course.

- * - * To reach the tomb, step onto the magical teleporter just to the - * West of where I am standing.

- * - * Once you have been teleported, follow the path, which will lead you to - * the tomb of Maabus.

One more thing before you go:

- * - * Should you get into trouble out there or should you lose your way, do - * not worry. I have also given you a magical horn - a Horn of Retreat. - * Play the horn at any time to open a magical gateway that leads back to this - * tower.

- * - * Should your horn run out of charges, simply - * hand me the horn to have it recharged.

- * - * Good luck friend. - */ - return 1060099; - } - } + public override object Message => 1060099; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -117,37 +47,7 @@ namespace Server.Engines.Quests.Necro public class MaabasConversation : QuestConversation { - public override object Message - { - get - { - /* Maabus emits an ear-crawling screech as his body reanimates. - * He turns and angrily screams at you:

- * - * YOU INFIDEL! HOW DARE YOU AWAKEN MAABUS!?!

- * - * Maabus continues to scream at you angrily for some time. - * As he settles down, you explain to him the purpose of your visit. - * Once you explain that you are on a quest to summon the elder daemon - * Kronus, Maabus begins to cooperate, and begins to speak in a more - * reasonable tone:

- * - * Well, why didn�t you say so? If you�re going to raise Kronus from - * the Well of Tears, you must first complete a long series of dark - * rituals. I once owned one of the scrolls needed for the summoning, - * but alas it was lost to me when I lost my life to a cowardly Paladin - * ambush near the Paladin city of Light. They would have probably - * hidden the scroll in their precious crystal cave near the city.

- * - * There is a teleporter in the corner of this tomb. It will transport - * you near the crystal cave at which I believe one of the calling scrolls - * is hidden. Good luck.

- * - * Maabus' body slumps back into the coffinas your magic expires. - */ - return 1060103; - } - } + public override object Message => 1060103; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -168,37 +68,7 @@ namespace Server.Engines.Quests.Necro public class HorusConversation : QuestConversation { - public override object Message - { - get - { - /* An old man, dressed in slightly tattered armor, whom you recognize - * to be a Paladin stands before the Crystal Cave staring blankly into - * the space in front of him. As he begins to speak to you, you realize - * this man is blind. You attempt to persuade the blind man that you are - * a Paladin seeking to inspect the scroll of calling...

- * - * Greetings traveler!

- * - * You seek entrance to the Crystal Cave, home of the Calling Scroll? Hmm. - * You reak of death and decay, brother. You reak of death like a Necromancer, - * but yet you claim to be a Paladin in hopes that I will grant thee passage - * into the cave?

- * - * Please don�t think ill of me for this, but I�m just a blind, old man looking - * to keep the brotherhood of Paladins safe from the clutches of the elder daemon - * Kronus. The Necromancers have been after this particular scroll for quite some - * time, so we must take all the security precautions we can.

- * - * Before I can let you pass into the Crystal Cave, you must speak to me the secret - * word that is kept in the Scroll of Abraxus in the Vault of Secrets at the Paladin - * city of Light. It�s the only way that I can be sure you are who you claim to be, - * since Necromancers cannot enter the Vault due to powerful protective magic that - * the brotherhood has blessed the vault with. - */ - return 1060105; - } - } + public override object Message => 1060105; public HorusConversation() { @@ -212,32 +82,7 @@ namespace Server.Engines.Quests.Necro public class MardothVaultConversation : QuestConversation { - public override object Message - { - get - { - /* Mardoth looks at you expectantly until you tell him that you failed - * to retrieve the scroll...

- * - * You failed? Very unfortunate... So now you must find your way into - * the paladin�s Vault of Secrets, eh? Well, you won't be able to get in - * � there is a powerful magic aura that protects the Vault from all - * Necromancers. We simply cannot enter. However, that's not to say you - * familiar spirit can't.

- * - * Mardoth grins with obvious satisfaction - * as he explains the details of the Summon - * Familiar spell to you..., which will allow you to summon a - * scavenging Horde Minion to steal the scroll.

- * - * Very well. You are prepared to go. Take the teleporter just to the - * West of where I am standing to transport - * to the Paladin city of Light. Once you have arrived in the city, follow - * the road of glowing runes to the Vault of Secrets. You know what to do. - */ - return 1060107; - } - } + public override object Message => 1060107; public MardothVaultConversation() { @@ -251,28 +96,7 @@ namespace Server.Engines.Quests.Necro public class VaultOfSecretsConversation : QuestConversation { - public override object Message - { - get - { - /* You have arrived in the Vault of Secrets. You can feel the - * protective magic in this place restricting you, making you - * feel nearly claustrophobic.

- * - * Just ahead of you and out of your reach, you see a collection - * of scrolls and books, one of them being entitled - * 'Scroll of Abraxus' . You can only assume that this scroll - * holds the current password required to enter the Crystal Cave.

- * - * This would be a good opportunity to summon - * your familiar. Since your familiar is not a Necromancer, it - * will not be affected by the anti-magic aura that surrounds the Vault.

- * - * Summon your familiar with the Summon Familiar spell. - */ - return 1060110; - } - } + public override object Message => 1060110; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -293,24 +117,7 @@ namespace Server.Engines.Quests.Necro public class ReadAbraxusScrollConversation : QuestConversation { - public override object Message - { - get - { - /* You have obtained the Scroll of Abraxus, which contains the secret - * password needed to gain passage into the Crystal Cave where the - * Scroll of Calling is kept. Read the scroll (double click) and - * figure out the password.

- * - * Once you have the password, return to the Crystal Cave and speak - * the password to the guard.

- * - * If you do not know the way to the Crystal Cave from the Paladin City, - * you can use the magic teleporter located just outside of the vault. - */ - return 1060114; - } - } + public override object Message => 1060114; public ReadAbraxusScrollConversation() { @@ -324,31 +131,7 @@ namespace Server.Engines.Quests.Necro public class SecondHorusConversation : QuestConversation { - public override object Message - { - get - { - /* Very well Paladin, you have proven to me your identity. - * I grant thee passage.

- * - * Be careful, however � I�ve heard that the cave has been - * infested with a vermin of some sort. Our High Lord - * Melkeer was supposed to send some troops to clear the - * vermin out of the cave, but that was last week already. - * I fear that he forgot.

- * - * If you can find it in your goodness to dispose of at - * least 5 of those vermin in there, I shall reward your - * efforts. If however you are too busy, and I would - * understand if you were, don�t bother with the vermin.

- * - * You may now pass through the energy barrier to enter the - * Crystal Cave. Take care honorable Paladin soul. - * Walk in the light my friend. - */ - return 1060118; - } - } + public override object Message => 1060118; public SecondHorusConversation() { @@ -362,21 +145,7 @@ namespace Server.Engines.Quests.Necro public class HealConversation : QuestConversation { - public override object Message - { - get - { - /* You've just slain a creature. Now is a good time to learn how - * to heal yourself as a Necromancer.

- * - * As a follower of the dark path, you are able to recover lost - * hitpoints by communing with the spirit world via the skill - * Spirit Speak. Learn more about it now, - * in the codex of Wisdom. - */ - return 1061610; - } - } + public override object Message => 1061610; public HealConversation() { @@ -385,20 +154,7 @@ namespace Server.Engines.Quests.Necro public class HorusRewardConversation : QuestConversation { - public override object Message - { - get - { - /* I thank you for going out of your way to clean out some - * of the vermin in that cave � here is your reward: a bag - * containing 500 gold coins plus a strange and magical artifact - * that should come in handy in your travels.

- * - * Take care young Paladin! - */ - return 1060717; - } - } + public override object Message => 1060717; public override bool Logged => false; @@ -465,27 +221,7 @@ namespace Server.Engines.Quests.Necro public class MardothKronusConversation : QuestConversation { - public override object Message - { - get - { - /* You have returned with the scroll! I knew I could count on you. - * You can now perform the rite of calling at the Well of Tears. - * This ritual will help charge the Well to prepare for the coming - * of Kronus. You are prepared to do your part young Necromancer!

- * - * Just outside of this tower, you will find a path lined with red - * lanterns. Follow this path to get to the Well of Tears. Once - * you have arrived at the Well, use the scroll to perform the - * ritual of calling. Performing the rite will empower the well - * and bring us that much closer to the arrival of Kronus.

- * - * Once you have completed the ritual, return here for your - * promised reward. - */ - return 1060121; - } - } + public override object Message => 1060121; public MardothKronusConversation() { @@ -499,36 +235,7 @@ namespace Server.Engines.Quests.Necro public class MardothEndConversation : QuestConversation { - public override object Message - { - get - { - /* You have done as I asked... I knew I could count on you from - * the moment you walked in here!

- * - * The forces of evil are strong within you. You will become - * a great Necromancer in this life - perhaps even the greatest.

- * - * My work for you is done here. I release you from my service - * to go into the world and fight for our cause...

- * - * Oh...I almost forgot - your reward. Here is a magical - * weapon and 2000 gold for you, in the form of a check. Don't - * spend it all in one place though, eh?

- * - * Actually, before you can spend any of it at all, you will - * have to cash the check at the - * nearest bank. Shopkeepers never accept checks for payment, - * they require cash.

- * - * In your pack, you will find an enchanted sextant. Use this - * sextant to guide you to the nearest bank.

- * - * Farewell, and stay true to the ways of the shadow... - */ - return 1060133; - } - } + public override object Message => 1060133; public MardothEndConversation() { @@ -542,30 +249,7 @@ namespace Server.Engines.Quests.Necro public class BankerConversation : QuestConversation { - public override object Message - { - get - { - /* The banker smiles at you and greets you in a loud and robust voice...

- * - * Well hello there adventurer! I see you've learned how to cash checks. Wonderful! - * Let me tell you a bit about the banks in this world...

- * - * Anything that you place into any bank box, can be retrieved from any other - * bank box in the land. For instance, if you place an item into a bank box in - * Britain, it can be retrieved from your bank box in Moonglow or any other city.

- * - * Bank boxes are very secure. So secure, in fact, that no one can ever get into - * your bank box except for yourself. Security is hard to come by these days, - * but you can trust in the banking system of Britannia! We shall not let you down!

- * - * I hope to be seeing much more of you as your riches grow! May your bank box overflow - * with the spoils of your adventures.

Farewell adventurer, you are now free to - * explore the world on your own. - */ - return 1060137; - } - } + public override object Message => 1060137; public BankerConversation() { @@ -579,21 +263,7 @@ namespace Server.Engines.Quests.Necro public class RadarConversation : QuestConversation { - public override object Message - { - get - { - /* If you are leaving the tower, you should learn about the Radar Map.

- * - * The Radar Map (or Overhead View) can be opened by pressing 'ALT-R' - * on your keyboard. It shows your immediate surroundings from a bird's - * eye view.

Pressing ALT-R twice, will enlarge the Radar Map a - * little. Use the Radar Map often as you travel throughout the world - * to familiarize yourself with your surroundings. - */ - return 1061692; - } - } + public override object Message => 1061692; public override bool Logged => false; diff --git a/Scripts/Engines/Quests/Dark Tides/DarkTidesQuest.cs b/Scripts/Engines/Quests/Dark Tides/DarkTidesQuest.cs index f488ab2d0..c69de0a5f 100644 --- a/Scripts/Engines/Quests/Dark Tides/DarkTidesQuest.cs +++ b/Scripts/Engines/Quests/Dark Tides/DarkTidesQuest.cs @@ -46,56 +46,9 @@ namespace Server.Engines.Quests.Necro public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // Dark Tides - return 1060095; - } - } + public override object Name => 1060095; - public override object OfferMessage - { - get - { - /* An old man who looks to be 200 years old from the looks - * of his translucently pale and heavily wrinkled skin, turns - * to you and gives you a half-cocked grin that makes you - * feel somewhat uneasy.

- * - * After a short pause, he begins to speak to you...


- * - * Hmm. What's this? Another budding Necromancer to join the - * ranks of Evil? Here... let me take a look at you... Ah - * yes... Very Good! I sense the forces of evil are strong - * within you, child � but you need training so that you can - * learn to focus your skills against those aligned against - * our cause. You are destined to become a legendary - * Necromancer - with the proper training, that only I can - * give you.

- * - * Mardoth pauses just long enough to give you a wide, - * skin-crawling grin.

- * - * Let me introduce myself. I am Mardoth, the guildmaster of - * the Necromantic Brotherhood. I have taken it upon myself - * to train anyone willing to learn the dark arts of Necromancy. - * The path of destruction, decay and obliteration is not an - * easy one. Only the most evil and the most dedicated can - * hope to master the sinister art of death.

- * - * I can lend you training and help supply you with equipment � - * in exchange for a few services rendered by you, of course. - * Nothing major, just a little death and destruction here and - * there - the tasks should be easy as a tasty meat pie for one - * as treacherous and evil as yourself.

- * - * What do you say? Do we have a deal? - */ - return 1060094; - } - } + public override object OfferMessage => 1060094; public override TimeSpan RestartDelay => TimeSpan.MaxValue; public override bool IsTutorial => true; diff --git a/Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs b/Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs index d1db82c5a..d5358cb3d 100644 --- a/Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs +++ b/Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs @@ -12,7 +12,9 @@ namespace Server.Engines.Quests.Necro public Maabus Maabus => m_Maabus; [CommandProperty( AccessLevel.GameMaster )] - public Point3D SpawnLocation { get { return m_SpawnLocation; } set { m_SpawnLocation = value; } } + public Point3D SpawnLocation { get => m_SpawnLocation; + set => m_SpawnLocation = value; + } [Constructible] public MaabusCoffin() @@ -106,7 +108,7 @@ namespace Server.Engines.Quests.Necro [CommandProperty( AccessLevel.GameMaster )] public Point3D SpawnLocation { - get { return Addon is MaabusCoffin coffin ? coffin.SpawnLocation : Point3D.Zero; } + get => Addon is MaabusCoffin coffin ? coffin.SpawnLocation : Point3D.Zero; set { if ( Addon is MaabusCoffin coffin ) coffin.SpawnLocation = value; } } diff --git a/Scripts/Engines/Quests/Dark Tides/Objectives.cs b/Scripts/Engines/Quests/Dark Tides/Objectives.cs index 57da7c8f0..125c7cc4e 100644 --- a/Scripts/Engines/Quests/Dark Tides/Objectives.cs +++ b/Scripts/Engines/Quests/Dark Tides/Objectives.cs @@ -5,16 +5,7 @@ namespace Server.Engines.Quests.Necro { public class AnimateMaabusCorpseObjective : QuestObjective { - public override object Message - { - get - { - /* Re-animate the corpse of Maabus using your Animate Dead - * spell and question him about the Kronus rituals. - */ - return 1060102; - } - } + public override object Message => 1060102; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -35,16 +26,7 @@ namespace Server.Engines.Quests.Necro public class FindCrystalCaveObjective : QuestObjective { - public override object Message - { - get - { - /* Take the teleporter in the corner of Maabus' tomb to - * the crystal cave where the calling scroll is kept. - */ - return 1060104; - } - } + public override object Message => 1060104; public FindCrystalCaveObjective() { @@ -58,16 +40,7 @@ namespace Server.Engines.Quests.Necro public class FindMardothAboutVaultObjective : QuestObjective { - public override object Message - { - get - { - /* Infiltrate the city of the Paladins and figure out a way into - * the Vault. See Mardoth for help with this objective. - */ - return 1060106; - } - } + public override object Message => 1060106; public FindMardothAboutVaultObjective() { @@ -81,16 +54,7 @@ namespace Server.Engines.Quests.Necro public class FindMaabusTombObjective : QuestObjective { - public override object Message - { - get - { - /* Step onto the teleporter near Mardoth and follow the path - * of glowing runes to the tomb of Maabus. - */ - return 1060124; - } - } + public override object Message => 1060124; public FindMaabusTombObjective() { @@ -110,16 +74,7 @@ namespace Server.Engines.Quests.Necro public class FindMaabusCorpseObjective : QuestObjective { - public override object Message - { - get - { - /* This is the tomb of Maabus. Enter within and find - * the corpse of the ancient necromancer. - */ - return 1061142; - } - } + public override object Message => 1061142; public FindMaabusCorpseObjective() { @@ -139,16 +94,7 @@ namespace Server.Engines.Quests.Necro public class FindCityOfLightObjective : QuestObjective { - public override object Message - { - get - { - /* Use the teleporter near Mardoth to be transported - * to the Paladin City of Light. - */ - return 1060108; - } - } + public override object Message => 1060108; public FindCityOfLightObjective() { @@ -168,18 +114,7 @@ namespace Server.Engines.Quests.Necro public class FindVaultOfSecretsObjective : QuestObjective { - public override object Message - { - get - { - /* Follow the road paved with glowing runes to - * find the Vault of Secrets. Be careful not - * to give yourself away as a Necromancer while - * in the city. - */ - return 1060109; - } - } + public override object Message => 1060109; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -206,14 +141,7 @@ namespace Server.Engines.Quests.Necro public class FetchAbraxusScrollObjective : QuestObjective { - public override object Message - { - get - { - // Summon your Horde Minion familiar to fetch the scroll for you. - return 1060196; - } - } + public override object Message => 1060196; public FetchAbraxusScrollObjective() { @@ -239,16 +167,7 @@ namespace Server.Engines.Quests.Necro public class RetrieveAbraxusScrollObjective : QuestObjective { - public override object Message - { - get - { - /* Double click your Horde Minion to open his pack and retrieve - * the Scroll of Abraxus that he looted for you. - */ - return 1060199; - } - } + public override object Message => 1060199; public RetrieveAbraxusScrollObjective() { @@ -262,17 +181,7 @@ namespace Server.Engines.Quests.Necro public class ReadAbraxusScrollObjective : QuestObjective { - public override object Message - { - get - { - /* Find the Crystal Cave password by reading (double click) - * the golden scroll entitled "Scroll of Abraxus" that you - * got from your familiar.. - */ - return 1060125; - } - } + public override object Message => 1060125; public ReadAbraxusScrollObjective() { @@ -286,17 +195,7 @@ namespace Server.Engines.Quests.Necro public class ReturnToCrystalCaveObjective : QuestObjective { - public override object Message - { - get - { - /* Now that you have the password, return to the Crystal Cave - * to speak with the guard there. Use the teleporter outside - * of the vault to get there if necessary. - */ - return 1060115; - } - } + public override object Message => 1060115; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -317,17 +216,7 @@ namespace Server.Engines.Quests.Necro public class SpeakCavePasswordObjective : QuestObjective { - public override object Message - { - get - { - /* Speak the secret word that you read in the scroll - * stolen from the Vault to Horus the guard, using - * his context menu. - */ - return 1060117; - } - } + public override object Message => 1060117; public SpeakCavePasswordObjective() { @@ -341,16 +230,7 @@ namespace Server.Engines.Quests.Necro public class FindCallingScrollObjective : QuestObjective { - public override object Message - { - get - { - /* Enter the Crystal Cave and find the Scroll of Calling. - * The barrier will now allow you to pass. - */ - return 1060119; - } - } + public override object Message => 1060119; private int m_SkitteringHoppersKilled; private bool m_HealConversationShown; @@ -414,16 +294,7 @@ namespace Server.Engines.Quests.Necro public class FindHorusAboutRewardObjective : QuestObjective { - public override object Message - { - get - { - /* You have disposed of the creatures as Horus has asked. - * See him on your way out of the Crystal Cave to claim your reward. - */ - return 1060126; - } - } + public override object Message => 1060126; public FindHorusAboutRewardObjective() { @@ -437,16 +308,7 @@ namespace Server.Engines.Quests.Necro public class FindMardothAboutKronusObjective : QuestObjective { - public override object Message - { - get - { - /* You have obtained the scroll of calling. See Mardoth - * for further instructions. - */ - return 1060127; - } - } + public override object Message => 1060127; public FindMardothAboutKronusObjective() { @@ -460,16 +322,7 @@ namespace Server.Engines.Quests.Necro public class FindWellOfTearsObjective : QuestObjective { - public override object Message - { - get - { - /* Follow the red lanterns to the Well of Tears where - * you will perform the calling of Kronus. - */ - return 1060128; - } - } + public override object Message => 1060128; public FindWellOfTearsObjective() { @@ -509,17 +362,7 @@ namespace Server.Engines.Quests.Necro public class UseCallingScrollObjective : QuestObjective { - public override object Message - { - get - { - /* Use the Scroll of Calling (double click) near the - * Well of Tears to charge the waters for the arrival - * of Kronus. - */ - return 1060130; - } - } + public override object Message => 1060130; public UseCallingScrollObjective() { @@ -585,17 +428,7 @@ namespace Server.Engines.Quests.Necro public class FindBankObjective : QuestObjective { - public override object Message - { - get - { - /* Use the enchanted sextant in your pack to locate - * the nearest bank. Go there and speak with the - * Banker. - */ - return 1060134; - } - } + public override object Message => 1060134; public FindBankObjective() { @@ -615,16 +448,7 @@ namespace Server.Engines.Quests.Necro public class CashBankCheckObjective : QuestObjective { - public override object Message - { - get - { - /* You have arrived at the Bank. Open your bank box - * and then cash the check that Mardoth gave you. - */ - return 1060644; - } - } + public override object Message => 1060644; public CashBankCheckObjective() { diff --git a/Scripts/Engines/Quests/Emino's Undertaking/Conversations.cs b/Scripts/Engines/Quests/Emino's Undertaking/Conversations.cs index a92558b0f..f74e20088 100644 --- a/Scripts/Engines/Quests/Emino's Undertaking/Conversations.cs +++ b/Scripts/Engines/Quests/Emino's Undertaking/Conversations.cs @@ -2,35 +2,7 @@ namespace Server.Engines.Quests.Ninja { public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Important Quest Information

- * - * During your quest, any important information that a - * NPC gives you, will appear in a - * window such as this one. You can review the information at - * any time during your quest.

Getting Help

- * - * Some of the text you will come across during your quest, will - * be underlined links to the codex of - * wisdom, or online help system. You can click on the text - * to get detailed information on the underlined subject. You - * may also access the Codex Of Wisdom by pressing "F1" or by - * clicking on the "?" on the toolbar at the top of your screen.

- * - * Context Menus

Context menus can be called up by - * single left-clicking (or Shift + single left-click, if you - * changed it) on most objects or NPCs in the world. Nearly - * everything, including your own avatar will have context menus - * available. Bringing up your avatar's context menu will give - * you options to cancel your quest and review various quest - * information.

- */ - return 1049092; - } - } + public override object Message => 1049092; public AcceptConversation() { @@ -44,28 +16,7 @@ namespace Server.Engines.Quests.Ninja public class FindZoelConversation : QuestConversation { - public override object Message - { - get - { - /* Ah, another fledgling unfurls its wings. Welcome to my - * home young one.

- * - * I am Daimyo Emino, a passionate collector of sorts. - * One who is vengeful towards those impeding my reign.

- * - * You have the look of someone who could help me but - * your skills are untested. Are you willing to prove - * your mettle as my hireling?

- * - * Elite Ninja Zoel awaits you in the backyard. He will - * lead you to the first trial. You will be directed - * further when you arrive at your destination. You - * should speak to him before exploring the yard or cave entrance. - */ - return 1063175; - } - } + public override object Message => 1063175; public FindZoelConversation() { @@ -79,23 +30,7 @@ namespace Server.Engines.Quests.Ninja public class RadarConversation : QuestConversation { - public override object Message - { - get - { - /* To view the surrounding area, you should learn about the Radar Map.

- * - * The Radar Map (or Overhead View) can be opened by pressing 'ALT-R' - * on your keyboard. It shows your immediate surroundings from a - * bird's eye view.

- * - * Pressing ALT-R twice, will enlarge the Radar Map a little. - * Use the Radar Map often as you travel throughout the world - * to familiarize yourself with your surroundings. - * */ - return 1063033; - } - } + public override object Message => 1063033; public override bool Logged => false; @@ -106,31 +41,7 @@ namespace Server.Engines.Quests.Ninja public class EnterCaveConversation : QuestConversation { - public override object Message - { - get - { - /* Zoel studies your face as you approach him. Wryly, he says:

- * - * Daimyo Emino has sent another already? The stains from the - * last have not yet dried!

- * - * No matter, we�ll finish you off and clean it all at once, eh?

- * - * Now to the point, your only task is to survive in the abandoned inn.

- * - * You will be instructed when you need to act and when you should - * return to one of us.

- * - * Only a true Ninja is deft enough to finish and remain alive.

- * - * Your future... or your demise... lies in this cave beyond.

- * - * Now go. - */ - return 1063177; - } - } + public override object Message => 1063177; public EnterCaveConversation() { @@ -144,21 +55,7 @@ namespace Server.Engines.Quests.Ninja public class SneakPastGuardiansConversation : QuestConversation { - public override object Message - { - get - { - /* A glowing archway stands before you.

- * - * To either side of its frame are mounted demon heads, - * breathing fire and watching your every move.

- * - * To pass through, you must first vanish from the demons� - * sight. Only then can you slowly traverse the entryway. - */ - return 1063180; - } - } + public override object Message => 1063180; public SneakPastGuardiansConversation() { @@ -172,23 +69,7 @@ namespace Server.Engines.Quests.Ninja public class NeedToHideConversation : QuestConversation { - public override object Message - { - get - { - /* You�ll need to hide in order to pass through the door.

- * - * To find out how to use active skills, visit the - * Codex of Wisdom. - * To activate a skill, locate it on your skills - * list and click the blue button located to the - * left of the skill's name.

Once you have - * successfully hidden, you may move slowly through the door. - * - */ - return 1063181; - } - } + public override object Message => 1063181; public NeedToHideConversation() { @@ -197,20 +78,7 @@ namespace Server.Engines.Quests.Ninja public class UseTeleporterConversation : QuestConversation { - public override object Message - { - get - { - /* - * Through the door lies a short passageway. - * The path ends abruptly at a strange tile on the floor. - * The special tile is known as a teleporter. - * Step on the teleporter tile and you will be transported - * to a new location. - */ - return 1063182; - } - } + public override object Message => 1063182; public UseTeleporterConversation() { @@ -224,25 +92,7 @@ namespace Server.Engines.Quests.Ninja public class GiveZoelNoteConversation : QuestConversation { - public override object Message - { - get - { - /* Daimyo Emino smiles as you approach him:

- * - * I see that you have survived both the first trial and Zoel�s temper.

- * - * For that you have been rewarded with Leggings and Gloves - * befitting your occupation. The material is the only armor - * a True Ninja needs.

- * - * You have yet to prove yourself fully, young hireling. - * Another trial must be met. Off to Zoel you go. - * Bring him this note so he knows we have spoken. - */ - return 1063184; - } - } + public override object Message => 1063184; public GiveZoelNoteConversation() { @@ -256,14 +106,7 @@ namespace Server.Engines.Quests.Ninja public class LostNoteConversation : QuestConversation { - public override object Message - { - get - { - // You have lost my note? I will scribe another for you. Try not to lose this one. - return 1063187; - } - } + public override object Message => 1063187; public override bool Logged => false; @@ -274,36 +117,7 @@ namespace Server.Engines.Quests.Ninja public class GainInnInformationConversation : QuestConversation { - public override object Message - { - get - { - /* Zoel quickly grabs the scroll from your - * hand and reads the note:

- * - * Still alive then? You�ll have to impress me - * further before I will give my approval of - * you to Daimyo Emino.

- * - * You must return to the inn and begin the next trial.

- * - * We believe an associate has, shall we say, - * inadvertently negated our contract.

- * - * Find out what information you can and return - * to Daimyo Emino with the news. And be careful - * not to lose your head.

- * - * The Blue Teleporter Tile in Daimyo Emino�s - * residence will lead you to your fate. - * I suggest you hurry.

- * - * ...And take care to tread softly. There - * is no greater traitor than a heavy footfall upon a path. - */ - return 1063189; - } - } + public override object Message => 1063189; public GainInnInformationConversation() { @@ -317,33 +131,7 @@ namespace Server.Engines.Quests.Ninja public class ReturnFromInnConversation : QuestConversation { - public override object Message - { - get - { - /* You quietly approach the door and see - * a woman named Jedah Entille speaking - * to a shady figure in dark clothing. - * You move closer so you can overhear - * the conversation. Fortunately, your - * entrance did not alert the preoccupied party.

- * - * Jedah�s brash voice permeates the air:

- * - * Now that it is hidden, we�ll hide out here - * until Daimyo Emino forgets about us. - * Once he realizes his beloved sword is missing, - * he�ll surely start looking for the thieves. - * We will be long gone by that time.


- * - * After overhearing the conversation, - * you understand why you were sent on - * this trial. You must immediately tell - * Daimyo Emino what you have learned. - * */ - return 1063196; - } - } + public override object Message => 1063196; public ReturnFromInnConversation() { @@ -357,45 +145,7 @@ namespace Server.Engines.Quests.Ninja public class SearchForSwordConversation : QuestConversation { - public override object Message - { - get - { - /* Daimyo Emino frowns as you relay the information. - * He pauses for a moment before speaking to you:

- * - * Jedah was once one of my most promising students, - * but her greed will be her downfall.

- * - * I will send one of my disciples to deal with her later. - * It is more important to get that sword back first.

- * - * I�m counting on you to find it. She would have kept it - * close to her. Take the White Teleporter, located in my - * backyard, and check inside boxes and chests around the - * treasure room of the inn and return it to me when you - * find it.

- * - * Be very careful. Jedah was an expert with traps and no - * doubt she�s protecting the sword with them.

- * - * If you find a trap, try timing it and you may be able - * to avoid damage.

- * - * I�ve provided you with several heal potions in case you - * become injured.

- * - * In the bag you will also find more clothing appropriate - * to your new found profession.

- * - * Please return the sword to me. I implore you not to take - * anything else that may be hidden in the Inn.

- * - * Thank you. - */ - return 1063199; - } - } + public override object Message => 1063199; public SearchForSwordConversation() { @@ -409,19 +159,7 @@ namespace Server.Engines.Quests.Ninja public class HallwayWalkConversation : QuestConversation { - public override object Message - { - get - { - /* A narrow hallway greets the teleporter. - * The enclosed space is the perfect setting - * for dangerous traps. Walk through the - * hallway being careful to avoid the traps. - * You may be able to time the traps to avoid injury. - */ - return 1063201; - } - } + public override object Message => 1063201; public HallwayWalkConversation() { @@ -435,20 +173,7 @@ namespace Server.Engines.Quests.Ninja public class ReturnSwordConversation : QuestConversation { - public override object Message - { - get - { - /* The lid of the chest refuses to budge at first, - * but slowly you are able to pry the lid open.

- * - * Inside lies the sword you have been in search of. - * You quickly take the sword and stash it in your backpack. - * Bring the sword back to Daimyo Emino. - */ - return 1063203; - } - } + public override object Message => 1063203; public ReturnSwordConversation() { @@ -462,20 +187,7 @@ namespace Server.Engines.Quests.Ninja public class SlayHenchmenConversation : QuestConversation { - public override object Message - { - get - { - /* Screams echo through the chamber as you walk - * away from the chest. Jedah�s Henchmen have - * become cognizant of your presence.

- * - * It is time for your Ninja Spirit to come alive. - * Slay 3 of the Henchmen before returning to Daimyo Emino. - */ - return 1063205; - } - } + public override object Message => 1063205; public SlayHenchmenConversation() { @@ -489,14 +201,7 @@ namespace Server.Engines.Quests.Ninja public class ContinueSlayHenchmenConversation : QuestConversation { - public override object Message - { - get - { - // Continue killing the henchmen! - return 1063208; - } - } + public override object Message => 1063208; public override bool Logged => false; @@ -507,17 +212,7 @@ namespace Server.Engines.Quests.Ninja public class GiveEminoSwordConversation : QuestConversation { - public override object Message - { - get - { - /* Go to Daimyo Emino. Go back through the chamber the way you came.

- * - * Give Daimyo Emino the sword when you've returned to his side. - */ - return 1063211; - } - } + public override object Message => 1063211; public GiveEminoSwordConversation() { @@ -531,14 +226,7 @@ namespace Server.Engines.Quests.Ninja public class LostSwordConversation : QuestConversation { - public override object Message - { - get - { - // What? You have returned without the sword? You need to go back and get it again! - return 1063212; - } - } + public override object Message => 1063212; public override bool Logged => false; @@ -549,23 +237,7 @@ namespace Server.Engines.Quests.Ninja public class EarnGiftsConversation : QuestConversation { - public override object Message - { - get - { - /* Beyond this path lies Zento City, your future home. - * To the right of the cave entrance you will find a luminous oval - * object known as a Moongate, step through it and you'll - * find yourself in Zento.

- * - * You may want to visit Ansella Gryen when you arrive.

- * - * Please accept the gifts I have placed in your pack. You - * have earned them. Farewell for now. - */ - return 1063216; - } - } + public override object Message => 1063216; public EarnGiftsConversation() { @@ -579,19 +251,7 @@ namespace Server.Engines.Quests.Ninja public class EarnLessGiftsConversation : QuestConversation { - public override object Message - { - get - { - /* You have earned these gifts for returning the sword. - * For that I thank you.

- * - * However, your reward has been lessened by your greed - * in the treasure room. Do not think I did not notice your full pockets. - */ - return 1063217; - } - } + public override object Message => 1063217; public EarnLessGiftsConversation() { diff --git a/Scripts/Engines/Quests/Emino's Undertaking/EminosUndertakingQuest.cs b/Scripts/Engines/Quests/Emino's Undertaking/EminosUndertakingQuest.cs index 0fc786f58..b7e912a05 100644 --- a/Scripts/Engines/Quests/Emino's Undertaking/EminosUndertakingQuest.cs +++ b/Scripts/Engines/Quests/Emino's Undertaking/EminosUndertakingQuest.cs @@ -44,23 +44,9 @@ namespace Server.Engines.Quests.Ninja public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // Emino's Undertaking - return 1063173; - } - } + public override object Name => 1063173; - public override object OfferMessage - { - get - { - // Your value as a Ninja must be proven. Find Daimyo Emino and accept the test he offers. - return 1063174; - } - } + public override object OfferMessage => 1063174; public override TimeSpan RestartDelay => TimeSpan.MaxValue; public override bool IsTutorial => true; diff --git a/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Emino.cs b/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Emino.cs index d2436eb73..5f6ad78d9 100644 --- a/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Emino.cs +++ b/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Emino.cs @@ -46,7 +46,7 @@ namespace Server.Engines.Quests.Ninja return 2; } - public override int TalkNumber{ get { return -1; } } + public override int TalkNumber => -1; public override void OnTalk( PlayerMobile player, bool contextMenu ) { diff --git a/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs b/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs index 76a07cb85..a49b20ece 100644 --- a/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs +++ b/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs @@ -15,7 +15,9 @@ namespace Server.Engines.Quests.Ninja private int m_Message; [CommandProperty( AccessLevel.GameMaster )] - public int Message{ get{ return m_Message; } set{ m_Message = value; } } + public int Message{ get => m_Message; + set => m_Message = value; + } [Constructible] public HiddenFigure() diff --git a/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Zoel.cs b/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Zoel.cs index 2b376ed83..ca2751a70 100644 --- a/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Zoel.cs +++ b/Scripts/Engines/Quests/Emino's Undertaking/Mobiles/Zoel.cs @@ -40,7 +40,7 @@ namespace Server.Engines.Quests.Ninja AddItem( tekagi ); } - public override int TalkNumber{ get { return -1; } } + public override int TalkNumber => -1; public override int GetAutoTalkRange( PlayerMobile pm ) { diff --git a/Scripts/Engines/Quests/Emino's Undertaking/Objectives.cs b/Scripts/Engines/Quests/Emino's Undertaking/Objectives.cs index 50fa85192..8215b5b37 100644 --- a/Scripts/Engines/Quests/Emino's Undertaking/Objectives.cs +++ b/Scripts/Engines/Quests/Emino's Undertaking/Objectives.cs @@ -5,14 +5,7 @@ namespace Server.Engines.Quests.Ninja { public class FindEminoBeginObjective : QuestObjective { - public override object Message - { - get - { - // Your value as a Ninja must be proven. Find Daimyo Emino and accept the test he offers. - return 1063174; - } - } + public override object Message => 1063174; public FindEminoBeginObjective() { @@ -26,14 +19,7 @@ namespace Server.Engines.Quests.Ninja public class FindZoelObjective : QuestObjective { - public override object Message - { - get - { - // Find Elite Ninja Zoel immediately! - return 1063176; - } - } + public override object Message => 1063176; public FindZoelObjective() { @@ -47,14 +33,7 @@ namespace Server.Engines.Quests.Ninja public class EnterCaveObjective : QuestObjective { - public override object Message - { - get - { - // Enter the cave and walk through it. You will be tested as you travel along the path. - return 1063179; - } - } + public override object Message => 1063179; public EnterCaveObjective() { @@ -78,18 +57,11 @@ namespace Server.Engines.Quests.Ninja public bool TaughtHowToUseSkills { - get{ return m_TaughtHowToUseSkills; } - set{ m_TaughtHowToUseSkills = value; } + get => m_TaughtHowToUseSkills; + set => m_TaughtHowToUseSkills = value; } - public override object Message - { - get - { - // Use your Ninja training to move invisibly past the magical guardians. - return 1063261; - } - } + public override object Message => 1063261; public SneakPastGuardiansObjective() { @@ -123,16 +95,7 @@ namespace Server.Engines.Quests.Ninja public class UseTeleporterObjective : QuestObjective { - public override object Message - { - get - { - /* The special tile is known as a teleporter. - * Step on the teleporter tile and you will be transported to a new location. - */ - return 1063183; - } - } + public override object Message => 1063183; public UseTeleporterObjective() { @@ -146,17 +109,7 @@ namespace Server.Engines.Quests.Ninja public class GiveZoelNoteObjective : QuestObjective { - public override object Message - { - get - { - /* Bring the note to Elite Ninja Zoel and speak with him again. - * He is near the cave entrance. You can hand the note to Zoel - * by dragging it and dropping it on his body. - */ - return 1063185; - } - } + public override object Message => 1063185; public GiveZoelNoteObjective() { @@ -170,17 +123,7 @@ namespace Server.Engines.Quests.Ninja public class GainInnInformationObjective : QuestObjective { - public override object Message - { - get - { - /* Take the Blue Teleporter Tile from Daimyo Emino's - * house to the Abandoned Inn. Quietly look around - * to gain information. - */ - return 1063190; - } - } + public override object Message => 1063190; public GainInnInformationObjective() { @@ -202,14 +145,7 @@ namespace Server.Engines.Quests.Ninja public class ReturnFromInnObjective : QuestObjective { - public override object Message - { - get - { - // Go back through the blue teleporter and tell Daimyo Emino what you�ve overheard. - return 1063197; - } - } + public override object Message => 1063197; public ReturnFromInnObjective() { @@ -223,18 +159,7 @@ namespace Server.Engines.Quests.Ninja public class SearchForSwordObjective : QuestObjective { - public override object Message - { - get - { - /* Take the white teleporter and check the chests for the sword. - * Leave everything else behind. Avoid damage from traps you may - * encounter. To use a potion, make sure at least one hand is - * free and double click on the bottle. - */ - return 1063200; - } - } + public override object Message => 1063200; public SearchForSwordObjective() { @@ -252,21 +177,11 @@ namespace Server.Engines.Quests.Ninja public bool StolenTreasure { - get{ return m_StolenTreasure; } - set{ m_StolenTreasure = value; } + get => m_StolenTreasure; + set => m_StolenTreasure = value; } - public override object Message - { - get - { - /* Walk through the hallway being careful - * to avoid the traps. You may be able to - * time the traps to avoid injury. - */ - return 1063202; - } - } + public override object Message => 1063202; public HallwayWalkObjective() { @@ -294,14 +209,7 @@ namespace Server.Engines.Quests.Ninja public class ReturnSwordObjective : QuestObjective { - public override object Message - { - get - { - // Take the sword and bring it back to Daimyo Emino. - return 1063204; - } - } + public override object Message => 1063204; public ReturnSwordObjective() { @@ -323,14 +231,7 @@ namespace Server.Engines.Quests.Ninja public class SlayHenchmenObjective : QuestObjective { - public override object Message - { - get - { - // Kill three henchmen. - return 1063206; - } - } + public override object Message => 1063206; public SlayHenchmenObjective() { @@ -368,17 +269,7 @@ namespace Server.Engines.Quests.Ninja public class GiveEminoSwordObjective : QuestObjective { - public override object Message - { - get - { - /* You have proven your fighting skills. Bring the Sword to - * Daimyo Emino immediately. Be sure to follow the - * path back to the teleporter. - */ - return 1063210; - } - } + public override object Message => 1063210; public GiveEminoSwordObjective() { diff --git a/Scripts/Engines/Quests/Haochi's Trials/Conversations.cs b/Scripts/Engines/Quests/Haochi's Trials/Conversations.cs index 41c0661f3..65390414a 100644 --- a/Scripts/Engines/Quests/Haochi's Trials/Conversations.cs +++ b/Scripts/Engines/Quests/Haochi's Trials/Conversations.cs @@ -2,35 +2,7 @@ namespace Server.Engines.Quests.Samurai { public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Important Quest Information

- * - * During your quest, any important information that a - * NPC gives you, will appear in a window - * such as this one. You can review the information at any time during your - * quest.

- * - * Getting Help

- * - * Some of the text you will come across during your quest, - * will be underlined links to the codex of wisdom, - * or online help system. You can click on the text to get detailed information - * on the underlined subject. You may also access the Codex Of Wisdom by - * pressing "F1" or by clicking on the "?" on the toolbar at the top of - * your screen.

Context Menus

- * - * Context menus can be called up by single left-clicking (or Shift + single - * left-click, if you changed it) on most objects or NPCs in the world. - * Nearly everything, including your own avatar will have context menus available. - * Bringing up your avatar's context menu will give you options to cancel your quest - * and review various quest information.

- */ - return 1049092; - } - } + public override object Message => 1049092; public AcceptConversation() { @@ -44,23 +16,7 @@ namespace Server.Engines.Quests.Samurai public class RadarConversation : QuestConversation { - public override object Message - { - get - { - /* To view the surrounding area, you should learn about the Radar Map.

- * - * The Radar Map (or Overhead View) can be opened by pressing 'ALT-R' - * on your keyboard. It shows your immediate surroundings from a - * bird's eye view.

- * - * Pressing ALT-R twice, will enlarge the Radar Map a little. - * Use the Radar Map often as you travel throughout the world - * to familiarize yourself with your surroundings. - * */ - return 1063033; - } - } + public override object Message => 1063033; public override bool Logged => false; @@ -71,36 +27,7 @@ namespace Server.Engines.Quests.Samurai public class FirstTrialIntroConversation : QuestConversation { - public override object Message - { - get - { - /* Greetings. I am Daimyo Haochi, the Feudal Lord of this region.

- * - * Since you are here at my side, you must wish to learn the ways of the Samurai.

- * - * Wielding a blade is easy, anyone can grasp a sword�s hilt. Learning how to - * fight properly and skillfully is to become an Armsman.

- * - * Learning how to master weapons, and even more importantly when not to use - * them, is the Way of the Warrior. The Way of the Samurai. The Code of the - * Bushido. That is why you are here.

- * - * You will go through 7 trials to prove your adherence to the Samurai code.

- * - * The first trial will test your decision making skills. You only have to enter - * the area beyond the green passageway.

- * - * Do not attempt to hurry your trials. The guards will only let you through - * to each trial when I have deemed you ready.

- * - * As a last resort you may use the golden teleporter tiles in each trial area - * but do so at your own risk. You may not be able to return and complete your - * trials once you have chosen to escape. - */ - return 1063029; - } - } + public override object Message => 1063029; public FirstTrialIntroConversation() { @@ -114,32 +41,7 @@ namespace Server.Engines.Quests.Samurai public class FirstTrialKillConversation : QuestConversation { - public override object Message - { - get - { - /* Beyond you are two troubled groups.

- * - * The Cursed Souls were once proud warriors that were ensorcelled - * by an evil mage. The mage trapped and killed them later but the spell - * has not lifted from their souls in death.

- * - * The Young Ronin were former Samurai in training who lost their way. - * They are loyal only to those with enough coin in their pocket.

- * - * You must decide who needs to be fought to the death. You may wish to - * review combat techniques as well as - * information on healing yourself.

- * - * Return to Daimyo Haochi after you have finished with your trial.

- * - * If you should die during any of your trials, visit one of the Ankh Shrines - * and you will be resurrected. You should retrieve your belongings from your - * body before returning to the Daimyo or you may not be able to return to your corpse. - */ - return 1063031; - } - } + public override object Message => 1063031; public FirstTrialKillConversation() { @@ -265,23 +167,7 @@ namespace Server.Engines.Quests.Samurai public class SecondTrialAttackConversation : QuestConversation { - public override object Message - { - get - { - /* Beyond the guards is a test of courage. You must face your fear and attack a - * great beast. You must choose which beast to slay for there is more than - * one beyond the courtyard doors.

- * - * The imp entered the courtyard unaware of its surroundings. The dragon came - * knowingly, hunting for the flesh of humans � A feast for the beast.

- * - * You must rid the courtyard of these beasts but you may only choose one to - * attack. Go and choose wisely. - */ - return 1063057; - } - } + public override object Message => 1063057; public SecondTrialAttackConversation() { @@ -369,19 +255,7 @@ namespace Server.Engines.Quests.Samurai public class ThirdTrialKillConversation : QuestConversation { - public override object Message - { - get - { - /* A pack of wolves circle your feet. They have been injured and are in pain. - * A quick death will end their suffering.

- * - * Use your Honorable Execution skill or other means to finish off a wounded wolf. - * Do so and return to Daimyo Haochi. - */ - return 1063062; - } - } + public override object Message => 1063062; public ThirdTrialKillConversation() { @@ -395,24 +269,7 @@ namespace Server.Engines.Quests.Samurai public class FourthTrialIntroConversation : QuestConversation { - public override object Message - { - get - { - /* Daimyo Haochi smiles as you walk up to him. Quietly he says:

- * - * A Samurai understands the need to help others even as he wields a blade against - * them.

- * - * You have shown compassion. A true Samurai is benevolent even to an enemy. - * For this you have been rewarded.

- * - * And now you must prove yourself again. Walk the red path. - * We will talk again later. - */ - return 1063065; - } - } + public override object Message => 1063065; public FourthTrialIntroConversation() { @@ -426,27 +283,7 @@ namespace Server.Engines.Quests.Samurai public class FourthTrialCatsConversation : QuestConversation { - public override object Message - { - get - { - /* You approach a disheveled gypsy standing near a small shed. - * You sense that she has not eaten nor bathed in quite some time.

- * - * Around her is a large colony of mangy and diseased cats. It appears - * she has spent what little money she�s earned to feed the cats instead - * of herself.

- * - * You have a decision to make. You can give her gold so she can buy some - * food for her animals and herself. You can also remove the necessity - * of the extra mouths to feed so she may concentrate on saving herself.


- * - * If you elect to give the gypsy money, you can do so by clicking your stack - * of gold and selecting �1�. Then dragging it and dropping it on the Gypsy. - */ - return 1063067; - } - } + public override object Message => 1063067; public FourthTrialCatsConversation() { @@ -531,21 +368,7 @@ namespace Server.Engines.Quests.Samurai public class FifthTrialReturnConversation : QuestConversation { - public override object Message - { - get - { - /* The guards let you through without question, and pay you no mind as - * you walk into the Daimyo's treasure cache. A vast fortune in gold, - * gemstones, and jewelry is stored here! Surely, the Daimyo wouldn't - * miss a single small item...

- * - * You spot the sword quickly amongst the cache of gemstones and other valuables. - * In one quick motion you retrieve it and stash it in your pack.
- */ - return 1063248; - } - } + public override object Message => 1063248; public FifthTrialReturnConversation() { @@ -559,14 +382,7 @@ namespace Server.Engines.Quests.Samurai public class LostSwordConversation : QuestConversation { - public override object Message - { - get - { - // What? You have returned without the sword? Go back and look for it again. - return 1063074; - } - } + public override object Message => 1063074; public override bool Logged => false; @@ -644,22 +460,7 @@ namespace Server.Engines.Quests.Samurai public class SeventhTrialIntroConversation : QuestConversation { - public override object Message - { - get - { - /* You have done well young Samurai. There is but one thing left to do.

- * - * In the final room is the holding cell containing young Ninjas who came to - * take my life. They were caught and placed in my custody.

- * - * Take care of these miscreants and show them where your loyalty lies.

- * - * This is your final act as a Samurai in training. - */ - return 1063079; - } - } + public override object Message => 1063079; public SeventhTrialIntroConversation() { @@ -673,28 +474,7 @@ namespace Server.Engines.Quests.Samurai public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* You have proven yourself young one. You will continue to improve as your skills - * are honed with age.

- * - * Now it is time for you to explore the lands. Beyond this path lies Zento - * City, your future home. On these grounds you will find a golden oval object - * known as a Moongate, step through it and you'll find yourself in Zento.

- * - * You may want to visit Ansella Gryen when you arrive.

- * - * You have learned the ways. You are an honorable warrior, a Samurai in - * the highest regards.

- * - * Please accept the gifts I have placed in your pack. You have earned them. - * Farewell for now. - */ - return 1063125; - } - } + public override object Message => 1063125; public EndConversation() { diff --git a/Scripts/Engines/Quests/Haochi's Trials/HaochisTrialsQuest.cs b/Scripts/Engines/Quests/Haochi's Trials/HaochisTrialsQuest.cs index 3458719f3..f891df7b1 100644 --- a/Scripts/Engines/Quests/Haochi's Trials/HaochisTrialsQuest.cs +++ b/Scripts/Engines/Quests/Haochi's Trials/HaochisTrialsQuest.cs @@ -47,34 +47,9 @@ namespace Server.Engines.Quests.Samurai public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // Haochi's Trials - return 1063022; - } - } + public override object Name => 1063022; - public override object OfferMessage - { - get - { - /* As you enter the courtyard you notice a faded sign. - * It reads:

- * - * Welcome to your new home, Samurai.

- * - * Though your skills are only a shadow of what they can be some day, - * you must prove your adherence to the code of the Bushido.

- * - * Seek Daimyo Haochi for guidance.

- * - * Will you accept the challenge? - */ - return 1063023; - } - } + public override object OfferMessage => 1063023; public override TimeSpan RestartDelay => TimeSpan.MaxValue; public override bool IsTutorial => true; diff --git a/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Haochi.cs b/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Haochi.cs index c417cab3b..38618c1da 100644 --- a/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Haochi.cs +++ b/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Haochi.cs @@ -42,7 +42,7 @@ namespace Server.Engines.Quests.Samurai return 2; } - public override int TalkNumber{ get { return -1; } } + public override int TalkNumber => -1; public override void OnTalk( PlayerMobile player, bool contextMenu ) { diff --git a/Scripts/Engines/Quests/Haochi's Trials/Mobiles/HaochisGuardsman.cs b/Scripts/Engines/Quests/Haochi's Trials/Mobiles/HaochisGuardsman.cs index 151d9a4a8..31c959cb0 100644 --- a/Scripts/Engines/Quests/Haochi's Trials/Mobiles/HaochisGuardsman.cs +++ b/Scripts/Engines/Quests/Haochi's Trials/Mobiles/HaochisGuardsman.cs @@ -55,7 +55,7 @@ namespace Server.Engines.Quests.Samurai AddItem( weapon ); } - public override int TalkNumber{ get { return -1; } } + public override int TalkNumber => -1; public override void OnTalk( PlayerMobile player, bool contextMenu ) { diff --git a/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Relnia.cs b/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Relnia.cs index 24077c3d2..8c5323487 100644 --- a/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Relnia.cs +++ b/Scripts/Engines/Quests/Haochi's Trials/Mobiles/Relnia.cs @@ -33,7 +33,7 @@ namespace Server.Engines.Quests.Samurai AddItem( new Skirt( 0x544 ) ); } - public override int TalkNumber{ get { return -1; } } + public override int TalkNumber => -1; public override void OnTalk( PlayerMobile player, bool contextMenu ) { diff --git a/Scripts/Engines/Quests/Haochi's Trials/Objectives.cs b/Scripts/Engines/Quests/Haochi's Trials/Objectives.cs index 47952f00f..6a683e744 100644 --- a/Scripts/Engines/Quests/Haochi's Trials/Objectives.cs +++ b/Scripts/Engines/Quests/Haochi's Trials/Objectives.cs @@ -6,14 +6,7 @@ namespace Server.Engines.Quests.Samurai { public class FindHaochiObjective : QuestObjective { - public override object Message - { - get - { - // Speak to Daimyo Haochi. - return 1063026; - } - } + public override object Message => 1063026; public FindHaochiObjective() { @@ -27,14 +20,7 @@ namespace Server.Engines.Quests.Samurai public class FirstTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - // Follow the green path. The guards will now let you through. - return 1063030; - } - } + public override object Message => 1063030; public FirstTrialIntroObjective() { @@ -48,14 +34,7 @@ namespace Server.Engines.Quests.Samurai public class FirstTrialKillObjective : QuestObjective { - public override object Message - { - get - { - // Kill 3 Young Ronin or 3 Cursed Souls. Return to Daimyo Haochi when you have finished. - return 1063032; - } - } + public override object Message => 1063032; public FirstTrialKillObjective() { @@ -116,14 +95,7 @@ namespace Server.Engines.Quests.Samurai public class FirstTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // The first trial is complete. Return to Daimyo Haochi. - return 1063044; - } - } + public override object Message => 1063044; bool m_CursedSoul; @@ -158,14 +130,7 @@ namespace Server.Engines.Quests.Samurai public class SecondTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - // Follow the yellow path. The guards will now let you through. - return 1063047; - } - } + public override object Message => 1063047; public SecondTrialIntroObjective() { @@ -179,14 +144,7 @@ namespace Server.Engines.Quests.Samurai public class SecondTrialAttackObjective : QuestObjective { - public override object Message - { - get - { - // Choose your opponent and attack one with all your skill. - return 1063058; - } - } + public override object Message => 1063058; public SecondTrialAttackObjective() { @@ -195,18 +153,11 @@ namespace Server.Engines.Quests.Samurai public class SecondTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // The second trial is complete. Return to Daimyo Haochi. - return 1063229; - } - } + public override object Message => 1063229; private bool m_Dragon; - public bool Dragon{ get{ return m_Dragon; } } + public bool Dragon => m_Dragon; public SecondTrialReturnObjective( bool dragon ) { @@ -239,16 +190,7 @@ namespace Server.Engines.Quests.Samurai public class ThirdTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - /* The next trial will test your benevolence. Follow the blue path. - * The guards will now let you through. - */ - return 1063061; - } - } + public override object Message => 1063061; public ThirdTrialIntroObjective() { @@ -262,17 +204,7 @@ namespace Server.Engines.Quests.Samurai public class ThirdTrialKillObjective : QuestObjective { - public override object Message - { - get - { - /* Use your Honorable Execution skill to finish off the wounded wolf. - * Double click the icon in your Book of Bushido to activate the skill. - * When you are done, return to Daimyo Haochi. - */ - return 1063063; - } - } + public override object Message => 1063063; public ThirdTrialKillObjective() { @@ -292,14 +224,7 @@ namespace Server.Engines.Quests.Samurai public class ThirdTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // Return to Daimyo Haochi. - return 1063064; - } - } + public override object Message => 1063064; public ThirdTrialReturnObjective() { @@ -313,14 +238,7 @@ namespace Server.Engines.Quests.Samurai public class FourthTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - // Follow the red path and pass through the guards to the entrance of the fourth trial. - return 1063066; - } - } + public override object Message => 1063066; public FourthTrialIntroObjective() { @@ -334,16 +252,7 @@ namespace Server.Engines.Quests.Samurai public class FourthTrialCatsObjective : QuestObjective { - public override object Message - { - get - { - /* Give the gypsy gold or hunt one of the cats to eliminate the undue - * need it has placed on the gypsy. - */ - return 1063068; - } - } + public override object Message => 1063068; public FourthTrialCatsObjective() { @@ -361,18 +270,11 @@ namespace Server.Engines.Quests.Samurai public class FourthTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // You have made your choice. Return now to Daimyo Haochi. - return 1063242; - } - } + public override object Message => 1063242; private bool m_KilledCat; - public bool KilledCat{ get{ return m_KilledCat; } } + public bool KilledCat => m_KilledCat; public FourthTrialReturnObjective( bool killedCat ) { @@ -405,18 +307,13 @@ namespace Server.Engines.Quests.Samurai public class FifthTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - // Retrieve Daimyo Haochi�s katana from the treasure room. - return 1063072; - } - } + public override object Message => 1063072; private bool m_StolenTreasure; - public bool StolenTreasure{ get{ return m_StolenTreasure; } set{ m_StolenTreasure = value; } } + public bool StolenTreasure{ get => m_StolenTreasure; + set => m_StolenTreasure = value; + } public FifthTrialIntroObjective() { @@ -444,14 +341,7 @@ namespace Server.Engines.Quests.Samurai public class FifthTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // Give the sword to Daimyo Haochi. - return 1063073; - } - } + public override object Message => 1063073; public FifthTrialReturnObjective() { @@ -460,14 +350,7 @@ namespace Server.Engines.Quests.Samurai public class SixthTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - // Light one of the candles near the altar and return to Daimyo Haochi. - return 1063078; - } - } + public override object Message => 1063078; public SixthTrialIntroObjective() { @@ -481,14 +364,7 @@ namespace Server.Engines.Quests.Samurai public class SixthTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // You have done as requested. Return to Daimyo Haochi. - return 1063252; - } - } + public override object Message => 1063252; public SixthTrialReturnObjective() { @@ -502,16 +378,7 @@ namespace Server.Engines.Quests.Samurai public class SeventhTrialIntroObjective : QuestObjective { - public override object Message - { - get - { - /* Three young Ninja must be dealt with. Your job is to kill them. - * When you have done so, return to Daimyo Haochi. - */ - return 1063080; - } - } + public override object Message => 1063080; public override int MaxProgress => 3; @@ -533,14 +400,7 @@ namespace Server.Engines.Quests.Samurai public class SeventhTrialReturnObjective : QuestObjective { - public override object Message - { - get - { - // The executions are complete. Return to the Daimyo. - return 1063253; - } - } + public override object Message => 1063253; public SeventhTrialReturnObjective() { diff --git a/Scripts/Engines/Quests/Solen Matriarch/Conversations.cs b/Scripts/Engines/Quests/Solen Matriarch/Conversations.cs index ee7723a02..4bd7ac206 100644 --- a/Scripts/Engines/Quests/Solen Matriarch/Conversations.cs +++ b/Scripts/Engines/Quests/Solen Matriarch/Conversations.cs @@ -62,20 +62,7 @@ namespace Server.Engines.Quests.Matriarch public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch looks pleased that you've accepted.

- * - * Very good. Please start by hunting some infiltrators from the other solen - * colony and eliminating them. Slay 7 of them and then return to me.

- * - * Farewell for now and good hunting. - */ - return 1054084; - } - } + public override object Message => 1054084; public AcceptConversation() { @@ -89,20 +76,7 @@ namespace Server.Engines.Quests.Matriarch public class DuringKillInfiltratorsConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch looks up as you approach.

- * - * You're back, but you have not yet eliminated 7 infiltrators from the enemy - * colony. Return when you have completed this task.

- * - * Carry on. I'll be waiting for your return. - */ - return 1054089; - } - } + public override object Message => 1054089; public override bool Logged => false; @@ -113,24 +87,7 @@ namespace Server.Engines.Quests.Matriarch public class GatherWaterConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch nods favorably as you approach her.

- * - * Marvelous! I'm impressed at your ability to hunt and kill enemies for me. - * My colony is thankful.

- * - * Now I must ask that you gather some water for me. A standard pitcher of water - * holds approximately one gallon. Please decant 8 gallons of fresh water - * into our water vats.

- * - * Farewell for now. - */ - return 1054091; - } - } + public override object Message => 1054091; public GatherWaterConversation() { @@ -144,20 +101,7 @@ namespace Server.Engines.Quests.Matriarch public class DuringWaterGatheringConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch looks up as you approach.

- * - * You're back, but you have not yet gathered 8 gallons of water. Return when - * you have completed this task.

- * - * Carry on. I'll be waiting for your return. - */ - return 1054094; - } - } + public override object Message => 1054094; public override bool Logged => false; @@ -241,19 +185,7 @@ namespace Server.Engines.Quests.Matriarch public class DuringFungiProcessConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch smiles as you greet her.

- * - * I will gladly process some zoogi fungus into powder of translocation for you. - * Two of the zoogi fungi are required for each measure of the powder. - * I will process up to 200 zoogi fungi into 100 measures of powder of translocation. - */ - return 1054099; - } - } + public override object Message => 1054099; public override bool Logged => false; @@ -264,20 +196,7 @@ namespace Server.Engines.Quests.Matriarch public class FullBackpackConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch looks at you with a smile.

- * - * While I'd like to finish conducting our business, it seems that you're a - * bit overloaded with equipment at the moment.

- * - * Perhaps you should free some room in your backpack before we proceed. - */ - return 1054102; - } - } + public override object Message => 1054102; private bool m_Logged; @@ -302,18 +221,7 @@ namespace Server.Engines.Quests.Matriarch public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* The Solen Matriarch smiles as you greet her.

- * - * Ah good, you've returned. I will conclude our business by giving you - * gold I owe you for aiding me. - */ - return 1054101; - } - } + public override object Message => 1054101; public EndConversation() { diff --git a/Scripts/Engines/Quests/Solen Matriarch/Objectives.cs b/Scripts/Engines/Quests/Solen Matriarch/Objectives.cs index 2ced0a44f..3a5f39508 100644 --- a/Scripts/Engines/Quests/Solen Matriarch/Objectives.cs +++ b/Scripts/Engines/Quests/Solen Matriarch/Objectives.cs @@ -5,14 +5,7 @@ namespace Server.Engines.Quests.Matriarch { public class KillInfiltratorsObjective : QuestObjective { - public override object Message - { - get - { - // Kill 7 black/red solen infiltrators. - return ((SolenMatriarchQuest)System).RedSolen ? 1054086 : 1054085; - } - } + public override object Message => ((SolenMatriarchQuest)System).RedSolen ? 1054086 : 1054085; public override int MaxProgress => 7; @@ -73,16 +66,7 @@ namespace Server.Engines.Quests.Matriarch public class ReturnAfterKillsObjective : QuestObjective { - public override object Message - { - get - { - /* You've completed your task of slaying solen infiltrators. Return to the - * Matriarch who gave you this task. - */ - return 1054090; - } - } + public override object Message => 1054090; public ReturnAfterKillsObjective() { @@ -96,14 +80,7 @@ namespace Server.Engines.Quests.Matriarch public class GatherWaterObjective : QuestObjective { - public override object Message - { - get - { - // Gather 8 gallons of water for the water vats of the solen ant lair. - return 1054092; - } - } + public override object Message => 1054092; public override int MaxProgress => 40; @@ -134,14 +111,7 @@ namespace Server.Engines.Quests.Matriarch public class ReturnAfterWaterObjective : QuestObjective { - public override object Message - { - get - { - // You've completed your task of gathering water. Return to the Matriarch who gave you this task. - return 1054095; - } - } + public override object Message => 1054095; public ReturnAfterWaterObjective() { @@ -165,14 +135,7 @@ namespace Server.Engines.Quests.Matriarch public class ProcessFungiObjective : QuestObjective { - public override object Message - { - get - { - // Give the Solen Matriarch a stack of zoogi fungus to process into powder of translocation. - return 1054098; - } - } + public override object Message => 1054098; public ProcessFungiObjective() { @@ -193,14 +156,7 @@ namespace Server.Engines.Quests.Matriarch public class GetRewardObjective : QuestObjective { - public override object Message - { - get - { - // Return to the solen matriarch for your reward. - return 1054149; - } - } + public override object Message => 1054149; public GetRewardObjective() { diff --git a/Scripts/Engines/Quests/Solen Matriarch/SolenMatriarchQuest.cs b/Scripts/Engines/Quests/Solen Matriarch/SolenMatriarchQuest.cs index 84760fc57..abbedb773 100644 --- a/Scripts/Engines/Quests/Solen Matriarch/SolenMatriarchQuest.cs +++ b/Scripts/Engines/Quests/Solen Matriarch/SolenMatriarchQuest.cs @@ -27,14 +27,7 @@ namespace Server.Engines.Quests.Matriarch public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // Solen Matriarch Quest - return 1054147; - } - } + public override object Name => 1054147; public override object OfferMessage { @@ -99,7 +92,7 @@ namespace Server.Engines.Quests.Matriarch private bool m_RedSolen; - public bool RedSolen{ get{ return m_RedSolen; } } + public bool RedSolen => m_RedSolen; public SolenMatriarchQuest( PlayerMobile from, bool redSolen ) : base( from ) { diff --git a/Scripts/Engines/Quests/Study of the Solen Hive/Conversations.cs b/Scripts/Engines/Quests/Study of the Solen Hive/Conversations.cs index 11325899b..e4ef8c891 100644 --- a/Scripts/Engines/Quests/Study of the Solen Hive/Conversations.cs +++ b/Scripts/Engines/Quests/Study of the Solen Hive/Conversations.cs @@ -2,24 +2,7 @@ namespace Server.Engines.Quests.Naturalist { public class DontOfferConversation : QuestConversation { - public override object Message - { - get - { - /* The Naturalist looks up from his scribbled notes.

- * - * Greetings!

- * - * If you're interested in helping out a scholar of some repute, I do have some - * work that I could use some assistance with.

- * - * You seem a little preoccupied with another task right now, however. Perhaps - * you should finish whatever it is that has your attention at the moment and - * return to me once you're done. - */ - return 1054052; - } - } + public override object Message => 1054052; public override bool Logged => false; @@ -30,23 +13,7 @@ namespace Server.Engines.Quests.Naturalist public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Ah! This is splendid news! Each time an assistant travels into the - * Solen Hive to gather information for me, I feel as if I am one step - * closer to some grand discovery. Though I felt the same way when I was - * certain that Terathans had the ability to change their shape to resemble - * various fruits and vegetables - a point on which I am certain further - * study of the beasts will prove correct.

- * - * In any case, I cannot thank you enough! Please return to me when you have - * studied all the Solen Egg Nests hidden within the Solen Hive. - */ - return 1054043; - } - } + public override object Message => 1054043; public AcceptConversation() { @@ -60,27 +27,7 @@ namespace Server.Engines.Quests.Naturalist public class NaturalistDuringStudyConversation : QuestConversation { - public override object Message - { - get - { - /* The Naturalist looks up from his notes with a frustrated look - * on his face.

- * - * Haven't you finished the task I appointed you yet? Gah! It's so - * difficult to find a good apprentice these days.

- * - * Remember, you must first find an entrance to the Solen Hive. Once inside, - * I need you to examine the Solen Egg Nests for me. When you have studied - * all four nests, you should have enough information to earn yourself a - * reward.

- * - * Now go on, away with you! I have piles of notes from other more helpful - * apprentices that I still need to study! - */ - return 1054049; - } - } + public override object Message => 1054049; public override bool Logged => false; @@ -91,34 +38,7 @@ namespace Server.Engines.Quests.Naturalist public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* The Naturalist looks up from his notes with a pleased expression - * on his face.

- * - * Ah! Thank you, my goodly apprentice! These notes you have gathered will - * no doubt assist me in my understanding of these fascinating Solen creatures.

- * - * Now, since you've done such a fine job, I feel that I should give you a little - * reward.

- * - * I have a botanist friend who has discovered a strange mutation in the plants - * she has grown. Through science and sorcery, she has managed to produce a mutant - * strain of colored seeds the like of which no gardener has laid eyes upon.

- * - * As a reward for your fine efforts, I present you with this strange rare seed. - * Which reminds me, I still need to compile my notes on Solen dietary habits. They - * are voracious seed eaters, those Solen Matriarchs!

- * - * In any case, I must get back to my notes now. I give you my thanks once more, - * and bid a good day to you my little apprentice! If you wish to help me out again, - * just say the word. - */ - return 1054050; - } - } + public override object Message => 1054050; public EndConversation() { @@ -132,39 +52,7 @@ namespace Server.Engines.Quests.Naturalist public class SpecialEndConversation : QuestConversation { - public override object Message - { - get - { - /* The Naturalist looks up from his notes with an ecstatic look upon - * his face.

- * - * Oh my! These notes you've brought me - they say you have information on the - * Secret Solen Egg Nest? I've heard many tales of this secret store of special - * Solen Eggs, but there are many missing gaps in my notes concerning it.

- * - * The notes you've made here will most certainly advance my understanding of - * this mysterious breed of creatures!

- * - * Considering the amazing effort you put into your work, I feel as if I should - * give you something extra special as a bonus. Hrmm...

- * - * I have a botanist friend who has discovered a strange mutation in the plants - * she has grown. Through science and sorcery, she has managed to produce a rare - * mutant strain of colored seeds the like of which no gardener has laid - * eyes upon.

- * - * I've given a few of her seeds out to various apprentices - but I usually keep - * her very rare stock all for myself. They're quite amazing looking! However, - * since you've done such a fine job for me, I'll present you with one of - * these rare fire-red seeds.

- * - * Once again, my thanks to you! Now I really must get back to studying these notes! - * Take care, my fine apprentice, and come back if you wish to help me further! - */ - return 1054051; - } - } + public override object Message => 1054051; public SpecialEndConversation() { @@ -178,20 +66,7 @@ namespace Server.Engines.Quests.Naturalist public class FullBackpackConversation : QuestConversation { - public override object Message - { - get - { - /* The Naturalist looks at you with a friendly expression.

- * - * I see you've returned with information for me. While I'd like to finish - * conducting our business, it seems that you're a bit overloaded with - * equipment at the moment. Perhaps you'd better free up some room before - * we get to discussing your reward. - */ - return 1054053; - } - } + public override object Message => 1054053; public override bool Logged => false; diff --git a/Scripts/Engines/Quests/Study of the Solen Hive/NestArea.cs b/Scripts/Engines/Quests/Study of the Solen Hive/NestArea.cs index aca90abb9..c1e450582 100644 --- a/Scripts/Engines/Quests/Study of the Solen Hive/NestArea.cs +++ b/Scripts/Engines/Quests/Study of the Solen Hive/NestArea.cs @@ -54,7 +54,7 @@ namespace Server.Engines.Quests.Naturalist private bool m_Special; private Rectangle2D[] m_Rects; - public bool Special{ get{ return m_Special; } } + public bool Special => m_Special; public int ID { diff --git a/Scripts/Engines/Quests/Study of the Solen Hive/Objectives.cs b/Scripts/Engines/Quests/Study of the Solen Hive/Objectives.cs index 5efef139e..2710dd27f 100644 --- a/Scripts/Engines/Quests/Study of the Solen Hive/Objectives.cs +++ b/Scripts/Engines/Quests/Study of the Solen Hive/Objectives.cs @@ -6,20 +6,7 @@ namespace Server.Engines.Quests.Naturalist { public class StudyNestsObjective : QuestObjective { - public override object Message - { - get - { - /* Find an entrance to the Solen Hive, and search within for the Solen - * Egg Nests. Each Nest must be studied for some time without a break in - * concentration in order to gather useful information.

- * - * Once you have completed your study of the Nests, return to the Naturalist - * who gave you this task. - */ - return 1054044; - } - } + public override object Message => 1054044; public override int MaxProgress => NestArea.NonSpecialCount; @@ -32,7 +19,7 @@ namespace Server.Engines.Quests.Naturalist private ArrayList m_StudiedNests; private bool m_StudiedSpecialNest; - public bool StudiedSpecialNest{ get{ return m_StudiedSpecialNest; } } + public bool StudiedSpecialNest => m_StudiedSpecialNest; public StudyNestsObjective() { @@ -174,16 +161,7 @@ namespace Server.Engines.Quests.Naturalist public class ReturnToNaturalistObjective : QuestObjective { - public override object Message - { - get - { - /* You have studied enough Solen Egg Nests to gather a fair amount of - * useful information. Return to the Naturalist who gave you this task. - */ - return 1054048; - } - } + public override object Message => 1054048; public ReturnToNaturalistObjective() { diff --git a/Scripts/Engines/Quests/Study of the Solen Hive/StudyOfSolenQuest.cs b/Scripts/Engines/Quests/Study of the Solen Hive/StudyOfSolenQuest.cs index bcc91a74d..c9b1de7b4 100644 --- a/Scripts/Engines/Quests/Study of the Solen Hive/StudyOfSolenQuest.cs +++ b/Scripts/Engines/Quests/Study of the Solen Hive/StudyOfSolenQuest.cs @@ -19,50 +19,9 @@ namespace Server.Engines.Quests.Naturalist public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // "Study of the Solen Hive" - return 1054041; - } - } + public override object Name => 1054041; - public override object OfferMessage - { - get - { - /* The Naturalist looks up from his notes, regarding you with a hopeful - * look in his eyes.

- * - * Um..yes..excuse me. I was wondering if you could offer me a bit of assistance. - * You see, I'm a naturalist of some repute - a gentleman and a scholar if you - * will - primarily interested in the study of insects and arachnids. While I've - * written a few interesting books on the marvelous Terathan race and their bizarre - * culture, now I've heard tales of a truly significant new discovery!

- * - * Apparently a race of ant-like creatures known as the Solen have appeared in - * our world, scuttling up from some previously hidden home. Can you believe it? - * Truly these are amazing times! To a scholar such as myself this is indeed - * an exciting opportunity.

- * - * That said, while I may be a genius of some reknown, sharp as a tack and quick - * with the quill, I'm afraid I'm not much of the adventuring type. Though I have - * gained assistance before, I still have many unanswered questions.

- * - * I am particularly interested in the Solen Egg Nests that are studiously - * protected by the Solen workers. If you would be so kind as to assist me, - * I would ask that you travel into the Solen Hive and inspect each of the - * Solen Egg Nests that reside within. You will have to spend some time examining - * each Nest before you have gathered enough information. Once you are done, - * report back to me and I will reward you as best as I can for your valiant - * efforts!

- * - * Will you accept my offer? - */ - return 1054042; - } - } + public override object OfferMessage => 1054042; public override TimeSpan RestartDelay => TimeSpan.Zero; public override bool IsTutorial => false; @@ -71,7 +30,7 @@ namespace Server.Engines.Quests.Naturalist private Naturalist m_Naturalist; - public Naturalist Naturalist{ get{ return m_Naturalist; } } + public Naturalist Naturalist => m_Naturalist; public StudyOfSolenQuest( PlayerMobile from, Naturalist naturalist ) : base( from ) { diff --git a/Scripts/Engines/Quests/Terrible Hatchlings/Conversations.cs b/Scripts/Engines/Quests/Terrible Hatchlings/Conversations.cs index 750f4fb47..ec6f993e1 100644 --- a/Scripts/Engines/Quests/Terrible Hatchlings/Conversations.cs +++ b/Scripts/Engines/Quests/Terrible Hatchlings/Conversations.cs @@ -2,35 +2,7 @@ namespace Server.Engines.Quests.Zento { public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Important Quest Information

- * - * During your quest, any important information that a - * NPC gives you, will appear in a window - * such as this one. You can review the information at any time during your - * quest.

- * - * Getting Help

- * - * Some of the text you will come across during your quest, - * will be underlined links to the codex of wisdom, - * or online help system. You can click on the text to get detailed information - * on the underlined subject. You may also access the Codex Of Wisdom by - * pressing "F1" or by clicking on the "?" on the toolbar at the top of - * your screen.

Context Menus

- * - * Context menus can be called up by single left-clicking (or Shift + single - * left-click, if you changed it) on most objects or NPCs in the world. - * Nearly everything, including your own avatar will have context menus available. - * Bringing up your avatar's context menu will give you options to cancel your quest - * and review various quest information.

- */ - return 1049092; - } - } + public override object Message => 1049092; public AcceptConversation() { @@ -44,14 +16,7 @@ namespace Server.Engines.Quests.Zento public class DirectionConversation : QuestConversation { - public override object Message - { - get - { - // The Deathwatch Beetle Hatchlings live in The Waste - the desert close to this city. - return 1063323; - } - } + public override object Message => 1063323; public override bool Logged => false; @@ -62,14 +27,7 @@ namespace Server.Engines.Quests.Zento public class TakeCareConversation : QuestConversation { - public override object Message - { - get - { - // I know you can take care of those nasty Deathwatch Beetle Hatchlings! No get to it! - return 1063324; - } - } + public override object Message => 1063324; public override bool Logged => false; @@ -80,19 +38,7 @@ namespace Server.Engines.Quests.Zento public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* Thank you for helping me get rid of these vile beasts! - * You have been rewarded for your good deeds. If you wish to - * help me in the future, visit me again.

- * - * Farewell. - */ - return 1063321; - } - } + public override object Message => 1063321; public EndConversation() { diff --git a/Scripts/Engines/Quests/Terrible Hatchlings/Objectives.cs b/Scripts/Engines/Quests/Terrible Hatchlings/Objectives.cs index 8c176e6f9..17f39546f 100644 --- a/Scripts/Engines/Quests/Terrible Hatchlings/Objectives.cs +++ b/Scripts/Engines/Quests/Terrible Hatchlings/Objectives.cs @@ -5,14 +5,7 @@ namespace Server.Engines.Quests.Zento { public class FirstKillObjective : QuestObjective { - public override object Message - { - get - { - // Kill 10 Deathwatch Beetle Hatchlings and return to Ansella Gryen. - return 1063316; - } - } + public override object Message => 1063316; public override void RenderProgress( BaseQuestGump gump ) { @@ -49,18 +42,7 @@ namespace Server.Engines.Quests.Zento public class SecondKillObjective : QuestObjective { - public override object Message - { - get - { - /* Great job! One less terrible hatchling in the Waste!

- * - * Once you've killed 10 of the Deathwatch Beetle Hatchlings, - * return to Ansella for your reward! - */ - return 1063320; - } - } + public override object Message => 1063320; public override void RenderProgress( BaseQuestGump gump ) { @@ -104,14 +86,7 @@ namespace Server.Engines.Quests.Zento public class ThirdKillObjective : QuestObjective { - public override object Message - { - get - { - // Continue killing Deathwatch Beetle Hatchlings. - return 1063319; - } - } + public override object Message => 1063319; public override void RenderProgress( BaseQuestGump gump ) { @@ -155,14 +130,7 @@ namespace Server.Engines.Quests.Zento public class ReturnObjective : QuestObjective { - public override object Message - { - get - { - // Return to Ansella Gryen for your reward. - return 1063313; - } - } + public override object Message => 1063313; public ReturnObjective() { diff --git a/Scripts/Engines/Quests/Terrible Hatchlings/TerribleHatchlingsQuest.cs b/Scripts/Engines/Quests/Terrible Hatchlings/TerribleHatchlingsQuest.cs index 5f1a96e24..56b543b36 100644 --- a/Scripts/Engines/Quests/Terrible Hatchlings/TerribleHatchlingsQuest.cs +++ b/Scripts/Engines/Quests/Terrible Hatchlings/TerribleHatchlingsQuest.cs @@ -19,30 +19,9 @@ namespace Server.Engines.Quests.Zento public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // Terrible Hatchlings - return 1063314; - } - } + public override object Name => 1063314; - public override object OfferMessage - { - get - { - /* The Deathwatch Beetle Hatchlings have trampled through my fields - * again, what a nuisance! Please help me get rid of the terrible - * hatchlings. If you kill 10 of them, you will be rewarded. - * The Deathwatch Beetle Hatchlings live in The Waste - - * the desert close to this city.

- * - * Will you accept this challenge? - */ - return 1063315; - } - } + public override object OfferMessage => 1063315; public override TimeSpan RestartDelay => TimeSpan.MaxValue; public override bool IsTutorial => true; diff --git a/Scripts/Engines/Quests/The Summoning/Conversations.cs b/Scripts/Engines/Quests/The Summoning/Conversations.cs index 00bd92430..cf7afd23e 100644 --- a/Scripts/Engines/Quests/The Summoning/Conversations.cs +++ b/Scripts/Engines/Quests/The Summoning/Conversations.cs @@ -4,24 +4,7 @@ namespace Server.Engines.Quests.Doom { public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* You have accepted Victoria's help. She requires 1000 Daemon - * bones to summon the devourer.

- * - * You may hand Victoria the bones as you collect them and she - * will keep count of how many you have brought her.

- * - * Daemon bones can be collected via various means throughout - * Dungeon Doom.

- * - * Good luck. - */ - return 1050027; - } - } + public override object Message => 1050027; public AcceptConversation() { @@ -35,17 +18,7 @@ namespace Server.Engines.Quests.Doom public class VanquishDaemonConversation : QuestConversation { - public override object Message - { - get - { - /* Well done brave soul. I shall summon the beast to the circle - * of stones just South-East of here. Take great care - the beast - * takes many forms. Now hurry... - */ - return 1050021; - } - } + public override object Message => 1050021; public VanquishDaemonConversation() { diff --git a/Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs b/Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs index 1b578fc2e..531bb2ac2 100644 --- a/Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs +++ b/Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs @@ -23,22 +23,22 @@ namespace Server.Engines.Quests.Doom [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public Chyloth Chyloth { - get{ return m_Chyloth; } - set{ m_Chyloth = value; } + get => m_Chyloth; + set => m_Chyloth = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public SkeletalDragon Dragon { - get{ return m_Dragon; } - set{ m_Dragon = value; } + get => m_Dragon; + set => m_Dragon = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public bool Summoning { - get{ return m_Summoning; } - set{ m_Summoning = value; } + get => m_Summoning; + set => m_Summoning = value; } public override void OnDoubleClick( Mobile from ) diff --git a/Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs b/Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs index 3698c473e..64990c03b 100644 --- a/Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs +++ b/Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs @@ -9,7 +9,7 @@ namespace Server.Engines.Quests.Doom public BoneDemon Daemon { - get{ return m_Daemon; } + get => m_Daemon; set { m_Daemon = value; diff --git a/Scripts/Engines/Quests/The Summoning/Mobiles/Chyloth.cs b/Scripts/Engines/Quests/The Summoning/Mobiles/Chyloth.cs index 3b66313da..a8db0538e 100644 --- a/Scripts/Engines/Quests/The Summoning/Mobiles/Chyloth.cs +++ b/Scripts/Engines/Quests/The Summoning/Mobiles/Chyloth.cs @@ -39,14 +39,14 @@ namespace Server.Engines.Quests.Doom public BellOfTheDead Bell { - get{ return m_Bell; } - set{ m_Bell = value; } + get => m_Bell; + set => m_Bell = value; } public Mobile AngryAt { - get{ return m_AngryAt; } - set{ m_AngryAt = value; } + get => m_AngryAt; + set => m_AngryAt = value; } public virtual void BeginGiveWarning() diff --git a/Scripts/Engines/Quests/The Summoning/Objectives.cs b/Scripts/Engines/Quests/The Summoning/Objectives.cs index 819674298..a63f72110 100644 --- a/Scripts/Engines/Quests/The Summoning/Objectives.cs +++ b/Scripts/Engines/Quests/The Summoning/Objectives.cs @@ -6,16 +6,7 @@ namespace Server.Engines.Quests.Doom { public class CollectBonesObjective : QuestObjective { - public override object Message - { - get - { - /* Find 1000 Daemon bones and hand them - * to Victoria as you find them. - */ - return 1050026; - } - } + public override object Message => 1050026; public override int MaxProgress => 1000; @@ -85,19 +76,11 @@ namespace Server.Engines.Quests.Doom public Corpse CorpseWithSkull { - get{ return m_CorpseWithSkull; } - set{ m_CorpseWithSkull = value; } + get => m_CorpseWithSkull; + set => m_CorpseWithSkull = value; } - public override object Message - { - get - { - /* Go forth and vanquish the devourer that has been summoned! - */ - return 1050037; - } - } + public override object Message => 1050037; public VanquishDaemonObjective( BoneDemon daemon ) { diff --git a/Scripts/Engines/Quests/The Summoning/TheSummoningQuest.cs b/Scripts/Engines/Quests/The Summoning/TheSummoningQuest.cs index e510b3c36..f9e9521d2 100644 --- a/Scripts/Engines/Quests/The Summoning/TheSummoningQuest.cs +++ b/Scripts/Engines/Quests/The Summoning/TheSummoningQuest.cs @@ -19,58 +19,17 @@ namespace Server.Engines.Quests.Doom private Victoria m_Victoria; private bool m_WaitForSummon; - public Victoria Victoria - { - get{ return m_Victoria; } - } + public Victoria Victoria => m_Victoria; public bool WaitForSummon { - get{ return m_WaitForSummon; } - set{ m_WaitForSummon = value; } + get => m_WaitForSummon; + set => m_WaitForSummon = value; } - public override object Name - { - get - { - // The Summoning - return 1050025; - } - } + public override object Name => 1050025; - public override object OfferMessage - { - get - { - /* Victoria turns to you and smiles...

- * - * Chyloth, eh? He is the ferry man of lake Mortis, beyond which lies - * the nest of the The Dark Father - the fountainhead of all the evil - * that you see around you here.

- * - * 800 and some years ago, my sisters and I persuaded the ferry man Chyloth - * to take us across the lake to battle the The Dark Father. - * My party was utterly destroyed, except for me. For my insolence, I was - * cursed by the The Dark Father to wander these halls for eternity, - * unable to die - unable to leave.

- * - * Chyloth usually only crosses over the souls of the undead, but he can be - * persuaded otherwise...with a token of gold, in the form of a human skull. - * Such a gem can be found only in the belly of the hellspawn known as - * the devourer.

- * - * I can help you summon the beast from the depths of the abyss, but I require - * 1000 Daemon bones to do so. If you accept my help, I will store the Daemon - * bones for you until you have collected all 1000 of them. Once the bones - * are collected in full, I will summon the beast for you, which you must - * slay to claim your prize.

- * - * Do you accept? - */ - return 1050020; - } - } + public override object OfferMessage => 1050020; public override bool IsTutorial => false; public override TimeSpan RestartDelay => TimeSpan.Zero; diff --git a/Scripts/Engines/Quests/Uzeraan Turmoil/Conversations.cs b/Scripts/Engines/Quests/Uzeraan Turmoil/Conversations.cs index 762f6cfac..55b79e6b1 100644 --- a/Scripts/Engines/Quests/Uzeraan Turmoil/Conversations.cs +++ b/Scripts/Engines/Quests/Uzeraan Turmoil/Conversations.cs @@ -2,38 +2,7 @@ namespace Server.Engines.Quests.Haven { public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Important Quest Information

- * - * During your quest, any important information that a - * NPC gives you, will appear - * in a window such as this one. You can review the information - * at any time during your quest.

- * - * Getting Help

- * - * Some of the text you will come across during your quest, - * will be underlined links to the codex of wisdom, - * or online help system. You can click on the text to get detailed - * information on the underlined subject. You may also access the - * Codex Of Wisdom by pressing "F1" or by clicking on the "?" on the toolbar - * at the top of your screen.

- * - * Context Menus

- * - * Context menus can be called up by single left-clicking - * (or Shift + single left-click, if you changed it) on most objects - * or NPCs in the world. Nearly everything, including your own avatar - * will have context menus available. Bringing up your avatar's - * context menu will give you options to cancel your quest and review - * various quest information.

- */ - return 1049092; - } - } + public override object Message => 1049092; public AcceptConversation() { @@ -47,53 +16,7 @@ namespace Server.Engines.Quests.Haven public class UzeraanTitheConversation : QuestConversation { - public override object Message - { - get - { - /* Uzeraan greets you as you approach...

- * - * Greetings traveler!

- * - * I am Uzeraan, the lord of this house and overseer of this fine city, Haven. - * I know we have just met, but time is short and we need to reinforce - * the troops in the mountain pass, so I will not waste your time - * with pleasantries.

- * - * We have been trying to fight back the wicked Horde Minions which - * have recently begun attacking our cities - but to no avail. - * We desperately need help!

- * - * Your first task will be to assess the situation in the mountain pass, - * and help our troops defeat the Horde Minions there.

- * - * Before I send you into battle however, it is time that I teach you a thing - * or two about the way of the Paladin.

- * - * The Paladin

- * - * Paladins are the holy warriors of the realm who have dedicated themselves - * as protectors of the virtues and vanquishers of all that is evil.

- * - * Paladins have several special abilities that - * are not available to the ordinary warrior. Due to the spiritual nature of - * these abilities, the Paladin requires some amount of mana to activate them. - * In addition to mana, the Paladin is also required to spend a certain amount - * of tithing points each time a special ability - * is used.

- * - * Tithing points and mana are automatically consumed when a special Paladin - * ability is activated. All Paladin abilities are activated through the - * Book of Chivalry

- * - * Go now, to the shrine just East of here, just before the doors and - * tithe at least 500 gold.

- * - * Return here when you are done. - */ - return 1060209; - } - } + public override object Message => 1060209; public UzeraanTitheConversation() { @@ -387,46 +310,7 @@ namespace Server.Engines.Quests.Haven public class UzeraanScrollOfPowerConversation : QuestConversation { - public override object Message - { - get - { - /* Uzeraan carefully unravels the scroll and begins to read... - * after a short while his face lights up with a smile and he speaks to you...

- * - * This is wonderful, friend! For your troubles I've given you a treasure map - * I had laying about, along with a shovel to dig up the treasure. - * Feel free to find the treasure at your leisure.

- * - * Now let us get back to the business of this scroll. The only trouble, - * is that this scroll calls for some special ingredients that I do - * not have on hand.

- * - * Though it may involve some danger, I will ask of you to find - * these reagents for me.

- * - * There are three reagents I need to complete the spell.

- * - * The first thing I need is some Fertile Dirt.

- * - * There lives a Dryad on this island who I know would have such a thing on hand. - * I have recalibrated the teleporter to transport you to the Dryad's grove, - * which lies South-West of this mansion.

- * - * Tell her Uzeraan sent you, and she should cooperate.

- * - * Should you get into trouble out there or should you lose your way, do not worry. - * I have also given you a magical horn - a Horn of Retreat. - * Play the horn at any time to open a magical gateway that leads back to this mansion.

- * - * Should your horn run out of charges, - * simply hand me or any of my mansion guards the horn to have it recharged.

- * - * Good luck friend. - */ - return 1049325; - } - } + public override object Message => 1049325; private static QuestItemInfo[] m_Info = new QuestItemInfo[] { @@ -449,27 +333,7 @@ namespace Server.Engines.Quests.Haven public class DryadConversation : QuestConversation { - public override object Message - { - get - { - /* The Dryad watches hungrily as you approach, giving you an - * uneasy feeling in the pit of your stomach. You explain that - * Uzeraan has sent you for a quantity of fertile dirt. With a wide grin - * and in a slightly hoarse voice she replies...

- * - * Fertile Dirt, eh? Well, I have a few patches here...but what have - * you brought me in return? Came empty-handed did you? That's unfortunate - * indeed... but since you were sent by my dear friend Uzeraan, I supposed - * I could oblige you.

- * - * The Dryad digs around in the ground and hands you a patch of Fertile Dirt.

- * - * With a smile she goes back to her work...
- */ - return 1049326; - } - } + public override object Message => 1049326; public DryadConversation() { @@ -639,34 +503,7 @@ namespace Server.Engines.Quests.Haven public class UzeraanDaemonBoneConversation : QuestConversation { - public override object Message - { - get - { - /* As you hand Uzeraan the final reagent, he nods at you with approval - * and starts searching through the pockets of his robe...

- * - * After a short while he hands you a small pouch...


- * - * There you are. Your contract of employment with me has expired and so here - * is your pay. 2000 gold in the form of a check and a magical sextant that - * will help you find Moongates and Banks.

- * - * Before you can actually spend the money I have given you, however, you must - * cash the check.

- * - * I have recalibrated the teleporter to take you to the Haven - * Bank. Step onto the teleporter to be taken - * to the bank, which lies South-East of here.

- * - * Thank you for all your help friend. I hope we shall meet - * each other again in the future.

- * - * Farewell. - */ - return 1049335; - } - } + public override object Message => 1049335; public UzeraanDaemonBoneConversation() { @@ -680,30 +517,7 @@ namespace Server.Engines.Quests.Haven public class BankerConversation : QuestConversation { - public override object Message - { - get - { - /* The banker smiles at you and greets you in a loud and robust voice...

- * - * Well hello there adventurer! I see you've learned how to cash checks. Wonderful! - * Let me tell you a bit about the banks in this world...

- * - * Anything that you place into any bank box, can be retrieved from any other - * bank box in the land. For instance, if you place an item into a bank box in - * Britain, it can be retrieved from your bank box in Moonglow or any other city.

- * - * Bank boxes are very secure. So secure, in fact, that no one can ever get into - * your bank box except for yourself. Security is hard to come by these days, - * but you can trust in the banking system of Britannia! We shall not let you down!

- * - * I hope to be seeing much more of you as your riches grow! May your bank box overflow - * with the spoils of your adventures.

Farewell adventurer, you are now free to - * explore the world on your own. - */ - return 1060137; - } - } + public override object Message => 1060137; public BankerConversation() { @@ -717,21 +531,7 @@ namespace Server.Engines.Quests.Haven public class RadarConversation : QuestConversation { - public override object Message - { - get - { - /* If you are leaving the mansion, you should learn about the Radar Map.

- * - * The Radar Map (or Overhead View) can be opened by pressing 'ALT-R' on your - * keyboard. It shows your immediate surroundings from a bird's eye view.

- * - * Pressing ALT-R twice, will enlarge the Radar Map a little. Use the Radar Map - * often as you travel throughout the world to familiarize yourself with your surroundings. - */ - return 1049660; - } - } + public override object Message => 1049660; public override bool Logged => false; @@ -868,21 +668,7 @@ namespace Server.Engines.Quests.Haven public class DryadAppleConversation : QuestConversation { - public override object Message - { - get - { - /* The Dryad sticks the apple into the ground and you watch it - * rot before your eyes.

- * - * She pulls the now fertile dirt out of the ground and hands - * it to you.


- * - * There you go friend. Try not to lose it again this time, eh? - */ - return 1049360; - } - } + public override object Message => 1049360; public override bool Logged => false; @@ -893,18 +679,7 @@ namespace Server.Engines.Quests.Haven public class LostDaemonBloodConversation : QuestConversation { - public override object Message - { - get - { - /* You return without a Vial of Blood? It is imperative that we - * get all of the ingredients friend.

- * - * Go back to the chest and fetch another vial. Please hurry. - */ - return 1049375; - } - } + public override object Message => 1049375; public override bool Logged => false; @@ -915,19 +690,7 @@ namespace Server.Engines.Quests.Haven public class LostDaemonBoneConversation : QuestConversation { - public override object Message - { - get - { - /* You return without a Daemon Bone? It is imperative that we - * get all of the ingredients friend.

- * - * Go back to the graveyard and continue hunting the undead until you - * find another one. Please hurry. - */ - return 1049376; - } - } + public override object Message => 1049376; public override bool Logged => false; @@ -938,25 +701,7 @@ namespace Server.Engines.Quests.Haven public class FewReagentsConversation : QuestConversation { - public override object Message - { - get - { - /* I don't feel comfortable sending you into a potentially dangerous situation - * with as few reagents as you have in your pack.

- * - * Before going on, please acquire at least 30 of each reagent. You can - * purchase reagents from the Mage shop, which is - * located just East this mansion.

- * - * Remember that there are eight (8) different reagents: Black Pearl, Mandrake Root, - * Sulfurous Ash, Garlic, Ginseng, Blood Moss, Nightshade and Spider's Silk.

- * - * Come back here when you are ready to go. - */ - return 1049390; - } - } + public override object Message => 1049390; public override bool Logged => false; diff --git a/Scripts/Engines/Quests/Uzeraan Turmoil/Items/Cannon.cs b/Scripts/Engines/Quests/Uzeraan Turmoil/Items/Cannon.cs index c85f86b94..74c1a8b51 100644 --- a/Scripts/Engines/Quests/Uzeraan Turmoil/Items/Cannon.cs +++ b/Scripts/Engines/Quests/Uzeraan Turmoil/Items/Cannon.cs @@ -19,7 +19,9 @@ namespace Server.Engines.Quests.Haven public CannonDirection CannonDirection => m_CannonDirection; [CommandProperty( AccessLevel.GameMaster )] - public MilitiaCanoneer Canoneer { get { return m_Canoneer; } set { m_Canoneer = value; } } + public MilitiaCanoneer Canoneer { get => m_Canoneer; + set => m_Canoneer = value; + } [Constructible] public Cannon( CannonDirection direction ) @@ -149,7 +151,7 @@ namespace Server.Engines.Quests.Haven [CommandProperty( AccessLevel.GameMaster )] public MilitiaCanoneer Canoneer { - get { return Addon is Cannon cannon ? cannon.Canoneer : null; } + get => Addon is Cannon cannon ? cannon.Canoneer : null; set { if ( Addon is Cannon cannon ) cannon.Canoneer = value; } } diff --git a/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/MilitiaCanoneer.cs b/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/MilitiaCanoneer.cs index 0bbfd6a0e..c2a2dbe7b 100644 --- a/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/MilitiaCanoneer.cs +++ b/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/MilitiaCanoneer.cs @@ -10,8 +10,8 @@ namespace Server.Engines.Quests.Haven [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get { return m_Active; } - set { m_Active = value; } + get => m_Active; + set => m_Active = value; } [Constructible] diff --git a/Scripts/Engines/Quests/Uzeraan Turmoil/Objectives.cs b/Scripts/Engines/Quests/Uzeraan Turmoil/Objectives.cs index d442c3e87..fd75e684e 100644 --- a/Scripts/Engines/Quests/Uzeraan Turmoil/Objectives.cs +++ b/Scripts/Engines/Quests/Uzeraan Turmoil/Objectives.cs @@ -6,14 +6,7 @@ namespace Server.Engines.Quests.Haven { public class FindUzeraanBeginObjective : QuestObjective { - public override object Message - { - get - { - // Find Uzeraan. Uzeraan will explain what you need to do next. - return 1046039; - } - } + public override object Message => 1046039; public FindUzeraanBeginObjective() { @@ -30,18 +23,7 @@ namespace Server.Engines.Quests.Haven public class TitheGoldObjective : QuestObjective { - public override object Message - { - get - { - /* Go to the shrine inside of Uzeraan's Mansion, near the front doors and - * tithe at least 500 gold.

- * - * Return to Uzeraan when you are done. - */ - return 1060386; - } - } + public override object Message => 1060386; private int m_OldTithingPoints; @@ -71,14 +53,7 @@ namespace Server.Engines.Quests.Haven public class FindUzeraanFirstTaskObjective : QuestObjective { - public override object Message - { - get - { - // Return to Uzeraan, now that you have enough tithing points to continue your quest. - return 1060387; - } - } + public override object Message => 1060387; public FindUzeraanFirstTaskObjective() { @@ -259,18 +234,7 @@ namespace Server.Engines.Quests.Haven public class FindUzeraanAboutReportObjective : QuestObjective { - public override object Message - { - get - { - /* It's no use... The Horde Minions are too many. - * They are appearing out of nowhere.

- * - * Return to Uzeraan and report your findings. - */ - return 1049091; - } - } + public override object Message => 1049091; public FindUzeraanAboutReportObjective() { @@ -284,18 +248,7 @@ namespace Server.Engines.Quests.Haven public class FindSchmendrickObjective : QuestObjective { - public override object Message - { - get - { - /* Prepare for battle and step onto the teleporter, - * located against the wall in the main hall of Uzeraan's mansion.

- * - * Find Schmendrick within the mines. - */ - return 1049120; - } - } + public override object Message => 1049120; public FindSchmendrickObjective() { @@ -318,16 +271,7 @@ namespace Server.Engines.Quests.Haven public class FindApprenticeObjective : QuestObjective { - public override object Message - { - get - { - /* Find Schmendrick's apprentice who is somewhere in the mining cave. - * The apprentice has the scroll of power needed by Uzeraan. - */ - return 1049323; - } - } + public override object Message => 1049323; public FindApprenticeObjective() { @@ -341,17 +285,7 @@ namespace Server.Engines.Quests.Haven public class ReturnScrollOfPowerObjective : QuestObjective { - public override object Message - { - get - { - /* You have obtained the scroll of power! Find your way out of the cave.

- * - * Hand the scroll to Uzeraan (drag and drop) once you arrive in his mansion. - */ - return 1049324; - } - } + public override object Message => 1049324; public ReturnScrollOfPowerObjective() { @@ -365,18 +299,7 @@ namespace Server.Engines.Quests.Haven public class FindDryadObjective : QuestObjective { - public override object Message - { - get - { - /* Find the Dryad in the woods of Haven and get a patch - * of fertile dirt from her.

- * - * Use Uzeraan's teleporter to get there if necessary. - */ - return 1049358; - } - } + public override object Message => 1049358; public FindDryadObjective() { @@ -390,18 +313,7 @@ namespace Server.Engines.Quests.Haven public class ReturnFertileDirtObjective : QuestObjective { - public override object Message - { - get - { - /* You have acquired the Fertile Dirt!

- * - * Return to the mansion (North-East - * of the Dryad's Grove) and hand it to Uzeraan. - */ - return 1049327; - } - } + public override object Message => 1049327; public ReturnFertileDirtObjective() { @@ -415,18 +327,7 @@ namespace Server.Engines.Quests.Haven public class GetDaemonBloodObjective : QuestObjective { - public override object Message - { - get - { - /* Bring back a vial of blood.

- * - * Follow the road leading north from the mansion and walk into the hut - * to find the chest that contains the vial - */ - return 1049361; - } - } + public override object Message => 1049361; private bool m_Ambushed; @@ -479,17 +380,7 @@ namespace Server.Engines.Quests.Haven public class ReturnDaemonBloodObjective : QuestObjective { - public override object Message - { - get - { - /* You have the vial of blood!

- * - * Return to Uzeraan's mansion and hand him the vial. - */ - return 1049332; - } - } + public override object Message => 1049332; public ReturnDaemonBloodObjective() { @@ -507,8 +398,8 @@ namespace Server.Engines.Quests.Haven public Container CorpseWithBone { - get { return m_CorpseWithBone; } - set { m_CorpseWithBone = value; } + get => m_CorpseWithBone; + set => m_CorpseWithBone = value; } public override object Message @@ -589,16 +480,7 @@ namespace Server.Engines.Quests.Haven public class ReturnDaemonBoneObjective : QuestObjective { - public override object Message - { - get - { - /* Head East of here (or use the Horn of Retreat) - * to return to Uzeraan's Mansion and deliver the bone to Uzeraan. - */ - return 1049334; - } - } + public override object Message => 1049334; public ReturnDaemonBoneObjective() { @@ -612,17 +494,7 @@ namespace Server.Engines.Quests.Haven public class CashBankCheckObjective : QuestObjective { - public override object Message - { - get - { - /* Locate the Haven Bank (use the teleporter in Uzeraan's Mansion - * if necessary), which lies South-East - * of Uzeraan's Mansion. Once there, cash your check. - */ - return 1049336; - } - } + public override object Message => 1049336; public CashBankCheckObjective() { diff --git a/Scripts/Engines/Quests/Uzeraan Turmoil/UzeraanTurmoilQuest.cs b/Scripts/Engines/Quests/Uzeraan Turmoil/UzeraanTurmoilQuest.cs index db2f8ac44..24a375514 100644 --- a/Scripts/Engines/Quests/Uzeraan Turmoil/UzeraanTurmoilQuest.cs +++ b/Scripts/Engines/Quests/Uzeraan Turmoil/UzeraanTurmoilQuest.cs @@ -44,41 +44,9 @@ namespace Server.Engines.Quests.Haven public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // "Uzeraan's Turmoil" - return 1049007; - } - } + public override object Name => 1049007; - public override object OfferMessage - { - get - { - /* The guard speaks to you as you come closer...

- * - * Greetings traveler!

- * - * Uzeraan, the lord of this house and overseer of this city - - * Haven, has requested an audience with you.

- * - * Hordes of gruesome hell spawn are beginning to overrun the - * city and terrorize the inhabitants. No one seems to be able - * to stop them.

- * - * Our fine city militia is falling to the evil creatures - * one battalion after the other.

- * - * Uzeraan, whom you can find through these doors, is looking to - * hire mercenaries to aid in the battle.

- * - * Will you assist us? - */ - return 1049008; - } - } + public override object OfferMessage => 1049008; public override TimeSpan RestartDelay => TimeSpan.MaxValue; public override bool IsTutorial => true; diff --git a/Scripts/Engines/Quests/Witch Apprentice/Conversations.cs b/Scripts/Engines/Quests/Witch Apprentice/Conversations.cs index 97dc40e2a..84c171e4b 100644 --- a/Scripts/Engines/Quests/Witch Apprentice/Conversations.cs +++ b/Scripts/Engines/Quests/Witch Apprentice/Conversations.cs @@ -2,29 +2,7 @@ namespace Server.Engines.Quests.Hag { public class DontOfferConversation : QuestConversation { - public override object Message - { - get - { - /* The ancient, wrinkled hag looks up from her vile-smelling cauldron. - * Her single, unblinking eye attempts to focus in on you, but to - * little avail.

- * - * What's that? Who's there? What do you want with me? I don't have - * time for the likes of you. I have stews to spice and brews to boil. - * Too many things to complete to be helping out a stranger.

- * - * Besides, it looks as if you've already got yourself a quest that needs - * doing. Perhaps if you finish the task you're on, you can return to me - * and I'll help you out. But until then, leave an old witch alone to her - * magics! Shoo! Away with ye!

- * - * The witch rushes you off with a wave of her decrepit hand and returns - * to tending the noxious brew boiling in her cauldron. - */ - return 1055000; - } - } + public override object Message => 1055000; public override bool Logged => false; @@ -35,29 +13,7 @@ namespace Server.Engines.Quests.Hag public class AcceptConversation : QuestConversation { - public override object Message - { - get - { - /* Somewhat out of character for the vile old witch, she actually seems - * delighted that you've accepted her offer.

- * - * Ah! That's the spirit! You're not a useless bag of bones after all, are ye? - * Well then, best get your hind quarters in gear and head towards the road! - * Remember, my young Apprentice could be anywhere along the road heading towards - * the Yew Graveyard, so be sure to run the whole course of it, and stay - * on track!

- * - * And for Gashnak's sake, come back here when you've found something! And remember, - * I don't have all day! And watch out for the imp Zeefzorpul! And don't return - * empty handed! And pack a warm sweater! And don't trample my lawn on the - * way out!

- * - * What are you still doing here? Get to it! Shoo! - */ - return 1055002; - } - } + public override object Message => 1055002; public AcceptConversation() { @@ -71,20 +27,7 @@ namespace Server.Engines.Quests.Hag public class HagDuringCorpseSearchConversation : QuestConversation { - public override object Message - { - get - { - /* The wrinkled hag looks up at you with venom in her eyes.

- * - * What're you doing back here? I thought I told you to go find my lost - * Apprentice! I don't have time for your laziness, you wretched little worm! - * Shoo! Away with ye! And don't come back until you've found out what's - * happened to my Apprentice! - */ - return 1055003; - } - } + public override object Message => 1055003; public override bool Logged => false; @@ -95,24 +38,7 @@ namespace Server.Engines.Quests.Hag public class ApprenticeCorpseConversation : QuestConversation { - public override object Message - { - get - { - /* You inspect the charred and bloodied corpse, recognizing it from the - * Hag's description as the lost Apprentice you were tasked to - * bring back.

- * - * It appears as if he has been scorched by fire and magic, and scratched - * at with vicious claws.

- * - * You wonder if this horrific act is the work of the vile imp Zeefzorpul - * of which the Hag spoke. You decide you'd best return to the Hag and - * report your findings. - */ - return 1055004; - } - } + public override object Message => 1055004; public ApprenticeCorpseConversation() { @@ -126,41 +52,7 @@ namespace Server.Engines.Quests.Hag public class MurderConversation : QuestConversation { - public override object Message - { - get - { - /* The wrinkled old Hag looks up from her cauldron of boiling - * innards.

- * - * Bah! Back already? Can't you see I'm busy with my cooking? You - * wouldn't like to have a little taste of my delicious dragon gizzard soup, - * would you? Haw! I thought as much.

- * - * Enough of this jibber-jabber then - what news of my Apprentice?

- * - * What's that? You say that horrible little imp Zeefzorpul was behind his - * disappearance!? What would Zeefzorpul want with my Apprentice? Probably - * just wants to make life more miserable for me than it already is.

- * - * Wait! Bah! That must be it! Zeefzorpul must have found out that I sent - * my Apprentices out with various Magic Brew Recipes - lists of tasks and - * ingredients that needed completing.

- * - * That despicable Zeefzorpul knows I need the list of ingredients I gave to - * that Apprentice. I've recipes to mix, stews to boil, magics to cast, and - * fortunes to meddle! I won't let that wretched felchscum spoil my day. - * You then, I need you to go find Zeefzorpul and get that scrap of - * parchment back!

- * - * I'm not sure where he bides his time, but I'm sure if you go find his imp - * friends and rough them up, they'll squeal on him in no time! They all - * know each others' secret hiding places. Go on! Shoo! Go slay a few imps - * until they cough up their secrets! No mercy for those little nasties! - */ - return 1055005; - } - } + public override object Message => 1055005; public MurderConversation() { @@ -174,22 +66,7 @@ namespace Server.Engines.Quests.Hag public class HagDuringImpSearchConversation : QuestConversation { - public override object Message - { - get - { - /* The sickly old hag looks up from her boiling cauldron.

- * - * Have you found that vile little Zeefzorpul yet? What!? You've come - * back here without finding out where Zeefzorpul is, and what he's done - * with my Magic Brew Recipe?

- * - * I told you what needs to be done, you little whelp! Now away with ye! - * And don't you return until you've found my list of ingredients! - */ - return 1055006; - } - } + public override object Message => 1055006; public override bool Logged => false; @@ -202,33 +79,7 @@ namespace Server.Engines.Quests.Hag { private Point3D m_ImpLocation; - public override object Message - { - get - { - /* The wretched imp cries out for mercy.

- * - * Forgive me! You master! You great warrior, great hooman, great greatest! - * Forgive! Forgive! I give up Zeef! He no good any way! He always smack me - * head and hurt me good! He say I ugly too, even with me pretty teef!

- * - * But I knows where he hide! I follow him flapping to his hidey hole. - * He think he so smart but he so wrong! I make scribble drawing of where he - * like to hide! But you need the whistle blower to make him come! He no come - * without it! Make with the whistle at his hidey place, and Zeef must come, - * he cannot resist!

- * - * The frightened imp hands you a crumpled map and a strange flute.

- * - * You go to where the picture shows and then you play that whistle! Zeef come, - * me promise! But you make promise that you smack Zeef head good! - * Pweese?

- * - * With this last request, the miserable little imp falls and breathes no more. - */ - return 1055007; - } - } + public override object Message => 1055007; public ImpDeathConversation( Point3D impLocation ) { @@ -261,41 +112,7 @@ namespace Server.Engines.Quests.Hag public class ZeefzorpulConversation : QuestConversation { - public override object Message - { - get - { - /* In a puff of smoke that smells of brimstone, the imp Zeefzorpul - * appears.

- * - * Wuh-whut!? How did stupid hooman find mighty Zeefzorpul? This crazy - * many times! This crazy not possible! This big crazy with crazy on top! - * But it happening! How can it be true!?

- * - * GAH! Even mighty Zeefzorpul can no resist that crazy music! Mighty - * Zeefzorpul do what you want! Have you stupid paper back! Mighty Zeefzorpul - * no want it any way. It dumb. It super dumb. Big dumb like stupid dumb - * tree with dumb things on it! So stupid! So dumb that mighty Zeefzorpul - * not even care! You see me not caring? You better cause it certainly - * happening! Me not caring one bit!

- * - * The strange little imp tosses the piece of parchment at you. Much - * to your surprise, however, he swoops down in a flash of flapping wings - * and steals the Magic Flute from your grasp.

- * - * Hah! So stupid like a hooman! Mighty Zeefzorpul has defeated stupid - * hooman and is greatest ever imp in world! You serious stupid, mister - * hooman. Big stupid with stupid on top. Now you no can make trick on me - * again with crazy dance music! Mighty Zeefzorpul fly away to his other - * secret home where you never find him again!

- * - * Me hope you get eated by a troll!

- * - * With that, the imp Zeefzorpul disappears in another puff of rancid smoke. - */ - return 1055008; - } - } + public override object Message => 1055008; public ZeefzorpulConversation() { @@ -309,31 +126,7 @@ namespace Server.Engines.Quests.Hag public class RecipeConversation : QuestConversation { - public override object Message - { - get - { - /* The wart-covered witch looks up from pouring fetid scraps of meat - * into her cauldron.

- * - * You've dealt with that troublesome imp Zeefzorpul? Good for you, little - * one! You're not as useless as you appear, even to a daft old wench such - * as myself!

- * - * Now then, I see you've recovered my precious Magic Brew Recipe. I suppose - * you expect a reward? Well, you can go on expecting, and I can go on being - * ugly. What good is it to me that I have the list, if I don't have an - * apprentice to go gather the ingredients and perform the tasks - * themselves!

- * - * If you want your precious little reward, you'll have to complete the task - * I gave to my previous Apprentice. Now away with you! Shoo! Shimmy! Skedattle! - * I've heads to boil and stews to spice! Don't you return until you've completed - * every item on that list! - */ - return 1055009; - } - } + public override object Message => 1055009; public RecipeConversation() { @@ -347,31 +140,7 @@ namespace Server.Engines.Quests.Hag public class HagDuringIngredientsConversation : QuestConversation { - public override object Message - { - get - { - /* The ancient crone looks up from her bubbling brew, staring you down - * with her one good eye.

- * - * You've returned already have you? And what of your task? Have you gathered - * all the needed ingredients?

- * - * What's that!? You still haven't finished the simple little task I've set before - * you? Then why come back here and bother me? I can't get a single brew - * concocted if you keep bugging me with your whimpering little diatribes! Why, - * you're worse than my last apprentice - and he was the very king of fools!

- * - * Go on with ye! Away and begone! I don't want to see hide nor hair of your - * whining little face until you've gathered each and every last one of the ingredients - * on that list!

- * - * With a disgusting hacking noise, the vile witch spits upon the ground and - * brushes you off with a wave of her wrinkled old hand. - */ - return 1055012; - } - } + public override object Message => 1055012; public override bool Logged => false; @@ -382,41 +151,7 @@ namespace Server.Engines.Quests.Hag public class BlackheartFirstConversation : QuestConversation { - public override object Message - { - get - { - /* The bawdy old pirate captain looks up from his bottle of Wild Harpy - * whiskey, as drunk as any man you've ever seen.

- * - * With an excruciatingly slow movement, he pushes back his tricorne hat - * and stares you down with red-rimmed eyes.


- * - * Whut tha blazes do ye want, landlubber? Some've Captain Blackheart's - * fine Whiskey? Well ye can drown in the seven seas, ya barnacle-covered - * bilge rat!

- * - * I've cut down pasty-faced runts like yerself for lesser insults! I've - * sailed the seas've this world fer fifty years, and never seen a more - * milk-soaked pansy lass than ye come in here for a favor. Give ye some - * of my special Whiskey? I'd sooner wrestle a sea serpent naked - and I've - * done that some twenty times!

- * - * Ye see, ol' Captain Blackheart's Whiskey is only for pirate folk. And ye - * don't look like no pirate I've ever seen. Ye have te have the right cut - * of cloth and the right amount of liquor in yer belly te sail on my crew! - * And without that, ye might as well go home and cry to yer mommy. Cause - * ye ain't ever gonna share no drink with me!

- * - * Now off with ye!

- * - * With that, Captain Blackheart goes back to singing his bawdy songs - * and drinking his whiskey. It seems as if you'll have to find some way to - * change his mind about your worthiness. - */ - return 1055010; - } - } + public override object Message => 1055010; public BlackheartFirstConversation() { @@ -643,46 +378,7 @@ namespace Server.Engines.Quests.Hag public class EndConversation : QuestConversation { - public override object Message - { - get - { - /* The horrible wretch of a witch looks up from her vile experiments - * and focuses her one good eye on you.

- * - * Eh? What's that? You say you've gathered the ingredients for my delicious - * Magic Brew?

- * - * Well, well, I don't know exactly what to say. I thought for sure you'd - * end up dead! Haw! Can't blame a lady for wishing, can you? Even if she - * is a bit old and wrinkled.

- * - * Well, I promised you a reward for your efforts, and I never lie - leastways - * not to someone like you, after the great sacrifices you've made. You know, - * I could use a new Apprentice, in an official capacity as it were. I couldn't - * convince you to stay around and help me out some more could I? There's always - * cauldrons that need cleaning, dung that needs shoveling, newts eye that - * needs a proper chewing, and fires that need stoking.

- * - * What's that? Not interested? Well, I suppose you have great things ahead of - * you and all that. Feh! Like a puckish little puke like you could ever make - * something of themselves in this cold old world!

- * - * Nevertheless, I'll give you your blasted reward, and you'd better be happy - * with it because it's all you're getting. Caused me enough trouble as it is. - * Here, take it, and be off with you! It'll be a pleasure to my eye if I - * never have to squint to see you again! And the stench! Smells like you - * washed this very morning! A great fancy folk you are, with your soaps and - * water! Think you're so great...why, I remember when we didn't even have - * soap, and water was made by tiny little fairies and cost a gold piece for - * a thimbleful...I could tell you some stories, I could...

- * - * Your reward in hand, you decide to leave the old Hag to her mumblings - * before she realizes you're still around and puts you back to work. - */ - return 1055013; - } - } + public override object Message => 1055013; public EndConversation() { @@ -696,25 +392,7 @@ namespace Server.Engines.Quests.Hag public class RecentlyFinishedConversation : QuestConversation { - public override object Message - { - get - { - /* The wrinkled old crone stops stirring her noxious stew, looking up at - * you with an annoyed expression on her face.

- * - * You again? Listen, you little wretch, I'm in no mood for any of your meddlesome - * requests. I've work to do, and no time for your whining.

- * - * Come back later, and maybe I'll have something for you to do. In the meantime, - * get out of my sight - and don't touch anything on your way out!

- * - * The vile hag hacks up a gob of phlegm, spitting it on the ground before - * returning to her work. - */ - return 1055064; - } - } + public override object Message => 1055064; public RecentlyFinishedConversation() { diff --git a/Scripts/Engines/Quests/Witch Apprentice/Ingredient.cs b/Scripts/Engines/Quests/Witch Apprentice/Ingredient.cs index 6a7188666..e667bd939 100644 --- a/Scripts/Engines/Quests/Witch Apprentice/Ingredient.cs +++ b/Scripts/Engines/Quests/Witch Apprentice/Ingredient.cs @@ -97,9 +97,9 @@ namespace Server.Engines.Quests.Hag private Type[] m_Creatures; private int m_Quantity; - public int Name{ get{ return m_Name; } } - public Type[] Creatures{ get{ return m_Creatures; } } - public int Quantity{ get{ return m_Quantity; } } + public int Name => m_Name; + public Type[] Creatures => m_Creatures; + public int Quantity => m_Quantity; private IngredientInfo( int name, int quantity, params Type[] creatures ) { diff --git a/Scripts/Engines/Quests/Witch Apprentice/Items/Cauldron.cs b/Scripts/Engines/Quests/Witch Apprentice/Items/Cauldron.cs index cc595bc2b..0d64ce249 100644 --- a/Scripts/Engines/Quests/Witch Apprentice/Items/Cauldron.cs +++ b/Scripts/Engines/Quests/Witch Apprentice/Items/Cauldron.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Cauldron : Item { - public override string DefaultName - { - get { return "a cauldron"; } - } + public override string DefaultName => "a cauldron"; [Constructible] public Cauldron() : base( 0x9ED ) diff --git a/Scripts/Engines/Quests/Witch Apprentice/Items/HangoverCure.cs b/Scripts/Engines/Quests/Witch Apprentice/Items/HangoverCure.cs index f6ab16a70..a54313ddb 100644 --- a/Scripts/Engines/Quests/Witch Apprentice/Items/HangoverCure.cs +++ b/Scripts/Engines/Quests/Witch Apprentice/Items/HangoverCure.cs @@ -9,8 +9,8 @@ namespace Server.Engines.Quests.Hag [CommandProperty( AccessLevel.GameMaster )] public int Uses { - get{ return m_Uses; } - set{ m_Uses = value; } + get => m_Uses; + set => m_Uses = value; } [Constructible] diff --git a/Scripts/Engines/Quests/Witch Apprentice/Objectives.cs b/Scripts/Engines/Quests/Witch Apprentice/Objectives.cs index 3b531fce4..0a73392a9 100644 --- a/Scripts/Engines/Quests/Witch Apprentice/Objectives.cs +++ b/Scripts/Engines/Quests/Witch Apprentice/Objectives.cs @@ -25,19 +25,9 @@ namespace Server.Engines.Quests.Hag private Corpse m_Corpse; private Point3D m_CorpseLocation; - public override object Message - { - get - { - /* To the west of the Hag's house lies the road between Skara Brae - * and Yew. Follow it carefully toward Yew's graveyard, and search for - * any sign of the Hag's apprentice along the road. - */ - return 1055014; - } - } + public override object Message => 1055014; - public Corpse Corpse{ get{ return m_Corpse; } } + public Corpse Corpse => m_Corpse; public FindApprenticeObjective( bool init ) { @@ -124,17 +114,7 @@ namespace Server.Engines.Quests.Hag public class FindGrizeldaAboutMurderObjective : QuestObjective { - public override object Message - { - get - { - /* Return to the Hag to tell her of the vile imp Zeefzorpul's role - * in the murder of her Apprentice, and the subsequent theft of a mysterious - * scrap of parchment from the corpse. - */ - return 1055015; - } - } + public override object Message => 1055015; public FindGrizeldaAboutMurderObjective() { @@ -150,17 +130,7 @@ namespace Server.Engines.Quests.Hag { private int m_MaxProgress; - public override object Message - { - get - { - /* Search the realm for any imps you can find, and slash, bash, mash, - * or fry them with magics until one of them gives up the secret hiding - * place of the imp Zeefzorpul. - */ - return 1055016; - } - } + public override object Message => 1055016; public override int MaxProgress => m_MaxProgress; @@ -225,19 +195,9 @@ namespace Server.Engines.Quests.Hag { private Point3D m_ImpLocation; - public override object Message - { - get - { - /* Find the location shown in the map that the imp gave you. When you - * have arrived at the location, play the magic flute he provided, - * and the imp Zeefzorpul will be drawn to your presence. - */ - return 1055017; - } - } + public override object Message => 1055017; - public Point3D ImpLocation{ get{ return m_ImpLocation; } } + public Point3D ImpLocation => m_ImpLocation; public FindZeefzorpulObjective( Point3D impLocation ) { @@ -296,16 +256,7 @@ namespace Server.Engines.Quests.Hag public class ReturnRecipeObjective : QuestObjective { - public override object Message - { - get - { - /* Return to the old Hag and tell her you have recovered her Magic - * Brew Recipe from the bizarre imp named Zeefzorpul. - */ - return 1055018; - } - } + public override object Message => 1055018; public ReturnRecipeObjective() { @@ -369,10 +320,10 @@ namespace Server.Engines.Quests.Hag } } - public Ingredient[] Ingredients{ get{ return m_Ingredients; } } - public Ingredient Ingredient{ get{ return m_Ingredients[m_Ingredients.Length - 1]; } } - public int Step{ get{ return m_Ingredients.Length; } } - public bool BlackheartMet{ get{ return m_BlackheartMet; } } + public Ingredient[] Ingredients => m_Ingredients; + public Ingredient Ingredient => m_Ingredients[m_Ingredients.Length - 1]; + public int Step => m_Ingredients.Length; + public bool BlackheartMet => m_BlackheartMet; public FindIngredientObjective( Ingredient[] oldIngredients ) : this( oldIngredients, false ) { @@ -500,16 +451,7 @@ namespace Server.Engines.Quests.Hag public class ReturnIngredientsObjective : QuestObjective { - public override object Message - { - get - { - /* You have gathered all the ingredients listed in the Hag's Magic Brew - * Recipe. Return to the Hag and tell her you have completed her task. - */ - return 1055050; - } - } + public override object Message => 1055050; public ReturnIngredientsObjective() { diff --git a/Scripts/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs b/Scripts/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs index a2654fbaf..24a6a0365 100644 --- a/Scripts/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs +++ b/Scripts/Engines/Quests/Witch Apprentice/WitchApprenticeQuest.cs @@ -33,57 +33,9 @@ namespace Server.Engines.Quests.Hag public override Type[] TypeReferenceTable => m_TypeReferenceTable; - public override object Name - { - get - { - // "The Witch's Apprentice" - return 1055042; - } - } + public override object Name => 1055042; - public override object OfferMessage - { - get - { - /* The ancient, wrinkled hag looks up from her vile-smelling cauldron. - * Her single, unblinking eye attempts to focus in on you, but to - * little avail.

- * - * Eh? Who is it? Who's there? Come to trouble an old woman have you?

- * - * I'll split ye open and swallow yer guts! I'll turn ye into a pile - * o' goo, I will! Bah! As if I didn't have enough to worry about. As if I've - * not enough trouble as it is!

- * - * Another of my blasted apprentices has gone missing! Foolish children, - * think they know everything. I should turn the lot of them into toads - - * if only they'd return with their task complete! But that's the trouble, innit? - * They never return!

- * - * But you don't care, do ye? I suppose you're another one of those meddlesome kids, - * come to ask me for something? Eh? Is that it? You want something from me, - * expect me to hand it over? I've enough troubles with my apprentices, and that - * vile imp, Zeefzorpul! Why, I bet it's him who's got the lot of them! And who - * knows what he's done? Vile little thing.

- * - * If you expect me to help you with your silly little desires, you'll be doing - * something for me first, eh? I expect you to go seek out my apprentice. - * I sent him along the road west of here up towards Yew's graveyard, but he never - * came back. Find him, and bring him back, and I'll give you a little reward that - * I'm sure you'll find pleasant.

- * - * But I tells ye to watch out for the imp name've Zeefzorpul! He's a despicable - * little beast who likes to fool and fiddle with folk and generally make life - * miserable for everyone. If ye get him on your bad side, you're sure to end up - * ruing the day ye were born. As if you didn't already, with an ugly mug - * like that!

- * - * Well, you little whelp? Going to help an old hag or not? - */ - return 1055001; - } - } + public override object OfferMessage => 1055001; public override TimeSpan RestartDelay => TimeSpan.FromMinutes( 5.0 ); public override bool IsTutorial => false; diff --git a/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs b/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs index 45ce940c4..d1dda5f58 100644 --- a/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs +++ b/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs @@ -13,7 +13,9 @@ namespace Server.RemoteAdmin private static StreamWriter m_Output; private static bool m_Enabled = true; - public static bool Enabled { get { return m_Enabled; } set { m_Enabled = value; } } + public static bool Enabled { get => m_Enabled; + set => m_Enabled = value; + } public static StreamWriter Output => m_Output; diff --git a/Scripts/Engines/Reports/Objects/Charts/BarGraph.cs b/Scripts/Engines/Reports/Objects/Charts/BarGraph.cs index 9e6f210ee..6afca5749 100644 --- a/Scripts/Engines/Reports/Objects/Charts/BarGraph.cs +++ b/Scripts/Engines/Reports/Objects/Charts/BarGraph.cs @@ -33,16 +33,30 @@ namespace Server.Engines.Reports private BarRegion[] m_Regions; - public int Ticks{ get{ return m_Ticks; } set{ m_Ticks = value; } } - public BarGraphRenderMode RenderMode{ get{ return m_RenderMode; } set{ m_RenderMode = value; } } + public int Ticks{ get => m_Ticks; + set => m_Ticks = value; + } + public BarGraphRenderMode RenderMode{ get => m_RenderMode; + set => m_RenderMode = value; + } - public string xTitle{ get{ return m_xTitle; } set{ m_xTitle = value; } } - public string yTitle{ get{ return m_yTitle; } set{ m_yTitle = value; } } + public string xTitle{ get => m_xTitle; + set => m_xTitle = value; + } + public string yTitle{ get => m_yTitle; + set => m_yTitle = value; + } - public int FontSize{ get{ return m_FontSize; } set{ m_FontSize = value; } } - public int Interval{ get{ return m_Interval; } set{ m_Interval = value; } } + public int FontSize{ get => m_FontSize; + set => m_FontSize = value; + } + public int Interval{ get => m_Interval; + set => m_Interval = value; + } - public BarRegion[] Regions{ get{ return m_Regions; } set{ m_Regions = value; } } + public BarRegion[] Regions{ get => m_Regions; + set => m_Regions = value; + } public BarGraph( string name, string fileName, int ticks, string xTitle, string yTitle, BarGraphRenderMode rm ) { diff --git a/Scripts/Engines/Reports/Objects/Charts/Chart.cs b/Scripts/Engines/Reports/Objects/Charts/Chart.cs index 412152325..d2ce667a4 100644 --- a/Scripts/Engines/Reports/Objects/Charts/Chart.cs +++ b/Scripts/Engines/Reports/Objects/Charts/Chart.cs @@ -6,9 +6,13 @@ namespace Server.Engines.Reports protected string m_FileName; protected ChartItemCollection m_Items; - public string Name{ get{ return m_Name; } set{ m_Name = value; } } - public string FileName{ get{ return m_FileName; } set{ m_FileName = value; } } - public ChartItemCollection Items{ get{ return m_Items; } } + public string Name{ get => m_Name; + set => m_Name = value; + } + public string FileName{ get => m_FileName; + set => m_FileName = value; + } + public ChartItemCollection Items => m_Items; public Chart() { diff --git a/Scripts/Engines/Reports/Objects/Charts/ChartItem.cs b/Scripts/Engines/Reports/Objects/Charts/ChartItem.cs index bc898f825..3f575515e 100644 --- a/Scripts/Engines/Reports/Objects/Charts/ChartItem.cs +++ b/Scripts/Engines/Reports/Objects/Charts/ChartItem.cs @@ -16,8 +16,12 @@ namespace Server.Engines.Reports private string m_Name; private int m_Value; - public string Name{ get{ return m_Name; } set{ m_Name = value; } } - public int Value{ get{ return m_Value; } set{ m_Value = value; } } + public string Name{ get => m_Name; + set => m_Name = value; + } + public int Value{ get => m_Value; + set => m_Value = value; + } private ChartItem() { diff --git a/Scripts/Engines/Reports/Objects/Charts/ChartItemCollection.cs b/Scripts/Engines/Reports/Objects/Charts/ChartItemCollection.cs index 198afed05..5678bd6b6 100644 --- a/Scripts/Engines/Reports/Objects/Charts/ChartItemCollection.cs +++ b/Scripts/Engines/Reports/Objects/Charts/ChartItemCollection.cs @@ -32,15 +32,9 @@ namespace Server.Engines.Reports ///
public Server.Engines.Reports.ChartItem this[int index] { - get - { - return ((Server.Engines.Reports.ChartItem)(this.List[index])); - } - set - { - this.List[index] = value; - } - } + get => ((Server.Engines.Reports.ChartItem)(this.List[index])); + set => this.List[index] = value; + } public int Add( string name, int value ) { diff --git a/Scripts/Engines/Reports/Objects/Charts/PieChart.cs b/Scripts/Engines/Reports/Objects/Charts/PieChart.cs index a815eacbd..7badf0986 100644 --- a/Scripts/Engines/Reports/Objects/Charts/PieChart.cs +++ b/Scripts/Engines/Reports/Objects/Charts/PieChart.cs @@ -15,7 +15,9 @@ namespace Server.Engines.Reports private bool m_ShowPercents; - public bool ShowPercents{ get{ return m_ShowPercents; } set{ m_ShowPercents = value; } } + public bool ShowPercents{ get => m_ShowPercents; + set => m_ShowPercents = value; + } public PieChart( string name, string fileName, bool showPercents ) { diff --git a/Scripts/Engines/Reports/Objects/Reports/ItemValue.cs b/Scripts/Engines/Reports/Objects/Reports/ItemValue.cs index 3c5cde910..6e7861e80 100644 --- a/Scripts/Engines/Reports/Objects/Reports/ItemValue.cs +++ b/Scripts/Engines/Reports/Objects/Reports/ItemValue.cs @@ -16,8 +16,12 @@ namespace Server.Engines.Reports private string m_Value; private string m_Format; - public string Value{ get{ return m_Value; } set{ m_Value = value; } } - public string Format{ get{ return m_Format; } set{ m_Format = value; } } + public string Value{ get => m_Value; + set => m_Value = value; + } + public string Format{ get => m_Format; + set => m_Format = value; + } private ItemValue() { diff --git a/Scripts/Engines/Reports/Objects/Reports/ItemValueCollection.cs b/Scripts/Engines/Reports/Objects/Reports/ItemValueCollection.cs index f77a96783..60d9192ee 100644 --- a/Scripts/Engines/Reports/Objects/Reports/ItemValueCollection.cs +++ b/Scripts/Engines/Reports/Objects/Reports/ItemValueCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports ///
public Server.Engines.Reports.ItemValue this[int index] { - get - { - return ((Server.Engines.Reports.ItemValue)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.ItemValue)(this.List[index])); + set => this.List[index] = value; } public int Add( string value ) diff --git a/Scripts/Engines/Reports/Objects/Reports/Report.cs b/Scripts/Engines/Reports/Objects/Reports/Report.cs index f25c6cd26..fbbf6e494 100644 --- a/Scripts/Engines/Reports/Objects/Reports/Report.cs +++ b/Scripts/Engines/Reports/Objects/Reports/Report.cs @@ -18,10 +18,14 @@ namespace Server.Engines.Reports private ReportColumnCollection m_Columns; private ReportItemCollection m_Items; - public string Name{ get{ return m_Name; } set{ m_Name = value; } } - public string Width{ get{ return m_Width; } set{ m_Width = value; } } - public ReportColumnCollection Columns{ get{ return m_Columns; } } - public ReportItemCollection Items{ get{ return m_Items; } } + public string Name{ get => m_Name; + set => m_Name = value; + } + public string Width{ get => m_Width; + set => m_Width = value; + } + public ReportColumnCollection Columns => m_Columns; + public ReportItemCollection Items => m_Items; private Report() : this( null, null ) { diff --git a/Scripts/Engines/Reports/Objects/Reports/ReportColumn.cs b/Scripts/Engines/Reports/Objects/Reports/ReportColumn.cs index 50841f64c..9def8932d 100644 --- a/Scripts/Engines/Reports/Objects/Reports/ReportColumn.cs +++ b/Scripts/Engines/Reports/Objects/Reports/ReportColumn.cs @@ -17,9 +17,15 @@ namespace Server.Engines.Reports private string m_Align; private string m_Name; - public string Width{ get{ return m_Width; } set{ m_Width = value; } } - public string Align{ get{ return m_Align; } set{ m_Align = value; } } - public string Name{ get{ return m_Name; } set{ m_Name = value; } } + public string Width{ get => m_Width; + set => m_Width = value; + } + public string Align{ get => m_Align; + set => m_Align = value; + } + public string Name{ get => m_Name; + set => m_Name = value; + } private ReportColumn() { diff --git a/Scripts/Engines/Reports/Objects/Reports/ReportColumnCollection.cs b/Scripts/Engines/Reports/Objects/Reports/ReportColumnCollection.cs index d9891d280..d3aa00ca8 100644 --- a/Scripts/Engines/Reports/Objects/Reports/ReportColumnCollection.cs +++ b/Scripts/Engines/Reports/Objects/Reports/ReportColumnCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports ///
public Server.Engines.Reports.ReportColumn this[int index] { - get - { - return ((Server.Engines.Reports.ReportColumn)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.ReportColumn)(this.List[index])); + set => this.List[index] = value; } public int Add( string width, string align ) diff --git a/Scripts/Engines/Reports/Objects/Reports/ReportItem.cs b/Scripts/Engines/Reports/Objects/Reports/ReportItem.cs index 0ab2e0ecb..ba5c4bb49 100644 --- a/Scripts/Engines/Reports/Objects/Reports/ReportItem.cs +++ b/Scripts/Engines/Reports/Objects/Reports/ReportItem.cs @@ -15,7 +15,7 @@ namespace Server.Engines.Reports private ItemValueCollection m_Values; - public ItemValueCollection Values{ get{ return m_Values; } } + public ItemValueCollection Values => m_Values; public ReportItem() { diff --git a/Scripts/Engines/Reports/Objects/Reports/ReportItemCollection.cs b/Scripts/Engines/Reports/Objects/Reports/ReportItemCollection.cs index e47a4a2dc..bd86a4122 100644 --- a/Scripts/Engines/Reports/Objects/Reports/ReportItemCollection.cs +++ b/Scripts/Engines/Reports/Objects/Reports/ReportItemCollection.cs @@ -32,15 +32,9 @@ namespace Server.Engines.Reports ///
public Server.Engines.Reports.ReportItem this[int index] { - get - { - return ((Server.Engines.Reports.ReportItem)(this.List[index])); - } - set - { - this.List[index] = value; - } - } + get => ((Server.Engines.Reports.ReportItem)(this.List[index])); + set => this.List[index] = value; + } public int Add( string name, object value ) { diff --git a/Scripts/Engines/Reports/Objects/Snapshots/Snapshot.cs b/Scripts/Engines/Reports/Objects/Snapshots/Snapshot.cs index c288f5136..b24ba5e72 100644 --- a/Scripts/Engines/Reports/Objects/Snapshots/Snapshot.cs +++ b/Scripts/Engines/Reports/Objects/Snapshots/Snapshot.cs @@ -18,8 +18,12 @@ namespace Server.Engines.Reports private DateTime m_TimeStamp; private ObjectCollection m_Children; - public DateTime TimeStamp{ get{ return m_TimeStamp; } set{ m_TimeStamp = value; } } - public ObjectCollection Children{ get{ return m_Children; } set{ m_Children = value; } } + public DateTime TimeStamp{ get => m_TimeStamp; + set => m_TimeStamp = value; + } + public ObjectCollection Children{ get => m_Children; + set => m_Children = value; + } public Snapshot() { diff --git a/Scripts/Engines/Reports/Objects/Snapshots/SnapshotCollection.cs b/Scripts/Engines/Reports/Objects/Snapshots/SnapshotCollection.cs index e041a4a02..3ab53c411 100644 --- a/Scripts/Engines/Reports/Objects/Snapshots/SnapshotCollection.cs +++ b/Scripts/Engines/Reports/Objects/Snapshots/SnapshotCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports /// public Server.Engines.Reports.Snapshot this[int index] { - get - { - return ((Server.Engines.Reports.Snapshot)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.Snapshot)(this.List[index])); + set => this.List[index] = value; } /// diff --git a/Scripts/Engines/Reports/Objects/Snapshots/SnapshotHistory.cs b/Scripts/Engines/Reports/Objects/Snapshots/SnapshotHistory.cs index 3bb9f94d9..378d891bd 100644 --- a/Scripts/Engines/Reports/Objects/Snapshots/SnapshotHistory.cs +++ b/Scripts/Engines/Reports/Objects/Snapshots/SnapshotHistory.cs @@ -17,7 +17,9 @@ namespace Server.Engines.Reports private SnapshotCollection m_Snapshots; - public SnapshotCollection Snapshots{ get{ return m_Snapshots; } set{ m_Snapshots = value; } } + public SnapshotCollection Snapshots{ get => m_Snapshots; + set => m_Snapshots = value; + } public SnapshotHistory() { diff --git a/Scripts/Engines/Reports/Objects/Staffing/Info.cs b/Scripts/Engines/Reports/Objects/Staffing/Info.cs index aedce421e..deaf04104 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/Info.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/Info.cs @@ -7,14 +7,20 @@ namespace Server.Engines.Reports { private static TimeSpan m_SortRange; - public static TimeSpan SortRange{ get{ return m_SortRange; } set{ m_SortRange = value; } } + public static TimeSpan SortRange{ get => m_SortRange; + set => m_SortRange = value; + } private string m_Account; private string m_Display; private PageInfoCollection m_Pages; - public string Account{ get{ return m_Account; } set{ m_Account = value; } } - public PageInfoCollection Pages{ get{ return m_Pages; } set{ m_Pages = value; } } + public string Account{ get => m_Account; + set => m_Account = value; + } + public PageInfoCollection Pages{ get => m_Pages; + set => m_Pages = value; + } public string Display { diff --git a/Scripts/Engines/Reports/Objects/Staffing/PageInfo.cs b/Scripts/Engines/Reports/Objects/Staffing/PageInfo.cs index 6d58c57ae..8fba785f9 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/PageInfo.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/PageInfo.cs @@ -32,7 +32,7 @@ namespace Server.Engines.Reports public StaffInfo Resolver { - get{ return m_Resolver; } + get => m_Resolver; set { if ( m_Resolver == value ) @@ -53,7 +53,7 @@ namespace Server.Engines.Reports public UserInfo Sender { - get{ return m_Sender; } + get => m_Sender; set { if ( m_Sender == value ) @@ -86,7 +86,7 @@ namespace Server.Engines.Reports public StaffHistory History { - get{ return m_History; } + get => m_History; set { if ( m_History == value ) @@ -108,15 +108,19 @@ namespace Server.Engines.Reports } } - public PageType PageType{ get{ return m_PageType; } set{ m_PageType = value; } } - public PageResolution Resolution{ get{ return m_Resolution; } } + public PageType PageType{ get => m_PageType; + set => m_PageType = value; + } + public PageResolution Resolution => m_Resolution; - public DateTime TimeSent{ get{ return m_TimeSent; } set{ m_TimeSent = value; } } - public DateTime TimeResolved{ get{ return m_TimeResolved; } } + public DateTime TimeSent{ get => m_TimeSent; + set => m_TimeSent = value; + } + public DateTime TimeResolved => m_TimeResolved; public string SentBy { - get{ return m_SentBy; } + get => m_SentBy; set { m_SentBy = value; @@ -126,13 +130,14 @@ namespace Server.Engines.Reports } } - public string ResolvedBy - { - get{ return m_ResolvedBy; } - } + public string ResolvedBy => m_ResolvedBy; - public string Message{ get{ return m_Message; } set{ m_Message = value; } } - public ResponseInfoCollection Responses{ get{ return m_Responses; } set{ m_Responses = value; } } + public string Message{ get => m_Message; + set => m_Message = value; + } + public ResponseInfoCollection Responses{ get => m_Responses; + set => m_Responses = value; + } public void UpdateResolver() { diff --git a/Scripts/Engines/Reports/Objects/Staffing/PageInfoCollection.cs b/Scripts/Engines/Reports/Objects/Staffing/PageInfoCollection.cs index 6c686d946..b901f2435 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/PageInfoCollection.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/PageInfoCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports /// public Server.Engines.Reports.PageInfo this[int index] { - get - { - return ((Server.Engines.Reports.PageInfo)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.PageInfo)(this.List[index])); + set => this.List[index] = value; } /// diff --git a/Scripts/Engines/Reports/Objects/Staffing/QueueStatus.cs b/Scripts/Engines/Reports/Objects/Staffing/QueueStatus.cs index ce6f4b19a..a31c7b651 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/QueueStatus.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/QueueStatus.cs @@ -18,8 +18,12 @@ namespace Server.Engines.Reports private DateTime m_TimeStamp; private int m_Count; - public DateTime TimeStamp{ get{ return m_TimeStamp; } set{ m_TimeStamp = value; } } - public int Count{ get{ return m_Count; } set{ m_Count = value; } } + public DateTime TimeStamp{ get => m_TimeStamp; + set => m_TimeStamp = value; + } + public int Count{ get => m_Count; + set => m_Count = value; + } public QueueStatus() { diff --git a/Scripts/Engines/Reports/Objects/Staffing/QueueStatusCollection.cs b/Scripts/Engines/Reports/Objects/Staffing/QueueStatusCollection.cs index 88c39fff2..d1d3156d9 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/QueueStatusCollection.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/QueueStatusCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports /// public Server.Engines.Reports.QueueStatus this[int index] { - get - { - return ((Server.Engines.Reports.QueueStatus)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.QueueStatus)(this.List[index])); + set => this.List[index] = value; } /// diff --git a/Scripts/Engines/Reports/Objects/Staffing/ResponseInfo.cs b/Scripts/Engines/Reports/Objects/Staffing/ResponseInfo.cs index f8e00d447..4b221ef2c 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/ResponseInfo.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/ResponseInfo.cs @@ -20,10 +20,16 @@ namespace Server.Engines.Reports private string m_SentBy; private string m_Message; - public DateTime TimeStamp{ get{ return m_TimeStamp; } set{ m_TimeStamp = value; } } + public DateTime TimeStamp{ get => m_TimeStamp; + set => m_TimeStamp = value; + } - public string SentBy{ get{ return m_SentBy; } set{ m_SentBy = value; } } - public string Message{ get{ return m_Message; } set{ m_Message = value; } } + public string SentBy{ get => m_SentBy; + set => m_SentBy = value; + } + public string Message{ get => m_Message; + set => m_Message = value; + } public ResponseInfo() { diff --git a/Scripts/Engines/Reports/Objects/Staffing/ResponseInfoCollection.cs b/Scripts/Engines/Reports/Objects/Staffing/ResponseInfoCollection.cs index 6d0e051e5..80e2914b1 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/ResponseInfoCollection.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/ResponseInfoCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports /// public Server.Engines.Reports.ResponseInfo this[int index] { - get - { - return ((Server.Engines.Reports.ResponseInfo)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.ResponseInfo)(this.List[index])); + set => this.List[index] = value; } public int Add( string sentBy, string message ) diff --git a/Scripts/Engines/Reports/Objects/Staffing/StaffHistory.cs b/Scripts/Engines/Reports/Objects/Staffing/StaffHistory.cs index 7c746c142..79c39a90b 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/StaffHistory.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/StaffHistory.cs @@ -23,11 +23,19 @@ namespace Server.Engines.Reports private Hashtable m_UserInfo; private Hashtable m_StaffInfo; - public PageInfoCollection Pages{ get{ return m_Pages; } set{ m_Pages = value; } } - public QueueStatusCollection QueueStats{ get{ return m_QueueStats; } set{ m_QueueStats = value; } } + public PageInfoCollection Pages{ get => m_Pages; + set => m_Pages = value; + } + public QueueStatusCollection QueueStats{ get => m_QueueStats; + set => m_QueueStats = value; + } - public Hashtable UserInfo{ get{ return m_UserInfo; } set{ m_UserInfo = value; } } - public Hashtable StaffInfo{ get{ return m_StaffInfo; } set{ m_StaffInfo = value; } } + public Hashtable UserInfo{ get => m_UserInfo; + set => m_UserInfo = value; + } + public Hashtable StaffInfo{ get => m_StaffInfo; + set => m_StaffInfo = value; + } public void AddPage( PageInfo info ) { diff --git a/Scripts/Engines/Reports/Persistance/PersistableObjectCollection.cs b/Scripts/Engines/Reports/Persistance/PersistableObjectCollection.cs index f46d7b4b5..c1ac03801 100644 --- a/Scripts/Engines/Reports/Persistance/PersistableObjectCollection.cs +++ b/Scripts/Engines/Reports/Persistance/PersistableObjectCollection.cs @@ -32,14 +32,8 @@ namespace Server.Engines.Reports /// public Server.Engines.Reports.PersistableObject this[int index] { - get - { - return ((Server.Engines.Reports.PersistableObject)(this.List[index])); - } - set - { - this.List[index] = value; - } + get => ((Server.Engines.Reports.PersistableObject)(this.List[index])); + set => this.List[index] = value; } /// diff --git a/Scripts/Engines/Reports/Persistance/PersistableType.cs b/Scripts/Engines/Reports/Persistance/PersistableType.cs index 8ef17faa6..ac58de7ce 100644 --- a/Scripts/Engines/Reports/Persistance/PersistableType.cs +++ b/Scripts/Engines/Reports/Persistance/PersistableType.cs @@ -46,8 +46,8 @@ namespace Server.Engines.Reports private string m_Name; private ConstructCallback m_Constructor; - public string Name{ get{ return m_Name; } } - public ConstructCallback Constructor{ get{ return m_Constructor; } } + public string Name => m_Name; + public ConstructCallback Constructor => m_Constructor; public PersistableType( string name, ConstructCallback constructor ) { diff --git a/Scripts/Engines/Reports/Persistance/PersistanceReader.cs b/Scripts/Engines/Reports/Persistance/PersistanceReader.cs index 0ce2816ff..47f4c9fbe 100644 --- a/Scripts/Engines/Reports/Persistance/PersistanceReader.cs +++ b/Scripts/Engines/Reports/Persistance/PersistanceReader.cs @@ -65,13 +65,7 @@ namespace Server.Engines.Reports private bool m_HasChild; - public override bool HasChild - { - get - { - return m_HasChild; - } - } + public override bool HasChild => m_HasChild; private bool m_WasEmptyElement; diff --git a/Scripts/Engines/Reports/Rendering/BarGraphRenderer.cs b/Scripts/Engines/Reports/Rendering/BarGraphRenderer.cs index 1825b26a1..2993dacb7 100644 --- a/Scripts/Engines/Reports/Rendering/BarGraphRenderer.cs +++ b/Scripts/Engines/Reports/Rendering/BarGraphRenderer.cs @@ -73,69 +73,69 @@ namespace Server.Engines.Reports public string FontFamily { - get{ return _fontFamily; } - set{ _fontFamily = value; } + get => _fontFamily; + set => _fontFamily = value; } public BarGraphRenderMode RenderMode { - get{ return _renderMode; } - set{ _renderMode = value; } + get => _renderMode; + set => _renderMode = value; } public Color BackgroundColor { - set{ _backColor = value; } + set => _backColor = value; } public int BottomBuffer { - set { _bottomBuffer = Convert.ToSingle(value); } + set => _bottomBuffer = Convert.ToSingle(value); } public Color FontColor { - set{ _fontColor = value; } + set => _fontColor = value; } public int Height { - get{ return Convert.ToInt32(_totalHeight); } - set{ _totalHeight = Convert.ToSingle(value); } + get => Convert.ToInt32(_totalHeight); + set => _totalHeight = Convert.ToSingle(value); } public int Width { - get{ return Convert.ToInt32(_totalWidth); } - set{ _totalWidth = Convert.ToSingle(value); } + get => Convert.ToInt32(_totalWidth); + set => _totalWidth = Convert.ToSingle(value); } public bool ShowLegend { - get{ return _displayLegend; } - set{ _displayLegend = value; } + get => _displayLegend; + set => _displayLegend = value; } public bool ShowData { - get{ return _displayBarData; } - set{ _displayBarData = value; } + get => _displayBarData; + set => _displayBarData = value; } public int TopBuffer { - set { _topBuffer = Convert.ToSingle(value); } + set => _topBuffer = Convert.ToSingle(value); } public string VerticalLabel { - get{ return _yLabel; } - set{ _yLabel = value; } + get => _yLabel; + set => _yLabel = value; } public int VerticalTickCount { - get{ return _yTickCount; } - set{ _yTickCount = value; } + get => _yTickCount; + set => _yTickCount = value; } private string _xTitle, _yTitle; diff --git a/Scripts/Engines/Reports/Rendering/ChartRenderer.cs b/Scripts/Engines/Reports/Rendering/ChartRenderer.cs index 8aaf50236..665e840aa 100644 --- a/Scripts/Engines/Reports/Rendering/ChartRenderer.cs +++ b/Scripts/Engines/Reports/Rendering/ChartRenderer.cs @@ -36,8 +36,8 @@ namespace Server.Engines.Reports public ChartItemsCollection DataPoints { - get{ return _dataPoints; } - set{ _dataPoints = value; } + get => _dataPoints; + set => _dataPoints = value; } public void SetColor(int index, Color NewColor) diff --git a/Scripts/Engines/Reports/Rendering/DataItem.cs b/Scripts/Engines/Reports/Rendering/DataItem.cs index 41fd22588..2e7f30b13 100644 --- a/Scripts/Engines/Reports/Rendering/DataItem.cs +++ b/Scripts/Engines/Reports/Rendering/DataItem.cs @@ -36,38 +36,38 @@ namespace Server.Engines.Reports public string Label { - get{ return _label; } - set{ _label = value; } + get => _label; + set => _label = value; } public string Description { - get{ return _description; } - set{ _description = value; } + get => _description; + set => _description = value; } public float Value { - get{ return _value; } - set{ _value = value; } + get => _value; + set => _value = value; } public Color ItemColor { - get{ return _color; } - set{ _color = value; } + get => _color; + set => _color = value; } public float StartPos { - get{ return _startPos; } - set{ _startPos = value; } + get => _startPos; + set => _startPos = value; } public float SweepSize { - get{ return _sweepSize; } - set{ _sweepSize = value; } + get => _sweepSize; + set => _sweepSize = value; } } @@ -81,8 +81,8 @@ namespace Server.Engines.Reports { public DataItem this[int index] { - get{ return (DataItem)(List[index]); } - set{ List[index] = value; } + get => (DataItem)(List[index]); + set => List[index] = value; } public int Add(DataItem value) diff --git a/Scripts/Engines/Reports/Rendering/PieChartRenderer.cs b/Scripts/Engines/Reports/Rendering/PieChartRenderer.cs index 38f37fc25..627ebf1e9 100644 --- a/Scripts/Engines/Reports/Rendering/PieChartRenderer.cs +++ b/Scripts/Engines/Reports/Rendering/PieChartRenderer.cs @@ -30,7 +30,9 @@ namespace Server.Engines.Reports private float _legendFontSize; private bool _showPercents; - public bool ShowPercents{ get{ return _showPercents; } set{ _showPercents = value; } } + public bool ShowPercents{ get => _showPercents; + set => _showPercents = value; + } public PieChartRenderer() { diff --git a/Scripts/Engines/Reports/Reports.cs b/Scripts/Engines/Reports/Reports.cs index 0e75e4ddd..9fb2fc910 100644 --- a/Scripts/Engines/Reports/Reports.cs +++ b/Scripts/Engines/Reports/Reports.cs @@ -49,7 +49,7 @@ namespace Server.Engines.Reports private static SnapshotHistory m_StatsHistory; private static StaffHistory m_StaffHistory; - public static StaffHistory StaffHistory{ get{ return m_StaffHistory; } } + public static StaffHistory StaffHistory => m_StaffHistory; public static void Generate() { diff --git a/Scripts/Engines/Spawner/ProximitySpawner.cs b/Scripts/Engines/Spawner/ProximitySpawner.cs index 6c70cda21..9b1ca9d65 100644 --- a/Scripts/Engines/Spawner/ProximitySpawner.cs +++ b/Scripts/Engines/Spawner/ProximitySpawner.cs @@ -11,22 +11,22 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.Developer )] public int TriggerRange { - get { return m_TriggerRange; } - set { m_TriggerRange = value; } + get => m_TriggerRange; + set => m_TriggerRange = value; } [CommandProperty( AccessLevel.Developer )] public TextDefinition SpawnMessage { - get { return m_SpawnMessage; } - set { m_SpawnMessage = value; } + get => m_SpawnMessage; + set => m_SpawnMessage = value; } [CommandProperty( AccessLevel.Developer )] public bool InstantFlag { - get { return m_InstantFlag; } - set { m_InstantFlag = value; } + get => m_InstantFlag; + set => m_InstantFlag = value; } [Constructible] @@ -68,10 +68,7 @@ namespace Server.Mobiles m_InstantFlag = instantFlag; } - public override string DefaultName - { - get { return "Proximity Spawner"; } - } + public override string DefaultName => "Proximity Spawner"; public override void DoTimer( TimeSpan delay ) { diff --git a/Scripts/Engines/Spawner/Spawner.cs b/Scripts/Engines/Spawner/Spawner.cs index e476ed01d..f13abca8e 100644 --- a/Scripts/Engines/Spawner/Spawner.cs +++ b/Scripts/Engines/Spawner/Spawner.cs @@ -27,15 +27,17 @@ namespace Server.Mobiles private WayPoint m_WayPoint; public override string DefaultName => "Spawner"; - public bool IsFull{ get{ return ( m_Spawned != null && m_Spawned.Count >= m_Count ); } } - public bool IsEmpty{ get{ return ( m_Spawned != null && m_Spawned.Count == 0 ); } } + public bool IsFull => ( m_Spawned != null && m_Spawned.Count >= m_Count ); + public bool IsEmpty => ( m_Spawned != null && m_Spawned.Count == 0 ); - public Point3D HomeLocation{ get{ return Location; } } - public bool UnlinkOnTaming{ get{ return true; } } - public DateTime End{ get{ return m_End; } set{ m_End = value; } } + public Point3D HomeLocation => Location; + public bool UnlinkOnTaming => true; + public DateTime End{ get => m_End; + set => m_End = value; + } - public List Entries{ get{ return m_Entries; } } - public Dictionary Spawned{ get{ return m_Spawned; } } + public List Entries => m_Entries; + public Dictionary Spawned => m_Spawned; public override void OnAfterDuped( Item newItem ) { @@ -49,7 +51,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.Developer )] public int Count { - get { return m_Count; } + get => m_Count; set { m_Count = value; @@ -65,12 +67,14 @@ namespace Server.Mobiles } [CommandProperty( AccessLevel.Developer )] - public WayPoint WayPoint{ get{ return m_WayPoint; } set{ m_WayPoint = value; } } + public WayPoint WayPoint{ get => m_WayPoint; + set => m_WayPoint = value; + } [CommandProperty( AccessLevel.Developer )] public bool Running { - get { return m_Running; } + get => m_Running; set { if ( value ) @@ -83,19 +87,24 @@ namespace Server.Mobiles } [CommandProperty( AccessLevel.Developer )] - public int HomeRange{ get { return m_HomeRange; } set { m_HomeRange = value; InvalidateProperties(); } } + public int HomeRange{ get => m_HomeRange; + set { m_HomeRange = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.Developer )] - public int WalkingRange{ get { return m_WalkingRange; } set { m_WalkingRange = value; InvalidateProperties(); } } + public int WalkingRange{ get => m_WalkingRange; + set { m_WalkingRange = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.Developer )] - public int Team{ get { return m_Team; } set { m_Team = value; InvalidateProperties(); } } + public int Team{ get => m_Team; + set { m_Team = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.Developer )] - public TimeSpan MinDelay{ get { return m_MinDelay; } set { m_MinDelay = value; InvalidateProperties(); } } + public TimeSpan MinDelay{ get => m_MinDelay; + set { m_MinDelay = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.Developer )] - public TimeSpan MaxDelay{ get { return m_MaxDelay; } set { m_MaxDelay = value; InvalidateProperties(); } } + public TimeSpan MaxDelay{ get => m_MaxDelay; + set { m_MaxDelay = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.Developer )] public TimeSpan NextSpawn @@ -117,11 +126,11 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.Developer )] public bool Group { - get { return m_Group; } + get => m_Group; set { m_Group = value; InvalidateProperties(); } } - Region ISpawner.Region{ get{ return Region.Find( Location, Map ); } } + Region ISpawner.Region => Region.Find( Location, Map ); // [Constructible] public Spawner( int amount, int minDelay, int maxDelay, int team, int homeRange, string spawnedNames ) : base( 0x1f13 ) @@ -1073,38 +1082,40 @@ namespace Server.Mobiles public int SpawnedProbability { - get { return m_SpawnedProbability; } - set { m_SpawnedProbability = value; } + get => m_SpawnedProbability; + set => m_SpawnedProbability = value; } public int SpawnedMaxCount { - get { return m_SpawnedMaxCount; } - set { m_SpawnedMaxCount = value; } + get => m_SpawnedMaxCount; + set => m_SpawnedMaxCount = value; } public string SpawnedName { - get { return m_SpawnedName; } - set { m_SpawnedName = value; } + get => m_SpawnedName; + set => m_SpawnedName = value; } public string Properties { - get { return m_Properties; } - set { m_Properties = value; } + get => m_Properties; + set => m_Properties = value; } public string Parameters { - get { return m_Parameters; } - set { m_Parameters = value; } + get => m_Parameters; + set => m_Parameters = value; } - public EntryFlags Valid{ get{ return m_Valid; } set{ m_Valid = value; } } + public EntryFlags Valid{ get => m_Valid; + set => m_Valid = value; + } public List Spawned => m_Spawned; - public bool IsFull{ get{ return m_Spawned.Count >= m_SpawnedMaxCount; } } + public bool IsFull => m_Spawned.Count >= m_SpawnedMaxCount; public SpawnerEntry( string name, int probability, int maxcount ) { diff --git a/Scripts/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs b/Scripts/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs index 08be88468..33b2c2650 100644 --- a/Scripts/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs +++ b/Scripts/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs @@ -65,7 +65,7 @@ namespace Server.Items protected TextDefinition Label { - get { return m_Label; } + get => m_Label; set { m_Label = value; InvalidateProperties(); } } @@ -73,10 +73,8 @@ namespace Server.Items /* DO NOT USE! Only used in serialization of pigments that originally derived from Item */ private bool m_InheritsItem; - protected bool InheritsItem - { - get{ return m_InheritsItem; } - } + protected bool InheritsItem => m_InheritsItem; + #endregion public BasePigmentsOfTokuno() : base( 0xEFF ) @@ -248,13 +246,13 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } public bool ShowUsesRemaining { - get { return true; } + get => true; set {} } diff --git a/Scripts/Engines/Treasures of Tokuno/GreaterArtifacts.cs b/Scripts/Engines/Treasures of Tokuno/GreaterArtifacts.cs index 42ef2399d..70e3e35ac 100644 --- a/Scripts/Engines/Treasures of Tokuno/GreaterArtifacts.cs +++ b/Scripts/Engines/Treasures of Tokuno/GreaterArtifacts.cs @@ -433,7 +433,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public PigmentType Type { - get { return m_Type; } + get => m_Type; set { m_Type = value; diff --git a/Scripts/Engines/Treasures of Tokuno/LesserArtifacts.cs b/Scripts/Engines/Treasures of Tokuno/LesserArtifacts.cs index 890738bfb..ea798f719 100644 --- a/Scripts/Engines/Treasures of Tokuno/LesserArtifacts.cs +++ b/Scripts/Engines/Treasures of Tokuno/LesserArtifacts.cs @@ -671,8 +671,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string UrnName { - get { return m_UrnName; } - set { m_UrnName = value; } + get => m_UrnName; + set => m_UrnName = value; } public override int LabelNumber => 1071014; // Ancient Urn @@ -730,8 +730,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string SwordsName { - get { return m_SwordsName; } - set { m_SwordsName = value; } + get => m_SwordsName; + set => m_SwordsName = value; } public override int LabelNumber => 1071015; // Honorable Swords @@ -948,7 +948,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public LesserPigmentType Type { - get { return m_Type; } + get => m_Type; set { m_Type = value; diff --git a/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs b/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs index b4124c8a3..13f38cc48 100644 --- a/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs +++ b/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs @@ -37,14 +37,14 @@ namespace Server.Misc public static TreasuresOfTokunoEra DropEra { - get { return _DropEra; } - set { _DropEra = value; } + get => _DropEra; + set => _DropEra = value; } public static TreasuresOfTokunoEra RewardEra { - get { return _RewardEra; } - set { _RewardEra = value; } + get => _RewardEra; + set => _RewardEra = value; } private static Type[][] m_LesserArtifacts = new Type[][] @@ -77,10 +77,7 @@ namespace Server.Misc } }; - public static Type[] LesserArtifacts - { - get { return m_LesserArtifacts[(int)RewardEra-1]; } - } + public static Type[] LesserArtifacts => m_LesserArtifacts[(int)RewardEra-1]; private static Type[][] m_GreaterArtifacts = null; @@ -191,7 +188,7 @@ namespace Server.Mobiles public override string DefaultName => "Ihara Soko"; protected List m_SBInfos = new List(); - protected override List SBInfos { get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override void InitSBInfo() { @@ -293,8 +290,8 @@ namespace Server.Gumps public Item Item { - get { return m_Item; } - set { m_Item = value; } + get => m_Item; + set => m_Item = value; } public ItemTileButtonInfo( Item i ) : base( i.ItemID, i.Hue, ((i.Name == null || i.Name.Length <= 0)? (TextDefinition)i.LabelNumber : (TextDefinition)i.Name ) ) @@ -423,15 +420,9 @@ namespace Server.Gumps public PigmentType Pigment { - get - { - return m_Pigment; - } + get => m_Pigment; - set - { - m_Pigment = value; - } + set => m_Pigment = value; } public PigmentsTileButtonInfo( PigmentType p ) : base( 0xEFF, PigmentsOfTokuno.GetInfo( p )[0], PigmentsOfTokuno.GetInfo( p )[1] ) @@ -484,10 +475,7 @@ namespace Server.Gumps }; #endregion - public static TypeTileButtonInfo[][] NormalRewards - { - get { return m_NormalRewards; } - } + public static TypeTileButtonInfo[][] NormalRewards => m_NormalRewards; #region ToT Pigment Rewards Table private static PigmentsTileButtonInfo[][] m_PigmentRewards = new PigmentsTileButtonInfo[][] @@ -533,10 +521,7 @@ namespace Server.Gumps }; #endregion - public static PigmentsTileButtonInfo[][] PigmentRewards - { - get { return m_PigmentRewards; } - } + public static PigmentsTileButtonInfo[][] PigmentRewards => m_PigmentRewards; private Mobile m_Collector; diff --git a/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokunoPersistance.cs b/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokunoPersistance.cs index 6246995d6..2e596d8c8 100644 --- a/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokunoPersistance.cs +++ b/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokunoPersistance.cs @@ -4,12 +4,9 @@ namespace Server.Misc { private static TreasuresOfTokunoPersistance m_Instance; - public static TreasuresOfTokunoPersistance Instance{ get{ return m_Instance; } } + public static TreasuresOfTokunoPersistance Instance => m_Instance; - public override string DefaultName - { - get { return "TreasuresOfTokuno Persistance - Internal"; } - } + public override string DefaultName => "TreasuresOfTokuno Persistance - Internal"; public static void Initialize() { diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs index ab4f3d272..2f053a4bc 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs @@ -47,21 +47,21 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public StatueType StatueType { - get { return m_Type; } + get => m_Type; set { m_Type = value; InvalidateHues(); InvalidatePose(); } } [CommandProperty( AccessLevel.GameMaster )] public StatuePose Pose { - get { return m_Pose; } + get => m_Pose; set { m_Pose = value; InvalidatePose(); } } [CommandProperty( AccessLevel.GameMaster )] public StatueMaterial Material { - get { return m_Material; } + get => m_Material; set { m_Material = value; InvalidateHues(); InvalidatePose(); } } @@ -71,23 +71,23 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile SculptedBy { - get{ return m_SculptedBy; } + get => m_SculptedBy; set{ m_SculptedBy = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public DateTime SculptedOn { - get{ return m_SculptedOn; } - set{ m_SculptedOn = value; } + get => m_SculptedOn; + set => m_SculptedOn = value; } private CharacterStatuePlinth m_Plinth; public CharacterStatuePlinth Plinth { - get { return m_Plinth; } - set { m_Plinth = value; } + get => m_Plinth; + set => m_Plinth = value; } private bool m_IsRewardItem; @@ -95,8 +95,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } public CharacterStatue( Mobile from, StatueType type ) @@ -442,8 +442,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public CharacterStatue Statue { - get { return m_Statue; } - set { m_Statue = value; } + get => m_Statue; + set => m_Statue = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -456,13 +456,13 @@ namespace Server.Mobiles return m_Type; } - set { m_Type = value; } + set => m_Type = value; } [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs index 6803b2b5c..e0a0c26ef 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs @@ -13,14 +13,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public StatueType StatueType { - get{ return m_Type; } + get => m_Type; set{ m_Type = value; InvalidateHue(); } } diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs index 96f0e43dd..4915af869 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs @@ -7,7 +7,7 @@ namespace Server.Items { public class CharacterStatuePlinth : Static, IAddon { - public Item Deed{ get{ return new CharacterStatueDeed( m_Statue ); } } + public Item Deed => new CharacterStatueDeed( m_Statue ); public override int LabelNumber => 1076201; // Character Statue private CharacterStatue m_Statue; diff --git a/Scripts/Engines/VeteranRewards/RewardCategory.cs b/Scripts/Engines/VeteranRewards/RewardCategory.cs index 7a4f7be60..bb185c077 100644 --- a/Scripts/Engines/VeteranRewards/RewardCategory.cs +++ b/Scripts/Engines/VeteranRewards/RewardCategory.cs @@ -8,8 +8,8 @@ namespace Server.Engines.VeteranRewards private string m_NameString; private List m_Entries; - public int Name{ get{ return m_Name; } } - public string NameString{ get{ return m_NameString; } } + public int Name => m_Name; + public string NameString => m_NameString; public List Entries => m_Entries; public RewardCategory( int name ) diff --git a/Scripts/Engines/VeteranRewards/RewardEntry.cs b/Scripts/Engines/VeteranRewards/RewardEntry.cs index e55d95c90..a728aa22a 100644 --- a/Scripts/Engines/VeteranRewards/RewardEntry.cs +++ b/Scripts/Engines/VeteranRewards/RewardEntry.cs @@ -12,13 +12,15 @@ namespace Server.Engines.VeteranRewards private string m_NameString; private object[] m_Args; - public RewardList List{ get{ return m_List; } set{ m_List = value; } } - public RewardCategory Category{ get{ return m_Category; } } - public Type ItemType{ get{ return m_ItemType; } } - public Expansion RequiredExpansion{ get{ return m_RequiredExpansion; } } - public int Name{ get{ return m_Name; } } - public string NameString{ get{ return m_NameString; } } - public object[] Args{ get{ return m_Args; } } + public RewardList List{ get => m_List; + set => m_List = value; + } + public RewardCategory Category => m_Category; + public Type ItemType => m_ItemType; + public Expansion RequiredExpansion => m_RequiredExpansion; + public int Name => m_Name; + public string NameString => m_NameString; + public object[] Args => m_Args; public Item Construct() { diff --git a/Scripts/Engines/VeteranRewards/RewardList.cs b/Scripts/Engines/VeteranRewards/RewardList.cs index c8a6517b1..7a721b23a 100644 --- a/Scripts/Engines/VeteranRewards/RewardList.cs +++ b/Scripts/Engines/VeteranRewards/RewardList.cs @@ -7,8 +7,8 @@ namespace Server.Engines.VeteranRewards private TimeSpan m_Age; private RewardEntry[] m_Entries; - public TimeSpan Age{ get{ return m_Age; } } - public RewardEntry[] Entries{ get{ return m_Entries; } } + public TimeSpan Age => m_Age; + public RewardEntry[] Entries => m_Entries; public RewardList( TimeSpan interval, int index, RewardEntry[] entries ) { diff --git a/Scripts/Engines/VeteranRewards/RewardOptionGump.cs b/Scripts/Engines/VeteranRewards/RewardOptionGump.cs index b7b9e0000..cb04a7b85 100644 --- a/Scripts/Engines/VeteranRewards/RewardOptionGump.cs +++ b/Scripts/Engines/VeteranRewards/RewardOptionGump.cs @@ -76,8 +76,8 @@ namespace Server.Gumps private int m_ID; private int m_Cliloc; - public int ID{ get{ return m_ID; } } - public int Cliloc{ get{ return m_Cliloc; } } + public int ID => m_ID; + public int Cliloc => m_Cliloc; public RewardOption( int id, int cliloc ) { diff --git a/Scripts/Engines/Virtues/Honor.cs b/Scripts/Engines/Virtues/Honor.cs index 69aa63e92..38fa9f2f9 100644 --- a/Scripts/Engines/Virtues/Honor.cs +++ b/Scripts/Engines/Virtues/Honor.cs @@ -208,8 +208,8 @@ namespace Server private InternalTimer m_Timer; - public PlayerMobile Source{ get{ return m_Source; } } - public Mobile Target{ get{ return m_Target; } } + public PlayerMobile Source => m_Source; + public Mobile Target => m_Target; public HonorContext( PlayerMobile source, Mobile target ) { @@ -388,15 +388,9 @@ namespace Server } } - public int PerfectionDamageBonus - { - get { return m_Perfection; } - } + public int PerfectionDamageBonus => m_Perfection; - public int PerfectionLuckBonus - { - get{ return (m_Perfection * m_Perfection) / 10; } - } + public int PerfectionLuckBonus => (m_Perfection * m_Perfection) / 10; public bool CheckDistance() { diff --git a/Scripts/Gumps/BaseConfirmGump.cs b/Scripts/Gumps/BaseConfirmGump.cs index c7c73212c..6afed9ddf 100644 --- a/Scripts/Gumps/BaseConfirmGump.cs +++ b/Scripts/Gumps/BaseConfirmGump.cs @@ -2,9 +2,12 @@ namespace Server.Gumps { public class BaseConfirmGump : Gump { - public virtual int TitleNumber{ get{ return 1075083; } } //
Warning!
- public virtual int LabelNumber{ get{ return 1074975; } } // Are you sure you wish to select this? - + public virtual int TitleNumber //
Warning!
+ => 1075083; + + public virtual int LabelNumber // Are you sure you wish to select this? + => 1074975; + private enum Buttons { Close, diff --git a/Scripts/Gumps/BaseGridGump.cs b/Scripts/Gumps/BaseGridGump.cs index 102f9d8f7..658a3bed0 100644 --- a/Scripts/Gumps/BaseGridGump.cs +++ b/Scripts/Gumps/BaseGridGump.cs @@ -10,37 +10,28 @@ namespace Server.Gumps protected GumpBackground m_Background; protected GumpImageTiled m_Offset; - public int CurrentPage - { - get{ return m_CurrentPage; } - } + public int CurrentPage => m_CurrentPage; - public int CurrentX - { - get{ return m_CurrentX; } - } + public int CurrentX => m_CurrentX; - public int CurrentY - { - get{ return m_CurrentY; } - } + public int CurrentY => m_CurrentY; public BaseGridGump( int x, int y ) : base( x, y ) { } - public virtual int BorderSize{ get{ return 10; } } - public virtual int OffsetSize{ get{ return 1; } } + public virtual int BorderSize => 10; + public virtual int OffsetSize => 1; - public virtual int EntryHeight{ get{ return 20; } } + public virtual int EntryHeight => 20; - public virtual int OffsetGumpID{ get{ return 0x0A40; } } - public virtual int HeaderGumpID{ get{ return 0x0E14; } } - public virtual int EntryGumpID{ get{ return 0x0BBC; } } - public virtual int BackGumpID{ get{ return 0x13BE; } } + public virtual int OffsetGumpID => 0x0A40; + public virtual int HeaderGumpID => 0x0E14; + public virtual int EntryGumpID => 0x0BBC; + public virtual int BackGumpID => 0x13BE; - public virtual int TextHue{ get{ return 0; } } - public virtual int TextOffsetX{ get{ return 2; } } + public virtual int TextHue => 0; + public virtual int TextOffsetX => 2; public const int ArrowLeftID1 = 0x15E3; public const int ArrowLeftID2 = 0x15E7; diff --git a/Scripts/Gumps/BaseImageTileButtonsGump.cs b/Scripts/Gumps/BaseImageTileButtonsGump.cs index a43ee425d..a3546653f 100644 --- a/Scripts/Gumps/BaseImageTileButtonsGump.cs +++ b/Scripts/Gumps/BaseImageTileButtonsGump.cs @@ -13,24 +13,24 @@ namespace Server.Gumps public virtual int ItemID { - get{ return m_ItemID; } - set{ m_ItemID = value; } + get => m_ItemID; + set => m_ItemID = value; } public virtual int Hue { - get{ return m_Hue; } - set{ m_Hue = value; } + get => m_Hue; + set => m_Hue = value; } public virtual int LocalizedTooltip { - get{ return m_LocalizedTooltip; } - set{ m_LocalizedTooltip = value; } + get => m_LocalizedTooltip; + set => m_LocalizedTooltip = value; } public virtual TextDefinition Label { - get{ return m_Label; } - set{ m_Label = value; } + get => m_Label; + set => m_Label = value; } public ImageTileButtonInfo( int itemID, int hue, TextDefinition label, int localizedTooltip ) @@ -49,10 +49,10 @@ namespace Server.Gumps { private ImageTileButtonInfo[] m_Buttons; - protected ImageTileButtonInfo[] Buttons { get { return m_Buttons; } } + protected ImageTileButtonInfo[] Buttons => m_Buttons; - protected virtual int XItems{ get{ return 2; } } - protected virtual int YItems{ get { return 5; } } + protected virtual int XItems => 2; + protected virtual int YItems => 5; public BaseImageTileButtonsGump( TextDefinition header, ArrayList buttons ) : this( header, (ImageTileButtonInfo[])buttons.ToArray( typeof( ImageTileButtonInfo ) ) ) { diff --git a/Scripts/Gumps/CategorizedAddGump.cs b/Scripts/Gumps/CategorizedAddGump.cs index 8e6e213f5..e29e0d36c 100644 --- a/Scripts/Gumps/CategorizedAddGump.cs +++ b/Scripts/Gumps/CategorizedAddGump.cs @@ -20,10 +20,10 @@ namespace Server.Gumps private int m_Hue; private CAGCategory m_Parent; - public Type Type{ get{ return m_Type; } } - public int ItemID{ get{ return m_ItemID; } } - public int Hue{ get{ return m_Hue; } } - public CAGCategory Parent{ get{ return m_Parent; } } + public Type Type => m_Type; + public int ItemID => m_ItemID; + public int Hue => m_Hue; + public CAGCategory Parent => m_Parent; public override string Caption => ( m_Type == null ? "bad type" : m_Type.Name ); @@ -62,9 +62,9 @@ namespace Server.Gumps private CAGNode[] m_Nodes; private CAGCategory m_Parent; - public string Title{ get{ return m_Title; } } - public CAGNode[] Nodes{ get{ return m_Nodes; } } - public CAGCategory Parent{ get{ return m_Parent; } } + public string Title => m_Title; + public CAGNode[] Nodes => m_Nodes; + public CAGCategory Parent => m_Parent; public override string Caption => m_Title; diff --git a/Scripts/Gumps/Go/ChildNode.cs b/Scripts/Gumps/Go/ChildNode.cs index 7f6aad628..ed2e5318f 100644 --- a/Scripts/Gumps/Go/ChildNode.cs +++ b/Scripts/Gumps/Go/ChildNode.cs @@ -37,28 +37,10 @@ namespace Server.Gumps m_Location = new Point3D( x, y, z ); } - public ParentNode Parent - { - get - { - return m_Parent; - } - } + public ParentNode Parent => m_Parent; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; - public Point3D Location - { - get - { - return m_Location; - } - } + public Point3D Location => m_Location; } } \ No newline at end of file diff --git a/Scripts/Gumps/Go/LocationTree.cs b/Scripts/Gumps/Go/LocationTree.cs index 0f55a4180..b0ba393db 100644 --- a/Scripts/Gumps/Go/LocationTree.cs +++ b/Scripts/Gumps/Go/LocationTree.cs @@ -29,29 +29,11 @@ namespace Server.Gumps } } - public Dictionary LastBranch - { - get - { - return m_LastBranch; - } - } + public Dictionary LastBranch => m_LastBranch; - public Map Map - { - get - { - return m_Map; - } - } + public Map Map => m_Map; - public ParentNode Root - { - get - { - return m_Root; - } - } + public ParentNode Root => m_Root; private ParentNode Parse( XmlTextReader xml ) { diff --git a/Scripts/Gumps/Go/ParentNode.cs b/Scripts/Gumps/Go/ParentNode.cs index 4263ce34e..7bb2a4335 100644 --- a/Scripts/Gumps/Go/ParentNode.cs +++ b/Scripts/Gumps/Go/ParentNode.cs @@ -53,28 +53,10 @@ namespace Server.Gumps } } - public ParentNode Parent - { - get - { - return m_Parent; - } - } + public ParentNode Parent => m_Parent; - public object[] Children - { - get - { - return m_Children; - } - } + public object[] Children => m_Children; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; } } \ No newline at end of file diff --git a/Scripts/Gumps/Guilds/New Guild System/BaseGuildGump.cs b/Scripts/Gumps/Guilds/New Guild System/BaseGuildGump.cs index ea1c2e4a4..0f5ba8a41 100644 --- a/Scripts/Gumps/Guilds/New Guild System/BaseGuildGump.cs +++ b/Scripts/Gumps/Guilds/New Guild System/BaseGuildGump.cs @@ -11,8 +11,8 @@ namespace Server.Guilds private Guild m_Guild; private PlayerMobile m_Player; - protected Guild guild{ get{ return m_Guild; } } - protected PlayerMobile player{ get{ return m_Player; } } + protected Guild guild => m_Guild; + protected PlayerMobile player => m_Player; public BaseGuildGump( PlayerMobile pm, Guild g ) : this( pm, g, 10, 10 ) { diff --git a/Scripts/Gumps/Guilds/New Guild System/BaseGuildListGump.cs b/Scripts/Gumps/Guilds/New Guild System/BaseGuildListGump.cs index 7498257d1..3dbd5b3c1 100644 --- a/Scripts/Gumps/Guilds/New Guild System/BaseGuildListGump.cs +++ b/Scripts/Gumps/Guilds/New Guild System/BaseGuildListGump.cs @@ -29,7 +29,7 @@ namespace Server.Guilds m_List = list; } - public virtual bool WillFilter{ get{ return (m_Filter.Length >= 0); } } + public virtual bool WillFilter => (m_Filter.Length >= 0); public override void PopulateGump() { @@ -192,8 +192,8 @@ namespace Server.Guilds private int m_Width; private IComparer m_Comparer; - public TextDefinition Name{ get{ return m_Name; } } - public int Width{ get{ return m_Width; } } + public TextDefinition Name => m_Name; + public int Width => m_Width; public IComparer Comparer => m_Comparer; public InfoField( TextDefinition name, int width, IComparer comparer ) { diff --git a/Scripts/Gumps/Guilds/New Guild System/DiplomacyGump.cs b/Scripts/Gumps/Guilds/New Guild System/DiplomacyGump.cs index ea6700b46..7c3dd8f06 100644 --- a/Scripts/Gumps/Guilds/New Guild System/DiplomacyGump.cs +++ b/Scripts/Gumps/Guilds/New Guild System/DiplomacyGump.cs @@ -14,7 +14,8 @@ namespace Server.Guilds public class GuildDiplomacyGump : BaseGuildListGump { - protected virtual bool AllowAdvancedSearch{ get{ return true; } } + protected virtual bool AllowAdvancedSearch => true; + #region Comparers private class NameComparer : IComparer { diff --git a/Scripts/Gumps/PlayerVendorGumps.cs b/Scripts/Gumps/PlayerVendorGumps.cs index bda5285ca..b2817a25f 100644 --- a/Scripts/Gumps/PlayerVendorGumps.cs +++ b/Scripts/Gumps/PlayerVendorGumps.cs @@ -352,11 +352,11 @@ namespace Server.Gumps return i; } - public Type Type{ get{ return m_Type; } } - public int ItemID{ get{ return m_ItemID; } } - public int LocNumber{ get{ return m_LocNum; } } - public int ArtNumber{ get{ return m_ArtNum; } } - public bool LongText{ get{ return m_LongText; } } + public Type Type => m_Type; + public int ItemID => m_ItemID; + public int LocNumber => m_LocNum; + public int ArtNumber => m_ArtNum; + public bool LongText => m_LongText; } private class CustomCategory @@ -374,10 +374,10 @@ namespace Server.Gumps m_LocNum = loc; } - public bool CanDye{ get{ return m_CanDye; } } - public CustomItem[] Entries{ get{ return m_Entries; } } - public Layer Layer{ get{ return m_Layer; } } - public int LocNumber{ get{ return m_LocNum; } } + public bool CanDye => m_CanDye; + public CustomItem[] Entries => m_Entries; + public Layer Layer => m_Layer; + public int LocNumber => m_LocNum; } private static CustomCategory[] Categories = new CustomCategory[]{ @@ -788,8 +788,8 @@ namespace Server.Gumps private int m_ItemID; private int m_Name; - public int ItemID{ get{ return m_ItemID; } } - public int Name{ get{ return m_Name; } } + public int ItemID => m_ItemID; + public int Name => m_Name; public HairOrBeard( int itemID, int name ) { diff --git a/Scripts/Gumps/PolymorphGump.cs b/Scripts/Gumps/PolymorphGump.cs index d506d8ccf..d69404286 100644 --- a/Scripts/Gumps/PolymorphGump.cs +++ b/Scripts/Gumps/PolymorphGump.cs @@ -40,8 +40,8 @@ namespace Server.Gumps public int ArtID => m_Art; public int BodyID => m_Body; public int LocNumber => m_Num; - public int X{ get{ return m_X; } } - public int Y{ get{ return m_Y; } } + public int X => m_X; + public int Y => m_Y; } diff --git a/Scripts/Gumps/RunebookGump.cs b/Scripts/Gumps/RunebookGump.cs index 23fb01acb..55edacb3b 100644 --- a/Scripts/Gumps/RunebookGump.cs +++ b/Scripts/Gumps/RunebookGump.cs @@ -13,7 +13,7 @@ namespace Server.Gumps { private Runebook m_Book; - public Runebook Book{ get{ return m_Book; } } + public Runebook Book => m_Book; public int GetMapHue( Map map ) { diff --git a/Scripts/Gumps/SkillsGump.cs b/Scripts/Gumps/SkillsGump.cs index 37752d010..1f6c4a61a 100644 --- a/Scripts/Gumps/SkillsGump.cs +++ b/Scripts/Gumps/SkillsGump.cs @@ -428,8 +428,8 @@ namespace Server.Gumps private string m_Name; private SkillName[] m_Skills; - public string Name{ get{ return m_Name; } } - public SkillName[] Skills{ get{ return m_Skills; } } + public string Name => m_Name; + public SkillName[] Skills => m_Skills; public SkillsGumpGroup( string name, SkillName[] skills ) { @@ -540,9 +540,6 @@ namespace Server.Gumps } ) }; - public static SkillsGumpGroup[] Groups - { - get{ return m_Groups; } - } + public static SkillsGumpGroup[] Groups => m_Groups; } } \ No newline at end of file diff --git a/Scripts/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs b/Scripts/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs index 122a31c0a..69511c28d 100644 --- a/Scripts/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs +++ b/Scripts/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs @@ -7,7 +7,7 @@ namespace Server.Items { public class Fireflies : Item, IAddon { - public override int LabelNumber { get { return 1150061; }} + public override int LabelNumber => 1150061; public Item Deed { diff --git a/Scripts/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs b/Scripts/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs index 47131c368..ae93e81d3 100644 --- a/Scripts/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs +++ b/Scripts/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs @@ -19,7 +19,7 @@ namespace Server.Items.Holiday } } - public virtual string MaskName { get { return "A Mask"; } } + public virtual string MaskName => "A Mask"; private string m_Staffer; diff --git a/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs b/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs index 8dd9a1d3b..90fe1bda5 100644 --- a/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs +++ b/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs @@ -8,7 +8,9 @@ namespace Server.Engines.Events { public class HalloweenHauntings { - public static Dictionary ReAnimated { get { return m_ReAnimated; } set { m_ReAnimated = value; } } + public static Dictionary ReAnimated { get => m_ReAnimated; + set => m_ReAnimated = value; + } private static Timer m_Timer; private static Timer m_ClearTimer; diff --git a/Scripts/Holiday Stuff/Halloween/HolidaySettings.cs b/Scripts/Holiday Stuff/Halloween/HolidaySettings.cs index fe45f40ec..6e72f5a18 100644 --- a/Scripts/Holiday Stuff/Halloween/HolidaySettings.cs +++ b/Scripts/Holiday Stuff/Halloween/HolidaySettings.cs @@ -5,11 +5,13 @@ namespace Server.Events.Halloween { class HolidaySettings { - public static DateTime StartHalloween { get { return new DateTime( 2012, 10, 24 ); } } // YY MM DD - public static DateTime FinishHalloween { get { return new DateTime( 2012, 11, 15 ); } } + public static DateTime StartHalloween // YY MM DD + => new DateTime( 2012, 10, 24 ); - public static Item RandomGMBeggerItem { get { return ( Item )Activator.CreateInstance( m_GMBeggarTreats[ Utility.Random( m_GMBeggarTreats.Length ) ] ); } } - public static Item RandomTreat { get { return (Item)Activator.CreateInstance ( m_Treats[ Utility.Random( m_Treats.Length ) ]) ; } } + public static DateTime FinishHalloween => new DateTime( 2012, 11, 15 ); + + public static Item RandomGMBeggerItem => ( Item )Activator.CreateInstance( m_GMBeggarTreats[ Utility.Random( m_GMBeggarTreats.Length ) ] ); + public static Item RandomTreat => (Item)Activator.CreateInstance ( m_Treats[ Utility.Random( m_Treats.Length ) ]); private static Type[] m_GMBeggarTreats = { diff --git a/Scripts/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs b/Scripts/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs index 038f502cd..dc6d1028b 100644 --- a/Scripts/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs +++ b/Scripts/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs @@ -27,47 +27,41 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string Owner { - get { return m_Owner; } + get => m_Owner; set { m_Owner = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string Line1 { - get { return m_Line1; } + get => m_Line1; set { m_Line1 = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string Line2 { - get { return m_Line2; } + get => m_Line2; set { m_Line2 = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string Line3 { - get { return m_Line3; } + get => m_Line3; set { m_Line3 = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public DateTime EditLimit { - get { return m_EditLimit; } - set { m_EditLimit = value; } + get => m_EditLimit; + set => m_EditLimit = value; } - public bool IsSigned - { - get { return ( m_Line1 != null || m_Line2 != null || m_Line3 != null ); } - } + public bool IsSigned => ( m_Line1 != null || m_Line2 != null || m_Line3 != null ); - public bool CanSign - { - get { return ( !IsSigned || DateTime.UtcNow <= m_EditLimit ); } - } + public bool CanSign => ( !IsSigned || DateTime.UtcNow <= m_EditLimit ); public StValentinesBear( int itemid, string name ) : base( itemid ) diff --git a/Scripts/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs b/Scripts/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs index b1e27ee34..830b13c80 100644 --- a/Scripts/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs +++ b/Scripts/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs @@ -15,21 +15,18 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string From { - get { return m_From; } + get => m_From; set { m_From = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string To { - get { return m_To; } + get => m_To; set { m_To = value; InvalidateProperties(); } } - public bool IsSigned - { - get { return ( m_From != null && m_To != null ); } - } + public bool IsSigned => ( m_From != null && m_To != null ); [Constructible] public CupidsArrow() diff --git a/Scripts/Items/Addons/AddonComponent.cs b/Scripts/Items/Addons/AddonComponent.cs index 88da8816c..d72bef273 100644 --- a/Scripts/Items/Addons/AddonComponent.cs +++ b/Scripts/Items/Addons/AddonComponent.cs @@ -61,7 +61,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Number { - get{ return m_LabelNumber; } + get => m_LabelNumber; set{ m_LabelNumber = value; InvalidateProperties(); } } @@ -111,36 +111,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public BaseAddon Addon { - get - { - return m_Addon; - } - set - { - m_Addon = value; - } + get => m_Addon; + set => m_Addon = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D Offset { - get - { - return m_Offset; - } - set - { - m_Offset = value; - } + get => m_Offset; + set => m_Offset = value; } [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get - { - return base.Hue; - } + get => base.Hue; set { base.Hue = value; @@ -150,8 +135,8 @@ namespace Server.Items } } - public virtual bool NeedsWall{ get{ return false; } } - public virtual Point3D WallPosition{ get{ return Point3D.Zero; } } + public virtual bool NeedsWall => false; + public virtual Point3D WallPosition => Point3D.Zero; [Constructible] public AddonComponent( int itemID ) : base( itemID ) diff --git a/Scripts/Items/Addons/AddonContainerComponent.cs b/Scripts/Items/Addons/AddonContainerComponent.cs index ed03b4923..58b932ded 100644 --- a/Scripts/Items/Addons/AddonContainerComponent.cs +++ b/Scripts/Items/Addons/AddonContainerComponent.cs @@ -14,21 +14,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public BaseAddonContainer Addon { - get { return m_Addon; } - set { m_Addon = value; } + get => m_Addon; + set => m_Addon = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D Offset { - get { return m_Offset; } - set { m_Offset = value; } + get => m_Offset; + set => m_Offset = value; } [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get { return base.Hue; } + get => base.Hue; set { base.Hue = value; diff --git a/Scripts/Items/Addons/ArcheryButteAddon.cs b/Scripts/Items/Addons/ArcheryButteAddon.cs index 03a473c10..dc44d0be0 100644 --- a/Scripts/Items/Addons/ArcheryButteAddon.cs +++ b/Scripts/Items/Addons/ArcheryButteAddon.cs @@ -17,43 +17,43 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public double MinSkill { - get{ return m_MinSkill; } - set{ m_MinSkill = value; } + get => m_MinSkill; + set => m_MinSkill = value; } [CommandProperty( AccessLevel.GameMaster )] public double MaxSkill { - get{ return m_MaxSkill; } - set{ m_MaxSkill = value; } + get => m_MaxSkill; + set => m_MaxSkill = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime LastUse { - get{ return m_LastUse; } - set{ m_LastUse = value; } + get => m_LastUse; + set => m_LastUse = value; } [CommandProperty( AccessLevel.GameMaster )] public bool FacingEast { - get{ return ( ItemID == 0x100A ); } - set{ ItemID = value ? 0x100A : 0x100B; } + get => ( ItemID == 0x100A ); + set => ItemID = value ? 0x100A : 0x100B; } [CommandProperty( AccessLevel.GameMaster )] public int Arrows { - get{ return m_Arrows; } - set{ m_Arrows = value; } + get => m_Arrows; + set => m_Arrows = value; } [CommandProperty( AccessLevel.GameMaster )] public int Bolts { - get{ return m_Bolts; } - set{ m_Bolts = value; } + get => m_Bolts; + set => m_Bolts = value; } [Constructible] @@ -102,8 +102,12 @@ namespace Server.Items private int m_Total; private int m_Count; - public int Total{ get{ return m_Total; } set{ m_Total = value; } } - public int Count{ get{ return m_Count; } set{ m_Count = value; } } + public int Total{ get => m_Total; + set => m_Total = value; + } + public int Count{ get => m_Count; + set => m_Count = value; + } public void Record( int score ) { diff --git a/Scripts/Items/Addons/BallotBox.cs b/Scripts/Items/Addons/BallotBox.cs index a38f882f3..23b4daf33 100644 --- a/Scripts/Items/Addons/BallotBox.cs +++ b/Scripts/Items/Addons/BallotBox.cs @@ -17,20 +17,11 @@ namespace Server.Items private List m_Yes; private List m_No; - public string[] Topic - { - get{ return m_Topic; } - } + public string[] Topic => m_Topic; - public List Yes - { - get{ return m_Yes; } - } + public List Yes => m_Yes; - public List No - { - get{ return m_No; } - } + public List No => m_No; [Constructible] public BallotBox() : base( 0x9A8 ) diff --git a/Scripts/Items/Addons/BaseAddon.cs b/Scripts/Items/Addons/BaseAddon.cs index 559c623a8..c040c3f17 100644 --- a/Scripts/Items/Addons/BaseAddon.cs +++ b/Scripts/Items/Addons/BaseAddon.cs @@ -29,7 +29,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set { if ( m_Resource != value ) @@ -64,7 +64,7 @@ namespace Server.Items m_Components = new List(); } - public virtual bool RetainDeedHue{ get{ return false; } } + public virtual bool RetainDeedHue => false; public virtual void OnChop( Mobile from ) { @@ -104,20 +104,11 @@ namespace Server.Items } } - public virtual BaseAddonDeed Deed{ get{ return null; } } + public virtual BaseAddonDeed Deed => null; - Item IAddon.Deed - { - get{ return this.Deed; } - } + Item IAddon.Deed => this.Deed; - public List Components - { - get - { - return m_Components; - } - } + public List Components => m_Components; public BaseAddon( Serial serial ) : base( serial ) { @@ -237,15 +228,12 @@ namespace Server.Items c.Delete(); } - public virtual bool ShareHue{ get{ return true; } } + public virtual bool ShareHue => true; [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get - { - return base.Hue; - } + get => base.Hue; set { if ( base.Hue != value ) diff --git a/Scripts/Items/Addons/BaseAddonContainer.cs b/Scripts/Items/Addons/BaseAddonContainer.cs index 6183b3ecb..43528727b 100644 --- a/Scripts/Items/Addons/BaseAddonContainer.cs +++ b/Scripts/Items/Addons/BaseAddonContainer.cs @@ -11,10 +11,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get - { - return base.Hue; - } + get => base.Hue; set { if ( base.Hue != value ) @@ -37,7 +34,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get { return m_Resource; } + get => m_Resource; set { if ( m_Resource != value ) @@ -50,10 +47,7 @@ namespace Server.Items } } - Item IAddon.Deed - { - get { return this.Deed; } - } + Item IAddon.Deed => this.Deed; public virtual bool RetainDeedHue => false; public virtual bool NeedsWall => false; @@ -63,10 +57,7 @@ namespace Server.Items private List m_Components; - public List Components - { - get { return m_Components; } - } + public List Components => m_Components; public BaseAddonContainer( int itemID ) : base( itemID ) { diff --git a/Scripts/Items/Addons/BaseAddonContainerDeed.cs b/Scripts/Items/Addons/BaseAddonContainerDeed.cs index 78520cdf6..45c78d868 100644 --- a/Scripts/Items/Addons/BaseAddonContainerDeed.cs +++ b/Scripts/Items/Addons/BaseAddonContainerDeed.cs @@ -15,7 +15,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set { if ( m_Resource != value ) diff --git a/Scripts/Items/Addons/BaseAddonDeed.cs b/Scripts/Items/Addons/BaseAddonDeed.cs index 63c487c24..c88b78ced 100644 --- a/Scripts/Items/Addons/BaseAddonDeed.cs +++ b/Scripts/Items/Addons/BaseAddonDeed.cs @@ -15,7 +15,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set { if ( m_Resource != value ) diff --git a/Scripts/Items/Addons/DartBoard.cs b/Scripts/Items/Addons/DartBoard.cs index e45a55387..b6f4eabc8 100644 --- a/Scripts/Items/Addons/DartBoard.cs +++ b/Scripts/Items/Addons/DartBoard.cs @@ -7,7 +7,7 @@ namespace Server.Items public override bool NeedsWall => true; public override Point3D WallPosition => this.East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 ); - public bool East{ get{ return this.ItemID == 0x1E2F; } } + public bool East => this.ItemID == 0x1E2F; [Constructible] public DartBoard() : this( true ) diff --git a/Scripts/Items/Addons/ElvenSpinningwheelEastAddon.cs b/Scripts/Items/Addons/ElvenSpinningwheelEastAddon.cs index 22fb79a49..1fcc079ed 100644 --- a/Scripts/Items/Addons/ElvenSpinningwheelEastAddon.cs +++ b/Scripts/Items/Addons/ElvenSpinningwheelEastAddon.cs @@ -42,7 +42,7 @@ namespace Server.Items } } - public bool Spinning{ get{ return m_Timer != null; } } + public bool Spinning => m_Timer != null; public void BeginSpin( SpinCallback callback, Mobile from, int hue ) { diff --git a/Scripts/Items/Addons/ElvenSpinningwheelSouthAddon.cs b/Scripts/Items/Addons/ElvenSpinningwheelSouthAddon.cs index 8ed3468ed..227b355eb 100644 --- a/Scripts/Items/Addons/ElvenSpinningwheelSouthAddon.cs +++ b/Scripts/Items/Addons/ElvenSpinningwheelSouthAddon.cs @@ -43,7 +43,7 @@ namespace Server.Items } } - public bool Spinning{ get{ return m_Timer != null; } } + public bool Spinning => m_Timer != null; public void BeginSpin( SpinCallback callback, Mobile from, int hue ) { diff --git a/Scripts/Items/Addons/FireColumnAddon.cs b/Scripts/Items/Addons/FireColumnAddon.cs index 892f54cfc..7ae634688 100644 --- a/Scripts/Items/Addons/FireColumnAddon.cs +++ b/Scripts/Items/Addons/FireColumnAddon.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class FireColumnAddon : BaseAddon { - public override bool ShareHue - { - get { return false; } - } + public override bool ShareHue => false; [Constructible] public FireColumnAddon() diff --git a/Scripts/Items/Addons/FlourMillEastAddon.cs b/Scripts/Items/Addons/FlourMillEastAddon.cs index 7187e0130..8e97245e1 100644 --- a/Scripts/Items/Addons/FlourMillEastAddon.cs +++ b/Scripts/Items/Addons/FlourMillEastAddon.cs @@ -25,35 +25,23 @@ namespace Server.Items private Timer m_Timer; [CommandProperty( AccessLevel.GameMaster )] - public int MaxFlour - { - get{ return 2; } - } + public int MaxFlour => 2; [CommandProperty( AccessLevel.GameMaster )] public int CurFlour { - get{ return m_Flour; } + get => m_Flour; set{ m_Flour = Math.Max( 0, Math.Min( value, MaxFlour ) ); UpdateStage(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool HasFlour - { - get{ return ( m_Flour > 0 ); } - } + public bool HasFlour => ( m_Flour > 0 ); [CommandProperty( AccessLevel.GameMaster )] - public bool IsFull - { - get{ return ( m_Flour >= MaxFlour ); } - } + public bool IsFull => ( m_Flour >= MaxFlour ); [CommandProperty( AccessLevel.GameMaster )] - public bool IsWorking - { - get{ return ( m_Timer != null ); } - } + public bool IsWorking => ( m_Timer != null ); public void StartWorking( Mobile from ) { diff --git a/Scripts/Items/Addons/FlourMillSouthAddon.cs b/Scripts/Items/Addons/FlourMillSouthAddon.cs index bbc232691..a2fc7d3fa 100644 --- a/Scripts/Items/Addons/FlourMillSouthAddon.cs +++ b/Scripts/Items/Addons/FlourMillSouthAddon.cs @@ -11,35 +11,23 @@ namespace Server.Items private Timer m_Timer; [CommandProperty( AccessLevel.GameMaster )] - public int MaxFlour - { - get{ return 2; } - } + public int MaxFlour => 2; [CommandProperty( AccessLevel.GameMaster )] public int CurFlour { - get{ return m_Flour; } + get => m_Flour; set{ m_Flour = Math.Max( 0, Math.Min( value, MaxFlour ) ); UpdateStage(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool HasFlour - { - get{ return ( m_Flour > 0 ); } - } + public bool HasFlour => ( m_Flour > 0 ); [CommandProperty( AccessLevel.GameMaster )] - public bool IsFull - { - get{ return ( m_Flour >= MaxFlour ); } - } + public bool IsFull => ( m_Flour >= MaxFlour ); [CommandProperty( AccessLevel.GameMaster )] - public bool IsWorking - { - get{ return ( m_Timer != null ); } - } + public bool IsWorking => ( m_Timer != null ); public void StartWorking( Mobile from ) { diff --git a/Scripts/Items/Addons/JackOLantern.cs b/Scripts/Items/Addons/JackOLantern.cs index 251186551..74814eb21 100644 --- a/Scripts/Items/Addons/JackOLantern.cs +++ b/Scripts/Items/Addons/JackOLantern.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class JackOLantern : BaseAddon { - public override bool ShareHue - { - get { return false; } - } + public override bool ShareHue => false; private AddonComponent GetComponent( int itemID, int hue ) { diff --git a/Scripts/Items/Addons/LoomEastAddon.cs b/Scripts/Items/Addons/LoomEastAddon.cs index 8883201cc..7767f522f 100644 --- a/Scripts/Items/Addons/LoomEastAddon.cs +++ b/Scripts/Items/Addons/LoomEastAddon.cs @@ -11,7 +11,9 @@ namespace Server.Items private int m_Phase; - public int Phase{ get{ return m_Phase; } set{ m_Phase = value; } } + public int Phase{ get => m_Phase; + set => m_Phase = value; + } [Constructible] public LoomEastAddon() diff --git a/Scripts/Items/Addons/LoomSouthAddon.cs b/Scripts/Items/Addons/LoomSouthAddon.cs index 581a2f3fa..82db51cfb 100644 --- a/Scripts/Items/Addons/LoomSouthAddon.cs +++ b/Scripts/Items/Addons/LoomSouthAddon.cs @@ -6,7 +6,9 @@ namespace Server.Items private int m_Phase; - public int Phase{ get{ return m_Phase; } set{ m_Phase = value; } } + public int Phase{ get => m_Phase; + set => m_Phase = value; + } [Constructible] public LoomSouthAddon() diff --git a/Scripts/Items/Addons/PickpocketDips.cs b/Scripts/Items/Addons/PickpocketDips.cs index 7d1ec428d..ccb97578a 100644 --- a/Scripts/Items/Addons/PickpocketDips.cs +++ b/Scripts/Items/Addons/PickpocketDips.cs @@ -13,22 +13,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public double MinSkill { - get{ return m_MinSkill; } - set{ m_MinSkill = value; } + get => m_MinSkill; + set => m_MinSkill = value; } [CommandProperty( AccessLevel.GameMaster )] public double MaxSkill { - get{ return m_MaxSkill; } - set{ m_MaxSkill = value; } + get => m_MaxSkill; + set => m_MaxSkill = value; } [CommandProperty( AccessLevel.GameMaster )] - public bool Swinging - { - get{ return ( m_Timer != null ); } - } + public bool Swinging => ( m_Timer != null ); public PickpocketDip( int itemID ) : base( itemID ) { diff --git a/Scripts/Items/Addons/PyramidAddon.cs b/Scripts/Items/Addons/PyramidAddon.cs index b6c27094f..dfbc148b8 100644 --- a/Scripts/Items/Addons/PyramidAddon.cs +++ b/Scripts/Items/Addons/PyramidAddon.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class PyramidAddon : BaseAddon { - public override bool ShareHue - { - get { return false; } - } + public override bool ShareHue => false; [Constructible] public PyramidAddon() diff --git a/Scripts/Items/Addons/SHTeleporter.cs b/Scripts/Items/Addons/SHTeleporter.cs index 345799e9c..8d1e56938 100644 --- a/Scripts/Items/Addons/SHTeleporter.cs +++ b/Scripts/Items/Addons/SHTeleporter.cs @@ -12,7 +12,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get { return m_Active; } + get => m_Active; set { m_Active = value; @@ -25,21 +25,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Point3D TeleOffset { - get { return m_TeleOffset; } - set { m_TeleOffset = value; } + get => m_TeleOffset; + set => m_TeleOffset = value; } [CommandProperty(AccessLevel.GameMaster)] public Point3D TelePoint { - get { return new Point3D( Location.X + TeleOffset.X, Location.Y + TeleOffset.Y, Location.Z + TeleOffset.Z ); } - set { m_TeleOffset = new Point3D( value.X - Location.X, value.Y - Location.Y, value.Z - Location.Z ); } + get => new Point3D( Location.X + TeleOffset.X, Location.Y + TeleOffset.Y, Location.Z + TeleOffset.Z ); + set => m_TeleOffset = new Point3D( value.X - Location.X, value.Y - Location.Y, value.Z - Location.Z ); } [CommandProperty( AccessLevel.GameMaster )] public SHTeleComponent TeleDest { - get { return m_TeleDest; } + get => m_TeleDest; set { m_TeleDest = value; @@ -49,10 +49,7 @@ namespace Server.Items } } - public override string DefaultName - { - get { return "a hole"; } - } + public override string DefaultName => "a hole"; [Constructible] public SHTeleComponent() : this( 0x1775 ) diff --git a/Scripts/Items/Addons/SpinningwheelEastAddon.cs b/Scripts/Items/Addons/SpinningwheelEastAddon.cs index 5e7630fc2..ee54fd219 100644 --- a/Scripts/Items/Addons/SpinningwheelEastAddon.cs +++ b/Scripts/Items/Addons/SpinningwheelEastAddon.cs @@ -51,7 +51,7 @@ namespace Server.Items } } - public bool Spinning{ get{ return m_Timer != null; } } + public bool Spinning => m_Timer != null; public void BeginSpin( SpinCallback callback, Mobile from, int hue ) { diff --git a/Scripts/Items/Addons/SpinningwheelSouthAddon.cs b/Scripts/Items/Addons/SpinningwheelSouthAddon.cs index 843663708..1bedeaa18 100644 --- a/Scripts/Items/Addons/SpinningwheelSouthAddon.cs +++ b/Scripts/Items/Addons/SpinningwheelSouthAddon.cs @@ -43,7 +43,7 @@ namespace Server.Items } } - public bool Spinning{ get{ return m_Timer != null; } } + public bool Spinning => m_Timer != null; public void BeginSpin( SpinCallback callback, Mobile from, int hue ) { diff --git a/Scripts/Items/Addons/TrainingDummies.cs b/Scripts/Items/Addons/TrainingDummies.cs index 87bd6a4c2..370519f8f 100644 --- a/Scripts/Items/Addons/TrainingDummies.cs +++ b/Scripts/Items/Addons/TrainingDummies.cs @@ -13,22 +13,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public double MinSkill { - get{ return m_MinSkill; } - set{ m_MinSkill = value; } + get => m_MinSkill; + set => m_MinSkill = value; } [CommandProperty( AccessLevel.GameMaster )] public double MaxSkill { - get{ return m_MaxSkill; } - set{ m_MaxSkill = value; } + get => m_MaxSkill; + set => m_MaxSkill = value; } [CommandProperty( AccessLevel.GameMaster )] - public bool Swinging - { - get{ return ( m_Timer != null ); } - } + public bool Swinging => ( m_Timer != null ); [Constructible] public TrainingDummy() : this( 0x1074 ) diff --git a/Scripts/Items/Addons/WaterTroughEastAddon.cs b/Scripts/Items/Addons/WaterTroughEastAddon.cs index 47abbc1d2..c8cd87808 100644 --- a/Scripts/Items/Addons/WaterTroughEastAddon.cs +++ b/Scripts/Items/Addons/WaterTroughEastAddon.cs @@ -31,7 +31,7 @@ namespace Server.Items public int Quantity { - get{ return 500; } + get => 500; set{} } } diff --git a/Scripts/Items/Addons/WaterTroughSouthAddon.cs b/Scripts/Items/Addons/WaterTroughSouthAddon.cs index 920f3100c..75c6a62bc 100644 --- a/Scripts/Items/Addons/WaterTroughSouthAddon.cs +++ b/Scripts/Items/Addons/WaterTroughSouthAddon.cs @@ -31,7 +31,7 @@ namespace Server.Items public int Quantity { - get{ return 500; } + get => 500; set{} } } diff --git a/Scripts/Items/Aquarium/Aquarium.cs b/Scripts/Items/Aquarium/Aquarium.cs index ca8657c4a..6f2df6663 100644 --- a/Scripts/Items/Aquarium/Aquarium.cs +++ b/Scripts/Items/Aquarium/Aquarium.cs @@ -14,10 +14,7 @@ namespace Server.Items private int m_LiveCreatures; [CommandProperty( AccessLevel.GameMaster )] - public int LiveCreatures - { - get{ return m_LiveCreatures; } - } + public int LiveCreatures => m_LiveCreatures; [CommandProperty( AccessLevel.GameMaster )] public int DeadCreatures @@ -57,10 +54,7 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public bool IsFull - { - get{ return ( Items.Count >= MaxItems ); } - } + public bool IsFull => ( Items.Count >= MaxItems ); // vacation info private int m_VacationLeft; @@ -68,7 +62,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int VacationLeft { - get{ return m_VacationLeft; } + get => m_VacationLeft; set{ m_VacationLeft = value; InvalidateProperties(); } } @@ -79,37 +73,31 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public AquariumState Food { - get{ return m_Food; } + get => m_Food; set{ m_Food = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public AquariumState Water { - get{ return m_Water; } + get => m_Water; set{ m_Water = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool OptimalState - { - get{ return ( m_Food.State == (int) FoodState.Full && m_Water.State == (int) WaterState.Strong ); } - } + public bool OptimalState => ( m_Food.State == (int) FoodState.Full && m_Water.State == (int) WaterState.Strong ); // events private List m_Events; private bool m_RewardAvailable; private bool m_EvaluateDay; - public List Events - { - get{ return m_Events; } - } + public List Events => m_Events; [CommandProperty( AccessLevel.GameMaster )] public bool RewardAvailable { - get{ return m_RewardAvailable; } + get => m_RewardAvailable; set{ m_RewardAvailable = value; InvalidateProperties(); } } @@ -941,10 +929,8 @@ namespace Server.Items 0x1C2, 0x1C3, 0x2A3, 0x47E, 0x51D }; - public static int[] FishHues - { - get{ return m_FishHues; } - } + public static int[] FishHues => m_FishHues; + #endregion #region Context entries diff --git a/Scripts/Items/Aquarium/AquariumState.cs b/Scripts/Items/Aquarium/AquariumState.cs index d7920e19d..bb6290b65 100644 --- a/Scripts/Items/Aquarium/AquariumState.cs +++ b/Scripts/Items/Aquarium/AquariumState.cs @@ -29,7 +29,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int State { - get{ return m_State; } + get => m_State; set { m_State = value; @@ -45,22 +45,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Maintain { - get{ return m_Maintain; } - set{ m_Maintain = value; } + get => m_Maintain; + set => m_Maintain = value; } [CommandProperty( AccessLevel.GameMaster )] public int Improve { - get{ return m_Improve; } - set{ m_Improve = value; } + get => m_Improve; + set => m_Improve = value; } [CommandProperty( AccessLevel.GameMaster )] public int Added { - get{ return m_Added; } - set{ m_Added = value; } + get => m_Added; + set => m_Added = value; } public AquariumState() diff --git a/Scripts/Items/Aquarium/BaseFish.cs b/Scripts/Items/Aquarium/BaseFish.cs index b5d702bd3..1a6e7f010 100644 --- a/Scripts/Items/Aquarium/BaseFish.cs +++ b/Scripts/Items/Aquarium/BaseFish.cs @@ -9,10 +9,7 @@ namespace Server.Items private Timer m_Timer; [CommandProperty( AccessLevel.GameMaster )] - public bool Dead - { - get{ return ( ItemID == 0x3B0C ); } - } + public bool Dead => ( ItemID == 0x3B0C ); [Constructible] public BaseFish( int itemID ) : base( itemID ) diff --git a/Scripts/Items/Aquarium/FishBowl.cs b/Scripts/Items/Aquarium/FishBowl.cs index 7bfbc7d44..c983c3edc 100644 --- a/Scripts/Items/Aquarium/FishBowl.cs +++ b/Scripts/Items/Aquarium/FishBowl.cs @@ -9,10 +9,7 @@ namespace Server.Items public override int LabelNumber => 1074499; // A fish bowl [CommandProperty( AccessLevel.GameMaster )] - public bool Empty - { - get{ return ( Items.Count == 0 ); } - } + public bool Empty => ( Items.Count == 0 ); [CommandProperty( AccessLevel.GameMaster )] public BaseFish Fish diff --git a/Scripts/Items/Armor/BaseArmor.cs b/Scripts/Items/Armor/BaseArmor.cs index ae5e952e8..d984c1625 100644 --- a/Scripts/Items/Armor/BaseArmor.cs +++ b/Scripts/Items/Armor/BaseArmor.cs @@ -16,7 +16,7 @@ namespace Server.Items public FactionItem FactionItemState { - get{ return m_FactionState; } + get => m_FactionState; set { m_FactionState = value; @@ -68,35 +68,35 @@ namespace Server.Items private AMA m_Meditate = (AMA)(-1); - public virtual bool AllowMaleWearer{ get{ return true; } } - public virtual bool AllowFemaleWearer{ get{ return true; } } + public virtual bool AllowMaleWearer => true; + public virtual bool AllowFemaleWearer => true; public abstract AMT MaterialType{ get; } - public virtual int RevertArmorBase{ get{ return ArmorBase; } } - public virtual int ArmorBase{ get{ return 0; } } + public virtual int RevertArmorBase => ArmorBase; + public virtual int ArmorBase => 0; - public virtual AMA DefMedAllowance{ get{ return AMA.None; } } - public virtual AMA AosMedAllowance{ get{ return DefMedAllowance; } } - public virtual AMA OldMedAllowance{ get{ return DefMedAllowance; } } + public virtual AMA DefMedAllowance => AMA.None; + public virtual AMA AosMedAllowance => DefMedAllowance; + public virtual AMA OldMedAllowance => DefMedAllowance; - public virtual int AosStrBonus{ get{ return 0; } } - public virtual int AosDexBonus{ get{ return 0; } } - public virtual int AosIntBonus{ get{ return 0; } } - public virtual int AosStrReq{ get{ return 0; } } - public virtual int AosDexReq{ get{ return 0; } } - public virtual int AosIntReq{ get{ return 0; } } + public virtual int AosStrBonus => 0; + public virtual int AosDexBonus => 0; + public virtual int AosIntBonus => 0; + public virtual int AosStrReq => 0; + public virtual int AosDexReq => 0; + public virtual int AosIntReq => 0; - public virtual int OldStrBonus{ get{ return 0; } } - public virtual int OldDexBonus{ get{ return 0; } } - public virtual int OldIntBonus{ get{ return 0; } } - public virtual int OldStrReq{ get{ return 0; } } - public virtual int OldDexReq{ get{ return 0; } } - public virtual int OldIntReq{ get{ return 0; } } + public virtual int OldStrBonus => 0; + public virtual int OldDexBonus => 0; + public virtual int OldIntBonus => 0; + public virtual int OldStrReq => 0; + public virtual int OldDexReq => 0; + public virtual int OldIntReq => 0; - public virtual bool CanFortify{ get{ return true; } } + public virtual bool CanFortify => true; public override void OnAfterDuped( Item newItem ) { @@ -111,8 +111,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public AMA MeditationAllowance { - get{ return ( m_Meditate == (AMA)(-1) ? Core.AOS ? AosMedAllowance : OldMedAllowance : m_Meditate ); } - set{ m_Meditate = value; } + get => ( m_Meditate == (AMA)(-1) ? Core.AOS ? AosMedAllowance : OldMedAllowance : m_Meditate ); + set => m_Meditate = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -130,13 +130,7 @@ namespace Server.Items } } - public double BaseArmorRatingScaled - { - get - { - return ( BaseArmorRating * ArmorScalar ); - } - } + public double BaseArmorRatingScaled => ( BaseArmorRating * ArmorScalar ); public virtual double ArmorRating { @@ -167,77 +161,68 @@ namespace Server.Items } } - public double ArmorRatingScaled - { - get - { - return ( ArmorRating * ArmorScalar ); - } - } + public double ArmorRatingScaled => ( ArmorRating * ArmorScalar ); [CommandProperty( AccessLevel.GameMaster )] public int StrBonus { - get{ return ( m_StrBonus == -1 ? Core.AOS ? AosStrBonus : OldStrBonus : m_StrBonus ); } + get => ( m_StrBonus == -1 ? Core.AOS ? AosStrBonus : OldStrBonus : m_StrBonus ); set{ m_StrBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int DexBonus { - get{ return ( m_DexBonus == -1 ? Core.AOS ? AosDexBonus : OldDexBonus : m_DexBonus ); } + get => ( m_DexBonus == -1 ? Core.AOS ? AosDexBonus : OldDexBonus : m_DexBonus ); set{ m_DexBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int IntBonus { - get{ return ( m_IntBonus == -1 ? Core.AOS ? AosIntBonus : OldIntBonus : m_IntBonus ); } + get => ( m_IntBonus == -1 ? Core.AOS ? AosIntBonus : OldIntBonus : m_IntBonus ); set{ m_IntBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int StrRequirement { - get{ return ( m_StrReq == -1 ? Core.AOS ? AosStrReq : OldStrReq : m_StrReq ); } + get => ( m_StrReq == -1 ? Core.AOS ? AosStrReq : OldStrReq : m_StrReq ); set{ m_StrReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int DexRequirement { - get{ return ( m_DexReq == -1 ? Core.AOS ? AosDexReq : OldDexReq : m_DexReq ); } + get => ( m_DexReq == -1 ? Core.AOS ? AosDexReq : OldDexReq : m_DexReq ); set{ m_DexReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int IntRequirement { - get{ return ( m_IntReq == -1 ? Core.AOS ? AosIntReq : OldIntReq : m_IntReq ); } + get => ( m_IntReq == -1 ? Core.AOS ? AosIntReq : OldIntReq : m_IntReq ); set{ m_IntReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool Identified { - get{ return m_Identified; } + get => m_Identified; set{ m_Identified = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool PlayerConstructed { - get{ return m_PlayerConstructed; } - set{ m_PlayerConstructed = value; } + get => m_PlayerConstructed; + set => m_PlayerConstructed = value; } [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get - { - return m_Resource; - } + get => m_Resource; set { if ( m_Resource != value ) @@ -277,17 +262,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxHitPoints { - get{ return m_MaxHitPoints; } + get => m_MaxHitPoints; set{ m_MaxHitPoints = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int HitPoints { - get - { - return m_HitPoints; - } + get => m_HitPoints; set { if ( value != m_HitPoints && MaxHitPoints > 0 ) @@ -308,7 +290,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } @@ -316,29 +298,23 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public ArmorQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ UnscaleDurability(); m_Quality = value; Invalidate(); InvalidateProperties(); ScaleDurability(); } } [CommandProperty( AccessLevel.GameMaster )] public ArmorDurabilityLevel Durability { - get{ return m_Durability; } + get => m_Durability; set{ UnscaleDurability(); m_Durability = value; ScaleDurability(); InvalidateProperties(); } } - public virtual int ArtifactRarity - { - get{ return 0; } - } + public virtual int ArtifactRarity => 0; [CommandProperty( AccessLevel.GameMaster )] public ArmorProtectionLevel ProtectionLevel { - get - { - return m_Protection; - } + get => m_Protection; set { if ( m_Protection != value ) @@ -356,21 +332,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public AosAttributes Attributes { - get{ return m_AosAttributes; } + get => m_AosAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosArmorAttributes ArmorAttributes { - get{ return m_AosArmorAttributes; } + get => m_AosArmorAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosSkillBonuses SkillBonuses { - get{ return m_AosSkillBonuses; } + get => m_AosSkillBonuses; set{} } @@ -399,25 +375,30 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int PhysicalBonus{ get{ return m_PhysicalBonus; } set{ m_PhysicalBonus = value; InvalidateProperties(); } } + public int PhysicalBonus{ get => m_PhysicalBonus; + set{ m_PhysicalBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int FireBonus{ get{ return m_FireBonus; } set{ m_FireBonus = value; InvalidateProperties(); } } + public int FireBonus{ get => m_FireBonus; + set{ m_FireBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int ColdBonus{ get{ return m_ColdBonus; } set{ m_ColdBonus = value; InvalidateProperties(); } } + public int ColdBonus{ get => m_ColdBonus; + set{ m_ColdBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int PoisonBonus{ get{ return m_PoisonBonus; } set{ m_PoisonBonus = value; InvalidateProperties(); } } + public int PoisonBonus{ get => m_PoisonBonus; + set{ m_PoisonBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int EnergyBonus{ get{ return m_EnergyBonus; } set{ m_EnergyBonus = value; InvalidateProperties(); } } + public int EnergyBonus{ get => m_EnergyBonus; + set{ m_EnergyBonus = value; InvalidateProperties(); } } - public virtual int BasePhysicalResistance{ get{ return 0; } } - public virtual int BaseFireResistance{ get{ return 0; } } - public virtual int BaseColdResistance{ get{ return 0; } } - public virtual int BasePoisonResistance{ get{ return 0; } } - public virtual int BaseEnergyResistance{ get{ return 0; } } + public virtual int BasePhysicalResistance => 0; + public virtual int BaseFireResistance => 0; + public virtual int BaseColdResistance => 0; + public virtual int BasePoisonResistance => 0; + public virtual int BaseEnergyResistance => 0; public override int PhysicalResistance => BasePhysicalResistance + GetProtOffset() + GetResourceAttrs().ArmorPhysicalResist + m_PhysicalBonus; public override int FireResistance => BaseFireResistance + GetProtOffset() + GetResourceAttrs().ArmorFireResist + m_FireBonus; @@ -425,8 +406,8 @@ namespace Server.Items public override int PoisonResistance => BasePoisonResistance + GetProtOffset() + GetResourceAttrs().ArmorPoisonResist + m_PoisonBonus; public override int EnergyResistance => BaseEnergyResistance + GetProtOffset() + GetResourceAttrs().ArmorEnergyResist + m_EnergyBonus; - public virtual int InitMinHits{ get{ return 0; } } - public virtual int InitMaxHits{ get{ return 0; } } + public virtual int InitMinHits => 0; + public virtual int InitMaxHits => 0; [CommandProperty( AccessLevel.GameMaster )] public ArmorBodyType BodyPosition @@ -584,14 +565,8 @@ namespace Server.Items public static double[] ArmorScalars { - get - { - return m_ArmorScalars; - } - set - { - m_ArmorScalars = value; - } + get => m_ArmorScalars; + set => m_ArmorScalars = value; } public static void ValidateMobile( Mobile m ) @@ -1123,7 +1098,7 @@ namespace Server.Items m_PlayerConstructed = true; // we don't know, so, assume it's crafted } - public virtual CraftResource DefaultResource{ get{ return CraftResource.Iron; } } + public virtual CraftResource DefaultResource => CraftResource.Iron; public BaseArmor( int itemID ) : base( itemID ) { @@ -1347,7 +1322,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get{ return base.Hue; } + get => base.Hue; set{ base.Hue = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Armor/Glasses/ElvenGlasses.cs b/Scripts/Items/Armor/Glasses/ElvenGlasses.cs index 5e40d988a..a446c226f 100644 --- a/Scripts/Items/Armor/Glasses/ElvenGlasses.cs +++ b/Scripts/Items/Armor/Glasses/ElvenGlasses.cs @@ -27,7 +27,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public AosWeaponAttributes WeaponAttributes { - get{ return m_AosWeaponAttributes; } + get => m_AosWeaponAttributes; set{} } diff --git a/Scripts/Items/Armor/Leather/LeafGloves.cs b/Scripts/Items/Armor/Leather/LeafGloves.cs index 30981eb6a..448e65b6c 100644 --- a/Scripts/Items/Armor/Leather/LeafGloves.cs +++ b/Scripts/Items/Armor/Leather/LeafGloves.cs @@ -83,22 +83,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxArcaneCharges { - get{ return m_MaxArcaneCharges; } + get => m_MaxArcaneCharges; set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] public int CurArcaneCharges { - get{ return m_CurArcaneCharges; } + get => m_CurArcaneCharges; set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool IsArcane - { - get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); } - } + public bool IsArcane => ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); public void Update() { diff --git a/Scripts/Items/Armor/Leather/LeatherGloves.cs b/Scripts/Items/Armor/Leather/LeatherGloves.cs index 5a6896125..01a6d5612 100644 --- a/Scripts/Items/Armor/Leather/LeatherGloves.cs +++ b/Scripts/Items/Armor/Leather/LeatherGloves.cs @@ -82,22 +82,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxArcaneCharges { - get{ return m_MaxArcaneCharges; } + get => m_MaxArcaneCharges; set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] public int CurArcaneCharges { - get{ return m_CurArcaneCharges; } + get => m_CurArcaneCharges; set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool IsArcane - { - get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); } - } + public bool IsArcane => ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); public void Update() { diff --git a/Scripts/Items/Body Parts/Head.cs b/Scripts/Items/Body Parts/Head.cs index 5324a0d49..7dcd1d821 100644 --- a/Scripts/Items/Body Parts/Head.cs +++ b/Scripts/Items/Body Parts/Head.cs @@ -17,15 +17,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string PlayerName { - get { return m_PlayerName; } - set { m_PlayerName = value; } + get => m_PlayerName; + set => m_PlayerName = value; } [CommandProperty( AccessLevel.GameMaster )] public HeadType HeadType { - get { return m_HeadType; } - set { m_HeadType = value; } + get => m_HeadType; + set => m_HeadType = value; } public override string DefaultName diff --git a/Scripts/Items/Books/BaseBook.cs b/Scripts/Items/Books/BaseBook.cs index 5c0e47477..da8205c05 100644 --- a/Scripts/Items/Books/BaseBook.cs +++ b/Scripts/Items/Books/BaseBook.cs @@ -15,14 +15,8 @@ namespace Server.Items public string[] Lines { - get - { - return m_Lines; - } - set - { - m_Lines = value; - } + get => m_Lines; + set => m_Lines = value; } public BookPageInfo() @@ -65,34 +59,28 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string Title { - get { return m_Title; } + get => m_Title; set { m_Title = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string Author { - get { return m_Author; } + get => m_Author; set { m_Author = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool Writable { - get { return m_Writable; } - set { m_Writable = value; } + get => m_Writable; + set => m_Writable = value; } [CommandProperty(AccessLevel.GameMaster)] - public int PagesCount - { - get { return m_Pages.Length; } - } + public int PagesCount => m_Pages.Length; - public BookPageInfo[] Pages - { - get { return m_Pages; } - } + public BookPageInfo[] Pages => m_Pages; [Constructible] public BaseBook( int itemID ) : this( itemID, 20, true ) @@ -145,7 +133,7 @@ namespace Server.Items } } - public virtual BookContent DefaultContent{ get{ return null; } } + public virtual BookContent DefaultContent => null; public BaseBook( Serial serial ) : base( serial ) { @@ -463,14 +451,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get - { - return m_SecureLevel; - } - set - { - m_SecureLevel = value; - } + get => m_SecureLevel; + set => m_SecureLevel = value; } #endregion diff --git a/Scripts/Items/Books/Defined/BookContent.cs b/Scripts/Items/Books/Defined/BookContent.cs index 31ebce1ba..9fbef9f47 100644 --- a/Scripts/Items/Books/Defined/BookContent.cs +++ b/Scripts/Items/Books/Defined/BookContent.cs @@ -7,10 +7,10 @@ namespace Server.Items private BookPageInfo[] m_Pages; - public string Title{ get{ return m_Title; } } - public string Author{ get{ return m_Author; } } + public string Title => m_Title; + public string Author => m_Author; - public BookPageInfo[] Pages{ get{ return m_Pages; } } + public BookPageInfo[] Pages => m_Pages; public BookContent( string title, string author, params BookPageInfo[] pages ) { diff --git a/Scripts/Items/Champion Artifacts/Shared/DetectiveBoots.cs b/Scripts/Items/Champion Artifacts/Shared/DetectiveBoots.cs index 06146edbd..ba9835e78 100644 --- a/Scripts/Items/Champion Artifacts/Shared/DetectiveBoots.cs +++ b/Scripts/Items/Champion Artifacts/Shared/DetectiveBoots.cs @@ -16,7 +16,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Level { - get{ return m_Level; } + get => m_Level; set{ m_Level = Math.Max( Math.Min( 2, value), 0 ); Attributes.BonusInt = 2 + m_Level; InvalidateProperties(); } } diff --git a/Scripts/Items/Clothing/BaseClothing.cs b/Scripts/Items/Clothing/BaseClothing.cs index ee669c1a6..6011940aa 100644 --- a/Scripts/Items/Clothing/BaseClothing.cs +++ b/Scripts/Items/Clothing/BaseClothing.cs @@ -27,7 +27,7 @@ namespace Server.Items public FactionItem FactionItemState { - get{ return m_FactionState; } + get => m_FactionState; set { m_FactionState = value; @@ -40,7 +40,7 @@ namespace Server.Items } #endregion - public virtual bool CanFortify{ get{ return true; } } + public virtual bool CanFortify => true; private int m_MaxHitPoints; private int m_HitPoints; @@ -58,17 +58,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxHitPoints { - get{ return m_MaxHitPoints; } + get => m_MaxHitPoints; set{ m_MaxHitPoints = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int HitPoints { - get - { - return m_HitPoints; - } + get => m_HitPoints; set { if ( value != m_HitPoints && MaxHitPoints > 0 ) @@ -88,73 +85,73 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int StrRequirement { - get{ return ( m_StrReq == -1 ? (Core.AOS ? AosStrReq : OldStrReq) : m_StrReq ); } + get => ( m_StrReq == -1 ? (Core.AOS ? AosStrReq : OldStrReq) : m_StrReq ); set{ m_StrReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public ClothingQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ m_Quality = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool PlayerConstructed { - get{ return m_PlayerConstructed; } - set{ m_PlayerConstructed = value; } + get => m_PlayerConstructed; + set => m_PlayerConstructed = value; } - public virtual CraftResource DefaultResource{ get{ return CraftResource.None; } } + public virtual CraftResource DefaultResource => CraftResource.None; [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public AosAttributes Attributes { - get{ return m_AosAttributes; } + get => m_AosAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosArmorAttributes ClothingAttributes { - get{ return m_AosClothingAttributes; } + get => m_AosClothingAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosSkillBonuses SkillBonuses { - get{ return m_AosSkillBonuses; } + get => m_AosSkillBonuses; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosElementAttributes Resistances { - get{ return m_AosResistances; } + get => m_AosResistances; set{} } - public virtual int BasePhysicalResistance{ get{ return 0; } } - public virtual int BaseFireResistance{ get{ return 0; } } - public virtual int BaseColdResistance{ get{ return 0; } } - public virtual int BasePoisonResistance{ get{ return 0; } } - public virtual int BaseEnergyResistance{ get{ return 0; } } + public virtual int BasePhysicalResistance => 0; + public virtual int BaseFireResistance => 0; + public virtual int BaseColdResistance => 0; + public virtual int BasePoisonResistance => 0; + public virtual int BaseEnergyResistance => 0; public override int PhysicalResistance => BasePhysicalResistance + m_AosResistances.Physical; public override int FireResistance => BaseFireResistance + m_AosResistances.Fire; @@ -162,11 +159,11 @@ namespace Server.Items public override int PoisonResistance => BasePoisonResistance + m_AosResistances.Poison; public override int EnergyResistance => BaseEnergyResistance + m_AosResistances.Energy; - public virtual int ArtifactRarity{ get{ return 0; } } + public virtual int ArtifactRarity => 0; - public virtual int BaseStrBonus{ get{ return 0; } } - public virtual int BaseDexBonus{ get{ return 0; } } - public virtual int BaseIntBonus{ get{ return 0; } } + public virtual int BaseStrBonus => 0; + public virtual int BaseDexBonus => 0; + public virtual int BaseIntBonus => 0; public override bool AllowSecureTrade( Mobile from, Mobile to, Mobile newOwner, bool accepted ) { @@ -228,15 +225,15 @@ namespace Server.Items return base.CanEquip( from ); } - public virtual int AosStrReq{ get{ return 10; } } - public virtual int OldStrReq{ get{ return 0; } } + public virtual int AosStrReq => 10; + public virtual int OldStrReq => 0; - public virtual int InitMinHits{ get{ return 0; } } - public virtual int InitMaxHits{ get{ return 0; } } + public virtual int InitMinHits => 0; + public virtual int InitMaxHits => 0; - public virtual bool AllowMaleWearer{ get{ return true; } } - public virtual bool AllowFemaleWearer{ get{ return true; } } - public virtual bool CanBeBlessed{ get{ return true; } } + public virtual bool AllowMaleWearer => true; + public virtual bool AllowFemaleWearer => true; + public virtual bool CanBeBlessed => true; public int ComputeStatReq( StatType type ) { diff --git a/Scripts/Items/Clothing/Cloaks.cs b/Scripts/Items/Clothing/Cloaks.cs index ac9f14e4e..846314958 100644 --- a/Scripts/Items/Clothing/Cloaks.cs +++ b/Scripts/Items/Clothing/Cloaks.cs @@ -41,22 +41,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxArcaneCharges { - get{ return m_MaxArcaneCharges; } + get => m_MaxArcaneCharges; set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] public int CurArcaneCharges { - get{ return m_CurArcaneCharges; } + get => m_CurArcaneCharges; set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool IsArcane - { - get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); } - } + public bool IsArcane => ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); public void Update() { @@ -164,14 +161,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [CommandProperty( AccessLevel.GameMaster )] public int Number { - get{ return m_LabelNumber; } + get => m_LabelNumber; set{ m_LabelNumber = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Clothing/Hats.cs b/Scripts/Items/Clothing/Hats.cs index 567f94e67..2378179bd 100644 --- a/Scripts/Items/Clothing/Hats.cs +++ b/Scripts/Items/Clothing/Hats.cs @@ -12,8 +12,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsShipwreckedItem { - get { return m_IsShipwreckedItem; } - set { m_IsShipwreckedItem = value; } + get => m_IsShipwreckedItem; + set => m_IsShipwreckedItem = value; } public BaseHat( int itemID ) : this( itemID, 0 ) @@ -698,10 +698,7 @@ namespace Server.Items return false; } - public override string DefaultName - { - get { return "a mask of orcish kin"; } - } + public override string DefaultName => "a mask of orcish kin"; [Constructible] public OrcishKinMask() : this( 0x8A4 ) diff --git a/Scripts/Items/Clothing/OuterTorso.cs b/Scripts/Items/Clothing/OuterTorso.cs index 1f3b1eff2..6fd771db2 100644 --- a/Scripts/Items/Clothing/OuterTorso.cs +++ b/Scripts/Items/Clothing/OuterTorso.cs @@ -105,10 +105,7 @@ namespace Server.Items private static TimeSpan m_DefaultDecayTime = TimeSpan.FromMinutes(1.0); - public override bool DisplayLootType - { - get{ return false; } - } + public override bool DisplayLootType => false; [Constructible] public DeathRobe() @@ -241,14 +238,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [CommandProperty( AccessLevel.GameMaster )] public int Number { - get{ return m_LabelNumber; } + get => m_LabelNumber; set{ m_LabelNumber = value; InvalidateProperties(); } } @@ -366,14 +363,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [CommandProperty( AccessLevel.GameMaster )] public int Number { - get{ return m_LabelNumber; } + get => m_LabelNumber; set{ m_LabelNumber = value; InvalidateProperties(); } } @@ -491,22 +488,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxArcaneCharges { - get{ return m_MaxArcaneCharges; } + get => m_MaxArcaneCharges; set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] public int CurArcaneCharges { - get{ return m_CurArcaneCharges; } + get => m_CurArcaneCharges; set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool IsArcane - { - get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); } - } + public bool IsArcane => ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); public void Update() { diff --git a/Scripts/Items/Clothing/Shoes.cs b/Scripts/Items/Clothing/Shoes.cs index eea9953f8..7962ce1fd 100644 --- a/Scripts/Items/Clothing/Shoes.cs +++ b/Scripts/Items/Clothing/Shoes.cs @@ -132,22 +132,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxArcaneCharges { - get{ return m_MaxArcaneCharges; } + get => m_MaxArcaneCharges; set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] public int CurArcaneCharges { - get{ return m_CurArcaneCharges; } + get => m_CurArcaneCharges; set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool IsArcane - { - get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); } - } + public bool IsArcane => ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); public override void OnSingleClick( Mobile from ) { diff --git a/Scripts/Items/Construction/Ankhs.cs b/Scripts/Items/Construction/Ankhs.cs index 7bdb5b8e4..95db23205 100644 --- a/Scripts/Items/Construction/Ankhs.cs +++ b/Scripts/Items/Construction/Ankhs.cs @@ -134,7 +134,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get{ return base.Hue; } + get => base.Hue; set{ base.Hue = value; if ( m_Item.Hue != value ) m_Item.Hue = value; } } @@ -233,7 +233,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get{ return base.Hue; } + get => base.Hue; set{ base.Hue = value; if ( m_Item.Hue != value ) m_Item.Hue = value; } } @@ -302,7 +302,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get{ return base.Hue; } + get => base.Hue; set{ base.Hue = value; if ( m_Item.Hue != value ) m_Item.Hue = value; } } @@ -403,7 +403,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get{ return base.Hue; } + get => base.Hue; set{ base.Hue = value; if ( m_Item.Hue != value ) m_Item.Hue = value; } } diff --git a/Scripts/Items/Construction/Doors/BaseDoor.cs b/Scripts/Items/Construction/Doors/BaseDoor.cs index c57925c2a..773072e42 100644 --- a/Scripts/Items/Construction/Doors/BaseDoor.cs +++ b/Scripts/Items/Construction/Doors/BaseDoor.cs @@ -198,36 +198,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Locked { - get - { - return m_Locked; - } - set - { - m_Locked = value; - } + get => m_Locked; + set => m_Locked = value; } [CommandProperty( AccessLevel.GameMaster )] public uint KeyValue { - get - { - return m_KeyValue; - } - set - { - m_KeyValue = value; - } + get => m_KeyValue; + set => m_KeyValue = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Open { - get - { - return m_Open; - } + get => m_Open; set { if ( m_Open != value ) @@ -317,66 +302,36 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int OpenedID { - get - { - return m_OpenedID; - } - set - { - m_OpenedID = value; - } + get => m_OpenedID; + set => m_OpenedID = value; } [CommandProperty( AccessLevel.GameMaster )] public int ClosedID { - get - { - return m_ClosedID; - } - set - { - m_ClosedID = value; - } + get => m_ClosedID; + set => m_ClosedID = value; } [CommandProperty( AccessLevel.GameMaster )] public int OpenedSound { - get - { - return m_OpenedSound; - } - set - { - m_OpenedSound = value; - } + get => m_OpenedSound; + set => m_OpenedSound = value; } [CommandProperty( AccessLevel.GameMaster )] public int ClosedSound { - get - { - return m_ClosedSound; - } - set - { - m_ClosedSound = value; - } + get => m_ClosedSound; + set => m_ClosedSound = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D Offset { - get - { - return m_Offset; - } - set - { - m_Offset = value; - } + get => m_Offset; + set => m_Offset = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -389,13 +344,10 @@ namespace Server.Items return m_Link; } - set - { - m_Link = value; - } + set => m_Link = value; } - public virtual bool UseChainedFunctionality{ get{ return false; } } + public virtual bool UseChainedFunctionality => false; public List GetChain() { diff --git a/Scripts/Items/Construction/Doors/HouseDoors.cs b/Scripts/Items/Construction/Doors/HouseDoors.cs index 81fa95fa8..2f96bac3c 100644 --- a/Scripts/Items/Construction/Doors/HouseDoors.cs +++ b/Scripts/Items/Construction/Doors/HouseDoors.cs @@ -98,15 +98,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public DoorFacing Facing { - get{ return m_Facing; } - set{ m_Facing = value; } + get => m_Facing; + set => m_Facing = value; } [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } public override void GetContextMenuEntries( Mobile from, List list ) diff --git a/Scripts/Items/Construction/Signs/LocalizedSign.cs b/Scripts/Items/Construction/Signs/LocalizedSign.cs index 38244d036..96c911c84 100644 --- a/Scripts/Items/Construction/Signs/LocalizedSign.cs +++ b/Scripts/Items/Construction/Signs/LocalizedSign.cs @@ -7,7 +7,8 @@ namespace Server.Items public override int LabelNumber => m_LabelNumber; [CommandProperty( AccessLevel.GameMaster )] - public int Number{ get{ return m_LabelNumber; } set{ m_LabelNumber = value; InvalidateProperties(); } } + public int Number{ get => m_LabelNumber; + set{ m_LabelNumber = value; InvalidateProperties(); } } [Constructible] public LocalizedSign( SignType type, SignFacing facing, int labelNumber ) : base( ( 0xB95 + (2 * (int)type) ) + (int)facing ) diff --git a/Scripts/Items/Construction/Signs/SubtextSign.cs b/Scripts/Items/Construction/Signs/SubtextSign.cs index 5a5ccfdc8..1e6c1a813 100644 --- a/Scripts/Items/Construction/Signs/SubtextSign.cs +++ b/Scripts/Items/Construction/Signs/SubtextSign.cs @@ -9,7 +9,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string Subtext { - get { return m_Subtext; } + get => m_Subtext; set { m_Subtext = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Containers/BaseTreasureChest.cs b/Scripts/Items/Containers/BaseTreasureChest.cs index 22552c7bc..34f021510 100644 --- a/Scripts/Items/Containers/BaseTreasureChest.cs +++ b/Scripts/Items/Containers/BaseTreasureChest.cs @@ -12,45 +12,27 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public TreasureLevel Level { - get - { - return m_TreasureLevel; - } - set - { - m_TreasureLevel = value; - } + get => m_TreasureLevel; + set => m_TreasureLevel = value; } [CommandProperty( AccessLevel.GameMaster )] public short MaxSpawnTime { - get - { - return m_MaxSpawnTime; - } - set - { - m_MaxSpawnTime = value; - } + get => m_MaxSpawnTime; + set => m_MaxSpawnTime = value; } [CommandProperty( AccessLevel.GameMaster )] public short MinSpawnTime { - get - { - return m_MinSpawnTime; - } - set - { - m_MinSpawnTime = value; - } + get => m_MinSpawnTime; + set => m_MinSpawnTime = value; } [CommandProperty( AccessLevel.GameMaster )] public override bool Locked { - get { return base.Locked; } + get => base.Locked; set { if ( base.Locked != value ) { base.Locked = value; @@ -61,10 +43,7 @@ namespace Server.Items } } - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; public BaseTreasureChest( int itemID ) : this( itemID, TreasureLevel.Level2 ) { diff --git a/Scripts/Items/Containers/FillableContainers.cs b/Scripts/Items/Containers/FillableContainers.cs index 249d4c34d..ae3b3f37b 100644 --- a/Scripts/Items/Containers/FillableContainers.cs +++ b/Scripts/Items/Containers/FillableContainers.cs @@ -26,13 +26,13 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public FillableContentType ContentType { - get { return FillableContent.Lookup( m_Content ); } - set { Content = FillableContent.Lookup( value ); } + get => FillableContent.Lookup( m_Content ); + set => Content = FillableContent.Lookup( value ); } public FillableContent Content { - get { return m_Content; } + get => m_Content; set { if ( m_Content == value ) @@ -701,7 +701,7 @@ namespace Server.Items public int Level => m_Level; public Type[] Vendors => m_Vendors; - public FillableContentType TypeID { get { return Lookup( this ); } } + public FillableContentType TypeID => Lookup( this ); public FillableContent( int level, Type[] vendors, FillableEntry[] entries ) { diff --git a/Scripts/Items/Containers/LockableContainer.cs b/Scripts/Items/Containers/LockableContainer.cs index cae1284a9..d0ba14985 100644 --- a/Scripts/Items/Containers/LockableContainer.cs +++ b/Scripts/Items/Containers/LockableContainer.cs @@ -15,62 +15,35 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Picker { - get - { - return m_Picker; - } - set - { - m_Picker = value; - } + get => m_Picker; + set => m_Picker = value; } [CommandProperty( AccessLevel.GameMaster )] public int MaxLockLevel { - get - { - return m_MaxLockLevel; - } - set - { - m_MaxLockLevel = value; - } + get => m_MaxLockLevel; + set => m_MaxLockLevel = value; } [CommandProperty( AccessLevel.GameMaster )] public int LockLevel { - get - { - return m_LockLevel; - } - set - { - m_LockLevel = value; - } + get => m_LockLevel; + set => m_LockLevel = value; } [CommandProperty( AccessLevel.GameMaster )] public int RequiredSkill { - get - { - return m_RequiredSkill; - } - set - { - m_RequiredSkill = value; - } + get => m_RequiredSkill; + set => m_RequiredSkill = value; } [CommandProperty( AccessLevel.GameMaster )] public virtual bool Locked { - get - { - return m_Locked; - } + get => m_Locked; set { m_Locked = value; @@ -85,35 +58,17 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public uint KeyValue { - get - { - return m_KeyValue; - } - set - { - m_KeyValue = value; - } + get => m_KeyValue; + set => m_KeyValue = value; } - public override bool TrapOnOpen - { - get - { - return !m_TrapOnLockpick; - } - } + public override bool TrapOnOpen => !m_TrapOnLockpick; [CommandProperty( AccessLevel.GameMaster )] public bool TrapOnLockpick { - get - { - return m_TrapOnLockpick; - } - set - { - m_TrapOnLockpick = value; - } + get => m_TrapOnLockpick; + set => m_TrapOnLockpick = value; } public override void Serialize( GenericWriter writer ) @@ -403,8 +358,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsShipwreckedItem { - get { return m_IsShipwreckedItem; } - set { m_IsShipwreckedItem = value; } + get => m_IsShipwreckedItem; + set => m_IsShipwreckedItem = value; } #endregion diff --git a/Scripts/Items/Containers/MarkContainer.cs b/Scripts/Items/Containers/MarkContainer.cs index 8a9497fc8..997619334 100644 --- a/Scripts/Items/Containers/MarkContainer.cs +++ b/Scripts/Items/Containers/MarkContainer.cs @@ -68,7 +68,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool AutoLock { - get { return m_AutoLock; } + get => m_AutoLock; set { m_AutoLock = value; @@ -81,15 +81,19 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public Map TargetMap { get { return m_TargetMap; } set { m_TargetMap = value; } } + public Map TargetMap { get => m_TargetMap; + set => m_TargetMap = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D Target { get { return m_Target; } set { m_Target = value; } } + public Point3D Target { get => m_Target; + set => m_Target = value; + } [CommandProperty( AccessLevel.GameMaster )] public bool Bone { - get { return ItemID == 0xECA; } + get => ItemID == 0xECA; set { ItemID = value ? 0xECA : 0xE79; @@ -98,13 +102,12 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public string Description { get { return m_Description; } set { m_Description = value; } } - - public override bool IsDecoContainer - { - get{ return false; } + public string Description { get => m_Description; + set => m_Description = value; } + public override bool IsDecoContainer => false; + [Constructible] public MarkContainer() : this( false ) { @@ -137,7 +140,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public override bool Locked { - get { return base.Locked; } + get => base.Locked; set { base.Locked = value; diff --git a/Scripts/Items/Containers/Strongbox.cs b/Scripts/Items/Containers/Strongbox.cs index 35ad51163..d248d0b29 100644 --- a/Scripts/Items/Containers/Strongbox.cs +++ b/Scripts/Items/Containers/Strongbox.cs @@ -24,10 +24,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Owner { - get - { - return m_Owner; - } + get => m_Owner; set { m_Owner = value; @@ -91,13 +88,7 @@ namespace Server.Items } } - public override TimeSpan DecayTime - { - get - { - return TimeSpan.FromMinutes( 30.0 ); - } - } + public override TimeSpan DecayTime => TimeSpan.FromMinutes( 30.0 ); public override void AddNameProperty( ObjectPropertyList list ) { diff --git a/Scripts/Items/Containers/TrappableContainer.cs b/Scripts/Items/Containers/TrappableContainer.cs index 843d65ab8..c798abe8b 100644 --- a/Scripts/Items/Containers/TrappableContainer.cs +++ b/Scripts/Items/Containers/TrappableContainer.cs @@ -20,43 +20,25 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public TrapType TrapType { - get - { - return m_TrapType; - } - set - { - m_TrapType = value; - } + get => m_TrapType; + set => m_TrapType = value; } [CommandProperty( AccessLevel.GameMaster )] public int TrapPower { - get - { - return m_TrapPower; - } - set - { - m_TrapPower = value; - } + get => m_TrapPower; + set => m_TrapPower = value; } [CommandProperty( AccessLevel.GameMaster )] public int TrapLevel { - get - { - return m_TrapLevel; - } - set - { - m_TrapLevel = value; - } + get => m_TrapLevel; + set => m_TrapLevel = value; } - public virtual bool TrapOnOpen{ get{ return true; } } + public virtual bool TrapOnOpen => true; public TrappableContainer( int itemID ) : base( itemID ) { diff --git a/Scripts/Items/Containers/TreasureMapChest.cs b/Scripts/Items/Containers/TreasureMapChest.cs index 1a73830df..4be227e2e 100644 --- a/Scripts/Items/Containers/TreasureMapChest.cs +++ b/Scripts/Items/Containers/TreasureMapChest.cs @@ -33,16 +33,22 @@ namespace Server.Items private List m_Guardians; [CommandProperty( AccessLevel.GameMaster )] - public int Level{ get{ return m_Level; } set{ m_Level = value; } } + public int Level{ get => m_Level; + set => m_Level = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Owner{ get{ return m_Owner; } set{ m_Owner = value; } } + public Mobile Owner{ get => m_Owner; + set => m_Owner = value; + } [CommandProperty( AccessLevel.GameMaster )] - public DateTime DeleteTime{ get{ return m_DeleteTime; } } + public DateTime DeleteTime => m_DeleteTime; [CommandProperty( AccessLevel.GameMaster )] - public bool Temporary{ get{ return m_Temporary; } set{ m_Temporary = value; } } + public bool Temporary{ get => m_Temporary; + set => m_Temporary = value; + } public List Guardians => m_Guardians; @@ -332,10 +338,7 @@ namespace Server.Items return false; } - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; public override bool CheckItemUse( Mobile from, Item item ) { diff --git a/Scripts/Items/Decoration Artifacts/SEDecorationArtifacts.cs b/Scripts/Items/Decoration Artifacts/SEDecorationArtifacts.cs index ec5f65a4c..e3b31eb16 100644 --- a/Scripts/Items/Decoration Artifacts/SEDecorationArtifacts.cs +++ b/Scripts/Items/Decoration Artifacts/SEDecorationArtifacts.cs @@ -1418,8 +1418,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsOn { - get{ return this.ItemID == 0x24BF; } - set{ this.ItemID = value ? 0x24BF : 0x24C0; } + get => this.ItemID == 0x24BF; + set => this.ItemID = value ? 0x24BF : 0x24C0; } [Constructible] diff --git a/Scripts/Items/Decoration Artifacts/StealableArtifactsSpawner.cs b/Scripts/Items/Decoration Artifacts/StealableArtifactsSpawner.cs index 48c936d57..ad5904844 100644 --- a/Scripts/Items/Decoration Artifacts/StealableArtifactsSpawner.cs +++ b/Scripts/Items/Decoration Artifacts/StealableArtifactsSpawner.cs @@ -15,12 +15,12 @@ namespace Server.Items private Type m_Type; private int m_Hue; - public Map Map{ get{ return m_Map; } } - public Point3D Location{ get{ return m_Location; } } - public int MinDelay{ get{ return m_MinDelay; } } - public int MaxDelay{ get{ return m_MaxDelay; } } - public Type Type{ get{ return m_Type; } } - public int Hue{ get{ return m_Hue; } } + public Map Map => m_Map; + public Point3D Location => m_Location; + public int MinDelay => m_MinDelay; + public int MaxDelay => m_MaxDelay; + public Type Type => m_Type; + public int Hue => m_Hue; public StealableEntry( Map map, Point3D location, int minDelay, int maxDelay, Type type ) : this( map, location, minDelay, maxDelay, type, 0 ) { @@ -158,7 +158,7 @@ namespace Server.Items new StealableEntry( Map.Malas, new Point3D( 178, 629, -1 ), 18432, 27648, typeof( ManStatuetteEastArtifact ) ) }; - public static StealableEntry[] Entries{ get{ return m_Entries; } } + public static StealableEntry[] Entries => m_Entries; private static Type[] m_TypesOfEntries = null; public static Type[] TypesOfEntires @@ -179,7 +179,7 @@ namespace Server.Items private static StealableArtifactsSpawner m_Instance; - public static StealableArtifactsSpawner Instance{ get{ return m_Instance; } } + public static StealableArtifactsSpawner Instance => m_Instance; private static int GetLampPostHue() { @@ -254,11 +254,11 @@ namespace Server.Items private Item m_Item; private DateTime m_NextRespawn; - public StealableEntry Entry{ get{ return m_Entry; } } + public StealableEntry Entry => m_Entry; public Item Item { - get{ return m_Item; } + get => m_Item; set { if ( m_Item != null && value == null ) @@ -282,8 +282,8 @@ namespace Server.Items public DateTime NextRespawn { - get{ return m_NextRespawn; } - set{ m_NextRespawn = value; } + get => m_NextRespawn; + set => m_NextRespawn = value; } public StealableInstance( StealableEntry entry ) : this( entry, null, DateTime.UtcNow ) @@ -313,10 +313,7 @@ namespace Server.Items private StealableInstance[] m_Artifacts; private Hashtable m_Table; - public override string DefaultName - { - get { return "Stealable Artifacts Spawner - Internal"; } - } + public override string DefaultName => "Stealable Artifacts Spawner - Internal"; private StealableArtifactsSpawner() : base( 1 ) { diff --git a/Scripts/Items/Deeds/BarkeepContract.cs b/Scripts/Items/Deeds/BarkeepContract.cs index 1e74d3e42..d237595a6 100644 --- a/Scripts/Items/Deeds/BarkeepContract.cs +++ b/Scripts/Items/Deeds/BarkeepContract.cs @@ -6,10 +6,7 @@ namespace Server.Items { public class BarkeepContract : Item { - public override string DefaultName - { - get { return "a barkeep contract"; } - } + public override string DefaultName => "a barkeep contract"; [Constructible] public BarkeepContract() : base( 0x14F0 ) diff --git a/Scripts/Items/Deeds/ClothingBlessDeed.cs b/Scripts/Items/Deeds/ClothingBlessDeed.cs index d65afb1cc..3782a29c0 100644 --- a/Scripts/Items/Deeds/ClothingBlessDeed.cs +++ b/Scripts/Items/Deeds/ClothingBlessDeed.cs @@ -53,10 +53,7 @@ namespace Server.Items public class ClothingBlessDeed : Item // Create the item class which is derived from the base item class { - public override string DefaultName - { - get { return "a clothing bless deed"; } - } + public override string DefaultName => "a clothing bless deed"; [Constructible] public ClothingBlessDeed() : base( 0x14F0 ) diff --git a/Scripts/Items/Deeds/CommodityDeed.cs b/Scripts/Items/Deeds/CommodityDeed.cs index c6d4d5795..b51cf458f 100644 --- a/Scripts/Items/Deeds/CommodityDeed.cs +++ b/Scripts/Items/Deeds/CommodityDeed.cs @@ -14,13 +14,7 @@ namespace Server.Items private Item m_Commodity; [CommandProperty( AccessLevel.GameMaster )] - public Item Commodity - { - get - { - return m_Commodity; - } - } + public Item Commodity => m_Commodity; public bool SetCommodity( Item item ) { diff --git a/Scripts/Items/Deeds/DragonBardingDeed.cs b/Scripts/Items/Deeds/DragonBardingDeed.cs index 39ca4412a..547cb29ab 100644 --- a/Scripts/Items/Deeds/DragonBardingDeed.cs +++ b/Scripts/Items/Deeds/DragonBardingDeed.cs @@ -14,13 +14,16 @@ namespace Server.Items public override int LabelNumber => m_Exceptional ? 1053181 : 1053012; // dragon barding deed [CommandProperty( AccessLevel.GameMaster )] - public Mobile Crafter{ get{ return m_Crafter; } set{ m_Crafter = value; InvalidateProperties(); } } + public Mobile Crafter{ get => m_Crafter; + set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool Exceptional{ get{ return m_Exceptional; } set{ m_Exceptional = value; InvalidateProperties(); } } + public bool Exceptional{ get => m_Exceptional; + set{ m_Exceptional = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public CraftResource Resource{ get{ return m_Resource; } set{ m_Resource = value; Hue = CraftResources.GetHue( value ); InvalidateProperties(); } } + public CraftResource Resource{ get => m_Resource; + set{ m_Resource = value; Hue = CraftResources.GetHue( value ); InvalidateProperties(); } } public DragonBardingDeed() : base( 0x14F0 ) { diff --git a/Scripts/Items/Deeds/NameChangeDeed.cs b/Scripts/Items/Deeds/NameChangeDeed.cs index f78face87..f8126f4b7 100644 --- a/Scripts/Items/Deeds/NameChangeDeed.cs +++ b/Scripts/Items/Deeds/NameChangeDeed.cs @@ -7,10 +7,7 @@ namespace Server.Items { public class NameChangeDeed : Item { - public override string DefaultName - { - get { return "a name change deed"; } - } + public override string DefaultName => "a name change deed"; [Constructible] public NameChangeDeed() : base( 0x14F0 ) diff --git a/Scripts/Items/Deeds/NewPlayerTicket.cs b/Scripts/Items/Deeds/NewPlayerTicket.cs index 1f28d7815..25be54ead 100644 --- a/Scripts/Items/Deeds/NewPlayerTicket.cs +++ b/Scripts/Items/Deeds/NewPlayerTicket.cs @@ -11,8 +11,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } public override int LabelNumber => 1062094; // a young player ticket diff --git a/Scripts/Items/Deeds/VendorRentalContract.cs b/Scripts/Items/Deeds/VendorRentalContract.cs index 6aacdd143..8ef1a997b 100644 --- a/Scripts/Items/Deeds/VendorRentalContract.cs +++ b/Scripts/Items/Deeds/VendorRentalContract.cs @@ -21,7 +21,7 @@ namespace Server.Items public VendorRentalDuration Duration { - get{ return m_Duration; } + get => m_Duration; set { if ( value != null ) @@ -32,20 +32,20 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Price { - get{ return m_Price; } - set{ m_Price = value; } + get => m_Price; + set => m_Price = value; } [CommandProperty( AccessLevel.GameMaster )] public bool LandlordRenew { - get{ return m_LandlordRenew; } - set{ m_LandlordRenew = value; } + get => m_LandlordRenew; + set => m_LandlordRenew = value; } public Mobile Offeree { - get{ return m_Offeree; } + get => m_Offeree; set { if ( m_OfferExpireTimer != null ) diff --git a/Scripts/Items/Food/Beverage.cs b/Scripts/Items/Food/Beverage.cs index c97b80b83..bbdba64fa 100644 --- a/Scripts/Items/Food/Beverage.cs +++ b/Scripts/Items/Food/Beverage.cs @@ -565,7 +565,7 @@ namespace Server.Items } } - public virtual bool ShowQuantity { get { return ( MaxQuantity > 1 ); } } + public virtual bool ShowQuantity => ( MaxQuantity > 1 ); public virtual bool Fillable => true; public virtual bool Pourable => true; @@ -577,41 +577,32 @@ namespace Server.Items public abstract int ComputeItemID(); [CommandProperty( AccessLevel.GameMaster )] - public bool IsEmpty - { - get { return ( m_Quantity <= 0 ); } - } + public bool IsEmpty => ( m_Quantity <= 0 ); [CommandProperty( AccessLevel.GameMaster )] - public bool ContainsAlchohol - { - get { return ( !IsEmpty && m_Content != BeverageType.Milk && m_Content != BeverageType.Water ); } - } + public bool ContainsAlchohol => ( !IsEmpty && m_Content != BeverageType.Milk && m_Content != BeverageType.Water ); [CommandProperty( AccessLevel.GameMaster )] - public bool IsFull - { - get { return ( m_Quantity >= MaxQuantity ); } - } + public bool IsFull => ( m_Quantity >= MaxQuantity ); [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get { return m_Poison; } - set { m_Poison = value; } + get => m_Poison; + set => m_Poison = value; } [CommandProperty( AccessLevel.GameMaster )] public Mobile Poisoner { - get { return m_Poisoner; } - set { m_Poisoner = value; } + get => m_Poisoner; + set => m_Poisoner = value; } [CommandProperty( AccessLevel.GameMaster )] public BeverageType Content { - get { return m_Content; } + get => m_Content; set { m_Content = value; @@ -630,7 +621,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Quantity { - get { return m_Quantity; } + get => m_Quantity; set { if ( value < 0 ) diff --git a/Scripts/Items/Food/CookableFood.cs b/Scripts/Items/Food/CookableFood.cs index ec07ff3a3..268d45b05 100644 --- a/Scripts/Items/Food/CookableFood.cs +++ b/Scripts/Items/Food/CookableFood.cs @@ -10,14 +10,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int CookingLevel { - get - { - return m_CookingLevel; - } - set - { - m_CookingLevel = value; - } + get => m_CookingLevel; + set => m_CookingLevel = value; } public CookableFood( int itemID, int cookingLevel ) : base( itemID ) @@ -706,10 +700,7 @@ namespace Server.Items // ********** BrightlyColoredEggs ********** public class BrightlyColoredEggs : CookableFood { - public override string DefaultName - { - get { return "brightly colored eggs"; } - } + public override string DefaultName => "brightly colored eggs"; [Constructible] public BrightlyColoredEggs() : base( 0x9B5, 15 ) @@ -848,10 +839,7 @@ namespace Server.Items public class RawFishSteak : CookableFood { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public RawFishSteak() : this( 1 ) diff --git a/Scripts/Items/Food/Cooking.cs b/Scripts/Items/Food/Cooking.cs index edca74825..4f9fc7d89 100644 --- a/Scripts/Items/Food/Cooking.cs +++ b/Scripts/Items/Food/Cooking.cs @@ -410,7 +410,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Quantity { - get{ return m_Quantity; } + get => m_Quantity; set { m_Quantity = Math.Min(20, Math.Max(0, value)); diff --git a/Scripts/Items/Food/Food.cs b/Scripts/Items/Food/Food.cs index 4e54c3c0b..78600043e 100644 --- a/Scripts/Items/Food/Food.cs +++ b/Scripts/Items/Food/Food.cs @@ -12,22 +12,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Poisoner { - get { return m_Poisoner; } - set { m_Poisoner = value; } + get => m_Poisoner; + set => m_Poisoner = value; } [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get { return m_Poison; } - set { m_Poison = value; } + get => m_Poison; + set => m_Poison = value; } [CommandProperty( AccessLevel.GameMaster )] public int FillFactor { - get { return m_FillFactor; } - set { m_FillFactor = value; } + get => m_FillFactor; + set => m_FillFactor = value; } public Food( int itemID ) : this( 1, itemID ) @@ -280,10 +280,7 @@ namespace Server.Items public class FishSteak : Food { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public FishSteak() : this( 1 ) @@ -317,10 +314,7 @@ namespace Server.Items public class CheeseWheel : Food { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public CheeseWheel() : this( 1 ) @@ -354,10 +348,7 @@ namespace Server.Items public class CheeseWedge : Food { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public CheeseWedge() : this( 1 ) @@ -391,10 +382,7 @@ namespace Server.Items public class CheeseSlice : Food { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public CheeseSlice() : this( 1 ) diff --git a/Scripts/Items/Games/BaseBoard.cs b/Scripts/Items/Games/BaseBoard.cs index d7083948c..d11b12ac2 100644 --- a/Scripts/Items/Games/BaseBoard.cs +++ b/Scripts/Items/Games/BaseBoard.cs @@ -14,8 +14,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } public BaseBoard( int itemID ) : base( itemID ) diff --git a/Scripts/Items/Games/BasePiece.cs b/Scripts/Items/Games/BasePiece.cs index 60a458317..fdb141f2d 100644 --- a/Scripts/Items/Games/BasePiece.cs +++ b/Scripts/Items/Games/BasePiece.cs @@ -6,8 +6,8 @@ namespace Server.Items public BaseBoard Board { - get { return m_Board; } - set { m_Board = value; } + get => m_Board; + set => m_Board = value; } public override bool IsVirtualItem => true; diff --git a/Scripts/Items/Games/CheckersPieces.cs b/Scripts/Items/Games/CheckersPieces.cs index 9dc7b0d44..67ee12eb5 100644 --- a/Scripts/Items/Games/CheckersPieces.cs +++ b/Scripts/Items/Games/CheckersPieces.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class PieceWhiteChecker : BasePiece { - public override string DefaultName - { - get { return "white checker"; } - } + public override string DefaultName => "white checker"; public PieceWhiteChecker( BaseBoard board ) : base( 0x3584, board ) { @@ -30,10 +27,7 @@ namespace Server.Items public class PieceBlackChecker : BasePiece { - public override string DefaultName - { - get { return "black checker"; } - } + public override string DefaultName => "black checker"; public PieceBlackChecker( BaseBoard board ) : base( 0x358B, board ) { diff --git a/Scripts/Items/Games/ChessPieces.cs b/Scripts/Items/Games/ChessPieces.cs index 35e348429..b692b19c3 100644 --- a/Scripts/Items/Games/ChessPieces.cs +++ b/Scripts/Items/Games/ChessPieces.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class PieceWhiteKing : BasePiece { - public override string DefaultName - { - get { return "white king"; } - } + public override string DefaultName => "white king"; public PieceWhiteKing( BaseBoard board ) : base( 0x3587, board ) { @@ -30,10 +27,7 @@ namespace Server.Items public class PieceBlackKing : BasePiece { - public override string DefaultName - { - get { return "black king"; } - } + public override string DefaultName => "black king"; public PieceBlackKing( BaseBoard board ) : base( 0x358E, board ) { @@ -58,10 +52,7 @@ namespace Server.Items public class PieceWhiteQueen : BasePiece { - public override string DefaultName - { - get { return "white queen"; } - } + public override string DefaultName => "white queen"; public PieceWhiteQueen( BaseBoard board ) : base( 0x358A, board ) { @@ -86,10 +77,7 @@ namespace Server.Items public class PieceBlackQueen : BasePiece { - public override string DefaultName - { - get { return "black queen"; } - } + public override string DefaultName => "black queen"; public PieceBlackQueen( BaseBoard board ) : base( 0x3591, board ) { @@ -114,10 +102,7 @@ namespace Server.Items public class PieceWhiteRook : BasePiece { - public override string DefaultName - { - get { return "white rook"; } - } + public override string DefaultName => "white rook"; public PieceWhiteRook( BaseBoard board ) : base( 0x3586, board ) { @@ -142,10 +127,7 @@ namespace Server.Items public class PieceBlackRook : BasePiece { - public override string DefaultName - { - get { return "black rook"; } - } + public override string DefaultName => "black rook"; public PieceBlackRook( BaseBoard board ) : base( 0x358D, board ) { @@ -170,10 +152,7 @@ namespace Server.Items public class PieceWhiteBishop : BasePiece { - public override string DefaultName - { - get { return "white bishop"; } - } + public override string DefaultName => "white bishop"; public PieceWhiteBishop( BaseBoard board ) : base( 0x3585, board ) { @@ -198,10 +177,7 @@ namespace Server.Items public class PieceBlackBishop : BasePiece { - public override string DefaultName - { - get { return "black bishop"; } - } + public override string DefaultName => "black bishop"; public PieceBlackBishop( BaseBoard board ) : base( 0x358C, board ) { @@ -226,10 +202,7 @@ namespace Server.Items public class PieceWhiteKnight : BasePiece { - public override string DefaultName - { - get { return "white knight"; } - } + public override string DefaultName => "white knight"; public PieceWhiteKnight( BaseBoard board ) : base( 0x3588, board ) { @@ -254,10 +227,7 @@ namespace Server.Items public class PieceBlackKnight : BasePiece { - public override string DefaultName - { - get { return "black knight"; } - } + public override string DefaultName => "black knight"; public PieceBlackKnight( BaseBoard board ) : base( 0x358F, board ) { @@ -282,10 +252,7 @@ namespace Server.Items public class PieceWhitePawn : BasePiece { - public override string DefaultName - { - get { return "white pawn"; } - } + public override string DefaultName => "white pawn"; public PieceWhitePawn( BaseBoard board ) : base( 0x3589, board ) { @@ -310,10 +277,7 @@ namespace Server.Items public class PieceBlackPawn : BasePiece { - public override string DefaultName - { - get { return "black pawn"; } - } + public override string DefaultName => "black pawn"; public PieceBlackPawn( BaseBoard board ) : base( 0x3590, board ) { diff --git a/Scripts/Items/Games/Mahjong/MahjongDealerIndicator.cs b/Scripts/Items/Games/Mahjong/MahjongDealerIndicator.cs index 2c09c3aa0..850b651bd 100644 --- a/Scripts/Items/Games/Mahjong/MahjongDealerIndicator.cs +++ b/Scripts/Items/Games/Mahjong/MahjongDealerIndicator.cs @@ -28,10 +28,7 @@ namespace Server.Engines.Mahjong m_Wind = wind; } - public MahjongPieceDim Dimensions - { - get { return GetDimensions( m_Position, m_Direction ); } - } + public MahjongPieceDim Dimensions => GetDimensions( m_Position, m_Direction ); public void Move( Point2D position, MahjongPieceDirection direction, MahjongWind wind ) { diff --git a/Scripts/Items/Games/Mahjong/MahjongGame.cs b/Scripts/Items/Games/Mahjong/MahjongGame.cs index 1149d2398..353ec2d7d 100644 --- a/Scripts/Items/Games/Mahjong/MahjongGame.cs +++ b/Scripts/Items/Games/Mahjong/MahjongGame.cs @@ -31,14 +31,14 @@ namespace Server.Engines.Mahjong [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } [CommandProperty( AccessLevel.GameMaster )] public bool ShowScores { - get { return m_ShowScores; } + get => m_ShowScores; set { if ( m_ShowScores == value ) @@ -58,7 +58,7 @@ namespace Server.Engines.Mahjong [CommandProperty( AccessLevel.GameMaster )] public bool SpectatorVision { - get { return m_SpectatorVision; } + get => m_SpectatorVision; set { if ( m_SpectatorVision == value ) diff --git a/Scripts/Items/Games/Mahjong/MahjongTile.cs b/Scripts/Items/Games/Mahjong/MahjongTile.cs index 7703ab5d5..35231debf 100644 --- a/Scripts/Items/Games/Mahjong/MahjongTile.cs +++ b/Scripts/Items/Games/Mahjong/MahjongTile.cs @@ -37,15 +37,9 @@ namespace Server.Engines.Mahjong m_Flipped = flipped; } - public MahjongPieceDim Dimensions - { - get { return GetDimensions( m_Position, m_Direction ); } - } + public MahjongPieceDim Dimensions => GetDimensions( m_Position, m_Direction ); - public bool IsMovable - { - get { return m_Game.GetStackLevel( Dimensions ) <= m_StackLevel; } - } + public bool IsMovable => m_Game.GetStackLevel( Dimensions ) <= m_StackLevel; public void Move( Point2D position, MahjongPieceDirection direction, bool flip, int validHandArea ) { diff --git a/Scripts/Items/Games/Mahjong/MahjongWallBreakIndicator.cs b/Scripts/Items/Games/Mahjong/MahjongWallBreakIndicator.cs index e2915b769..b4aa34847 100644 --- a/Scripts/Items/Games/Mahjong/MahjongWallBreakIndicator.cs +++ b/Scripts/Items/Games/Mahjong/MahjongWallBreakIndicator.cs @@ -19,10 +19,7 @@ namespace Server.Engines.Mahjong m_Position = position; } - public MahjongPieceDim Dimensions - { - get { return GetDimensions( m_Position ); } - } + public MahjongPieceDim Dimensions => GetDimensions( m_Position ); public void Move( Point2D position ) { diff --git a/Scripts/Items/Gems/Amber.cs b/Scripts/Items/Gems/Amber.cs index 7c87be0a5..a1c3746e2 100644 --- a/Scripts/Items/Gems/Amber.cs +++ b/Scripts/Items/Gems/Amber.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Amber : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Amber() : this( 1 ) diff --git a/Scripts/Items/Gems/Amethyst.cs b/Scripts/Items/Gems/Amethyst.cs index cfbe53c4c..b95ba98a8 100644 --- a/Scripts/Items/Gems/Amethyst.cs +++ b/Scripts/Items/Gems/Amethyst.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Amethyst : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Amethyst() : this( 1 ) diff --git a/Scripts/Items/Gems/Citrine.cs b/Scripts/Items/Gems/Citrine.cs index a735a87f2..b507e15d2 100644 --- a/Scripts/Items/Gems/Citrine.cs +++ b/Scripts/Items/Gems/Citrine.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Citrine : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Citrine() : this( 1 ) diff --git a/Scripts/Items/Gems/Diamond.cs b/Scripts/Items/Gems/Diamond.cs index 09ef46263..229a418bc 100644 --- a/Scripts/Items/Gems/Diamond.cs +++ b/Scripts/Items/Gems/Diamond.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Diamond : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Diamond() : this( 1 ) diff --git a/Scripts/Items/Gems/Emerald.cs b/Scripts/Items/Gems/Emerald.cs index 3f6a58786..5fc727c68 100644 --- a/Scripts/Items/Gems/Emerald.cs +++ b/Scripts/Items/Gems/Emerald.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Emerald : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Emerald() : this( 1 ) diff --git a/Scripts/Items/Gems/Ruby.cs b/Scripts/Items/Gems/Ruby.cs index 480adc620..1f52b38a3 100644 --- a/Scripts/Items/Gems/Ruby.cs +++ b/Scripts/Items/Gems/Ruby.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Ruby : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Ruby() : this( 1 ) diff --git a/Scripts/Items/Gems/Sapphire.cs b/Scripts/Items/Gems/Sapphire.cs index 06c162f12..ef2a16144 100644 --- a/Scripts/Items/Gems/Sapphire.cs +++ b/Scripts/Items/Gems/Sapphire.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Sapphire : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Sapphire() : this( 1 ) diff --git a/Scripts/Items/Gems/StarSapphire.cs b/Scripts/Items/Gems/StarSapphire.cs index 2623f76c2..c4a2bb74a 100644 --- a/Scripts/Items/Gems/StarSapphire.cs +++ b/Scripts/Items/Gems/StarSapphire.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class StarSapphire : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public StarSapphire() : this( 1 ) diff --git a/Scripts/Items/Gems/Tourmaline.cs b/Scripts/Items/Gems/Tourmaline.cs index 08ce1f937..1d77eb108 100644 --- a/Scripts/Items/Gems/Tourmaline.cs +++ b/Scripts/Items/Gems/Tourmaline.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class Tourmaline : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Tourmaline() : this( 1 ) diff --git a/Scripts/Items/Guilds/Guildstone.cs b/Scripts/Items/Guilds/Guildstone.cs index 0b9f5f8e4..33133a518 100644 --- a/Scripts/Items/Guilds/Guildstone.cs +++ b/Scripts/Items/Guilds/Guildstone.cs @@ -16,25 +16,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string GuildName { - get { return m_GuildName; } + get => m_GuildName; set { m_GuildName = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string GuildAbbrev { - get { return m_GuildAbbrev; } + get => m_GuildAbbrev; set { m_GuildAbbrev = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Guild Guild - { - get - { - return m_Guild; - } - } + public Guild Guild => m_Guild; public override int LabelNumber => 1041429; // a guildstone @@ -228,10 +222,7 @@ namespace Server.Items } #region IAddon Members - public Item Deed - { - get { return new GuildstoneDeed( m_Guild, m_GuildName, m_GuildAbbrev ); } - } + public Item Deed => new GuildstoneDeed( m_Guild, m_GuildName, m_GuildAbbrev ); public bool CouldFit( IPoint3D p, Map map ) { @@ -283,25 +274,19 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string GuildName { - get { return m_GuildName; } + get => m_GuildName; set { m_GuildName = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public string GuildAbbrev { - get { return m_GuildAbbrev; } + get => m_GuildAbbrev; set { m_GuildAbbrev = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Guild Guild - { - get - { - return m_Guild; - } - } + public Guild Guild => m_Guild; [Constructible] public GuildstoneDeed() : this( null, null ) diff --git a/Scripts/Items/Jewels/BaseJewel.cs b/Scripts/Items/Jewels/BaseJewel.cs index 96a2b9bc5..4041bf72f 100644 --- a/Scripts/Items/Jewels/BaseJewel.cs +++ b/Scripts/Items/Jewels/BaseJewel.cs @@ -31,17 +31,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxHitPoints { - get{ return m_MaxHitPoints; } + get => m_MaxHitPoints; set{ m_MaxHitPoints = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int HitPoints { - get - { - return m_HitPoints; - } + get => m_HitPoints; set { if ( value != m_HitPoints && MaxHitPoints > 0 ) @@ -61,35 +58,35 @@ namespace Server.Items [CommandProperty( AccessLevel.Player )] public AosAttributes Attributes { - get{ return m_AosAttributes; } + get => m_AosAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosElementAttributes Resistances { - get{ return m_AosResistances; } + get => m_AosResistances; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosSkillBonuses SkillBonuses { - get{ return m_AosSkillBonuses; } + get => m_AosSkillBonuses; set{} } [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); } } [CommandProperty( AccessLevel.GameMaster )] public GemType GemType { - get{ return m_GemType; } + get => m_GemType; set{ m_GemType = value; InvalidateProperties(); } } @@ -98,10 +95,10 @@ namespace Server.Items public override int ColdResistance => m_AosResistances.Cold; public override int PoisonResistance => m_AosResistances.Poison; public override int EnergyResistance => m_AosResistances.Energy; - public virtual int BaseGemTypeNumber{ get{ return 0; } } + public virtual int BaseGemTypeNumber => 0; - public virtual int InitMinHits{ get{ return 0; } } - public virtual int InitMaxHits{ get{ return 0; } } + public virtual int InitMinHits => 0; + public virtual int InitMaxHits => 0; public override int LabelNumber { @@ -124,7 +121,7 @@ namespace Server.Items jewel.m_AosSkillBonuses = new AosSkillBonuses( newItem, m_AosSkillBonuses ); } - public virtual int ArtifactRarity{ get{ return 0; } } + public virtual int ArtifactRarity => 0; public BaseJewel( int itemID, Layer layer ) : base( itemID ) { diff --git a/Scripts/Items/Lights/BaseLight.cs b/Scripts/Items/Lights/BaseLight.cs index be427ec0c..77010341a 100644 --- a/Scripts/Items/Lights/BaseLight.cs +++ b/Scripts/Items/Lights/BaseLight.cs @@ -25,7 +25,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Burning { - get { return m_Burning; } + get => m_Burning; set { if ( m_Burning != value ) @@ -39,15 +39,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool BurntOut { - get { return m_BurntOut; } - set { m_BurntOut = value; } + get => m_BurntOut; + set => m_BurntOut = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Protected { - get { return m_Protected; } - set { m_Protected = value; } + get => m_Protected; + set => m_Protected = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -63,7 +63,7 @@ namespace Server.Items return m_Duration; } - set { m_Duration = value; } + set => m_Duration = value; } [Constructible] diff --git a/Scripts/Items/Lights/Candelabra.cs b/Scripts/Items/Lights/Candelabra.cs index 9e4f9f4ec..ce25fda4f 100644 --- a/Scripts/Items/Lights/Candelabra.cs +++ b/Scripts/Items/Lights/Candelabra.cs @@ -66,8 +66,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsShipwreckedItem { - get { return m_IsShipwreckedItem; } - set { m_IsShipwreckedItem = value; } + get => m_IsShipwreckedItem; + set => m_IsShipwreckedItem = value; } #endregion } diff --git a/Scripts/Items/Maps/MapItem.cs b/Scripts/Items/Maps/MapItem.cs index e6fb35488..18ff953bf 100644 --- a/Scripts/Items/Maps/MapItem.cs +++ b/Scripts/Items/Maps/MapItem.cs @@ -22,35 +22,32 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Protected { - get { return m_Protected; } - set { m_Protected = value; } + get => m_Protected; + set => m_Protected = value; } [CommandProperty( AccessLevel.GameMaster )] public Rectangle2D Bounds { - get { return m_Bounds; } - set { m_Bounds = value; } + get => m_Bounds; + set => m_Bounds = value; } [CommandProperty( AccessLevel.GameMaster )] public int Width { - get { return m_Width; } - set { m_Width = value; } + get => m_Width; + set => m_Width = value; } [CommandProperty( AccessLevel.GameMaster )] public int Height { - get { return m_Height; } - set { m_Height = value; } + get => m_Height; + set => m_Height = value; } - public List Pins - { - get { return m_Pins; } - } + public List Pins => m_Pins; [Constructible] public MapItem() : base( 0x14EC ) diff --git a/Scripts/Items/Maps/PresetMap.cs b/Scripts/Items/Maps/PresetMap.cs index ccc1d4f7f..cbe381565 100644 --- a/Scripts/Items/Maps/PresetMap.cs +++ b/Scripts/Items/Maps/PresetMap.cs @@ -66,10 +66,10 @@ namespace Server.Items private int m_Width, m_Height; private Rectangle2D m_Bounds; - public int Name{ get{ return m_Name; } } - public int Width{ get{ return m_Width; } } - public int Height{ get{ return m_Height; } } - public Rectangle2D Bounds{ get{ return m_Bounds; } } + public int Name => m_Name; + public int Width => m_Width; + public int Height => m_Height; + public Rectangle2D Bounds => m_Bounds; public PresetMapEntry( int name, int width, int height, int xLeft, int yTop, int xRight, int yBottom ) { @@ -111,7 +111,7 @@ namespace Server.Items new PresetMapEntry( 1041202, 200, 200, 0000, 0512, 1792, 2048 ) // map of Yew to Britain }; - public static PresetMapEntry[] Table{ get{ return m_Table; } } + public static PresetMapEntry[] Table => m_Table; } public enum PresetMapType diff --git a/Scripts/Items/Maps/TreasureMap.cs b/Scripts/Items/Maps/TreasureMap.cs index 5b66e81fb..bd2f30c10 100644 --- a/Scripts/Items/Maps/TreasureMap.cs +++ b/Scripts/Items/Maps/TreasureMap.cs @@ -18,22 +18,29 @@ namespace Server.Items private Point2D m_Location; [CommandProperty( AccessLevel.GameMaster )] - public int Level{ get{ return m_Level; } set{ m_Level = value; InvalidateProperties(); } } + public int Level{ get => m_Level; + set{ m_Level = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public bool Completed{ get{ return m_Completed; } set{ m_Completed = value; InvalidateProperties(); } } + public bool Completed{ get => m_Completed; + set{ m_Completed = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Mobile CompletedBy{ get{ return m_CompletedBy; } set{ m_CompletedBy = value; InvalidateProperties(); } } + public Mobile CompletedBy{ get => m_CompletedBy; + set{ m_CompletedBy = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Decoder{ get{ return m_Decoder; } set{ m_Decoder = value; InvalidateProperties(); } } + public Mobile Decoder{ get => m_Decoder; + set{ m_Decoder = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Map ChestMap{ get{ return m_Map; } set{ m_Map = value; InvalidateProperties(); } } + public Map ChestMap{ get => m_Map; + set{ m_Map = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Point2D ChestLocation{ get{ return m_Location; } set{ m_Location = value; } } + public Point2D ChestLocation{ get => m_Location; + set => m_Location = value; + } private static Point2D[] m_Locations; private static Point2D[] m_HavenLocations; diff --git a/Scripts/Items/Minor Artifacts/ML/AegisOfGrace.cs b/Scripts/Items/Minor Artifacts/ML/AegisOfGrace.cs index cf49b94f6..42b81f718 100644 --- a/Scripts/Items/Minor Artifacts/ML/AegisOfGrace.cs +++ b/Scripts/Items/Minor Artifacts/ML/AegisOfGrace.cs @@ -26,13 +26,7 @@ namespace Server.Items ArmorAttributes.SelfRepair = 2; } - public override Race RequiredRace - { - get - { - return Race.Elf; - } - } + public override Race RequiredRace => Race.Elf; public AegisOfGrace( Serial serial ) : base( serial ) { diff --git a/Scripts/Items/Misc/ArcaneGem.cs b/Scripts/Items/Misc/ArcaneGem.cs index b8972bbbe..5e2e77117 100644 --- a/Scripts/Items/Misc/ArcaneGem.cs +++ b/Scripts/Items/Misc/ArcaneGem.cs @@ -5,10 +5,7 @@ namespace Server.Items { public class ArcaneGem : Item { - public override string DefaultName - { - get { return "arcane gem"; } - } + public override string DefaultName => "arcane gem"; [Constructible] public ArcaneGem() : base( 0x1EA7 ) diff --git a/Scripts/Items/Misc/BankCheck.cs b/Scripts/Items/Misc/BankCheck.cs index 515fb2dd2..03764481d 100644 --- a/Scripts/Items/Misc/BankCheck.cs +++ b/Scripts/Items/Misc/BankCheck.cs @@ -15,7 +15,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Worth { - get{ return m_Worth; } + get => m_Worth; set{ m_Worth = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Misc/BulletinBoards.cs b/Scripts/Items/Misc/BulletinBoards.cs index 2edc0c4f2..a3314b0d8 100644 --- a/Scripts/Items/Misc/BulletinBoards.cs +++ b/Scripts/Items/Misc/BulletinBoards.cs @@ -38,8 +38,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string BoardName { - get{ return m_BoardName; } - set{ m_BoardName = value; } + get => m_BoardName; + set => m_BoardName = value; } public BaseBulletinBoard( int itemID ) : base( itemID ) @@ -368,16 +368,18 @@ namespace Server.Items m_PostedEquip = list.ToArray(); } - public Mobile Poster{ get{ return m_Poster; } } - public BulletinMessage Thread{ get{ return m_Thread; } } - public string Subject{ get{ return m_Subject; } } - public DateTime Time{ get{ return m_Time; } } - public DateTime LastPostTime{ get{ return m_LastPostTime; } set{ m_LastPostTime = value; } } - public string PostedName{ get{ return m_PostedName; } } - public int PostedBody{ get{ return m_PostedBody; } } - public int PostedHue{ get{ return m_PostedHue; } } - public BulletinEquip[] PostedEquip{ get{ return m_PostedEquip; } } - public string[] Lines{ get{ return m_Lines; } } + public Mobile Poster => m_Poster; + public BulletinMessage Thread => m_Thread; + public string Subject => m_Subject; + public DateTime Time => m_Time; + public DateTime LastPostTime{ get => m_LastPostTime; + set => m_LastPostTime = value; + } + public string PostedName => m_PostedName; + public int PostedBody => m_PostedBody; + public int PostedHue => m_PostedHue; + public BulletinEquip[] PostedEquip => m_PostedEquip; + public string[] Lines => m_Lines; public BulletinMessage( Serial serial ) : base( serial ) { diff --git a/Scripts/Items/Misc/ClockworkAssembly.cs b/Scripts/Items/Misc/ClockworkAssembly.cs index be01efe86..8f50b4bfd 100644 --- a/Scripts/Items/Misc/ClockworkAssembly.cs +++ b/Scripts/Items/Misc/ClockworkAssembly.cs @@ -5,10 +5,7 @@ namespace Server.Items { public class ClockworkAssembly : Item { - public override string DefaultName - { - get { return "clockwork assembly"; } - } + public override string DefaultName => "clockwork assembly"; [Constructible] public ClockworkAssembly() : base( 0x1EA8 ) diff --git a/Scripts/Items/Misc/CommunicationCrystals.cs b/Scripts/Items/Misc/CommunicationCrystals.cs index 307577749..e598673c5 100644 --- a/Scripts/Items/Misc/CommunicationCrystals.cs +++ b/Scripts/Items/Misc/CommunicationCrystals.cs @@ -33,8 +33,8 @@ namespace Server.Items private Type m_Type; private int m_Amount; - public Type Type{ get{ return m_Type; } } - public int Amount{ get{ return m_Amount; } } + public Type Type => m_Type; + public int Amount => m_Amount; private CrystalRechargeInfo( Type type, int amount ) { @@ -55,7 +55,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get{ return this.ItemID == 0x1ECD; } + get => this.ItemID == 0x1ECD; set { this.ItemID = value ? 0x1ECD : 0x1ED0; @@ -66,7 +66,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set { m_Charges = value; @@ -74,10 +74,7 @@ namespace Server.Items } } - public List Receivers - { - get{ return m_Receivers; } - } + public List Receivers => m_Receivers; [Constructible] public BroadcastCrystal() : this( 2000 ) @@ -122,10 +119,7 @@ namespace Server.Items LabelTo( from, 1060746, Receivers.Count.ToString() ); // links: ~1_val~ } - public override bool HandlesOnSpeech - { - get{ return true; } - } + public override bool HandlesOnSpeech => true; public override void OnSpeech( SpeechEventArgs e ) { @@ -304,7 +298,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get{ return this.ItemID == 0x1ED1; } + get => this.ItemID == 0x1ED1; set { this.ItemID = value ? 0x1ED1 : 0x1ED0; @@ -315,7 +309,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public BroadcastCrystal Sender { - get{ return m_Sender; } + get => m_Sender; set { if ( m_Sender != null ) diff --git a/Scripts/Items/Misc/Corpses/Corpse.cs b/Scripts/Items/Misc/Corpses/Corpse.cs index 465b489e6..1732175f0 100644 --- a/Scripts/Items/Misc/Corpses/Corpse.cs +++ b/Scripts/Items/Misc/Corpses/Corpse.cs @@ -114,7 +114,9 @@ namespace Server.Items private Item m_Item; private bool m_Perpetual; //Needed for Rummaged stuff. CONTRARY to the Patchlog, cause a later FoF contradicts it. Verify on OSI. - public bool Perpetual { get { return m_Perpetual; } set { m_Perpetual = value; } } + public bool Perpetual { get => m_Perpetual; + set => m_Perpetual = value; + } public InstancedItemInfo( Item i, Mobile m ) { @@ -249,16 +251,13 @@ namespace Server.Items } } - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; [CommandProperty( AccessLevel.GameMaster )] public DateTime TimeOfDeath { - get{ return m_TimeOfDeath; } - set{ m_TimeOfDeath = value; } + get => m_TimeOfDeath; + set => m_TimeOfDeath = value; } public override bool DisplayWeight => false; @@ -267,109 +266,82 @@ namespace Server.Items public FacialHairInfo FacialHair => m_FacialHair; [CommandProperty( AccessLevel.GameMaster )] - public bool IsBones - { - get { return GetFlag( CorpseFlag.IsBones ); } - } + public bool IsBones => GetFlag( CorpseFlag.IsBones ); [CommandProperty( AccessLevel.GameMaster )] - public bool Devoured - { - get { return (m_Devourer != null); } - } + public bool Devoured => (m_Devourer != null); [CommandProperty( AccessLevel.GameMaster )] public bool Carved { - get{ return GetFlag( CorpseFlag.Carved ); } - set { SetFlag( CorpseFlag.Carved, value ); } + get => GetFlag( CorpseFlag.Carved ); + set => SetFlag( CorpseFlag.Carved, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool VisitedByTaxidermist { - get { return GetFlag( CorpseFlag.VisitedByTaxidermist ); } - set { SetFlag( CorpseFlag.VisitedByTaxidermist, value ); } + get => GetFlag( CorpseFlag.VisitedByTaxidermist ); + set => SetFlag( CorpseFlag.VisitedByTaxidermist, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool Channeled { - get { return GetFlag( CorpseFlag.Channeled ); } - set { SetFlag( CorpseFlag.Channeled, value ); } + get => GetFlag( CorpseFlag.Channeled ); + set => SetFlag( CorpseFlag.Channeled, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool Animated { - get { return GetFlag( CorpseFlag.Animated ); } - set { SetFlag( CorpseFlag.Animated, value ); } + get => GetFlag( CorpseFlag.Animated ); + set => SetFlag( CorpseFlag.Animated, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool SelfLooted { - get { return GetFlag( CorpseFlag.SelfLooted ); } - set { SetFlag( CorpseFlag.SelfLooted, value ); } + get => GetFlag( CorpseFlag.SelfLooted ); + set => SetFlag( CorpseFlag.SelfLooted, value ); } [CommandProperty( AccessLevel.GameMaster )] - public AccessLevel AccessLevel - { - get{ return m_AccessLevel; } - } + public AccessLevel AccessLevel => m_AccessLevel; - public List Aggressors - { - get{ return m_Aggressors; } - } + public List Aggressors => m_Aggressors; - public List Looters - { - get{ return m_Looters; } - } + public List Looters => m_Looters; [CommandProperty( AccessLevel.GameMaster )] - public Mobile Killer - { - get{ return m_Killer; } - } + public Mobile Killer => m_Killer; - public List EquipItems - { - get{ return m_EquipItems; } - } + public List EquipItems => m_EquipItems; public List RestoreEquip { - get { return m_RestoreEquip; } - set { m_RestoreEquip = value; } + get => m_RestoreEquip; + set => m_RestoreEquip = value; } - public Guild Guild - { - get{ return m_Guild; } - } + public Guild Guild => m_Guild; [CommandProperty( AccessLevel.GameMaster )] public int Kills { - get{ return m_Kills; } - set{ m_Kills = value; } + get => m_Kills; + set => m_Kills = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Criminal { - get { return GetFlag( CorpseFlag.Criminal ); } - set { SetFlag( CorpseFlag.Criminal, value ); } + get => GetFlag( CorpseFlag.Criminal ); + set => SetFlag( CorpseFlag.Criminal, value ); } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Owner - { - get{ return m_Owner; } - } + public Mobile Owner => m_Owner; public void TurnToBones() { diff --git a/Scripts/Items/Misc/Corpses/CorpseNameAttribute.cs b/Scripts/Items/Misc/Corpses/CorpseNameAttribute.cs index d71d3f988..1d317a4f9 100644 --- a/Scripts/Items/Misc/Corpses/CorpseNameAttribute.cs +++ b/Scripts/Items/Misc/Corpses/CorpseNameAttribute.cs @@ -7,10 +7,7 @@ namespace Server { private string m_Name; - public string Name - { - get{ return m_Name; } - } + public string Name => m_Name; public CorpseNameAttribute( string name ) { diff --git a/Scripts/Items/Misc/DeceitBrazier.cs b/Scripts/Items/Misc/DeceitBrazier.cs index 5dab0ce89..90ce32fa0 100644 --- a/Scripts/Items/Misc/DeceitBrazier.cs +++ b/Scripts/Items/Misc/DeceitBrazier.cs @@ -77,10 +77,14 @@ namespace Server.Items public DateTime NextSpawn => m_NextSpawn; [CommandProperty( AccessLevel.GameMaster )] - public int SpawnRange { get { return m_SpawnRange; } set { m_SpawnRange = value; } } + public int SpawnRange { get => m_SpawnRange; + set => m_SpawnRange = value; + } [CommandProperty( AccessLevel.GameMaster )] - public TimeSpan NextSpawnDelay { get { return m_NextSpawnDelay; } set { m_NextSpawnDelay = value; } } + public TimeSpan NextSpawnDelay { get => m_NextSpawnDelay; + set => m_NextSpawnDelay = value; + } public override int LabelNumber => 1023633; // Brazier diff --git a/Scripts/Items/Misc/EffectController.cs b/Scripts/Items/Misc/EffectController.cs index f2c8db28d..2f75cb883 100644 --- a/Scripts/Items/Misc/EffectController.cs +++ b/Scripts/Items/Misc/EffectController.cs @@ -56,96 +56,145 @@ namespace Server.Items private int m_TriggerRange; [CommandProperty( AccessLevel.GameMaster )] - public ECEffectType EffectType{ get{ return m_EffectType; } set{ m_EffectType = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public EffectTriggerType TriggerType{ get{ return m_TriggerType; } set{ m_TriggerType = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public EffectLayer EffectLayer{ get{ return m_EffectLayer; } set{ m_EffectLayer = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public TimeSpan EffectDelay{ get{ return m_EffectDelay; } set{ m_EffectDelay = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public TimeSpan TriggerDelay{ get{ return m_TriggerDelay; } set{ m_TriggerDelay = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public TimeSpan SoundDelay{ get{ return m_SoundDelay; } set{ m_SoundDelay = value; } } - - - [CommandProperty( AccessLevel.GameMaster )] - public Item SourceItem{ get{ return m_Source as Item; } set{ m_Source = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public Mobile SourceMobile{ get{ return m_Source as Mobile; } set{ m_Source = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public bool SourceNull{ get{ return ( m_Source == null ); } set{ if ( value ) m_Source = null; } } - - - [CommandProperty( AccessLevel.GameMaster )] - public Item TargetItem{ get{ return m_Target as Item; } set{ m_Target = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public Mobile TargetMobile{ get{ return m_Target as Mobile; } set{ m_Target = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public bool TargetNull{ get{ return ( m_Target == null ); } set{ if ( value ) m_Target = null; } } - - - [CommandProperty( AccessLevel.GameMaster )] - public EffectController Sequence{ get{ return m_Trigger; } set{ m_Trigger = value; } } - - - [CommandProperty( AccessLevel.GameMaster )] - private bool FixedDirection{ get{ return m_FixedDirection; } set{ m_FixedDirection = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - private bool Explodes{ get{ return m_Explodes; } set{ m_Explodes = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - private bool PlaySoundAtTrigger{ get{ return m_PlaySoundAtTrigger; } set{ m_PlaySoundAtTrigger = value; } } - - - [CommandProperty( AccessLevel.GameMaster )] - public int EffectItemID{ get{ return m_ItemID; } set{ m_ItemID = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int EffectHue{ get{ return m_Hue; } set{ m_Hue = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int RenderMode{ get{ return m_RenderMode; } set{ m_RenderMode = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int Speed{ get{ return m_Speed; } set{ m_Speed = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int Duration{ get{ return m_Duration; } set{ m_Duration = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int ParticleEffect{ get{ return m_ParticleEffect; } set{ m_ParticleEffect = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int ExplodeParticleEffect{ get{ return m_ExplodeParticleEffect; } set{ m_ExplodeParticleEffect = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int ExplodeSound{ get{ return m_ExplodeSound; } set{ m_ExplodeSound = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int Unknown{ get{ return m_Unknown; } set{ m_Unknown = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int SoundID{ get{ return m_SoundID; } set{ m_SoundID = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public int TriggerRange{ get{ return m_TriggerRange; } set{ m_TriggerRange = value; } } - - public override string DefaultName - { - get { return "Effect Controller"; } + public ECEffectType EffectType{ get => m_EffectType; + set => m_EffectType = value; } + [CommandProperty( AccessLevel.GameMaster )] + public EffectTriggerType TriggerType{ get => m_TriggerType; + set => m_TriggerType = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public EffectLayer EffectLayer{ get => m_EffectLayer; + set => m_EffectLayer = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public TimeSpan EffectDelay{ get => m_EffectDelay; + set => m_EffectDelay = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public TimeSpan TriggerDelay{ get => m_TriggerDelay; + set => m_TriggerDelay = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public TimeSpan SoundDelay{ get => m_SoundDelay; + set => m_SoundDelay = value; + } + + + [CommandProperty( AccessLevel.GameMaster )] + public Item SourceItem{ get => m_Source as Item; + set => m_Source = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public Mobile SourceMobile{ get => m_Source as Mobile; + set => m_Source = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public bool SourceNull{ get => ( m_Source == null ); + set{ if ( value ) m_Source = null; } } + + + [CommandProperty( AccessLevel.GameMaster )] + public Item TargetItem{ get => m_Target as Item; + set => m_Target = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public Mobile TargetMobile{ get => m_Target as Mobile; + set => m_Target = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public bool TargetNull{ get => ( m_Target == null ); + set{ if ( value ) m_Target = null; } } + + + [CommandProperty( AccessLevel.GameMaster )] + public EffectController Sequence{ get => m_Trigger; + set => m_Trigger = value; + } + + + [CommandProperty( AccessLevel.GameMaster )] + private bool FixedDirection{ get => m_FixedDirection; + set => m_FixedDirection = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + private bool Explodes{ get => m_Explodes; + set => m_Explodes = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + private bool PlaySoundAtTrigger{ get => m_PlaySoundAtTrigger; + set => m_PlaySoundAtTrigger = value; + } + + + [CommandProperty( AccessLevel.GameMaster )] + public int EffectItemID{ get => m_ItemID; + set => m_ItemID = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int EffectHue{ get => m_Hue; + set => m_Hue = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int RenderMode{ get => m_RenderMode; + set => m_RenderMode = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int Speed{ get => m_Speed; + set => m_Speed = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int Duration{ get => m_Duration; + set => m_Duration = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int ParticleEffect{ get => m_ParticleEffect; + set => m_ParticleEffect = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int ExplodeParticleEffect{ get => m_ExplodeParticleEffect; + set => m_ExplodeParticleEffect = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int ExplodeSound{ get => m_ExplodeSound; + set => m_ExplodeSound = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int Unknown{ get => m_Unknown; + set => m_Unknown = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int SoundID{ get => m_SoundID; + set => m_SoundID = value; + } + + [CommandProperty( AccessLevel.GameMaster )] + public int TriggerRange{ get => m_TriggerRange; + set => m_TriggerRange = value; + } + + public override string DefaultName => "Effect Controller"; + [Constructible] public EffectController() : base( 0x1B72 ) { diff --git a/Scripts/Items/Misc/EffectItem.cs b/Scripts/Items/Misc/EffectItem.cs index cd302686a..2d569f3d7 100644 --- a/Scripts/Items/Misc/EffectItem.cs +++ b/Scripts/Items/Misc/EffectItem.cs @@ -44,13 +44,7 @@ namespace Server.Items new FreeTimer( this, duration ).Start(); } - public override bool Decays - { - get - { - return true; - } - } + public override bool Decays => true; public EffectItem( Serial serial ) : base( serial ) { diff --git a/Scripts/Items/Misc/Firebomb.cs b/Scripts/Items/Misc/Firebomb.cs index ae241690a..e6cf31e76 100644 --- a/Scripts/Items/Misc/Firebomb.cs +++ b/Scripts/Items/Misc/Firebomb.cs @@ -193,10 +193,7 @@ namespace Server.Items { private Firebomb m_Bomb; - public Firebomb Bomb - { - get { return m_Bomb; } - } + public Firebomb Bomb => m_Bomb; public ThrowTarget( Firebomb bomb ) : base( 12, true, TargetFlags.None ) diff --git a/Scripts/Items/Misc/FlippableAddonAttribute.cs b/Scripts/Items/Misc/FlippableAddonAttribute.cs index e26c8a81e..8170eee3d 100644 --- a/Scripts/Items/Misc/FlippableAddonAttribute.cs +++ b/Scripts/Items/Misc/FlippableAddonAttribute.cs @@ -16,10 +16,7 @@ namespace Server.Items private Direction[] m_Directions; - public Direction[] Directions - { - get { return m_Directions; } - } + public Direction[] Directions => m_Directions; public FlippableAddonAttribute( params Direction[] directions ) { diff --git a/Scripts/Items/Misc/FlippableAttribute.cs b/Scripts/Items/Misc/FlippableAttribute.cs index b67e4fd1e..908ba5437 100644 --- a/Scripts/Items/Misc/FlippableAttribute.cs +++ b/Scripts/Items/Misc/FlippableAttribute.cs @@ -63,10 +63,7 @@ namespace Server.Items { private int[] m_ItemIDs; - public int[] ItemIDs - { - get { return m_ItemIDs; } - } + public int[] ItemIDs => m_ItemIDs; public FlippableAttribute() : this( null ) diff --git a/Scripts/Items/Misc/Gold.cs b/Scripts/Items/Misc/Gold.cs index b1d4013f8..a2a1ec513 100644 --- a/Scripts/Items/Misc/Gold.cs +++ b/Scripts/Items/Misc/Gold.cs @@ -6,10 +6,7 @@ namespace Server.Items { public class Gold : Item { - public override double DefaultWeight - { - get { return ( Core.ML ? ( 0.02 / 3 ) : 0.02 ); } - } + public override double DefaultWeight => ( Core.ML ? ( 0.02 / 3 ) : 0.02 ); [Constructible] public Gold() : this( 1 ) diff --git a/Scripts/Items/Misc/HairDye.cs b/Scripts/Items/Misc/HairDye.cs index 050952065..73a50807b 100644 --- a/Scripts/Items/Misc/HairDye.cs +++ b/Scripts/Items/Misc/HairDye.cs @@ -55,29 +55,11 @@ namespace Server.Items private int m_HueStart; private int m_HueCount; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; - public int HueStart - { - get - { - return m_HueStart; - } - } + public int HueStart => m_HueStart; - public int HueCount - { - get - { - return m_HueCount; - } - } + public int HueCount => m_HueCount; public HairDyeEntry( string name, int hueStart, int hueCount ) { diff --git a/Scripts/Items/Misc/InteriorDecorator.cs b/Scripts/Items/Misc/InteriorDecorator.cs index ddb1fe401..dee6491aa 100644 --- a/Scripts/Items/Misc/InteriorDecorator.cs +++ b/Scripts/Items/Misc/InteriorDecorator.cs @@ -18,7 +18,8 @@ namespace Server.Items private DecorateCommand m_Command; [CommandProperty( AccessLevel.GameMaster )] - public DecorateCommand Command{ get{ return m_Command; } set{ m_Command = value; InvalidateProperties(); } } + public DecorateCommand Command{ get => m_Command; + set{ m_Command = value; InvalidateProperties(); } } [Constructible] public InteriorDecorator() : base( 0xFC1 ) diff --git a/Scripts/Items/Misc/Key.cs b/Scripts/Items/Misc/Key.cs index 78ec2c5c8..881d5b158 100644 --- a/Scripts/Items/Misc/Key.cs +++ b/Scripts/Items/Misc/Key.cs @@ -92,10 +92,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string Description { - get - { - return m_Description; - } + get => m_Description; set { m_Description = value; @@ -106,24 +103,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxRange { - get - { - return m_MaxRange; - } + get => m_MaxRange; - set - { - m_MaxRange = value; - } + set => m_MaxRange = value; } [CommandProperty( AccessLevel.GameMaster )] public uint KeyValue { - get - { - return m_KeyVal; - } + get => m_KeyVal; set { @@ -135,15 +123,9 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Item Link { - get - { - return m_Link; - } + get => m_Link; - set - { - m_Link = value; - } + set => m_Link = value; } public override void Serialize( GenericWriter writer ) diff --git a/Scripts/Items/Misc/LOSBlocker.cs b/Scripts/Items/Misc/LOSBlocker.cs index b86ad5e6f..1cf55ca33 100644 --- a/Scripts/Items/Misc/LOSBlocker.cs +++ b/Scripts/Items/Misc/LOSBlocker.cs @@ -10,10 +10,7 @@ namespace Server.Items TileData.ItemTable[0x21A2].Height = 20; } - public override string DefaultName - { - get { return "no line of sight"; } - } + public override string DefaultName => "no line of sight"; [Constructible] public LOSBlocker() : base( 0x21A2 ) diff --git a/Scripts/Items/Misc/Moonstone.cs b/Scripts/Items/Misc/Moonstone.cs index 621bba90e..d4bafa54a 100644 --- a/Scripts/Items/Misc/Moonstone.cs +++ b/Scripts/Items/Misc/Moonstone.cs @@ -16,10 +16,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public MoonstoneType Type { - get - { - return m_Type; - } + get => m_Type; set { m_Type = value; diff --git a/Scripts/Items/Misc/MorphItem.cs b/Scripts/Items/Misc/MorphItem.cs index d27730561..370e6bc3d 100644 --- a/Scripts/Items/Misc/MorphItem.cs +++ b/Scripts/Items/Misc/MorphItem.cs @@ -12,33 +12,33 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int InactiveItemID { - get{ return m_InactiveItemID; } - set{ m_InactiveItemID = value; } + get => m_InactiveItemID; + set => m_InactiveItemID = value; } [CommandProperty( AccessLevel.GameMaster )] public int ActiveItemID { - get{ return m_ActiveItemID; } - set{ m_ActiveItemID = value; } + get => m_ActiveItemID; + set => m_ActiveItemID = value; } [CommandProperty( AccessLevel.GameMaster )] public int InRange { - get{ return m_InRange; } + get => m_InRange; set{ if ( value > 18 ) value = 18; m_InRange = value; } } [CommandProperty( AccessLevel.GameMaster )] public int OutRange { - get{ return m_OutRange; } + get => m_OutRange; set{ if ( value > 18 ) value = 18; m_OutRange = value; } } [CommandProperty( AccessLevel.GameMaster )] - public int CurrentRange{ get{ return ItemID == InactiveItemID ? InRange : OutRange; } } + public int CurrentRange => ItemID == InactiveItemID ? InRange : OutRange; [Constructible] public MorphItem( int inactiveItemID, int activeItemID, int range ) : this( inactiveItemID, activeItemID, range, range ) diff --git a/Scripts/Items/Misc/OilCloth.cs b/Scripts/Items/Misc/OilCloth.cs index 00f14a717..a1a1c1e53 100644 --- a/Scripts/Items/Misc/OilCloth.cs +++ b/Scripts/Items/Misc/OilCloth.cs @@ -8,10 +8,7 @@ namespace Server.Items { public override int LabelNumber => 1041498; // oil cloth - public override double DefaultWeight - { - get { return 1.0; } - } + public override double DefaultWeight => 1.0; [Constructible] public OilCloth() : base( 0x175D ) diff --git a/Scripts/Items/Misc/PlayerBulletinBoards.cs b/Scripts/Items/Misc/PlayerBulletinBoards.cs index 874fec344..ec255ad63 100644 --- a/Scripts/Items/Misc/PlayerBulletinBoards.cs +++ b/Scripts/Items/Misc/PlayerBulletinBoards.cs @@ -74,29 +74,26 @@ namespace Server.Items private string m_Title; private SecureLevel m_Level; - public List Messages - { - get{ return m_Messages; } - } + public List Messages => m_Messages; public PlayerBBMessage Greeting { - get{ return m_Greeting; } - set{ m_Greeting = value; } + get => m_Greeting; + set => m_Greeting = value; } [CommandProperty( AccessLevel.GameMaster )] public string Title { - get{ return m_Title; } - set{ m_Title = value; } + get => m_Title; + set => m_Title = value; } [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } public BasePlayerBB( int itemID ) : base( itemID ) @@ -335,22 +332,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public DateTime Time { - get{ return m_Time; } - set{ m_Time = value; } + get => m_Time; + set => m_Time = value; } [CommandProperty( AccessLevel.GameMaster )] public Mobile Poster { - get{ return m_Poster; } - set{ m_Poster = value; } + get => m_Poster; + set => m_Poster = value; } [CommandProperty( AccessLevel.GameMaster )] public string Message { - get{ return m_Message; } - set{ m_Message = value; } + get => m_Message; + set => m_Message = value; } public PlayerBBMessage( DateTime time, Mobile poster, string message ) diff --git a/Scripts/Items/Misc/PowerCrystal.cs b/Scripts/Items/Misc/PowerCrystal.cs index 3182e8743..732a91cfa 100644 --- a/Scripts/Items/Misc/PowerCrystal.cs +++ b/Scripts/Items/Misc/PowerCrystal.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class PowerCrystal : Item { - public override string DefaultName - { - get { return "power crystal"; } - } + public override string DefaultName => "power crystal"; [Constructible] public PowerCrystal() : base( 0x1F1C ) diff --git a/Scripts/Items/Misc/PowerGenerator.cs b/Scripts/Items/Misc/PowerGenerator.cs index 1fa5b5d3c..1b9b50a7f 100644 --- a/Scripts/Items/Misc/PowerGenerator.cs +++ b/Scripts/Items/Misc/PowerGenerator.cs @@ -62,8 +62,12 @@ namespace Server.Items private int m_X; private int m_Y; - public int X{ get{ return m_X; } set{ m_X = value; } } - public int Y{ get{ return m_Y; } set{ m_Y = value; } } + public int X{ get => m_X; + set => m_X = value; + } + public int Y{ get => m_Y; + set => m_Y = value; + } public Node( int x, int y ) { @@ -78,7 +82,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int SideLength { - get{ return m_SideLength; } + get => m_SideLength; set { if ( value < 3 ) @@ -94,12 +98,9 @@ namespace Server.Items } } - public Node[] Path{ get{ return m_Path; } } + public Node[] Path => m_Path; - public override string DefaultName - { - get { return "a control panel"; } - } + public override string DefaultName => "a control panel"; public ControlPanel( int sideLength ) : base( 0xBDC ) { diff --git a/Scripts/Items/Misc/PublicMoongate.cs b/Scripts/Items/Misc/PublicMoongate.cs index 520120d82..917270861 100644 --- a/Scripts/Items/Misc/PublicMoongate.cs +++ b/Scripts/Items/Misc/PublicMoongate.cs @@ -157,21 +157,9 @@ namespace Server.Items private Point3D m_Location; private int m_Number; - public Point3D Location - { - get - { - return m_Location; - } - } + public Point3D Location => m_Location; - public int Number - { - get - { - return m_Number; - } - } + public int Number => m_Number; public PMEntry( Point3D loc, int number ) { @@ -186,37 +174,13 @@ namespace Server.Items private Map m_Map; private PMEntry[] m_Entries; - public int Number - { - get - { - return m_Number; - } - } + public int Number => m_Number; - public int SelNumber - { - get - { - return m_SelNumber; - } - } + public int SelNumber => m_SelNumber; - public Map Map - { - get - { - return m_Map; - } - } + public Map Map => m_Map; - public PMEntry[] Entries - { - get - { - return m_Entries; - } - } + public PMEntry[] Entries => m_Entries; public PMList( int number, int selNumber, Map map, PMEntry[] entries ) { diff --git a/Scripts/Items/Misc/SerpentPillar.cs b/Scripts/Items/Misc/SerpentPillar.cs index 928967762..8be852551 100644 --- a/Scripts/Items/Misc/SerpentPillar.cs +++ b/Scripts/Items/Misc/SerpentPillar.cs @@ -11,22 +11,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Active { - get{ return m_Active; } - set{ m_Active = value; } + get => m_Active; + set => m_Active = value; } [CommandProperty( AccessLevel.GameMaster )] public string Word { - get{ return m_Word; } - set{ m_Word = value; } + get => m_Word; + set => m_Word = value; } [CommandProperty( AccessLevel.GameMaster )] public Rectangle2D Destination { - get{ return m_Destination; } - set{ m_Destination = value; } + get => m_Destination; + set => m_Destination = value; } [Constructible] diff --git a/Scripts/Items/Misc/SpecialBeardDye.cs b/Scripts/Items/Misc/SpecialBeardDye.cs index b6467d85e..d99d8808e 100644 --- a/Scripts/Items/Misc/SpecialBeardDye.cs +++ b/Scripts/Items/Misc/SpecialBeardDye.cs @@ -56,29 +56,11 @@ namespace Server.Items private int m_HueStart; private int m_HueCount; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; - public int HueStart - { - get - { - return m_HueStart; - } - } + public int HueStart => m_HueStart; - public int HueCount - { - get - { - return m_HueCount; - } - } + public int HueCount => m_HueCount; public SpecialBeardDyeEntry( string name, int hueStart, int hueCount ) { diff --git a/Scripts/Items/Misc/SpecialHairDye.cs b/Scripts/Items/Misc/SpecialHairDye.cs index 6ee0444d6..e4a600f67 100644 --- a/Scripts/Items/Misc/SpecialHairDye.cs +++ b/Scripts/Items/Misc/SpecialHairDye.cs @@ -5,10 +5,7 @@ namespace Server.Items { public class SpecialHairDye : Item { - public override string DefaultName - { - get { return "Special Hair Dye"; } - } + public override string DefaultName => "Special Hair Dye"; [Constructible] public SpecialHairDye() : base( 0xE26 ) @@ -60,29 +57,11 @@ namespace Server.Items private int m_HueStart; private int m_HueCount; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; - public int HueStart - { - get - { - return m_HueStart; - } - } + public int HueStart => m_HueStart; - public int HueCount - { - get - { - return m_HueCount; - } - } + public int HueCount => m_HueCount; public SpecialHairDyeEntry( string name, int hueStart, int hueCount ) { diff --git a/Scripts/Items/Misc/Static.cs b/Scripts/Items/Misc/Static.cs index f14879057..85daa2d59 100644 --- a/Scripts/Items/Misc/Static.cs +++ b/Scripts/Items/Misc/Static.cs @@ -47,7 +47,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Number { - get{ return m_LabelNumber; } + get => m_LabelNumber; set{ m_LabelNumber = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Misc/SwarmOfFlies.cs b/Scripts/Items/Misc/SwarmOfFlies.cs index d684573d4..1fb1488e5 100644 --- a/Scripts/Items/Misc/SwarmOfFlies.cs +++ b/Scripts/Items/Misc/SwarmOfFlies.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class SwarmOfFlies : Item { - public override string DefaultName - { - get { return "a swarm of flies"; } - } + public override string DefaultName => "a swarm of flies"; [Constructible] public SwarmOfFlies() : base( 0x91B ) diff --git a/Scripts/Items/Misc/Teleporter.cs b/Scripts/Items/Misc/Teleporter.cs index 427c8c137..4379a8dd2 100644 --- a/Scripts/Items/Misc/Teleporter.cs +++ b/Scripts/Items/Misc/Teleporter.cs @@ -20,70 +20,70 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public bool SourceEffect { - get { return m_SourceEffect; } + get => m_SourceEffect; set { m_SourceEffect = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DestEffect { - get { return m_DestEffect; } + get => m_DestEffect; set { m_DestEffect = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int SoundID { - get { return m_SoundID; } + get => m_SoundID; set { m_SoundID = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public TimeSpan Delay { - get { return m_Delay; } + get => m_Delay; set { m_Delay = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool Active { - get { return m_Active; } + get => m_Active; set { m_Active = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public Point3D PointDest { - get { return m_PointDest; } + get => m_PointDest; set { m_PointDest = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public Map MapDest { - get { return m_MapDest; } + get => m_MapDest; set { m_MapDest = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool Creatures { - get { return m_Creatures; } + get => m_Creatures; set { m_Creatures = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool CombatCheck { - get { return m_CombatCheck; } + get => m_CombatCheck; set { m_CombatCheck = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool CriminalCheck { - get { return m_CriminalCheck; } + get => m_CriminalCheck; set { m_CriminalCheck = value; InvalidateProperties(); } } @@ -302,28 +302,28 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public SkillName Skill { - get { return m_Skill; } + get => m_Skill; set { m_Skill = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public double Required { - get { return m_Required; } + get => m_Required; set { m_Required = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public string MessageString { - get { return m_MessageString; } + get => m_MessageString; set { m_MessageString = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int MessageNumber { - get { return m_MessageNumber; } + get => m_MessageNumber; set { m_MessageNumber = value; InvalidateProperties(); } } @@ -429,21 +429,21 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public string Substring { - get { return m_Substring; } + get => m_Substring; set { m_Substring = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int Keyword { - get { return m_Keyword; } + get => m_Keyword; set { m_Keyword = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int Range { - get { return m_Range; } + get => m_Range; set { m_Range = value; InvalidateProperties(); } } @@ -573,36 +573,36 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public int StartNumber { - get { return m_StartNumber; } - set { m_StartNumber = value; } + get => m_StartNumber; + set => m_StartNumber = value; } [CommandProperty(AccessLevel.GameMaster)] public string StartMessage { - get { return m_StartMessage; } - set { m_StartMessage = value; } + get => m_StartMessage; + set => m_StartMessage = value; } [CommandProperty(AccessLevel.GameMaster)] public int ProgressNumber { - get { return m_ProgressNumber; } - set { m_ProgressNumber = value; } + get => m_ProgressNumber; + set => m_ProgressNumber = value; } [CommandProperty(AccessLevel.GameMaster)] public string ProgressMessage { - get { return m_ProgressMessage; } - set { m_ProgressMessage = value; } + get => m_ProgressMessage; + set => m_ProgressMessage = value; } [CommandProperty(AccessLevel.GameMaster)] public bool ShowTimeRemaining { - get { return m_ShowTimeRemaining; } - set { m_ShowTimeRemaining = value; } + get => m_ShowTimeRemaining; + set => m_ShowTimeRemaining = value; } [Constructible] @@ -732,8 +732,8 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public TimeSpan TimeoutDelay { - get { return m_TimeoutDelay; } - set { m_TimeoutDelay = value; } + get => m_TimeoutDelay; + set => m_TimeoutDelay = value; } [Constructible] @@ -846,8 +846,8 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public TimeoutTeleporter Teleporter { - get { return m_Teleporter; } - set { m_Teleporter = value; } + get => m_Teleporter; + set => m_Teleporter = value; } [Constructible] @@ -868,10 +868,7 @@ namespace Server.Items return true; } - public override string DefaultName - { - get { return "timeout teleporter goal"; } - } + public override string DefaultName => "timeout teleporter goal"; public TimeoutGoal(Serial serial) : base(serial) @@ -919,63 +916,63 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public bool DenyMounted { - get { return GetFlag(ConditionFlag.DenyMounted); } + get => GetFlag(ConditionFlag.DenyMounted); set { SetFlag(ConditionFlag.DenyMounted, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DenyFollowers { - get { return GetFlag(ConditionFlag.DenyFollowers); } + get => GetFlag(ConditionFlag.DenyFollowers); set { SetFlag(ConditionFlag.DenyFollowers, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DenyPackContents { - get { return GetFlag(ConditionFlag.DenyPackContents); } + get => GetFlag(ConditionFlag.DenyPackContents); set { SetFlag(ConditionFlag.DenyPackContents, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DenyHolding { - get { return GetFlag(ConditionFlag.DenyHolding); } + get => GetFlag(ConditionFlag.DenyHolding); set { SetFlag(ConditionFlag.DenyHolding, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DenyEquipment { - get { return GetFlag(ConditionFlag.DenyEquipment); } + get => GetFlag(ConditionFlag.DenyEquipment); set { SetFlag(ConditionFlag.DenyEquipment, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DenyTransformed { - get { return GetFlag(ConditionFlag.DenyTransformed); } + get => GetFlag(ConditionFlag.DenyTransformed); set { SetFlag(ConditionFlag.DenyTransformed, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool StaffOnly { - get { return GetFlag(ConditionFlag.StaffOnly); } + get => GetFlag(ConditionFlag.StaffOnly); set { SetFlag(ConditionFlag.StaffOnly, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DenyPackEthereals { - get { return GetFlag(ConditionFlag.DenyPackEthereals); } + get => GetFlag(ConditionFlag.DenyPackEthereals); set { SetFlag(ConditionFlag.DenyPackEthereals, value); InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool DeadOnly { - get { return GetFlag(ConditionFlag.DeadOnly); } + get => GetFlag(ConditionFlag.DeadOnly); set { SetFlag(ConditionFlag.DeadOnly, value); InvalidateProperties(); } } diff --git a/Scripts/Items/Misc/TrashBarrel.cs b/Scripts/Items/Misc/TrashBarrel.cs index 5c3387213..dceca857c 100644 --- a/Scripts/Items/Misc/TrashBarrel.cs +++ b/Scripts/Items/Misc/TrashBarrel.cs @@ -10,10 +10,7 @@ namespace Server.Items public override int DefaultMaxWeight => 0; // A value of 0 signals unlimited weight - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; [Constructible] public TrashBarrel() : base( 0xE77 ) diff --git a/Scripts/Items/Misc/TrashChest.cs b/Scripts/Items/Misc/TrashChest.cs index a3a459f61..273a40ced 100644 --- a/Scripts/Items/Misc/TrashChest.cs +++ b/Scripts/Items/Misc/TrashChest.cs @@ -5,10 +5,7 @@ namespace Server.Items { public override int DefaultMaxWeight => 0; // A value of 0 signals unlimited weight - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; [Constructible] public TrashChest() : base( 0xE41 ) diff --git a/Scripts/Items/Misc/UnholyBone.cs b/Scripts/Items/Misc/UnholyBone.cs index bc8f90081..eba5f6d5e 100644 --- a/Scripts/Items/Misc/UnholyBone.cs +++ b/Scripts/Items/Misc/UnholyBone.cs @@ -7,10 +7,7 @@ namespace Server.Items { private SpawnTimer m_Timer; - public override string DefaultName - { - get { return "unholy bone"; } - } + public override string DefaultName => "unholy bone"; [Constructible] public UnholyBone() : base( 0xF7E ) diff --git a/Scripts/Items/Misc/WarningItem.cs b/Scripts/Items/Misc/WarningItem.cs index 0e9c276f6..e3e8d3c96 100644 --- a/Scripts/Items/Misc/WarningItem.cs +++ b/Scripts/Items/Misc/WarningItem.cs @@ -14,29 +14,29 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string WarningString { - get{ return m_WarningString; } - set{ m_WarningString = value; } + get => m_WarningString; + set => m_WarningString = value; } [CommandProperty( AccessLevel.GameMaster )] public int WarningNumber { - get{ return m_WarningNumber; } - set{ m_WarningNumber = value; } + get => m_WarningNumber; + set => m_WarningNumber = value; } [CommandProperty( AccessLevel.GameMaster )] public int Range { - get{ return m_Range; } + get => m_Range; set{ if ( value > 18 ) value = 18; m_Range = value; } } [CommandProperty( AccessLevel.GameMaster )] public TimeSpan ResetDelay { - get{ return m_ResetDelay; } - set{ m_ResetDelay = value; } + get => m_ResetDelay; + set => m_ResetDelay = value; } [Constructible] @@ -89,7 +89,7 @@ namespace Server.Items } } - public virtual bool OnlyToTriggerer{ get{ return false; } } + public virtual bool OnlyToTriggerer => false; public virtual int NeighborRange => 5; public virtual void Broadcast( Mobile triggerer ) @@ -175,15 +175,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string HintString { - get{ return m_HintString; } - set{ m_HintString = value; } + get => m_HintString; + set => m_HintString = value; } [CommandProperty( AccessLevel.GameMaster )] public int HintNumber { - get{ return m_HintNumber; } - set{ m_HintNumber = value; } + get => m_HintNumber; + set => m_HintNumber = value; } public override bool OnlyToTriggerer => true; diff --git a/Scripts/Items/Misc/Waypoint.cs b/Scripts/Items/Misc/Waypoint.cs index 9a1dcc27c..46703c9e4 100644 --- a/Scripts/Items/Misc/Waypoint.cs +++ b/Scripts/Items/Misc/Waypoint.cs @@ -19,10 +19,7 @@ namespace Server.Items private WayPoint m_Next; - public override string DefaultName - { - get { return "AI Way Point"; } - } + public override string DefaultName => "AI Way Point"; [Constructible] public WayPoint() : base( 0x1f14 ) @@ -41,10 +38,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public WayPoint NextPoint { - get - { - return m_Next; - } + get => m_Next; set { if ( m_Next != this ) diff --git a/Scripts/Items/Misc/WindChimes.cs b/Scripts/Items/Misc/WindChimes.cs index 01aaa80f3..011414051 100644 --- a/Scripts/Items/Misc/WindChimes.cs +++ b/Scripts/Items/Misc/WindChimes.cs @@ -11,7 +11,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool TurnedOn { - get{ return m_TurnedOn; } + get => m_TurnedOn; set{ m_TurnedOn = value; InvalidateProperties(); } } @@ -21,10 +21,7 @@ namespace Server.Items private static int[] m_Sounds = new int[] { 0x505, 0x506, 0x507 }; - public static int[] Sounds - { - get{ return m_Sounds; } - } + public static int[] Sounds => m_Sounds; public override bool HandlesOnMovement => m_TurnedOn && IsLockedDown; diff --git a/Scripts/Items/Quivers/BaseQuiver.cs b/Scripts/Items/Quivers/BaseQuiver.cs index f9c778dbb..f4c06d88a 100644 --- a/Scripts/Items/Quivers/BaseQuiver.cs +++ b/Scripts/Items/Quivers/BaseQuiver.cs @@ -19,35 +19,35 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster)] public AosAttributes Attributes { - get{ return m_Attributes; } + get => m_Attributes; set{} } [CommandProperty( AccessLevel.GameMaster)] public int Capacity { - get{ return m_Capacity; } + get => m_Capacity; set{ m_Capacity = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster)] public int LowerAmmoCost { - get{ return m_LowerAmmoCost; } + get => m_LowerAmmoCost; set{ m_LowerAmmoCost = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster)] public int WeightReduction { - get{ return m_WeightReduction; } + get => m_WeightReduction; set{ m_WeightReduction = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster)] public int DamageIncrease { - get{ return m_DamageIncrease; } + get => m_DamageIncrease; set{ m_DamageIncrease = value; InvalidateProperties(); } } @@ -57,21 +57,18 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public ClothingQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ m_Quality = value; InvalidateProperties(); } } - public Item Ammo - { - get{ return Items.Count > 0 ? Items[ 0 ] : null; } - } + public Item Ammo => Items.Count > 0 ? Items[ 0 ] : null; public BaseQuiver() : this( 0x2FB7 ) { diff --git a/Scripts/Items/Resources/Arrows/Arrow.cs b/Scripts/Items/Resources/Arrows/Arrow.cs index 2277cb5a1..1c879789d 100644 --- a/Scripts/Items/Resources/Arrows/Arrow.cs +++ b/Scripts/Items/Resources/Arrows/Arrow.cs @@ -2,13 +2,10 @@ namespace Server.Items { public class Arrow : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Arrow() : this( 1 ) diff --git a/Scripts/Items/Resources/Arrows/Bolt.cs b/Scripts/Items/Resources/Arrows/Bolt.cs index f8413ed14..003effe1b 100644 --- a/Scripts/Items/Resources/Arrows/Bolt.cs +++ b/Scripts/Items/Resources/Arrows/Bolt.cs @@ -2,13 +2,10 @@ namespace Server.Items { public class Bolt : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Bolt() : this( 1 ) diff --git a/Scripts/Items/Resources/Arrows/Feather.cs b/Scripts/Items/Resources/Arrows/Feather.cs index 457bfbb5b..124981ee5 100644 --- a/Scripts/Items/Resources/Arrows/Feather.cs +++ b/Scripts/Items/Resources/Arrows/Feather.cs @@ -2,13 +2,10 @@ namespace Server.Items { public class Feather : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Feather() : this( 1 ) diff --git a/Scripts/Items/Resources/Arrows/Shaft.cs b/Scripts/Items/Resources/Arrows/Shaft.cs index 22437e6bf..a01adc17d 100644 --- a/Scripts/Items/Resources/Arrows/Shaft.cs +++ b/Scripts/Items/Resources/Arrows/Shaft.cs @@ -2,13 +2,10 @@ namespace Server.Items { public class Shaft : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Shaft() : this( 1 ) diff --git a/Scripts/Items/Resources/Blacksmithing/Ingots.cs b/Scripts/Items/Resources/Blacksmithing/Ingots.cs index f98ec3871..c0f8f6510 100644 --- a/Scripts/Items/Resources/Blacksmithing/Ingots.cs +++ b/Scripts/Items/Resources/Blacksmithing/Ingots.cs @@ -7,17 +7,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; InvalidateProperties(); } } - public override double DefaultWeight - { - get { return 0.1; } - } - - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + public override double DefaultWeight => 0.1; + + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Blacksmithing/Ore.cs b/Scripts/Items/Resources/Blacksmithing/Ore.cs index 51699a48b..084dbf9cc 100644 --- a/Scripts/Items/Resources/Blacksmithing/Ore.cs +++ b/Scripts/Items/Resources/Blacksmithing/Ore.cs @@ -11,7 +11,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Resources/Blacksmithing/Scales.cs b/Scripts/Items/Resources/Blacksmithing/Scales.cs index f432dc28e..cb60eb70f 100644 --- a/Scripts/Items/Resources/Blacksmithing/Scales.cs +++ b/Scripts/Items/Resources/Blacksmithing/Scales.cs @@ -9,17 +9,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; InvalidateProperties(); } } - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Fishing/BigFish.cs b/Scripts/Items/Resources/Fishing/BigFish.cs index 5ab692470..108a2ade2 100644 --- a/Scripts/Items/Resources/Fishing/BigFish.cs +++ b/Scripts/Items/Resources/Fishing/BigFish.cs @@ -9,7 +9,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Fisher { - get{ return m_Fisher; } + get => m_Fisher; set{ m_Fisher = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Resources/Fishing/MagicFish.cs b/Scripts/Items/Resources/Fishing/MagicFish.cs index 3fd3f6def..c943e6e9c 100644 --- a/Scripts/Items/Resources/Fishing/MagicFish.cs +++ b/Scripts/Items/Resources/Fishing/MagicFish.cs @@ -5,13 +5,10 @@ namespace Server.Items { public abstract class BaseMagicFish : Item { - public virtual int Bonus{ get{ return 0; } } - public virtual StatType Type{ get{ return StatType.Str; } } + public virtual int Bonus => 0; + public virtual StatType Type => StatType.Str; - public override double DefaultWeight - { - get { return 1.0; } - } + public override double DefaultWeight => 1.0; public BaseMagicFish( int hue ) : base( 0xDD6 ) { diff --git a/Scripts/Items/Resources/Masonry/Granite.cs b/Scripts/Items/Resources/Masonry/Granite.cs index 8076345c1..98a680898 100644 --- a/Scripts/Items/Resources/Masonry/Granite.cs +++ b/Scripts/Items/Resources/Masonry/Granite.cs @@ -7,7 +7,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; InvalidateProperties(); } } @@ -40,10 +40,7 @@ namespace Server.Items Stackable = Core.ML; } - public override double DefaultWeight - { - get { return Core.ML ? 1.0 : 10.0; } // Pub 57 - } + public override double DefaultWeight => Core.ML ? 1.0 : 10.0; public BaseGranite( CraftResource resource ) : base( 0x1779 ) { diff --git a/Scripts/Items/Resources/Reagents/BaseReagent.cs b/Scripts/Items/Resources/Reagents/BaseReagent.cs index 47c380d15..189f63fee 100644 --- a/Scripts/Items/Resources/Reagents/BaseReagent.cs +++ b/Scripts/Items/Resources/Reagents/BaseReagent.cs @@ -2,10 +2,7 @@ namespace Server.Items { public abstract class BaseReagent : Item { - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; public BaseReagent( int itemID ) : this( itemID, 1 ) { diff --git a/Scripts/Items/Resources/Reagents/BatWing.cs b/Scripts/Items/Resources/Reagents/BatWing.cs index 68fae0021..5e0db1c8d 100644 --- a/Scripts/Items/Resources/Reagents/BatWing.cs +++ b/Scripts/Items/Resources/Reagents/BatWing.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class BatWing : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public BatWing() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/BlackPearl.cs b/Scripts/Items/Resources/Reagents/BlackPearl.cs index c9749c07e..32aee0ead 100644 --- a/Scripts/Items/Resources/Reagents/BlackPearl.cs +++ b/Scripts/Items/Resources/Reagents/BlackPearl.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class BlackPearl : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public BlackPearl() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/Bloodmoss.cs b/Scripts/Items/Resources/Reagents/Bloodmoss.cs index 7b5463e4a..f49ffbac0 100644 --- a/Scripts/Items/Resources/Reagents/Bloodmoss.cs +++ b/Scripts/Items/Resources/Reagents/Bloodmoss.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class Bloodmoss : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public Bloodmoss() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/DaemonBlood.cs b/Scripts/Items/Resources/Reagents/DaemonBlood.cs index b54c1e435..24f07a484 100644 --- a/Scripts/Items/Resources/Reagents/DaemonBlood.cs +++ b/Scripts/Items/Resources/Reagents/DaemonBlood.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class DaemonBlood : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public DaemonBlood() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/DaemonBone.cs b/Scripts/Items/Resources/Reagents/DaemonBone.cs index 23b73f754..0ffa9971a 100644 --- a/Scripts/Items/Resources/Reagents/DaemonBone.cs +++ b/Scripts/Items/Resources/Reagents/DaemonBone.cs @@ -3,10 +3,7 @@ namespace Server.Items // TODO: Commodity? public class DaemonBone : BaseReagent { - public override double DefaultWeight - { - get { return 1.0; } - } + public override double DefaultWeight => 1.0; [Constructible] public DaemonBone() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/DeadWood.cs b/Scripts/Items/Resources/Reagents/DeadWood.cs index 3f04c28e3..6a5cf3e6a 100644 --- a/Scripts/Items/Resources/Reagents/DeadWood.cs +++ b/Scripts/Items/Resources/Reagents/DeadWood.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class DeadWood : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public DeadWood() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/DragonsBlood.cs b/Scripts/Items/Resources/Reagents/DragonsBlood.cs index 3c78982a0..7cd67f355 100644 --- a/Scripts/Items/Resources/Reagents/DragonsBlood.cs +++ b/Scripts/Items/Resources/Reagents/DragonsBlood.cs @@ -2,8 +2,8 @@ { public class DragonsBlood : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return Core.ML; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => Core.ML; [Constructible] public DragonsBlood() diff --git a/Scripts/Items/Resources/Reagents/Garlic.cs b/Scripts/Items/Resources/Reagents/Garlic.cs index a65179888..b1d24b434 100644 --- a/Scripts/Items/Resources/Reagents/Garlic.cs +++ b/Scripts/Items/Resources/Reagents/Garlic.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class Garlic : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public Garlic() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/Ginseng.cs b/Scripts/Items/Resources/Reagents/Ginseng.cs index 179ca45a3..b59a6a8cf 100644 --- a/Scripts/Items/Resources/Reagents/Ginseng.cs +++ b/Scripts/Items/Resources/Reagents/Ginseng.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class Ginseng : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public Ginseng() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/GraveDust.cs b/Scripts/Items/Resources/Reagents/GraveDust.cs index 2aa51d98d..5fa2a4da8 100644 --- a/Scripts/Items/Resources/Reagents/GraveDust.cs +++ b/Scripts/Items/Resources/Reagents/GraveDust.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class GraveDust : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public GraveDust() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/MandrakeRoot.cs b/Scripts/Items/Resources/Reagents/MandrakeRoot.cs index e525c0d7a..c6a3cd3d4 100644 --- a/Scripts/Items/Resources/Reagents/MandrakeRoot.cs +++ b/Scripts/Items/Resources/Reagents/MandrakeRoot.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class MandrakeRoot : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public MandrakeRoot() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/Nightshade.cs b/Scripts/Items/Resources/Reagents/Nightshade.cs index 4372f1997..9868408c0 100644 --- a/Scripts/Items/Resources/Reagents/Nightshade.cs +++ b/Scripts/Items/Resources/Reagents/Nightshade.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class Nightshade : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public Nightshade() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/NoxCrystal.cs b/Scripts/Items/Resources/Reagents/NoxCrystal.cs index 5267b7b23..d7736cda1 100644 --- a/Scripts/Items/Resources/Reagents/NoxCrystal.cs +++ b/Scripts/Items/Resources/Reagents/NoxCrystal.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class NoxCrystal : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public NoxCrystal() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/PigIron.cs b/Scripts/Items/Resources/Reagents/PigIron.cs index 0f62f4675..0b88ec676 100644 --- a/Scripts/Items/Resources/Reagents/PigIron.cs +++ b/Scripts/Items/Resources/Reagents/PigIron.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class PigIron : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public PigIron() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/SpidersSilk.cs b/Scripts/Items/Resources/Reagents/SpidersSilk.cs index 732199151..3d84ea39a 100644 --- a/Scripts/Items/Resources/Reagents/SpidersSilk.cs +++ b/Scripts/Items/Resources/Reagents/SpidersSilk.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class SpidersSilk : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public SpidersSilk() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/SulfurousAsh.cs b/Scripts/Items/Resources/Reagents/SulfurousAsh.cs index f9666067c..2be7fed8c 100644 --- a/Scripts/Items/Resources/Reagents/SulfurousAsh.cs +++ b/Scripts/Items/Resources/Reagents/SulfurousAsh.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class SulfurousAsh : BaseReagent, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public SulfurousAsh() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/BoltOfCloth.cs b/Scripts/Items/Resources/Tailor/BoltOfCloth.cs index 5cfa14189..ba856c83f 100644 --- a/Scripts/Items/Resources/Tailor/BoltOfCloth.cs +++ b/Scripts/Items/Resources/Tailor/BoltOfCloth.cs @@ -5,8 +5,8 @@ namespace Server.Items [FlippableAttribute( 0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C )] public class BoltOfCloth : Item, IScissorable, IDyable, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public BoltOfCloth() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/Bone.cs b/Scripts/Items/Resources/Tailor/Bone.cs index db92ee626..e31657257 100644 --- a/Scripts/Items/Resources/Tailor/Bone.cs +++ b/Scripts/Items/Resources/Tailor/Bone.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class Bone : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; [Constructible] public Bone() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/Cloth.cs b/Scripts/Items/Resources/Tailor/Cloth.cs index ca43b96e5..9e47a1e3d 100644 --- a/Scripts/Items/Resources/Tailor/Cloth.cs +++ b/Scripts/Items/Resources/Tailor/Cloth.cs @@ -5,13 +5,10 @@ namespace Server.Items [FlippableAttribute( 0x1766, 0x1768 )] public class Cloth : Item, IScissorable, IDyable, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public Cloth() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/Hides.cs b/Scripts/Items/Resources/Tailor/Hides.cs index f52855a61..126602328 100644 --- a/Scripts/Items/Resources/Tailor/Hides.cs +++ b/Scripts/Items/Resources/Tailor/Hides.cs @@ -7,12 +7,12 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; InvalidateProperties(); } } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Tailor/Leathers.cs b/Scripts/Items/Resources/Tailor/Leathers.cs index ccf8688c1..ec9024e43 100644 --- a/Scripts/Items/Resources/Tailor/Leathers.cs +++ b/Scripts/Items/Resources/Tailor/Leathers.cs @@ -7,12 +7,12 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; InvalidateProperties(); } } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Tailor/UncutCloth.cs b/Scripts/Items/Resources/Tailor/UncutCloth.cs index 83ccea6b1..8dd032ff2 100644 --- a/Scripts/Items/Resources/Tailor/UncutCloth.cs +++ b/Scripts/Items/Resources/Tailor/UncutCloth.cs @@ -5,13 +5,10 @@ namespace Server.Items [FlippableAttribute( 0x1765, 0x1767 )] public class UncutCloth : Item, IScissorable, IDyable, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; [Constructible] public UncutCloth() : this( 1 ) diff --git a/Scripts/Items/Skill Items/Camping/Campfire.cs b/Scripts/Items/Skill Items/Camping/Campfire.cs index 9ce3589a5..95c08034a 100644 --- a/Scripts/Items/Skill Items/Camping/Campfire.cs +++ b/Scripts/Items/Skill Items/Camping/Campfire.cs @@ -50,10 +50,7 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public DateTime Created - { - get{ return m_Created; } - } + public DateTime Created => m_Created; [CommandProperty( AccessLevel.GameMaster )] public CampfireStatus Status @@ -186,19 +183,16 @@ namespace Server.Items private DateTime m_Start; private bool m_Safe; - public PlayerMobile Player{ get{ return m_Player; } } - public Campfire Fire{ get{ return m_Fire; } } - public DateTime Start{ get{ return m_Start; } } + public PlayerMobile Player => m_Player; + public Campfire Fire => m_Fire; + public DateTime Start => m_Start; - public bool Valid - { - get{ return !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange( Fire, Campfire.SecureRange ); } - } + public bool Valid => !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange( Fire, Campfire.SecureRange ); public bool Safe { - get{ return Valid && m_Safe; } - set{ m_Safe = value; } + get => Valid && m_Safe; + set => m_Safe = value; } public CampfireEntry( PlayerMobile player, Campfire fire ) diff --git a/Scripts/Items/Skill Items/Carpenter Items/Board.cs b/Scripts/Items/Skill Items/Carpenter Items/Board.cs index 3b28eab98..9a5e1879b 100644 --- a/Scripts/Items/Skill Items/Carpenter Items/Board.cs +++ b/Scripts/Items/Skill Items/Carpenter Items/Board.cs @@ -8,7 +8,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get { return m_Resource; } + get => m_Resource; set { m_Resource = value; InvalidateProperties(); } } @@ -30,7 +30,7 @@ namespace Server.Items } } - bool ICommodity.IsDeedable { get { return true; } } + bool ICommodity.IsDeedable => true; [Constructible] public Board() diff --git a/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs b/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs index b9ac6b233..77f641c12 100644 --- a/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs +++ b/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs @@ -180,22 +180,31 @@ namespace Server.Items private int m_AnimalWeight; [CommandProperty( AccessLevel.GameMaster )] - public int WestID{ get{ return m_WestID; } set{ m_WestID = value; } } + public int WestID{ get => m_WestID; + set => m_WestID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int NorthID{ get{ return m_NorthID; } set{ m_NorthID = value; } } + public int NorthID{ get => m_NorthID; + set => m_NorthID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int DeedNumber{ get{ return m_DeedNumber; } set{ m_DeedNumber = value; } } + public int DeedNumber{ get => m_DeedNumber; + set => m_DeedNumber = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int AddonNumber{ get{ return m_AddonNumber; } set{ m_AddonNumber = value; InvalidateProperties(); } } + public int AddonNumber{ get => m_AddonNumber; + set{ m_AddonNumber = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Hunter{ get{ return m_Hunter; } set{ m_Hunter = value; InvalidateProperties(); } } + public Mobile Hunter{ get => m_Hunter; + set{ m_Hunter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int AnimalWeight{ get{ return m_AnimalWeight; } set{ m_AnimalWeight = value; InvalidateProperties(); } } + public int AnimalWeight{ get => m_AnimalWeight; + set{ m_AnimalWeight = value; InvalidateProperties(); } } public override int LabelNumber => m_AddonNumber; @@ -312,10 +321,7 @@ namespace Server.Items } } - public Item Deed - { - get{ return new TrophyDeed( m_WestID, m_NorthID, m_DeedNumber, m_AddonNumber, m_Hunter, m_AnimalWeight ); } - } + public Item Deed => new TrophyDeed( m_WestID, m_NorthID, m_DeedNumber, m_AddonNumber, m_Hunter, m_AnimalWeight ); public override void OnDoubleClick( Mobile from ) { @@ -348,22 +354,31 @@ namespace Server.Items private int m_AnimalWeight; [CommandProperty( AccessLevel.GameMaster )] - public int WestID{ get{ return m_WestID; } set{ m_WestID = value; } } + public int WestID{ get => m_WestID; + set => m_WestID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int NorthID{ get{ return m_NorthID; } set{ m_NorthID = value; } } + public int NorthID{ get => m_NorthID; + set => m_NorthID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int DeedNumber{ get{ return m_DeedNumber; } set{ m_DeedNumber = value; InvalidateProperties(); } } + public int DeedNumber{ get => m_DeedNumber; + set{ m_DeedNumber = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int AddonNumber{ get{ return m_AddonNumber; } set{ m_AddonNumber = value; } } + public int AddonNumber{ get => m_AddonNumber; + set => m_AddonNumber = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Hunter{ get{ return m_Hunter; } set{ m_Hunter = value; InvalidateProperties(); } } + public Mobile Hunter{ get => m_Hunter; + set{ m_Hunter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public int AnimalWeight{ get{ return m_AnimalWeight; } set{ m_AnimalWeight = value; InvalidateProperties(); } } + public int AnimalWeight{ get => m_AnimalWeight; + set{ m_AnimalWeight = value; InvalidateProperties(); } } public override int LabelNumber => m_DeedNumber; diff --git a/Scripts/Items/Skill Items/Fishing/Misc/MessageInABottle.cs b/Scripts/Items/Skill Items/Fishing/Misc/MessageInABottle.cs index 4e10b8010..722829027 100644 --- a/Scripts/Items/Skill Items/Fishing/Misc/MessageInABottle.cs +++ b/Scripts/Items/Skill Items/Fishing/Misc/MessageInABottle.cs @@ -20,15 +20,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Map TargetMap { - get{ return m_TargetMap; } - set{ m_TargetMap = value; } + get => m_TargetMap; + set => m_TargetMap = value; } [CommandProperty( AccessLevel.GameMaster )] public int Level { - get{ return m_Level; } - set{ m_Level = Math.Max( 1, Math.Min( value, 4 ) ); } + get => m_Level; + set => m_Level = Math.Max( 1, Math.Min( value, 4 ) ); } [Constructible] diff --git a/Scripts/Items/Skill Items/Fishing/Misc/SOS.cs b/Scripts/Items/Skill Items/Fishing/Misc/SOS.cs index 957ecaee6..a44d14634 100644 --- a/Scripts/Items/Skill Items/Fishing/Misc/SOS.cs +++ b/Scripts/Items/Skill Items/Fishing/Misc/SOS.cs @@ -23,15 +23,12 @@ namespace Server.Items private int m_MessageIndex; [CommandProperty( AccessLevel.GameMaster )] - public bool IsAncient - { - get{ return ( m_Level >= 4 ); } - } + public bool IsAncient => ( m_Level >= 4 ); [CommandProperty( AccessLevel.GameMaster )] public int Level { - get{ return m_Level; } + get => m_Level; set { m_Level = Math.Max( 1, Math.Min( value, 4 ) ); @@ -43,22 +40,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Map TargetMap { - get{ return m_TargetMap; } - set{ m_TargetMap = value; } + get => m_TargetMap; + set => m_TargetMap = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D TargetLocation { - get{ return m_TargetLocation; } - set{ m_TargetLocation = value; } + get => m_TargetLocation; + set => m_TargetLocation = value; } [CommandProperty( AccessLevel.GameMaster )] public int MessageIndex { - get{ return m_MessageIndex; } - set{ m_MessageIndex = value; } + get => m_MessageIndex; + set => m_MessageIndex = value; } public void UpdateHue() @@ -304,9 +301,9 @@ namespace Server.Items private int m_Width, m_Height; private string m_Message; - public int Width{ get{ return m_Width; } } - public int Height{ get{ return m_Height; } } - public string Message{ get{ return m_Message; } } + public int Width => m_Width; + public int Height => m_Height; + public string Message => m_Message; public MessageEntry( int width, int height, string message ) { @@ -331,10 +328,7 @@ namespace Server.Items new MessageEntry( 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..." ) }; - public static MessageEntry[] Entries - { - get{ return m_Entries; } - } + public static MessageEntry[] Entries => m_Entries; } } } diff --git a/Scripts/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs b/Scripts/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs index 5d1eb6c73..d8a01e639 100644 --- a/Scripts/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs +++ b/Scripts/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs @@ -67,10 +67,7 @@ namespace Server.Items public bool IsShipwreckedItem { - get - { - return true; //It's a ShipwreckedItem item. 'Course it's gonna be a Shipwreckeditem - } + get => true; set { } diff --git a/Scripts/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs b/Scripts/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs index 604b0ddce..b4139d864 100644 --- a/Scripts/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs +++ b/Scripts/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs @@ -15,8 +15,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool InUse { - get{ return m_InUse; } - set{ m_InUse = value; } + get => m_InUse; + set => m_InUse = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs b/Scripts/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs index c3f331ad4..7806897c8 100644 --- a/Scripts/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs +++ b/Scripts/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs @@ -23,21 +23,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public ToolQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ UnscaleUses(); m_Quality = value; InvalidateProperties(); ScaleUses(); } } [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } @@ -60,7 +60,8 @@ namespace Server.Items return 100; } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } public abstract HarvestSystem HarvestSystem{ get; } diff --git a/Scripts/Items/Skill Items/Harvest Tools/ProspectorsTool.cs b/Scripts/Items/Skill Items/Harvest Tools/ProspectorsTool.cs index a77ff62a4..4be358b32 100644 --- a/Scripts/Items/Skill Items/Harvest Tools/ProspectorsTool.cs +++ b/Scripts/Items/Skill Items/Harvest Tools/ProspectorsTool.cs @@ -11,11 +11,12 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } public override int LabelNumber => 1049065; // prospector's tool diff --git a/Scripts/Items/Skill Items/Lumberjack/Log.cs b/Scripts/Items/Skill Items/Lumberjack/Log.cs index ffacfc6ef..33072ac4a 100644 --- a/Scripts/Items/Skill Items/Lumberjack/Log.cs +++ b/Scripts/Items/Skill Items/Lumberjack/Log.cs @@ -8,12 +8,12 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get { return m_Resource; } + get => m_Resource; set { m_Resource = value; InvalidateProperties(); } } - int ICommodity.DescriptionNumber { get { return CraftResources.IsStandard( m_Resource ) ? LabelNumber : 1075062 + ( (int)m_Resource - (int)CraftResource.RegularWood ); } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => CraftResources.IsStandard( m_Resource ) ? LabelNumber : 1075062 + ( (int)m_Resource - (int)CraftResource.RegularWood ); + bool ICommodity.IsDeedable => true; [Constructible] public Log() : this( 1 ) diff --git a/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs b/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs index d95a08b0c..f7f70269f 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs @@ -15,8 +15,8 @@ namespace Server.Items Amount = amount; } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return (Core.ML); } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => (Core.ML); public BlankScroll( Serial serial ) : base( serial ) { diff --git a/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs b/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs index 7398c78d0..6c8237e2c 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class Bottle : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return (Core.ML); } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => (Core.ML); [Constructible] public Bottle() : this( 1 ) diff --git a/Scripts/Items/Skill Items/Magical/Misc/Moongate.cs b/Scripts/Items/Skill Items/Magical/Misc/Moongate.cs index 803bdfc6e..4aab20440 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/Moongate.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/Moongate.cs @@ -17,43 +17,25 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Point3D Target { - get - { - return m_Target; - } - set - { - m_Target = value; - } + get => m_Target; + set => m_Target = value; } [CommandProperty( AccessLevel.GameMaster )] public Map TargetMap { - get - { - return m_TargetMap; - } - set - { - m_TargetMap = value; - } + get => m_TargetMap; + set => m_TargetMap = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Dispellable { - get - { - return m_bDispellable; - } - set - { - m_bDispellable = value; - } + get => m_bDispellable; + set => m_bDispellable = value; } - public virtual bool ShowFeluccaWarning{ get{ return false; } } + public virtual bool ShowFeluccaWarning => false; [Constructible] public Moongate() : this( Point3D.Zero, null ) @@ -273,50 +255,50 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int GumpWidth { - get{ return m_GumpWidth; } - set{ m_GumpWidth = value; } + get => m_GumpWidth; + set => m_GumpWidth = value; } [CommandProperty( AccessLevel.GameMaster )] public int GumpHeight { - get{ return m_GumpHeight; } - set{ m_GumpHeight = value; } + get => m_GumpHeight; + set => m_GumpHeight = value; } [CommandProperty( AccessLevel.GameMaster )] public int TitleColor { - get{ return m_TitleColor; } - set{ m_TitleColor = value; } + get => m_TitleColor; + set => m_TitleColor = value; } [CommandProperty( AccessLevel.GameMaster )] public int MessageColor { - get{ return m_MessageColor; } - set{ m_MessageColor = value; } + get => m_MessageColor; + set => m_MessageColor = value; } [CommandProperty( AccessLevel.GameMaster )] public int TitleNumber { - get{ return m_TitleNumber; } - set{ m_TitleNumber = value; } + get => m_TitleNumber; + set => m_TitleNumber = value; } [CommandProperty( AccessLevel.GameMaster )] public int MessageNumber { - get{ return m_MessageNumber; } - set{ m_MessageNumber = value; } + get => m_MessageNumber; + set => m_MessageNumber = value; } [CommandProperty( AccessLevel.GameMaster )] public string MessageString { - get{ return m_MessageString; } - set{ m_MessageString = value; } + get => m_MessageString; + set => m_MessageString = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Magical/Misc/PotionKeg.cs b/Scripts/Items/Skill Items/Magical/Misc/PotionKeg.cs index f0bd208cd..7fa36979d 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/PotionKeg.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/PotionKeg.cs @@ -10,10 +10,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Held { - get - { - return m_Held; - } + get => m_Held; set { if ( m_Held != value ) @@ -28,10 +25,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public PotionEffect Type { - get - { - return m_Type; - } + get => m_Type; set { m_Type = value; diff --git a/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs b/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs index 9df99a8d5..aef79e020 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs @@ -78,10 +78,7 @@ namespace Server.Items [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public string Description { - get - { - return m_Description; - } + get => m_Description; set { m_Description = value; @@ -92,10 +89,7 @@ namespace Server.Items [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public bool Marked { - get - { - return m_Marked; - } + get => m_Marked; set { if ( m_Marked != value ) @@ -110,23 +104,14 @@ namespace Server.Items [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Point3D Target { - get - { - return m_Target; - } - set - { - m_Target = value; - } + get => m_Target; + set => m_Target = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Map TargetMap { - get - { - return m_TargetMap; - } + get => m_TargetMap; set { if ( m_TargetMap != value ) diff --git a/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs b/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs index 8a7ad8f97..40f11e4e9 100644 --- a/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs +++ b/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs @@ -43,10 +43,7 @@ namespace Server.Items public PotionEffect PotionEffect { - get - { - return m_PotionEffect; - } + get => m_PotionEffect; set { m_PotionEffect = value; @@ -54,8 +51,8 @@ namespace Server.Items } } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return (Core.ML); } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => (Core.ML); public override int LabelNumber => 1041314 + (int)m_PotionEffect; @@ -71,7 +68,7 @@ namespace Server.Items { } - public virtual bool RequireFreeHand{ get{ return true; } } + public virtual bool RequireFreeHand => true; public static bool HasFreeHand( Mobile m ) { diff --git a/Scripts/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs b/Scripts/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs index ad132a35e..d950f962c 100644 --- a/Scripts/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs +++ b/Scripts/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs @@ -140,10 +140,7 @@ namespace Server.Items { private BaseConflagrationPotion m_Potion; - public BaseConflagrationPotion Potion - { - get{ return m_Potion; } - } + public BaseConflagrationPotion Potion => m_Potion; public ThrowTarget( BaseConflagrationPotion potion ) : base( 12, true, TargetFlags.None ) { @@ -185,7 +182,7 @@ namespace Server.Items private DateTime m_End; private Timer m_Timer; - public Mobile From{ get{ return m_From; } } + public Mobile From => m_From; public override bool BlocksFit => true; diff --git a/Scripts/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs b/Scripts/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs index b60ede52d..2ad2093b7 100644 --- a/Scripts/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs +++ b/Scripts/Items/Skill Items/Magical/Potions/Confusion Blast Potions/BaseConfusionBlastPotion.cs @@ -160,10 +160,7 @@ namespace Server.Items { private BaseConfusionBlastPotion m_Potion; - public BaseConfusionBlastPotion Potion - { - get{ return m_Potion; } - } + public BaseConfusionBlastPotion Potion => m_Potion; public ThrowTarget( BaseConfusionBlastPotion potion ) : base( 12, true, TargetFlags.None ) { diff --git a/Scripts/Items/Skill Items/Magical/Potions/Cure Potions/BaseCurePotion.cs b/Scripts/Items/Skill Items/Magical/Potions/Cure Potions/BaseCurePotion.cs index 6256408e3..bb37ec6cf 100644 --- a/Scripts/Items/Skill Items/Magical/Potions/Cure Potions/BaseCurePotion.cs +++ b/Scripts/Items/Skill Items/Magical/Potions/Cure Potions/BaseCurePotion.cs @@ -7,15 +7,9 @@ namespace Server.Items private Poison m_Poison; private double m_Chance; - public Poison Poison - { - get{ return m_Poison; } - } + public Poison Poison => m_Poison; - public double Chance - { - get{ return m_Chance; } - } + public double Chance => m_Chance; public CureLevelInfo( Poison poison, double chance ) { diff --git a/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs b/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs index 3d42b3cd8..5e793c258 100644 --- a/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs +++ b/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs @@ -166,10 +166,7 @@ namespace Server.Items { private BaseExplosionPotion m_Potion; - public BaseExplosionPotion Potion - { - get{ return m_Potion; } - } + public BaseExplosionPotion Potion => m_Potion; public ThrowTarget( BaseExplosionPotion potion ) : base( 12, true, TargetFlags.None ) { diff --git a/Scripts/Items/Skill Items/Magical/Runebook.cs b/Scripts/Items/Skill Items/Magical/Runebook.cs index 1c9bc4aee..a80026a11 100644 --- a/Scripts/Items/Skill Items/Magical/Runebook.cs +++ b/Scripts/Items/Skill Items/Magical/Runebook.cs @@ -18,7 +18,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public BookQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ m_Quality = value; InvalidateProperties(); } } @@ -36,31 +36,28 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public DateTime NextUse { - get{ return m_NextUse; } - set{ m_NextUse = value; } + get => m_NextUse; + set => m_NextUse = value; } [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } [CommandProperty( AccessLevel.GameMaster )] public string Description { - get - { - return m_Description; - } + get => m_Description; set { m_Description = value; @@ -71,39 +68,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int CurCharges { - get - { - return m_CurCharges; - } - set - { - m_CurCharges = value; - } + get => m_CurCharges; + set => m_CurCharges = value; } [CommandProperty( AccessLevel.GameMaster )] public int MaxCharges { - get - { - return m_MaxCharges; - } - set - { - m_MaxCharges = value; - } + get => m_MaxCharges; + set => m_MaxCharges = value; } public List Openers { - get - { - return m_Openers; - } - set - { - m_Openers = value; - } + get => m_Openers; + set => m_Openers = value; } public override int LabelNumber => 1041267; // runebook @@ -131,13 +110,7 @@ namespace Server.Items { } - public List Entries - { - get - { - return m_Entries; - } - } + public List Entries => m_Entries; public RunebookEntry Default { @@ -480,25 +453,13 @@ namespace Server.Items private string m_Description; private BaseHouse m_House; - public Point3D Location - { - get{ return m_Location; } - } + public Point3D Location => m_Location; - public Map Map - { - get{ return m_Map; } - } + public Map Map => m_Map; - public string Description - { - get{ return m_Description; } - } + public string Description => m_Description; - public BaseHouse House - { - get{ return m_House; } - } + public BaseHouse House => m_House; public RunebookEntry( Point3D loc, Map map, string desc, BaseHouse house ) { diff --git a/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs b/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs index bdb3528de..58fa42848 100644 --- a/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs +++ b/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs @@ -8,16 +8,10 @@ namespace Server.Items { private int m_SpellID; - public int SpellID - { - get - { - return m_SpellID; - } - } + public int SpellID => m_SpellID; - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return (Core.ML); } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => (Core.ML); public SpellScroll( Serial serial ) : base( serial ) { diff --git a/Scripts/Items/Skill Items/Magical/Spellbook.cs b/Scripts/Items/Skill Items/Magical/Spellbook.cs index fd659e4fa..8750cc3b2 100644 --- a/Scripts/Items/Skill Items/Magical/Spellbook.cs +++ b/Scripts/Items/Skill Items/Magical/Spellbook.cs @@ -34,14 +34,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string EngravedText { - get{ return m_EngravedText; } + get => m_EngravedText; set{ m_EngravedText = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public BookQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ m_Quality = value; InvalidateProperties(); } } @@ -302,20 +302,20 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public AosAttributes Attributes { - get{ return m_AosAttributes; } + get => m_AosAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosSkillBonuses SkillBonuses { - get{ return m_AosSkillBonuses; } + get => m_AosSkillBonuses; set{} } - public virtual SpellbookType SpellbookType{ get{ return SpellbookType.Regular; } } - public virtual int BookOffset{ get{ return 0; } } - public virtual int BookCount{ get{ return 64; } } + public virtual SpellbookType SpellbookType => SpellbookType.Regular; + public virtual int BookOffset => 0; + public virtual int BookCount => 64; private ulong m_Content; private int m_Count; @@ -386,10 +386,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public ulong Content { - get - { - return m_Content; - } + get => m_Content; set { if ( m_Content != value ) @@ -410,13 +407,7 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int SpellCount - { - get - { - return m_Count; - } - } + public int SpellCount => m_Count; [Constructible] public Spellbook() : this( (ulong)0 ) @@ -560,7 +551,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } @@ -700,14 +691,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SlayerName Slayer { - get { return m_Slayer; } + get => m_Slayer; set { m_Slayer = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SlayerName Slayer2 { - get { return m_Slayer2; } + get => m_Slayer2; set { m_Slayer2 = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Skill Items/Misc/Bandage.cs b/Scripts/Items/Skill Items/Misc/Bandage.cs index d20cff9ac..07f3535ce 100644 --- a/Scripts/Items/Skill Items/Misc/Bandage.cs +++ b/Scripts/Items/Skill Items/Misc/Bandage.cs @@ -10,10 +10,7 @@ namespace Server.Items { public static int Range = ( Core.AOS ? 2 : 1 ); - public override double DefaultWeight - { - get { return 0.1; } - } + public override double DefaultWeight => 0.1; public static void Initialize() { @@ -165,10 +162,12 @@ namespace Server.Items private int m_Slips; private Timer m_Timer; - public Mobile Healer{ get{ return m_Healer; } } - public Mobile Patient{ get{ return m_Patient; } } - public int Slips{ get{ return m_Slips; } set{ m_Slips = value; } } - public Timer Timer{ get{ return m_Timer; } } + public Mobile Healer => m_Healer; + public Mobile Patient => m_Patient; + public int Slips{ get => m_Slips; + set => m_Slips = value; + } + public Timer Timer => m_Timer; public void Slip() { diff --git a/Scripts/Items/Skill Items/Misc/RecipeScroll.cs b/Scripts/Items/Skill Items/Misc/RecipeScroll.cs index 7b78e566e..2b21be0a3 100644 --- a/Scripts/Items/Skill Items/Misc/RecipeScroll.cs +++ b/Scripts/Items/Skill Items/Misc/RecipeScroll.cs @@ -13,7 +13,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int RecipeID { - get { return m_RecipeID; } + get => m_RecipeID; set { m_RecipeID = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Skill Items/Misc/RepairDeed.cs b/Scripts/Items/Skill Items/Misc/RepairDeed.cs index bb2e01bce..6ba6c6af0 100644 --- a/Scripts/Items/Skill Items/Misc/RepairDeed.cs +++ b/Scripts/Items/Skill Items/Misc/RepairDeed.cs @@ -13,7 +13,7 @@ namespace Server.Items private Type[] m_NearbyTypes; private TextDefinition m_NotNearbyMessage, m_Name; - public TextDefinition NotNearbyMessage{ get { return m_NotNearbyMessage; } } + public TextDefinition NotNearbyMessage => m_NotNearbyMessage; public TextDefinition Name => m_Name; @@ -72,21 +72,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public RepairSkillType RepairSkill { - get { return m_Skill; } + get => m_Skill; set { m_Skill = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public double SkillLevel { - get { return m_SkillLevel; } + get => m_SkillLevel; set { m_SkillLevel = Math.Max( Math.Min( value, 120.0 ), 0 ) ; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get { return m_Crafter; } + get => m_Crafter; set { m_Crafter = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Skill Items/Musical Instruments/BaseInstrument.cs b/Scripts/Items/Skill Items/Musical Instruments/BaseInstrument.cs index d57b7dd02..a07eb9de3 100644 --- a/Scripts/Items/Skill Items/Musical Instruments/BaseInstrument.cs +++ b/Scripts/Items/Skill Items/Musical Instruments/BaseInstrument.cs @@ -27,49 +27,49 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int SuccessSound { - get{ return m_WellSound; } - set{ m_WellSound = value; } + get => m_WellSound; + set => m_WellSound = value; } [CommandProperty( AccessLevel.GameMaster )] public int FailureSound { - get{ return m_BadlySound; } - set{ m_BadlySound = value; } + get => m_BadlySound; + set => m_BadlySound = value; } [CommandProperty( AccessLevel.GameMaster )] public SlayerName Slayer { - get{ return m_Slayer; } + get => m_Slayer; set{ m_Slayer = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SlayerName Slayer2 { - get{ return m_Slayer2; } + get => m_Slayer2; set{ m_Slayer2 = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public InstrumentQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ UnscaleUses(); m_Quality = value; InvalidateProperties(); ScaleUses(); } } [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } - public virtual int InitMinUses{ get{ return 350; } } - public virtual int InitMaxUses{ get{ return 450; } } + public virtual int InitMinUses => 350; + public virtual int InitMaxUses => 450; - public virtual TimeSpan ChargeReplenishRate { get { return TimeSpan.FromMinutes( 5.0 ); } } + public virtual TimeSpan ChargeReplenishRate => TimeSpan.FromMinutes( 5.0 ); [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining @@ -83,7 +83,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public DateTime LastReplenished { - get { return m_LastReplenished; } + get => m_LastReplenished; set { m_LastReplenished = value; CheckReplenishUses(); } } @@ -91,7 +91,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool ReplenishesCharges { - get { return m_ReplenishesCharges; } + get => m_ReplenishesCharges; set { if ( value != m_ReplenishesCharges && value ) diff --git a/Scripts/Items/Skill Items/Ninjitsu/EggBomb.cs b/Scripts/Items/Skill Items/Ninjitsu/EggBomb.cs index efe4c1042..07412265f 100644 --- a/Scripts/Items/Skill Items/Ninjitsu/EggBomb.cs +++ b/Scripts/Items/Skill Items/Ninjitsu/EggBomb.cs @@ -2,11 +2,8 @@ namespace Server.Items { public class EggBomb : Item { - public override int LabelNumber - { - get { return 1030249; } - } - + public override int LabelNumber => 1030249; + [Constructible] public EggBomb() : base( 0x2808 ) { diff --git a/Scripts/Items/Skill Items/Ninjitsu/Fukiya.cs b/Scripts/Items/Skill Items/Ninjitsu/Fukiya.cs index a8623a37b..ff8a1387d 100644 --- a/Scripts/Items/Skill Items/Ninjitsu/Fukiya.cs +++ b/Scripts/Items/Skill Items/Ninjitsu/Fukiya.cs @@ -17,7 +17,7 @@ namespace Server.Items public virtual int WeaponMinRange => 0; public virtual int WeaponMaxRange => 6; - public virtual int WeaponDamage { get { return Utility.RandomMinMax(4, 6); } } + public virtual int WeaponDamage => Utility.RandomMinMax(4, 6); public Type AmmoType => typeof(FukiyaDarts); @@ -28,25 +28,26 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get{ return m_Poison; } + get => m_Poison; set{ m_Poison = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int PoisonCharges { - get { return m_PoisonCharges; } + get => m_PoisonCharges; set { m_PoisonCharges = value; InvalidateProperties(); } } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } [Constructible] public Fukiya() : base( 0x27AA ) diff --git a/Scripts/Items/Skill Items/Ninjitsu/FukiyaDarts.cs b/Scripts/Items/Skill Items/Ninjitsu/FukiyaDarts.cs index 97ad8f665..b023450ec 100644 --- a/Scripts/Items/Skill Items/Ninjitsu/FukiyaDarts.cs +++ b/Scripts/Items/Skill Items/Ninjitsu/FukiyaDarts.cs @@ -13,25 +13,26 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get{ return m_Poison; } + get => m_Poison; set{ m_Poison = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int PoisonCharges { - get { return m_PoisonCharges; } + get => m_PoisonCharges; set { m_PoisonCharges = value; InvalidateProperties(); } } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } [Constructible] public FukiyaDarts() : this( 1 ) diff --git a/Scripts/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs b/Scripts/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs index c1ae2d2cd..e0b47231b 100644 --- a/Scripts/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs +++ b/Scripts/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs @@ -19,7 +19,7 @@ namespace Server.Items public virtual int WeaponMinRange => 2; public virtual int WeaponMaxRange => 10; - public virtual int WeaponDamage { get { return Utility.RandomMinMax(3, 5); } } + public virtual int WeaponDamage => Utility.RandomMinMax(3, 5); public virtual Type AmmoType => typeof(Shuriken); @@ -30,25 +30,26 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get{ return m_Poison; } + get => m_Poison; set{ m_Poison = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int PoisonCharges { - get { return m_PoisonCharges; } + get => m_PoisonCharges; set { m_PoisonCharges = value; InvalidateProperties(); } } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } [Constructible] public LeatherNinjaBelt() : base( 0x2790 ) diff --git a/Scripts/Items/Skill Items/Ninjitsu/Shuriken.cs b/Scripts/Items/Skill Items/Ninjitsu/Shuriken.cs index 915d2573f..d0ecd0d58 100644 --- a/Scripts/Items/Skill Items/Ninjitsu/Shuriken.cs +++ b/Scripts/Items/Skill Items/Ninjitsu/Shuriken.cs @@ -14,25 +14,26 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get{ return m_Poison; } + get => m_Poison; set{ m_Poison = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int PoisonCharges { - get { return m_PoisonCharges; } + get => m_PoisonCharges; set { m_PoisonCharges = value; InvalidateProperties(); } } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } [Constructible] public Shuriken() : this( 1 ) diff --git a/Scripts/Items/Skill Items/Specialized/GlassblowingBook.cs b/Scripts/Items/Skill Items/Specialized/GlassblowingBook.cs index 84434af66..4faeb4339 100644 --- a/Scripts/Items/Skill Items/Specialized/GlassblowingBook.cs +++ b/Scripts/Items/Skill Items/Specialized/GlassblowingBook.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class GlassblowingBook : Item { - public override string DefaultName - { - get { return "Crafting Glass With Glassblowing"; } - } + public override string DefaultName => "Crafting Glass With Glassblowing"; [Constructible] public GlassblowingBook() : base( 0xFF4 ) diff --git a/Scripts/Items/Skill Items/Specialized/MasonryBook.cs b/Scripts/Items/Skill Items/Specialized/MasonryBook.cs index c824fb299..1558e8a21 100644 --- a/Scripts/Items/Skill Items/Specialized/MasonryBook.cs +++ b/Scripts/Items/Skill Items/Specialized/MasonryBook.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class MasonryBook : Item { - public override string DefaultName - { - get { return "Making Valuables With Stonecrafting"; } - } + public override string DefaultName => "Making Valuables With Stonecrafting"; [Constructible] public MasonryBook() : base( 0xFBE ) diff --git a/Scripts/Items/Skill Items/Specialized/Sand.cs b/Scripts/Items/Skill Items/Specialized/Sand.cs index a7d7da67b..b3e375f2c 100644 --- a/Scripts/Items/Skill Items/Specialized/Sand.cs +++ b/Scripts/Items/Skill Items/Specialized/Sand.cs @@ -3,8 +3,8 @@ namespace Server.Items [FlippableAttribute( 0x11EA, 0x11EB )] public class Sand : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return true; } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => true; public override int LabelNumber => 1044626; // sand diff --git a/Scripts/Items/Skill Items/Specialized/SandMiningBook.cs b/Scripts/Items/Skill Items/Specialized/SandMiningBook.cs index b14c6ea38..785474b92 100644 --- a/Scripts/Items/Skill Items/Specialized/SandMiningBook.cs +++ b/Scripts/Items/Skill Items/Specialized/SandMiningBook.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class SandMiningBook : Item { - public override string DefaultName - { - get { return "Find Glass-Quality Sand"; } - } + public override string DefaultName => "Find Glass-Quality Sand"; [Constructible] public SandMiningBook() : base( 0xFF4 ) diff --git a/Scripts/Items/Skill Items/Specialized/StoneMiningBook.cs b/Scripts/Items/Skill Items/Specialized/StoneMiningBook.cs index 6a1847aad..7ee9ec107 100644 --- a/Scripts/Items/Skill Items/Specialized/StoneMiningBook.cs +++ b/Scripts/Items/Skill Items/Specialized/StoneMiningBook.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class StoneMiningBook : Item { - public override string DefaultName - { - get { return "Mining For Quality Stone"; } - } + public override string DefaultName => "Mining For Quality Stone"; [Constructible] public StoneMiningBook() : base( 0xFBE ) diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs index 120db8473..313493b6f 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/CustomHuePicker.cs @@ -9,10 +9,10 @@ namespace Server.Items private string m_NameString; private int[] m_Hues; - public int Name{ get{ return m_Name; } } - public string NameString{ get{ return m_NameString; } } + public int Name => m_Name; + public string NameString => m_NameString; - public int[] Hues{ get{ return m_Hues; } } + public int[] Hues => m_Hues; public CustomHueGroup( int name, int[] hues ) { @@ -34,10 +34,10 @@ namespace Server.Items private int m_Title; private string m_TitleString; - public bool DefaultSupported{ get{ return m_DefaultSupported; } } - public CustomHueGroup[] Groups{ get{ return m_Groups; } } - public int Title{ get{ return m_Title; } } - public string TitleString{ get{ return m_TitleString; } } + public bool DefaultSupported => m_DefaultSupported; + public CustomHueGroup[] Groups => m_Groups; + public int Title => m_Title; + public string TitleString => m_TitleString; public CustomHuePicker( CustomHueGroup[] groups, bool defaultSupported ) { diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/DyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/DyeTub.cs index 649063c22..6ff63d506 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/DyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/DyeTub.cs @@ -17,32 +17,17 @@ namespace Server.Items private int m_DyedHue; private SecureLevel m_SecureLevel; - public virtual CustomHuePicker CustomHuePicker{ get{ return null; } } + public virtual CustomHuePicker CustomHuePicker => null; - public virtual bool AllowRunebooks - { - get{ return false; } - } + public virtual bool AllowRunebooks => false; - public virtual bool AllowFurniture - { - get{ return false; } - } + public virtual bool AllowFurniture => false; - public virtual bool AllowStatuettes - { - get{ return false; } - } + public virtual bool AllowStatuettes => false; - public virtual bool AllowLeather - { - get{ return false; } - } + public virtual bool AllowLeather => false; - public virtual bool AllowDyables - { - get{ return true; } - } + public virtual bool AllowDyables => true; public override void Serialize( GenericWriter writer ) { @@ -81,23 +66,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public virtual bool Redyable { - get - { - return m_Redyable; - } - set - { - m_Redyable = value; - } + get => m_Redyable; + set => m_Redyable = value; } [CommandProperty( AccessLevel.GameMaster )] public int DyedHue { - get - { - return m_DyedHue; - } + get => m_DyedHue; set { if ( m_Redyable ) @@ -111,14 +87,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get - { - return m_SecureLevel; - } - set - { - m_SecureLevel = value; - } + get => m_SecureLevel; + set => m_SecureLevel = value; } [Constructible] @@ -142,10 +112,10 @@ namespace Server.Items public virtual bool MetallicHues => false; // Select the clothing to dye. - public virtual int TargetMessage{ get{ return 500859; } } + public virtual int TargetMessage => 500859; // You can not dye that. - public virtual int FailMessage{ get{ return 1042083; } } + public virtual int FailMessage => 1042083; public override void OnDoubleClick( Mobile from ) { diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/FurnitureDyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/FurnitureDyeTub.cs index 49f780b51..91686bbcd 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/FurnitureDyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/FurnitureDyeTub.cs @@ -13,8 +13,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/LeatherDyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/LeatherDyeTub.cs index 44691205f..1d8053252 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/LeatherDyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/LeatherDyeTub.cs @@ -14,8 +14,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RewardBlackDyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RewardBlackDyeTub.cs index 1f81fa244..f5fa77487 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RewardBlackDyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RewardBlackDyeTub.cs @@ -9,8 +9,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RunebookDyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RunebookDyeTub.cs index 7c0b169c0..6a1b90333 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RunebookDyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/RunebookDyeTub.cs @@ -14,8 +14,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/SpecialDyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/SpecialDyeTub.cs index 2ae81e97e..8f37a8fb9 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/SpecialDyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/SpecialDyeTub.cs @@ -12,8 +12,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/StatuetteDyeTub.cs b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/StatuetteDyeTub.cs index 7ff474219..66ff29be0 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Dyetubs/StatuetteDyeTub.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Dyetubs/StatuetteDyeTub.cs @@ -14,8 +14,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [Constructible] diff --git a/Scripts/Items/Skill Items/Thief/DisguiseKit.cs b/Scripts/Items/Skill Items/Thief/DisguiseKit.cs index 8f53d05de..8ce2ae39a 100644 --- a/Scripts/Items/Skill Items/Thief/DisguiseKit.cs +++ b/Scripts/Items/Skill Items/Thief/DisguiseKit.cs @@ -364,9 +364,6 @@ namespace Server.Items private static Dictionary m_Timers = new Dictionary(); - public static Dictionary Timers - { - get { return m_Timers; } - } + public static Dictionary Timers => m_Timers; } } diff --git a/Scripts/Items/Skill Items/Thief/DisguisePersistance.cs b/Scripts/Items/Skill Items/Thief/DisguisePersistance.cs index 9341f1505..67bf6b9db 100644 --- a/Scripts/Items/Skill Items/Thief/DisguisePersistance.cs +++ b/Scripts/Items/Skill Items/Thief/DisguisePersistance.cs @@ -7,12 +7,9 @@ namespace Server.Items { private static DisguisePersistance m_Instance; - public static DisguisePersistance Instance{ get{ return m_Instance; } } + public static DisguisePersistance Instance => m_Instance; - public override string DefaultName - { - get { return "Disguise Persistance - Internal"; } - } + public override string DefaultName => "Disguise Persistance - Internal"; public DisguisePersistance() : base( 1 ) { diff --git a/Scripts/Items/Skill Items/Tinkering/Clocks.cs b/Scripts/Items/Skill Items/Tinkering/Clocks.cs index cab4cd0bf..1a650db09 100644 --- a/Scripts/Items/Skill Items/Tinkering/Clocks.cs +++ b/Scripts/Items/Skill Items/Tinkering/Clocks.cs @@ -19,10 +19,7 @@ namespace Server.Items { private static DateTime m_ServerStart; - public static DateTime ServerStart - { - get{ return m_ServerStart; } - } + public static DateTime ServerStart => m_ServerStart; public static void Initialize() { diff --git a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs index 255e2ee20..b7dd54beb 100644 --- a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs +++ b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs @@ -11,7 +11,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); InvalidateProperties(); } } diff --git a/Scripts/Items/Skill Items/Tools/BaseTool.cs b/Scripts/Items/Skill Items/Tools/BaseTool.cs index fc6a7faf2..aad3f7100 100644 --- a/Scripts/Items/Skill Items/Tools/BaseTool.cs +++ b/Scripts/Items/Skill Items/Tools/BaseTool.cs @@ -20,21 +20,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public ToolQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ UnscaleUses(); m_Quality = value; InvalidateProperties(); ScaleUses(); } } [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } @@ -59,7 +59,8 @@ namespace Server.Items return 100; } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } public abstract CraftSystem CraftSystem{ get; } diff --git a/Scripts/Items/Special/11th Year promo/EarringsOfProtection.cs b/Scripts/Items/Special/11th Year promo/EarringsOfProtection.cs index a61b3305c..217d5450b 100644 --- a/Scripts/Items/Special/11th Year promo/EarringsOfProtection.cs +++ b/Scripts/Items/Special/11th Year promo/EarringsOfProtection.cs @@ -35,29 +35,11 @@ public class EarringsOfProtection : BaseJewel { [CommandProperty( AccessLevel.GameMaster )] - public virtual AosElementAttribute Attribute - { - get - { - return m_Attribute; - } - } + public virtual AosElementAttribute Attribute => m_Attribute; - public override int LabelNumber - { - get - { - return GetItemData( m_Attribute, true ); - } - } + public override int LabelNumber => GetItemData( m_Attribute, true ); - public override int Hue - { - get - { - return GetItemData( m_Attribute, false ); - } - } + public override int Hue => GetItemData( m_Attribute, false ); private AosElementAttribute m_Attribute; diff --git a/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs b/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs index 3a411ab14..8f9b989d9 100644 --- a/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs +++ b/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs @@ -24,18 +24,15 @@ namespace Server.Items private List m_Tracks; - public List Tracks - { - get { return m_Tracks; } - } + public List Tracks => m_Tracks; private SecureLevel m_Level; [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get { return m_Level; } - set { m_Level = value; } + get => m_Level; + set => m_Level = value; } [Constructible] diff --git a/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs b/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs index a8c7a65fc..43fadd80e 100644 --- a/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs +++ b/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicGear.cs @@ -5,28 +5,19 @@ namespace Server.Items [Flippable( 0x1053, 0x1054 )] public class DawnsMusicGear : Item { - public static DawnsMusicGear RandomCommon - { - get { return new DawnsMusicGear( DawnsMusicBox.RandomTrack( DawnsMusicRarity.Common ) ); } - } + public static DawnsMusicGear RandomCommon => new DawnsMusicGear( DawnsMusicBox.RandomTrack( DawnsMusicRarity.Common ) ); - public static DawnsMusicGear RandomUncommon - { - get { return new DawnsMusicGear( DawnsMusicBox.RandomTrack( DawnsMusicRarity.Uncommon ) ); } - } + public static DawnsMusicGear RandomUncommon => new DawnsMusicGear( DawnsMusicBox.RandomTrack( DawnsMusicRarity.Uncommon ) ); - public static DawnsMusicGear RandomRare - { - get { return new DawnsMusicGear( DawnsMusicBox.RandomTrack( DawnsMusicRarity.Rare ) ); } - } + public static DawnsMusicGear RandomRare => new DawnsMusicGear( DawnsMusicBox.RandomTrack( DawnsMusicRarity.Rare ) ); private MusicName m_Music; [CommandProperty( AccessLevel.GameMaster )] public MusicName Music { - get { return m_Music; } - set { m_Music = value; } + get => m_Music; + set => m_Music = value; } [Constructible] diff --git a/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicInfo.cs b/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicInfo.cs index 980e4c573..08d61fc20 100644 --- a/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicInfo.cs +++ b/Scripts/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicInfo.cs @@ -11,17 +11,11 @@ { private int m_Name; - public int Name - { - get { return m_Name; } - } + public int Name => m_Name; private DawnsMusicRarity m_Rarity; - public DawnsMusicRarity Rarity - { - get { return m_Rarity; } - } + public DawnsMusicRarity Rarity => m_Rarity; public DawnsMusicInfo( int name, DawnsMusicRarity rarity ) { diff --git a/Scripts/Items/Special/8th Anniversary Items/FountainOfLife.cs b/Scripts/Items/Special/8th Anniversary Items/FountainOfLife.cs index 702835ce5..7b90ef1b1 100644 --- a/Scripts/Items/Special/8th Anniversary Items/FountainOfLife.cs +++ b/Scripts/Items/Special/8th Anniversary Items/FountainOfLife.cs @@ -56,17 +56,14 @@ namespace Server.Items [FlippableAttribute( 0x2AC0, 0x2AC3 )] public class FountainOfLife : BaseAddonContainer { - public override BaseAddonContainerDeed Deed - { - get { return new FountainOfLifeDeed( m_Charges ); } - } + public override BaseAddonContainerDeed Deed => new FountainOfLifeDeed( m_Charges ); public override bool OnDragLift( Mobile from ) { return false; } - public virtual TimeSpan RechargeTime { get { return TimeSpan.FromDays( 1 ); } } + public virtual TimeSpan RechargeTime => TimeSpan.FromDays( 1 ); public override int LabelNumber => 1075197; // Fountain of Life public override int DefaultGumpID => 0x484; @@ -78,7 +75,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get { return m_Charges; } + get => m_Charges; set { m_Charges = Math.Min( value, 10 ); InvalidateProperties(); } } @@ -230,7 +227,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get { return m_Charges; } + get => m_Charges; set { m_Charges = Math.Min( value, 10 ); InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs b/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs index 0520d6465..cc45e4fcc 100644 --- a/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs +++ b/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs @@ -11,10 +11,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Bonus { - get - { - return m_Bonus; - } + get => m_Bonus; set { m_Bonus = value; diff --git a/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs b/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs index e55e10912..a70f4f029 100644 --- a/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs +++ b/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs @@ -146,10 +146,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Bonus { - get - { - return m_Bonus; - } + get => m_Bonus; set { m_Bonus = value; diff --git a/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs b/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs index 2dbf76d57..6b645a234 100644 --- a/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs +++ b/Scripts/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs @@ -10,11 +10,12 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } public override int LabelNumber => 1049082; // powder of fortifying diff --git a/Scripts/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs b/Scripts/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs index dc3396418..44c546a87 100644 --- a/Scripts/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs +++ b/Scripts/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs @@ -7,7 +7,7 @@ namespace Server.Items public class AwesomeDisturbingPortraitComponent : AddonComponent { public override int LabelNumber => 1074479; // Disturbing portrait - public bool FacingSouth { get { return ItemID < 0x2A61; } } + public bool FacingSouth => ItemID < 0x2A61; private InternalTimer m_Timer; diff --git a/Scripts/Items/Special/Gifts/RoseOfTrinsic.cs b/Scripts/Items/Special/Gifts/RoseOfTrinsic.cs index 76d2391a2..7fe6cebf7 100644 --- a/Scripts/Items/Special/Gifts/RoseOfTrinsic.cs +++ b/Scripts/Items/Special/Gifts/RoseOfTrinsic.cs @@ -23,14 +23,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } [CommandProperty( AccessLevel.GameMaster )] public int Petals { - get{ return m_Petals; } + get => m_Petals; set { if ( value >= 10 ) diff --git a/Scripts/Items/Special/Gifts/TapestryOfSosaria.cs b/Scripts/Items/Special/Gifts/TapestryOfSosaria.cs index e07bf32ab..60aa26932 100644 --- a/Scripts/Items/Special/Gifts/TapestryOfSosaria.cs +++ b/Scripts/Items/Special/Gifts/TapestryOfSosaria.cs @@ -16,8 +16,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } [Constructible] diff --git a/Scripts/Items/Special/Heritage Items/Curtains.cs b/Scripts/Items/Special/Heritage Items/Curtains.cs index f150c2d46..24ebd5da0 100644 --- a/Scripts/Items/Special/Heritage Items/Curtains.cs +++ b/Scripts/Items/Special/Heritage Items/Curtains.cs @@ -13,8 +13,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int ClosedID { - get { return m_ClosedID; } - set { m_ClosedID = value; } + get => m_ClosedID; + set => m_ClosedID = value; } public CurtainsComponent( int itemID, int closedID ) : base( itemID ) diff --git a/Scripts/Items/Special/Heritage Items/FruitTrees.cs b/Scripts/Items/Special/Heritage Items/FruitTrees.cs index c9f2d4a88..d96e93367 100644 --- a/Scripts/Items/Special/Heritage Items/FruitTrees.cs +++ b/Scripts/Items/Special/Heritage Items/FruitTrees.cs @@ -13,7 +13,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Fruits { - get { return m_Fruits; } + get => m_Fruits; set { if ( value < 0 ) diff --git a/Scripts/Items/Special/Holiday/Christmas/HolidayTree.cs b/Scripts/Items/Special/Holiday/Christmas/HolidayTree.cs index d4a00180e..6c186d13b 100644 --- a/Scripts/Items/Special/Holiday/Christmas/HolidayTree.cs +++ b/Scripts/Items/Special/Holiday/Christmas/HolidayTree.cs @@ -18,8 +18,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Mobile Placer { - get{ return m_Placer; } - set{ m_Placer = value; } + get => m_Placer; + set => m_Placer = value; } private class Ornament : Item @@ -212,10 +212,7 @@ namespace Server.Items return map.CanFit( (Point3D)p, 20 ); } - Item IAddon.Deed - { - get{ return new HolidayTreeDeed(); } - } + Item IAddon.Deed => new HolidayTreeDeed(); public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Special/Holiday/HolidayBell.cs b/Scripts/Items/Special/Holiday/HolidayBell.cs index f22db46da..91fbc534e 100644 --- a/Scripts/Items/Special/Holiday/HolidayBell.cs +++ b/Scripts/Items/Special/Holiday/HolidayBell.cs @@ -37,18 +37,17 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public int SoundID { - get { return m_SoundID; } + get => m_SoundID; set { m_SoundID = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] - public string Giver { get { return m_Maker; } set { m_Maker = value; } } - - public override string DefaultName - { - get { return String.Format("A Holiday Bell From {0}", Giver); } + public string Giver { get => m_Maker; + set => m_Maker = value; } + public override string DefaultName => String.Format("A Holiday Bell From {0}", Giver); + private string m_Maker; private int m_SoundID; diff --git a/Scripts/Items/Special/Holiday/HolidayFoods.cs b/Scripts/Items/Special/Holiday/HolidayFoods.cs index 36f9461cd..37a36ec67 100644 --- a/Scripts/Items/Special/Holiday/HolidayFoods.cs +++ b/Scripts/Items/Special/Holiday/HolidayFoods.cs @@ -9,8 +9,8 @@ namespace Server.Items public static Dictionary ToothAches { - get { return m_ToothAches; } - set { m_ToothAches = value; } + get => m_ToothAches; + set => m_ToothAches = value; } public static void Initialize() @@ -24,7 +24,9 @@ namespace Server.Items private Mobile m_Eater; public Mobile Eater => m_Eater; - public int Eaten { get { return m_Eaten; } set { m_Eaten = value; } } + public int Eaten { get => m_Eaten; + set => m_Eaten = value; + } public CandyCaneTimer( Mobile eater ) : base( TimeSpan.FromSeconds( 30 ), TimeSpan.FromSeconds( 30 ) ) diff --git a/Scripts/Items/Special/Holiday/HolidayGiftBoxes.cs b/Scripts/Items/Special/Holiday/HolidayGiftBoxes.cs index bd4eeea29..a522aa63b 100644 --- a/Scripts/Items/Special/Holiday/HolidayGiftBoxes.cs +++ b/Scripts/Items/Special/Holiday/HolidayGiftBoxes.cs @@ -2,8 +2,8 @@ { public class GiftBoxHues { - public static int RandomGiftBoxHue{ get { return m_NormalHues[Utility.Random(m_NormalHues.Length)]; }} - public static int RandomNeonBoxHue{ get { return m_NeonHues[Utility.Random(m_NeonHues.Length)]; }} + public static int RandomGiftBoxHue => m_NormalHues[Utility.Random(m_NormalHues.Length)]; + public static int RandomNeonBoxHue => m_NeonHues[Utility.Random(m_NeonHues.Length)]; /* there's possibly a couple more, but this is what we could verify on OSI */ diff --git a/Scripts/Items/Special/Holiday/PKHolidayStuff.cs b/Scripts/Items/Special/Holiday/PKHolidayStuff.cs index ce06852d6..f6a35aa6b 100644 --- a/Scripts/Items/Special/Holiday/PKHolidayStuff.cs +++ b/Scripts/Items/Special/Holiday/PKHolidayStuff.cs @@ -2,7 +2,7 @@ namespace Server.Items { public class Coal : Item { - public override string DefaultName{ get { return "Coal"; }} + public override string DefaultName => "Coal"; [Constructible] public Coal() : base( 0x19b9 ) @@ -31,7 +31,8 @@ namespace Server.Items public class BadCard : Item { - public override int LabelNumber{ get { return 1041428; }} // Maybe next year youll get a better... + public override int LabelNumber // Maybe next year youll get a better... + => 1041428; [Constructible] public BadCard() : base( 0x14ef ) diff --git a/Scripts/Items/Special/Holiday/SnowGlobes.cs b/Scripts/Items/Special/Holiday/SnowGlobes.cs index 4ff23b2d0..ef483f848 100644 --- a/Scripts/Items/Special/Holiday/SnowGlobes.cs +++ b/Scripts/Items/Special/Holiday/SnowGlobes.cs @@ -63,7 +63,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SnowGlobeTypeOne Place { - get { return m_Type; } + get => m_Type; set { m_Type = value; InvalidateProperties(); } } @@ -165,7 +165,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SnowGlobeTypeTwo Place { - get { return m_Type; } + get => m_Type; set { m_Type = value; InvalidateProperties(); } } @@ -251,7 +251,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SnowGlobeTypeThree Place { - get { return m_Type; } + get => m_Type; set { m_Type = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Holiday/Snowman.cs b/Scripts/Items/Special/Holiday/Snowman.cs index afcb0e31d..540719ebb 100644 --- a/Scripts/Items/Special/Holiday/Snowman.cs +++ b/Scripts/Items/Special/Holiday/Snowman.cs @@ -74,7 +74,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string Title { - get{ return m_Title; } + get => m_Title; set{ m_Title = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Holiday/Wreath.cs b/Scripts/Items/Special/Holiday/Wreath.cs index ea20293fc..bcfe2ff37 100644 --- a/Scripts/Items/Special/Holiday/Wreath.cs +++ b/Scripts/Items/Special/Holiday/Wreath.cs @@ -74,10 +74,7 @@ namespace Server.Items } } - public Item Deed - { - get{ return new WreathDeed( this.Hue ); } - } + public Item Deed => new WreathDeed( this.Hue ); public override void OnDoubleClick( Mobile from ) { diff --git a/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs b/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs index fcfdfb565..1875b7618 100644 --- a/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs +++ b/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs @@ -13,46 +13,37 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public HouseRaffleStone Stone { - get { return m_Stone; } + get => m_Stone; set { m_Stone = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public Point3D PlotLocation { - get { return m_PlotLocation; } + get => m_PlotLocation; set { m_PlotLocation = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public Map PlotFacet { - get { return m_Facet; } + get => m_Facet; set { m_Facet = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public Mobile AwardedTo { - get { return m_AwardedTo; } + get => m_AwardedTo; set { m_AwardedTo = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] - public bool IsExpired - { - get { return ( m_Stone == null || m_Stone.Deleted || m_Stone.IsExpired ); } - } + public bool IsExpired => ( m_Stone == null || m_Stone.Deleted || m_Stone.IsExpired ); - public override string DefaultName - { - get { return "a writ of lease"; } - } + public override string DefaultName => "a writ of lease"; - public override double DefaultWeight - { - get { return 1.0; } - } + public override double DefaultWeight => 1.0; [Constructible] public HouseRaffleDeed() diff --git a/Scripts/Items/Special/House Raffle/HouseRaffleStone.cs b/Scripts/Items/Special/House Raffle/HouseRaffleStone.cs index 6d2fa8129..af1e63328 100644 --- a/Scripts/Items/Special/House Raffle/HouseRaffleStone.cs +++ b/Scripts/Items/Special/House Raffle/HouseRaffleStone.cs @@ -16,20 +16,11 @@ namespace Server.Items private IPAddress m_Address; private DateTime m_Date; - public Mobile From - { - get { return m_From; } - } + public Mobile From => m_From; - public IPAddress Address - { - get { return m_Address; } - } + public IPAddress Address => m_Address; - public DateTime Date - { - get { return m_Date; } - } + public DateTime Date => m_Date; public RaffleEntry( Mobile from ) { @@ -111,7 +102,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public HouseRaffleState CurrentState { - get { return m_State; } + get => m_State; set { if ( m_State != value ) @@ -133,7 +124,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public Rectangle2D PlotBounds { - get { return m_Bounds; } + get => m_Bounds; set { m_Bounds = value; @@ -146,7 +137,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public Map PlotFacet { - get { return m_Facet; } + get => m_Facet; set { m_Facet = value; @@ -159,28 +150,28 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public Mobile Winner { - get { return m_Winner; } + get => m_Winner; set { m_Winner = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public HouseRaffleDeed Deed { - get { return m_Deed; } - set { m_Deed = value; } + get => m_Deed; + set => m_Deed = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public DateTime Started { - get { return m_Started; } + get => m_Started; set { m_Started = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public TimeSpan Duration { - get { return m_Duration; } + get => m_Duration; set { m_Duration = value; InvalidateProperties(); } } @@ -199,14 +190,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public HouseRaffleExpireAction ExpireAction { - get { return m_ExpireAction; } - set { m_ExpireAction = value; } + get => m_ExpireAction; + set => m_ExpireAction = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Seer )] public int TicketPrice { - get { return m_TicketPrice; } + get => m_TicketPrice; set { m_TicketPrice = Math.Max( 0, value ); @@ -214,20 +205,11 @@ namespace Server.Items } } - public List Entries - { - get { return m_Entries; } - } + public List Entries => m_Entries; - public override string DefaultName - { - get { return "a house raffle stone"; } - } + public override string DefaultName => "a house raffle stone"; - public override bool DisplayWeight - { - get { return false; } - } + public override bool DisplayWeight => false; private static List m_AllStones = new List(); diff --git a/Scripts/Items/Special/MiniHouses.cs b/Scripts/Items/Special/MiniHouses.cs index caac66fd2..8a0e0dee8 100644 --- a/Scripts/Items/Special/MiniHouses.cs +++ b/Scripts/Items/Special/MiniHouses.cs @@ -9,7 +9,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public MiniHouseType Type { - get{ return m_Type; } + get => m_Type; set{ m_Type = value; Construct(); } } @@ -86,7 +86,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public MiniHouseType Type { - get{ return m_Type; } + get => m_Type; set{ m_Type = value; InvalidateProperties(); } } @@ -178,8 +178,8 @@ namespace Server.Items private int[] m_Graphics; private int m_LabelNumber; - public int[] Graphics{ get{ return m_Graphics; } } - public int LabelNumber{ get{ return m_LabelNumber; } } + public int[] Graphics => m_Graphics; + public int LabelNumber => m_LabelNumber; public MiniHouseInfo( int start, int count, int labelNumber ) { diff --git a/Scripts/Items/Special/MonsterStatuette.cs b/Scripts/Items/Special/MonsterStatuette.cs index 01a8469a8..548b9f871 100644 --- a/Scripts/Items/Special/MonsterStatuette.cs +++ b/Scripts/Items/Special/MonsterStatuette.cs @@ -55,9 +55,9 @@ namespace Server.Items private int m_ItemID; private int[] m_Sounds; - public int LabelNumber{ get{ return m_LabelNumber; } } - public int ItemID{ get{ return m_ItemID; } } - public int[] Sounds{ get{ return m_Sounds; } } + public int LabelNumber => m_LabelNumber; + public int ItemID => m_ItemID; + public int[] Sounds => m_Sounds; public MonsterStatuetteInfo( int labelNumber, int itemID, int baseSoundID ) { @@ -137,21 +137,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } [CommandProperty( AccessLevel.GameMaster )] public bool TurnedOn { - get{ return m_TurnedOn; } + get => m_TurnedOn; set{ m_TurnedOn = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public MonsterStatuetteType Type { - get{ return m_Type; } + get => m_Type; set { m_Type = value; @@ -170,15 +170,9 @@ namespace Server.Items } } - public override int LabelNumber - { - get{ return MonsterStatuetteInfo.GetInfo( m_Type ).LabelNumber; } - } + public override int LabelNumber => MonsterStatuetteInfo.GetInfo( m_Type ).LabelNumber; - public override double DefaultWeight - { - get { return 1.0; } - } + public override double DefaultWeight => 1.0; [Constructible] public MonsterStatuette() : this( MonsterStatuetteType.Crocodile ) diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs index 52e02906a..bb43bdd9c 100644 --- a/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs @@ -5,15 +5,9 @@ namespace Server.Items { public class PlagueBeastBlood : PlagueBeastComponent { - public bool Patched - { - get { return ItemID == 0x1765; } - } + public bool Patched => ItemID == 0x1765; - public bool Starting - { - get { return ItemID == 0x122C; } - } + public bool Starting => ItemID == 0x122C; private Timer m_Timer; diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs index f5cf58602..7730161bd 100644 --- a/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs @@ -79,24 +79,15 @@ namespace Server.Items public PlagueBeastOrgan Organ { - get { return m_Organ; } - set { m_Organ = value; } + get => m_Organ; + set => m_Organ = value; } - public bool IsBrain - { - get { return ItemID == 0x1CF0; } - } + public bool IsBrain => ItemID == 0x1CF0; - public bool IsGland - { - get { return ItemID == 0x1CEF; } - } + public bool IsGland => ItemID == 0x1CEF; - public bool IsReceptacle - { - get { return ItemID == 0x9DF; } - } + public bool IsReceptacle => ItemID == 0x9DF; public PlagueBeastComponent( int itemID, int hue ) : this( itemID, hue, false ) { diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs index dc688cb5d..da6b637c8 100644 --- a/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs @@ -11,8 +11,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Cut { - get { return m_Cut; } - set { m_Cut = value; } + get => m_Cut; + set => m_Cut = value; } public override string DefaultName => "a plague beast mutation core"; diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs index 773a1fb8d..e1b90e029 100644 --- a/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs @@ -10,25 +10,22 @@ namespace Server.Items private List m_Components; - public List Components - { - get { return m_Components; } - } + public List Components => m_Components; private int m_BrainHue; public int BrainHue { - get { return m_BrainHue; } - set { m_BrainHue = value; } + get => m_BrainHue; + set => m_BrainHue = value; } private bool m_Opened; public bool Opened { - get { return m_Opened; } - set { m_Opened = value; } + get => m_Opened; + set => m_Opened = value; } private Timer m_Timer; @@ -466,10 +463,7 @@ namespace Server.Items { private int m_Brains; - public bool Complete - { - get { return m_Brains >= 4; } - } + public bool Complete => m_Brains >= 4; public PlagueBeastMainOrgan() { diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs index c54b8d622..13f5b63eb 100644 --- a/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs @@ -7,10 +7,7 @@ namespace Server.Items { private bool m_Cut; - public bool Cut - { - get { return m_Cut; } - } + public bool Cut => m_Cut; private Timer m_Timer; diff --git a/Scripts/Items/Special/Rares/Containers/BaseWaterContainer.cs b/Scripts/Items/Special/Rares/Containers/BaseWaterContainer.cs index d072d7b01..717c5f651 100644 --- a/Scripts/Items/Special/Rares/Containers/BaseWaterContainer.cs +++ b/Scripts/Items/Special/Rares/Containers/BaseWaterContainer.cs @@ -9,18 +9,15 @@ public override int DefaultGumpID => 0x3e; [CommandProperty( AccessLevel.GameMaster )] - public virtual bool IsEmpty { get { return ( m_Quantity <= 0 ); } } + public virtual bool IsEmpty => ( m_Quantity <= 0 ); [CommandProperty( AccessLevel.GameMaster )] - public virtual bool IsFull { get { return ( m_Quantity >= MaxQuantity ); } } + public virtual bool IsFull => ( m_Quantity >= MaxQuantity ); [CommandProperty( AccessLevel.GameMaster )] public virtual int Quantity { - get - { - return m_Quantity; - } + get => m_Quantity; set { if ( value != m_Quantity ) diff --git a/Scripts/Items/Special/Solen Items/BagOfSending.cs b/Scripts/Items/Special/Solen Items/BagOfSending.cs index df48867ad..a63286bdf 100644 --- a/Scripts/Items/Special/Solen Items/BagOfSending.cs +++ b/Scripts/Items/Special/Solen Items/BagOfSending.cs @@ -32,7 +32,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set { if ( value > this.MaxCharges ) @@ -49,7 +49,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Recharges { - get{ return m_Recharges; } + get => m_Recharges; set { if ( value > this.MaxRecharges ) @@ -64,19 +64,19 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int MaxCharges{ get{ return 30; } } + public int MaxCharges => 30; [CommandProperty( AccessLevel.GameMaster )] - public int MaxRecharges{ get{ return 255; } } + public int MaxRecharges => 255; - public string TranslocationItemName{ get{ return "bag of sending"; } } + public string TranslocationItemName => "bag of sending"; public override int LabelNumber => 1054104; // a bag of sending [CommandProperty( AccessLevel.GameMaster )] public BagOfSendingHue BagOfSendingHue { - get{ return m_BagOfSendingHue; } + get => m_BagOfSendingHue; set { m_BagOfSendingHue = value; diff --git a/Scripts/Items/Special/Solen Items/BallOfSummoning.cs b/Scripts/Items/Special/Solen Items/BallOfSummoning.cs index 5abf4bff1..392025759 100644 --- a/Scripts/Items/Special/Solen Items/BallOfSummoning.cs +++ b/Scripts/Items/Special/Solen Items/BallOfSummoning.cs @@ -20,7 +20,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set { if ( value > this.MaxCharges ) @@ -37,7 +37,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Recharges { - get{ return m_Recharges; } + get => m_Recharges; set { if ( value > this.MaxRecharges ) @@ -52,12 +52,12 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int MaxCharges{ get{ return 20; } } + public int MaxCharges => 20; [CommandProperty( AccessLevel.GameMaster )] - public int MaxRecharges{ get{ return 255; } } + public int MaxRecharges => 255; - public string TranslocationItemName{ get{ return "crystal ball of pet summoning"; } } + public string TranslocationItemName => "crystal ball of pet summoning"; [CommandProperty( AccessLevel.GameMaster )] public BaseCreature Pet @@ -80,7 +80,7 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public string PetName{ get{ return m_PetName; } } + public string PetName => m_PetName; [Constructible] public BallOfSummoning() : base( 0xE2E ) @@ -399,13 +399,7 @@ namespace Server.Items public override double CastDelayFastScalar => 0; - public override TimeSpan CastDelayBase - { - get - { - return TimeSpan.FromSeconds( 2.0 ); - } - } + public override TimeSpan CastDelayBase => TimeSpan.FromSeconds( 2.0 ); public override int GetMana() { diff --git a/Scripts/Items/Special/Solen Items/BraceletOfBinding.cs b/Scripts/Items/Special/Solen Items/BraceletOfBinding.cs index f094166f8..b045ec6fc 100644 --- a/Scripts/Items/Special/Solen Items/BraceletOfBinding.cs +++ b/Scripts/Items/Special/Solen Items/BraceletOfBinding.cs @@ -20,7 +20,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set { if ( value > this.MaxCharges ) @@ -37,7 +37,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Recharges { - get{ return m_Recharges; } + get => m_Recharges; set { if ( value > this.MaxRecharges ) @@ -52,17 +52,17 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int MaxCharges{ get{ return 20; } } + public int MaxCharges => 20; [CommandProperty( AccessLevel.GameMaster )] - public int MaxRecharges{ get{ return 255; } } + public int MaxRecharges => 255; - public string TranslocationItemName{ get{ return "bracelet of binding"; } } + public string TranslocationItemName => "bracelet of binding"; [CommandProperty( AccessLevel.GameMaster )] public string Inscription { - get{ return m_Inscription; } + get => m_Inscription; set { m_Inscription = value; @@ -80,7 +80,7 @@ namespace Server.Items return m_Bound; } - set{ m_Bound = value; } + set => m_Bound = value; } [Constructible] diff --git a/Scripts/Items/Special/Solen Items/ZoogiFungus.cs b/Scripts/Items/Special/Solen Items/ZoogiFungus.cs index 532f35f43..2354b1376 100644 --- a/Scripts/Items/Special/Solen Items/ZoogiFungus.cs +++ b/Scripts/Items/Special/Solen Items/ZoogiFungus.cs @@ -2,8 +2,8 @@ namespace Server.Items { public class ZoogiFungus : Item, ICommodity { - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - bool ICommodity.IsDeedable { get { return (Core.ML); } } + int ICommodity.DescriptionNumber => LabelNumber; + bool ICommodity.IsDeedable => (Core.ML); [Constructible] public ZoogiFungus() : this( 1 ) diff --git a/Scripts/Items/Special/SoulStone.cs b/Scripts/Items/Special/SoulStone.cs index 0525f3688..fff949374 100644 --- a/Scripts/Items/Special/SoulStone.cs +++ b/Scripts/Items/Special/SoulStone.cs @@ -20,14 +20,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } [CommandProperty( AccessLevel.GameMaster )] public virtual int ActiveItemID { - get { return m_ActiveItemID; } + get => m_ActiveItemID; set { m_ActiveItemID = value; @@ -40,7 +40,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public virtual int InactiveItemID { - get { return m_InactiveItemID; } + get => m_InactiveItemID; set { m_InactiveItemID = value; @@ -59,28 +59,28 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string Account { - get{ return m_Account; } - set{ m_Account = value; } + get => m_Account; + set => m_Account = value; } [CommandProperty( AccessLevel.GameMaster )] public string LastUserName { - get{ return m_LastUserName; } + get => m_LastUserName; set{ m_LastUserName = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SkillName Skill { - get{ return m_Skill; } + get => m_Skill; set{ m_Skill = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public double SkillValue { - get{ return m_SkillValue; } + get => m_SkillValue; set { m_SkillValue = value; @@ -95,10 +95,7 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public bool IsEmpty - { - get{ return m_SkillValue <= 0.0; } - } + public bool IsEmpty => m_SkillValue <= 0.0; [Constructible] public SoulStone() : this( null ) @@ -849,10 +846,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get - { - return m_UsesRemaining; - } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); @@ -915,7 +909,8 @@ namespace Server.Items } - public bool ShowUsesRemaining{ get{ return true; } set{} } + public bool ShowUsesRemaining{ get => true; + set{} } } [Flippable] @@ -989,7 +984,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs b/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs index 8af58c90c..91e34e484 100644 --- a/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs +++ b/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs @@ -13,10 +13,8 @@ namespace Server.Items /* DO NOT USE! Only used in serialization of special scrolls that originally derived from Item */ private bool m_InheritsItem; - protected bool InheritsItem - { - get{ return m_InheritsItem; } - } + protected bool InheritsItem => m_InheritsItem; + #endregion public abstract int Message{ get; } @@ -39,15 +37,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public SkillName Skill { - get { return m_Skill; } - set { m_Skill = value; } + get => m_Skill; + set => m_Skill = value; } [CommandProperty( AccessLevel.GameMaster )] public double Value { - get { return m_Value; } - set { m_Value = value; } + get => m_Value; + set => m_Value = value; } public virtual string GetNameLocalized() diff --git a/Scripts/Items/Special/Valentines/2007/ValentinesCard.cs b/Scripts/Items/Special/Valentines/2007/ValentinesCard.cs index d41ba873d..d162a75f5 100644 --- a/Scripts/Items/Special/Valentines/2007/ValentinesCard.cs +++ b/Scripts/Items/Special/Valentines/2007/ValentinesCard.cs @@ -9,10 +9,14 @@ namespace Server.Items public override string DefaultName => "a Valentine's card"; [CommandProperty(AccessLevel.GameMaster)] - public virtual string From { get { return m_From; } set { m_From = value; } } + public virtual string From { get => m_From; + set => m_From = value; + } [CommandProperty(AccessLevel.GameMaster)] - public virtual string To { get { return m_To; } set { m_To = value; } } + public virtual string To { get => m_To; + set => m_To = value; + } private static string Unsigned = "___"; diff --git a/Scripts/Items/Special/Veteran Rewards/AnkhOfSacrifice.cs b/Scripts/Items/Special/Veteran Rewards/AnkhOfSacrifice.cs index d39048715..3b07625bd 100644 --- a/Scripts/Items/Special/Veteran Rewards/AnkhOfSacrifice.cs +++ b/Scripts/Items/Special/Veteran Rewards/AnkhOfSacrifice.cs @@ -169,7 +169,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -246,7 +246,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/Banner.cs b/Scripts/Items/Special/Veteran Rewards/Banner.cs index cbcad8763..57ca664ea 100644 --- a/Scripts/Items/Special/Veteran Rewards/Banner.cs +++ b/Scripts/Items/Special/Veteran Rewards/Banner.cs @@ -26,14 +26,11 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } - public bool FacingSouth - { - get{ return ( ItemID & 0x1 ) == 0; } - } + public bool FacingSouth => ( ItemID & 0x1 ) == 0; [Constructible] public Banner( int itemID ) : base( itemID ) @@ -121,7 +118,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } [Constructible] diff --git a/Scripts/Items/Special/Veteran Rewards/BloodyPentagram.cs b/Scripts/Items/Special/Veteran Rewards/BloodyPentagram.cs index a8176170d..a6f760f93 100644 --- a/Scripts/Items/Special/Veteran Rewards/BloodyPentagram.cs +++ b/Scripts/Items/Special/Veteran Rewards/BloodyPentagram.cs @@ -48,7 +48,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -139,7 +139,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/Brazier.cs b/Scripts/Items/Special/Veteran Rewards/Brazier.cs index f780588f1..6c07b0bce 100644 --- a/Scripts/Items/Special/Veteran Rewards/Brazier.cs +++ b/Scripts/Items/Special/Veteran Rewards/Brazier.cs @@ -14,7 +14,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -135,7 +135,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/Cannon.cs b/Scripts/Items/Special/Veteran Rewards/Cannon.cs index 230cfb316..0d6ca3190 100644 --- a/Scripts/Items/Special/Veteran Rewards/Cannon.cs +++ b/Scripts/Items/Special/Veteran Rewards/Cannon.cs @@ -67,15 +67,12 @@ namespace Server.Items private bool m_IsRewardItem; [CommandProperty( AccessLevel.GameMaster )] - public CannonDirection CannonDirection - { - get{ return m_CannonDirection; } - } + public CannonDirection CannonDirection => m_CannonDirection; [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set { m_Charges = value; @@ -88,7 +85,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set { m_IsRewardItem = value; @@ -381,14 +378,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set{ m_Charges = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/CommodityDeedBox.cs b/Scripts/Items/Special/Veteran Rewards/CommodityDeedBox.cs index 3e72876d0..81c9051cf 100644 --- a/Scripts/Items/Special/Veteran Rewards/CommodityDeedBox.cs +++ b/Scripts/Items/Special/Veteran Rewards/CommodityDeedBox.cs @@ -13,7 +13,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/ContestMiniHouse.cs b/Scripts/Items/Special/Veteran Rewards/ContestMiniHouse.cs index 679f2aeff..4045c0213 100644 --- a/Scripts/Items/Special/Veteran Rewards/ContestMiniHouse.cs +++ b/Scripts/Items/Special/Veteran Rewards/ContestMiniHouse.cs @@ -20,7 +20,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -75,7 +75,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/DecorativeShield.cs b/Scripts/Items/Special/Veteran Rewards/DecorativeShield.cs index 074fb4249..3ef927339 100644 --- a/Scripts/Items/Special/Veteran Rewards/DecorativeShield.cs +++ b/Scripts/Items/Special/Veteran Rewards/DecorativeShield.cs @@ -26,7 +26,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -121,7 +121,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/FlamingHead.cs b/Scripts/Items/Special/Veteran Rewards/FlamingHead.cs index b85c75954..873a06df8 100644 --- a/Scripts/Items/Special/Veteran Rewards/FlamingHead.cs +++ b/Scripts/Items/Special/Veteran Rewards/FlamingHead.cs @@ -27,7 +27,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -117,7 +117,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/HangingSkeleton.cs b/Scripts/Items/Special/Veteran Rewards/HangingSkeleton.cs index 3f4a85fd2..d72349fce 100644 --- a/Scripts/Items/Special/Veteran Rewards/HangingSkeleton.cs +++ b/Scripts/Items/Special/Veteran Rewards/HangingSkeleton.cs @@ -26,7 +26,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -123,7 +123,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/MiningCart.cs b/Scripts/Items/Special/Veteran Rewards/MiningCart.cs index f7044dbc6..735b590a8 100644 --- a/Scripts/Items/Special/Veteran Rewards/MiningCart.cs +++ b/Scripts/Items/Special/Veteran Rewards/MiningCart.cs @@ -34,25 +34,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } - set{ m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } private MiningCartType m_CartType; [CommandProperty( AccessLevel.GameMaster )] - public MiningCartType CartType - { - get{ return m_CartType; } - } + public MiningCartType CartType => m_CartType; private int m_Gems; [CommandProperty( AccessLevel.GameMaster )] public int Gems { - get{ return m_Gems; } - set{ m_Gems = value; } + get => m_Gems; + set => m_Gems = value; } private int m_Ore; @@ -60,8 +57,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Ore { - get{ return m_Ore; } - set{ m_Ore = value; } + get => m_Ore; + set => m_Ore = value; } private Timer m_Timer; @@ -327,7 +324,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -336,8 +333,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Gems { - get{ return m_Gems; } - set{ m_Gems = value; } + get => m_Gems; + set => m_Gems = value; } private int m_Ore; @@ -345,8 +342,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Ore { - get{ return m_Ore; } - set{ m_Ore = value; } + get => m_Ore; + set => m_Ore = value; } [Constructible] diff --git a/Scripts/Items/Special/Veteran Rewards/MinotaurStatue.cs b/Scripts/Items/Special/Veteran Rewards/MinotaurStatue.cs index a9e15a942..5e0ede3e7 100644 --- a/Scripts/Items/Special/Veteran Rewards/MinotaurStatue.cs +++ b/Scripts/Items/Special/Veteran Rewards/MinotaurStatue.cs @@ -29,7 +29,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -104,7 +104,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/PottedCactus.cs b/Scripts/Items/Special/Veteran Rewards/PottedCactus.cs index a5d5de5f4..423806758 100644 --- a/Scripts/Items/Special/Veteran Rewards/PottedCactus.cs +++ b/Scripts/Items/Special/Veteran Rewards/PottedCactus.cs @@ -13,7 +13,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get { return m_IsRewardItem; } + get => m_IsRewardItem; set { m_IsRewardItem = value; InvalidateProperties(); } } @@ -66,7 +66,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/StoneAnkh.cs b/Scripts/Items/Special/Veteran Rewards/StoneAnkh.cs index 0edf2d54e..4c1d389b0 100644 --- a/Scripts/Items/Special/Veteran Rewards/StoneAnkh.cs +++ b/Scripts/Items/Special/Veteran Rewards/StoneAnkh.cs @@ -59,7 +59,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -148,7 +148,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/TreeStump.cs b/Scripts/Items/Special/Veteran Rewards/TreeStump.cs index bdfc34046..4460a1dbc 100644 --- a/Scripts/Items/Special/Veteran Rewards/TreeStump.cs +++ b/Scripts/Items/Special/Veteran Rewards/TreeStump.cs @@ -25,7 +25,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -34,7 +34,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Logs { - get{ return m_Logs; } + get => m_Logs; set{ m_Logs = value; InvalidateProperties(); } } @@ -177,7 +177,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -186,7 +186,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Logs { - get{ return m_Logs; } + get => m_Logs; set{ m_Logs = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/WallBanner.cs b/Scripts/Items/Special/Veteran Rewards/WallBanner.cs index 27bd8d791..4dc9a6e44 100644 --- a/Scripts/Items/Special/Veteran Rewards/WallBanner.cs +++ b/Scripts/Items/Special/Veteran Rewards/WallBanner.cs @@ -63,7 +63,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -72,7 +72,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool East { - get{ return m_East; } + get => m_East; set{ m_IsRewardItem = value; InvalidateProperties(); } } @@ -276,7 +276,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs b/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs index fe30c372e..bd1b2af6f 100644 --- a/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs +++ b/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs @@ -16,20 +16,20 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get{ return m_UsesRemaining; } + get => m_UsesRemaining; set{ m_UsesRemaining = value; InvalidateProperties(); } } public virtual bool ShowUsesRemaining { - get{ return true; } + get => true; set{} } [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get{ return m_IsRewardItem; } + get => m_IsRewardItem; set{ m_IsRewardItem = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Suits/BaseSuit.cs b/Scripts/Items/Suits/BaseSuit.cs index 66cf9f0f7..e9698ef83 100644 --- a/Scripts/Items/Suits/BaseSuit.cs +++ b/Scripts/Items/Suits/BaseSuit.cs @@ -5,7 +5,9 @@ namespace Server.Items private AccessLevel m_AccessLevel; [CommandProperty( AccessLevel.Administrator )] - public AccessLevel AccessLevel{ get{ return m_AccessLevel; } set{ m_AccessLevel = value; } } + public AccessLevel AccessLevel{ get => m_AccessLevel; + set => m_AccessLevel = value; + } public BaseSuit( AccessLevel level, int hue, int itemID ) : base( itemID ) { diff --git a/Scripts/Items/Talismans/BaseTalisman.cs b/Scripts/Items/Talismans/BaseTalisman.cs index a2c62daa4..bc344937a 100644 --- a/Scripts/Items/Talismans/BaseTalisman.cs +++ b/Scripts/Items/Talismans/BaseTalisman.cs @@ -51,14 +51,14 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public int MaxCharges { - get { return m_MaxCharges; } + get => m_MaxCharges; set { m_MaxCharges = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int Charges { - get { return m_Charges; } + get => m_Charges; set { m_Charges = value; @@ -73,20 +73,20 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public int MaxChargeTime { - get { return m_MaxChargeTime; } + get => m_MaxChargeTime; set { m_MaxChargeTime = value; InvalidateProperties(); } } public int ChargeTime { - get { return m_ChargeTime; } + get => m_ChargeTime; set { m_ChargeTime = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public bool Blessed { - get { return m_Blessed; } + get => m_Blessed; set { m_Blessed = value; InvalidateProperties(); } } @@ -96,7 +96,7 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public TalismanSlayerName Slayer { - get { return m_Slayer; } + get => m_Slayer; set { m_Slayer = value; InvalidateProperties(); } } #endregion @@ -109,14 +109,14 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public TalismanAttribute Summoner { - get { return m_Summoner; } + get => m_Summoner; set { m_Summoner = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public TalismanRemoval Removal { - get { return m_Removal; } + get => m_Removal; set { m_Removal = value; InvalidateProperties(); } } #endregion @@ -128,14 +128,14 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public TalismanAttribute Protection { - get { return m_Protection; } + get => m_Protection; set { m_Protection = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public TalismanAttribute Killer { - get { return m_Killer; } + get => m_Killer; set { m_Killer = value; InvalidateProperties(); } } #endregion @@ -148,21 +148,21 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public SkillName Skill { - get { return m_Skill; } + get => m_Skill; set { m_Skill = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int SuccessBonus { - get { return m_SuccessBonus; } + get => m_SuccessBonus; set { m_SuccessBonus = value; InvalidateProperties(); } } [CommandProperty(AccessLevel.GameMaster)] public int ExceptionalBonus { - get { return m_ExceptionalBonus; } + get => m_ExceptionalBonus; set { m_ExceptionalBonus = value; InvalidateProperties(); } } #endregion @@ -174,14 +174,14 @@ namespace Server.Items [CommandProperty(AccessLevel.GameMaster)] public AosAttributes Attributes { - get { return m_AosAttributes; } + get => m_AosAttributes; set { } } [CommandProperty(AccessLevel.GameMaster)] public AosSkillBonuses SkillBonuses { - get { return m_AosSkillBonuses; } + get => m_AosSkillBonuses; set { } } #endregion diff --git a/Scripts/Items/Talismans/TalismanAttribute.cs b/Scripts/Items/Talismans/TalismanAttribute.cs index 7f6159d10..650bcb324 100644 --- a/Scripts/Items/Talismans/TalismanAttribute.cs +++ b/Scripts/Items/Talismans/TalismanAttribute.cs @@ -12,35 +12,29 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Type Type { - get{ return m_Type; } - set{ m_Type = value; } + get => m_Type; + set => m_Type = value; } [CommandProperty( AccessLevel.GameMaster )] public TextDefinition Name { - get{ return m_Name; } - set{ m_Name = value; } + get => m_Name; + set => m_Name = value; } [CommandProperty( AccessLevel.GameMaster )] public int Amount { - get { return m_Amount; } - set { m_Amount = value; } + get => m_Amount; + set => m_Amount = value; } [CommandProperty( AccessLevel.GameMaster )] - public bool IsEmpty - { - get { return m_Type == null; } - } + public bool IsEmpty => m_Type == null; [CommandProperty( AccessLevel.GameMaster )] - public bool IsItem - { - get { return m_Type != null && m_Type.Namespace.Equals( "Server.Items" ); } - } + public bool IsItem => m_Type != null && m_Type.Namespace.Equals( "Server.Items" ); public TalismanAttribute() : this( null, 0, 0 ) { diff --git a/Scripts/Items/Traps/BaseTrap.cs b/Scripts/Items/Traps/BaseTrap.cs index 6f32a49c9..748223eb6 100644 --- a/Scripts/Items/Traps/BaseTrap.cs +++ b/Scripts/Items/Traps/BaseTrap.cs @@ -4,10 +4,10 @@ namespace Server.Items { public abstract class BaseTrap : Item { - public virtual bool PassivelyTriggered{ get{ return false; } } - public virtual TimeSpan PassiveTriggerDelay{ get{ return TimeSpan.Zero; } } - public virtual int PassiveTriggerRange{ get{ return -1; } } - public virtual TimeSpan ResetDelay{ get{ return TimeSpan.Zero; } } + public virtual bool PassivelyTriggered => false; + public virtual TimeSpan PassiveTriggerDelay => TimeSpan.Zero; + public virtual int PassiveTriggerRange => -1; + public virtual TimeSpan ResetDelay => TimeSpan.Zero; private DateTime m_NextPassiveTrigger, m_NextActiveTrigger; diff --git a/Scripts/Items/Traps/FireColumnTrap.cs b/Scripts/Items/Traps/FireColumnTrap.cs index bea33b582..23960516c 100644 --- a/Scripts/Items/Traps/FireColumnTrap.cs +++ b/Scripts/Items/Traps/FireColumnTrap.cs @@ -23,8 +23,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public virtual int MinDamage { - get { return m_MinDamage; } - set { m_MinDamage = value; } + get => m_MinDamage; + set => m_MinDamage = value; } private int m_MaxDamage; @@ -32,8 +32,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public virtual int MaxDamage { - get { return m_MaxDamage; } - set { m_MaxDamage = value; } + get => m_MaxDamage; + set => m_MaxDamage = value; } private bool m_WarningFlame; @@ -41,8 +41,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public virtual bool WarningFlame { - get { return m_WarningFlame; } - set { m_WarningFlame = value; } + get => m_WarningFlame; + set => m_WarningFlame = value; } public override void OnTrigger( Mobile from ) diff --git a/Scripts/Items/Traps/GasTrap.cs b/Scripts/Items/Traps/GasTrap.cs index 3bb335c2d..7404eb234 100644 --- a/Scripts/Items/Traps/GasTrap.cs +++ b/Scripts/Items/Traps/GasTrap.cs @@ -17,8 +17,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get{ return m_Poison; } - set{ m_Poison = value; } + get => m_Poison; + set => m_Poison = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -35,10 +35,7 @@ namespace Server.Items return GasTrapType.WestWall; } - set - { - ItemID = GetBaseID( value ); - } + set => ItemID = GetBaseID( value ); } public static int GetBaseID( GasTrapType type ) diff --git a/Scripts/Items/Traps/SawTrap.cs b/Scripts/Items/Traps/SawTrap.cs index 1bb229dee..f186d3a85 100644 --- a/Scripts/Items/Traps/SawTrap.cs +++ b/Scripts/Items/Traps/SawTrap.cs @@ -28,10 +28,7 @@ namespace Server.Items return SawTrapType.NorthWall; } - set - { - ItemID = GetBaseID( value ); - } + set => ItemID = GetBaseID( value ); } public static int GetBaseID( SawTrapType type ) diff --git a/Scripts/Items/Traps/SpikeTrap.cs b/Scripts/Items/Traps/SpikeTrap.cs index 2b27c0cb6..1a5e8a6da 100644 --- a/Scripts/Items/Traps/SpikeTrap.cs +++ b/Scripts/Items/Traps/SpikeTrap.cs @@ -38,7 +38,7 @@ namespace Server.Items public bool Extended { - get{ return ( ItemID == GetExtendedID( this.Type ) ); } + get => ( ItemID == GetExtendedID( this.Type ) ); set { if ( value ) diff --git a/Scripts/Items/Traps/StoneFaceTrap.cs b/Scripts/Items/Traps/StoneFaceTrap.cs index d1309c204..1c584e0cf 100644 --- a/Scripts/Items/Traps/StoneFaceTrap.cs +++ b/Scripts/Items/Traps/StoneFaceTrap.cs @@ -35,7 +35,7 @@ namespace Server.Items public bool Breathing { - get{ return ( ItemID == GetFireID( this.Type ) ); } + get => ( ItemID == GetFireID( this.Type ) ); set { if ( value ) diff --git a/Scripts/Items/TreasureChests/TreasureChestLevel1.cs b/Scripts/Items/TreasureChests/TreasureChestLevel1.cs index 43a99b701..349f4696b 100644 --- a/Scripts/Items/TreasureChests/TreasureChestLevel1.cs +++ b/Scripts/Items/TreasureChests/TreasureChestLevel1.cs @@ -39,10 +39,7 @@ namespace Server.Items public override int DefaultDropSound => 0x42; - public override Rectangle2D Bounds - { - get { return new Rectangle2D( 18, 105, 144, 73 ); } - } + public override Rectangle2D Bounds => new Rectangle2D( 18, 105, 144, 73 ); [Constructible] public TreasureChestLevel1() diff --git a/Scripts/Items/TreasureChests/TreasureChestLevel2.cs b/Scripts/Items/TreasureChests/TreasureChestLevel2.cs index edd77aa29..0dace56af 100644 --- a/Scripts/Items/TreasureChests/TreasureChestLevel2.cs +++ b/Scripts/Items/TreasureChests/TreasureChestLevel2.cs @@ -64,10 +64,7 @@ namespace Server.Items public override int DefaultDropSound => 0x42; - public override Rectangle2D Bounds - { - get { return new Rectangle2D( 18, 105, 144, 73 ); } - } + public override Rectangle2D Bounds => new Rectangle2D( 18, 105, 144, 73 ); [Constructible] public TreasureChestLevel2() diff --git a/Scripts/Items/TreasureChests/TreasureChestLevel3.cs b/Scripts/Items/TreasureChests/TreasureChestLevel3.cs index 714fbdc92..84fa757ad 100644 --- a/Scripts/Items/TreasureChests/TreasureChestLevel3.cs +++ b/Scripts/Items/TreasureChests/TreasureChestLevel3.cs @@ -38,10 +38,7 @@ namespace Server.Items public override int DefaultDropSound => 0x42; - public override Rectangle2D Bounds - { - get { return new Rectangle2D( 18, 105, 144, 73 ); } - } + public override Rectangle2D Bounds => new Rectangle2D( 18, 105, 144, 73 ); [Constructible] public TreasureChestLevel3() diff --git a/Scripts/Items/TreasureChests/TreasureChestLevel4.cs b/Scripts/Items/TreasureChests/TreasureChestLevel4.cs index f352ef957..64a0a4d50 100644 --- a/Scripts/Items/TreasureChests/TreasureChestLevel4.cs +++ b/Scripts/Items/TreasureChests/TreasureChestLevel4.cs @@ -44,10 +44,7 @@ namespace Server.Items public override int DefaultDropSound => 0x42; - public override Rectangle2D Bounds - { - get { return new Rectangle2D( 18, 105, 144, 73 ); } - } + public override Rectangle2D Bounds => new Rectangle2D( 18, 105, 144, 73 ); [Constructible] public TreasureChestLevel4() diff --git a/Scripts/Items/Wands/BaseWand.cs b/Scripts/Items/Wands/BaseWand.cs index 57b0c2ce9..075707a1a 100644 --- a/Scripts/Items/Wands/BaseWand.cs +++ b/Scripts/Items/Wands/BaseWand.cs @@ -43,19 +43,19 @@ namespace Server.Items private WandEffect m_WandEffect; private int m_Charges; - public virtual TimeSpan GetUseDelay{ get{ return TimeSpan.FromSeconds( 4.0 ); } } + public virtual TimeSpan GetUseDelay => TimeSpan.FromSeconds( 4.0 ); [CommandProperty( AccessLevel.GameMaster )] public WandEffect Effect { - get{ return m_WandEffect; } + get => m_WandEffect; set{ m_WandEffect = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set{ m_Charges = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Weapons/Abilities/WeaponAbility.cs b/Scripts/Items/Weapons/Abilities/WeaponAbility.cs index 33187ff6e..9d127dabd 100644 --- a/Scripts/Items/Weapons/Abilities/WeaponAbility.cs +++ b/Scripts/Items/Weapons/Abilities/WeaponAbility.cs @@ -8,10 +8,10 @@ namespace Server.Items { public abstract class WeaponAbility { - public virtual int BaseMana{ get{ return 0; } } + public virtual int BaseMana => 0; - public virtual int AccuracyBonus{ get{ return 0; } } - public virtual double DamageScalar{ get{ return 1.0; } } + public virtual int AccuracyBonus => 0; + public virtual double DamageScalar => 1.0; public virtual bool RequiresSE => false; @@ -285,11 +285,11 @@ namespace Server.Items new Disrobe() }; - public static WeaponAbility[] Abilities{ get{ return m_Abilities; } } + public static WeaponAbility[] Abilities => m_Abilities; private static Hashtable m_Table = new Hashtable(); - public static Hashtable Table{ get{ return m_Table; } } + public static Hashtable Table => m_Table; public static readonly WeaponAbility ArmorIgnore = m_Abilities[ 1]; public static readonly WeaponAbility BleedAttack = m_Abilities[ 2]; @@ -473,7 +473,7 @@ namespace Server.Items { private Timer m_Timer; - public Timer Timer{ get{ return m_Timer; } } + public Timer Timer => m_Timer; public WeaponAbilityContext( Timer timer ) { diff --git a/Scripts/Items/Weapons/Axes/BaseAxe.cs b/Scripts/Items/Weapons/Axes/BaseAxe.cs index 49f35556f..2c8dc4cd8 100644 --- a/Scripts/Items/Weapons/Axes/BaseAxe.cs +++ b/Scripts/Items/Weapons/Axes/BaseAxe.cs @@ -20,7 +20,7 @@ namespace Server.Items public override WeaponType DefType => WeaponType.Axe; public override WeaponAnimation DefAnimation => WeaponAnimation.Slash2H; - public virtual HarvestSystem HarvestSystem{ get{ return Lumberjacking.System; } } + public virtual HarvestSystem HarvestSystem => Lumberjacking.System; private int m_UsesRemaining; private bool m_ShowUsesRemaining; @@ -28,14 +28,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool ShowUsesRemaining { - get { return m_ShowUsesRemaining; } + get => m_ShowUsesRemaining; set { m_ShowUsesRemaining = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index be2e6043a..9b9a8abb7 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -25,7 +25,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public string EngravedText { - get{ return m_EngravedText; } + get => m_EngravedText; set{ m_EngravedText = value; InvalidateProperties(); } } @@ -34,7 +34,7 @@ namespace Server.Items public FactionItem FactionItemState { - get{ return m_FactionState; } + get => m_FactionState; set { m_FactionState = value; @@ -102,47 +102,47 @@ namespace Server.Items #endregion #region Virtual Properties - public virtual WeaponAbility PrimaryAbility{ get{ return null; } } - public virtual WeaponAbility SecondaryAbility{ get{ return null; } } + public virtual WeaponAbility PrimaryAbility => null; + public virtual WeaponAbility SecondaryAbility => null; - public virtual int DefMaxRange{ get{ return 1; } } - public virtual int DefHitSound{ get{ return 0; } } - public virtual int DefMissSound{ get{ return 0; } } - public virtual SkillName DefSkill{ get{ return SkillName.Swords; } } - public virtual WeaponType DefType{ get{ return WeaponType.Slashing; } } - public virtual WeaponAnimation DefAnimation{ get{ return WeaponAnimation.Slash1H; } } + public virtual int DefMaxRange => 1; + public virtual int DefHitSound => 0; + public virtual int DefMissSound => 0; + public virtual SkillName DefSkill => SkillName.Swords; + public virtual WeaponType DefType => WeaponType.Slashing; + public virtual WeaponAnimation DefAnimation => WeaponAnimation.Slash1H; - public virtual int AosStrengthReq{ get{ return 0; } } - public virtual int AosDexterityReq{ get{ return 0; } } - public virtual int AosIntelligenceReq{ get{ return 0; } } - public virtual int AosMinDamage{ get{ return 0; } } - public virtual int AosMaxDamage{ get{ return 0; } } - public virtual int AosSpeed{ get{ return 0; } } - public virtual float MlSpeed{ get{ return 0.0f; } } - public virtual int AosMaxRange{ get{ return DefMaxRange; } } - public virtual int AosHitSound{ get{ return DefHitSound; } } - public virtual int AosMissSound{ get{ return DefMissSound; } } - public virtual SkillName AosSkill{ get{ return DefSkill; } } - public virtual WeaponType AosType{ get{ return DefType; } } - public virtual WeaponAnimation AosAnimation{ get{ return DefAnimation; } } + public virtual int AosStrengthReq => 0; + public virtual int AosDexterityReq => 0; + public virtual int AosIntelligenceReq => 0; + public virtual int AosMinDamage => 0; + public virtual int AosMaxDamage => 0; + public virtual int AosSpeed => 0; + public virtual float MlSpeed => 0.0f; + public virtual int AosMaxRange => DefMaxRange; + public virtual int AosHitSound => DefHitSound; + public virtual int AosMissSound => DefMissSound; + public virtual SkillName AosSkill => DefSkill; + public virtual WeaponType AosType => DefType; + public virtual WeaponAnimation AosAnimation => DefAnimation; - public virtual int OldStrengthReq{ get{ return 0; } } - public virtual int OldDexterityReq{ get{ return 0; } } - public virtual int OldIntelligenceReq{ get{ return 0; } } - public virtual int OldMinDamage{ get{ return 0; } } - public virtual int OldMaxDamage{ get{ return 0; } } - public virtual int OldSpeed{ get{ return 0; } } - public virtual int OldMaxRange{ get{ return DefMaxRange; } } - public virtual int OldHitSound{ get{ return DefHitSound; } } - public virtual int OldMissSound{ get{ return DefMissSound; } } - public virtual SkillName OldSkill{ get{ return DefSkill; } } - public virtual WeaponType OldType{ get{ return DefType; } } - public virtual WeaponAnimation OldAnimation{ get{ return DefAnimation; } } + public virtual int OldStrengthReq => 0; + public virtual int OldDexterityReq => 0; + public virtual int OldIntelligenceReq => 0; + public virtual int OldMinDamage => 0; + public virtual int OldMaxDamage => 0; + public virtual int OldSpeed => 0; + public virtual int OldMaxRange => DefMaxRange; + public virtual int OldHitSound => DefHitSound; + public virtual int OldMissSound => DefMissSound; + public virtual SkillName OldSkill => DefSkill; + public virtual WeaponType OldType => DefType; + public virtual WeaponAnimation OldAnimation => DefAnimation; - public virtual int InitMinHits{ get{ return 0; } } - public virtual int InitMaxHits{ get{ return 0; } } + public virtual int InitMinHits => 0; + public virtual int InitMaxHits => 0; - public virtual bool CanFortify{ get{ return true; } } + public virtual bool CanFortify => true; public override int PhysicalResistance => m_AosWeaponAttributes.ResistPhysicalBonus; public override int FireResistance => m_AosWeaponAttributes.ResistFireBonus; @@ -157,56 +157,56 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public AosAttributes Attributes { - get{ return m_AosAttributes; } + get => m_AosAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosWeaponAttributes WeaponAttributes { - get{ return m_AosWeaponAttributes; } + get => m_AosWeaponAttributes; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosSkillBonuses SkillBonuses { - get{ return m_AosSkillBonuses; } + get => m_AosSkillBonuses; set{} } [CommandProperty( AccessLevel.GameMaster )] public AosElementAttributes AosElementDamages { - get { return m_AosElementDamages; } + get => m_AosElementDamages; set { } } [CommandProperty( AccessLevel.GameMaster )] public bool Cursed { - get{ return m_Cursed; } - set{ m_Cursed = value; } + get => m_Cursed; + set => m_Cursed = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Consecrated { - get{ return m_Consecrated; } - set{ m_Consecrated = value; } + get => m_Consecrated; + set => m_Consecrated = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Identified { - get{ return m_Identified; } + get => m_Identified; set{ m_Identified = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int HitPoints { - get{ return m_Hits; } + get => m_Hits; set { if ( m_Hits == value ) @@ -224,133 +224,133 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int MaxHitPoints { - get{ return m_MaxHits; } + get => m_MaxHits; set{ m_MaxHits = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int PoisonCharges { - get{ return m_PoisonCharges; } + get => m_PoisonCharges; set{ m_PoisonCharges = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get{ return m_Poison; } + get => m_Poison; set{ m_Poison = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public WeaponQuality Quality { - get{ return m_Quality; } + get => m_Quality; set{ UnscaleDurability(); m_Quality = value; ScaleDurability(); InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { - get{ return m_Crafter; } + get => m_Crafter; set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SlayerName Slayer { - get{ return m_Slayer; } + get => m_Slayer; set{ m_Slayer = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public SlayerName Slayer2 { - get { return m_Slayer2; } + get => m_Slayer2; set { m_Slayer2 = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { - get{ return m_Resource; } + get => m_Resource; set{ UnscaleDurability(); m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); InvalidateProperties(); ScaleDurability(); } } [CommandProperty( AccessLevel.GameMaster )] public WeaponDamageLevel DamageLevel { - get{ return m_DamageLevel; } + get => m_DamageLevel; set{ m_DamageLevel = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public WeaponDurabilityLevel DurabilityLevel { - get{ return m_DurabilityLevel; } + get => m_DurabilityLevel; set{ UnscaleDurability(); m_DurabilityLevel = value; InvalidateProperties(); ScaleDurability(); } } [CommandProperty( AccessLevel.GameMaster )] public bool PlayerConstructed { - get{ return m_PlayerConstructed; } - set{ m_PlayerConstructed = value; } + get => m_PlayerConstructed; + set => m_PlayerConstructed = value; } [CommandProperty( AccessLevel.GameMaster )] public int MaxRange { - get{ return ( m_MaxRange == -1 ? Core.AOS ? AosMaxRange : OldMaxRange : m_MaxRange ); } + get => ( m_MaxRange == -1 ? Core.AOS ? AosMaxRange : OldMaxRange : m_MaxRange ); set{ m_MaxRange = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public WeaponAnimation Animation { - get{ return ( m_Animation == (WeaponAnimation)(-1) ? Core.AOS ? AosAnimation : OldAnimation : m_Animation ); } - set{ m_Animation = value; } + get => ( m_Animation == (WeaponAnimation)(-1) ? Core.AOS ? AosAnimation : OldAnimation : m_Animation ); + set => m_Animation = value; } [CommandProperty( AccessLevel.GameMaster )] public WeaponType Type { - get{ return ( m_Type == (WeaponType)(-1) ? Core.AOS ? AosType : OldType : m_Type ); } - set{ m_Type = value; } + get => ( m_Type == (WeaponType)(-1) ? Core.AOS ? AosType : OldType : m_Type ); + set => m_Type = value; } [CommandProperty( AccessLevel.GameMaster )] public SkillName Skill { - get{ return ( m_Skill == (SkillName)(-1) ? Core.AOS ? AosSkill : OldSkill : m_Skill ); } + get => ( m_Skill == (SkillName)(-1) ? Core.AOS ? AosSkill : OldSkill : m_Skill ); set{ m_Skill = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int HitSound { - get{ return ( m_HitSound == -1 ? Core.AOS ? AosHitSound : OldHitSound : m_HitSound ); } - set{ m_HitSound = value; } + get => ( m_HitSound == -1 ? Core.AOS ? AosHitSound : OldHitSound : m_HitSound ); + set => m_HitSound = value; } [CommandProperty( AccessLevel.GameMaster )] public int MissSound { - get{ return ( m_MissSound == -1 ? Core.AOS ? AosMissSound : OldMissSound : m_MissSound ); } - set{ m_MissSound = value; } + get => ( m_MissSound == -1 ? Core.AOS ? AosMissSound : OldMissSound : m_MissSound ); + set => m_MissSound = value; } [CommandProperty( AccessLevel.GameMaster )] public int MinDamage { - get{ return ( m_MinDamage == -1 ? Core.AOS ? AosMinDamage : OldMinDamage : m_MinDamage ); } + get => ( m_MinDamage == -1 ? Core.AOS ? AosMinDamage : OldMinDamage : m_MinDamage ); set{ m_MinDamage = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int MaxDamage { - get{ return ( m_MaxDamage == -1 ? Core.AOS ? AosMaxDamage : OldMaxDamage : m_MaxDamage ); } + get => ( m_MaxDamage == -1 ? Core.AOS ? AosMaxDamage : OldMaxDamage : m_MaxDamage ); set{ m_MaxDamage = value; InvalidateProperties(); } } @@ -375,31 +375,28 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int StrRequirement { - get{ return ( m_StrReq == -1 ? Core.AOS ? AosStrengthReq : OldStrengthReq : m_StrReq ); } + get => ( m_StrReq == -1 ? Core.AOS ? AosStrengthReq : OldStrengthReq : m_StrReq ); set{ m_StrReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int DexRequirement { - get{ return ( m_DexReq == -1 ? Core.AOS ? AosDexterityReq : OldDexterityReq : m_DexReq ); } - set{ m_DexReq = value; } + get => ( m_DexReq == -1 ? Core.AOS ? AosDexterityReq : OldDexterityReq : m_DexReq ); + set => m_DexReq = value; } [CommandProperty( AccessLevel.GameMaster )] public int IntRequirement { - get{ return ( m_IntReq == -1 ? Core.AOS ? AosIntelligenceReq : OldIntelligenceReq : m_IntReq ); } - set{ m_IntReq = value; } + get => ( m_IntReq == -1 ? Core.AOS ? AosIntelligenceReq : OldIntelligenceReq : m_IntReq ); + set => m_IntReq = value; } [CommandProperty( AccessLevel.GameMaster )] public WeaponAccuracyLevel AccuracyLevel { - get - { - return m_AccuracyLevel; - } + get => m_AccuracyLevel; set { if ( m_AccuracyLevel != value ) @@ -599,7 +596,7 @@ namespace Server.Items return base.CanEquip( from ); } - public virtual bool UseSkillMod{ get{ return !Core.AOS; } } + public virtual bool UseSkillMod => !Core.AOS; public override bool OnEquip( Mobile from ) { @@ -1310,8 +1307,8 @@ namespace Server.Items public static bool InDoubleStrike { - get{ return m_InDoubleStrike; } - set{ m_InDoubleStrike = value; } + get => m_InDoubleStrike; + set => m_InDoubleStrike = value; } public virtual void OnHit( Mobile attacker, Mobile defender, double damageBonus = 1.0) @@ -2189,7 +2186,7 @@ namespace Server.Items return damage + (int)(damage * totalBonus); } - public virtual int VirtualDamageBonus{ get{ return 0; } } + public virtual int VirtualDamageBonus => 0; public virtual int ComputeDamageAOS( Mobile attacker, Mobile defender ) { @@ -2926,7 +2923,7 @@ namespace Server.Items [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get{ return base.Hue; } + get => base.Hue; set{ base.Hue = value; InvalidateProperties(); } } @@ -3024,10 +3021,7 @@ namespace Server.Items return ( m_AosAttributes.SpellChanneling != 0 ); } - public virtual int ArtifactRarity - { - get{ return 0; } - } + public virtual int ArtifactRarity => 0; public virtual int GetLuckBonus() { @@ -3362,8 +3356,8 @@ namespace Server.Items public static BaseWeapon Fists { - get{ return m_Fists; } - set{ m_Fists = value; } + get => m_Fists; + set => m_Fists = value; } #region ICraftable Members diff --git a/Scripts/Items/Weapons/Knives/ThrowingDagger.cs b/Scripts/Items/Weapons/Knives/ThrowingDagger.cs index e4e2e7b74..b41d29485 100644 --- a/Scripts/Items/Weapons/Knives/ThrowingDagger.cs +++ b/Scripts/Items/Weapons/Knives/ThrowingDagger.cs @@ -6,10 +6,7 @@ namespace Server.Items [FlippableAttribute( 0xF52, 0xF51 )] public class ThrowingDagger : Item { - public override string DefaultName - { - get { return "a throwing dagger"; } - } + public override string DefaultName => "a throwing dagger"; [Constructible] public ThrowingDagger() : base( 0xF52 ) diff --git a/Scripts/Items/Weapons/Maces/FireworksWand.cs b/Scripts/Items/Weapons/Maces/FireworksWand.cs index e33eca858..b4d1be517 100644 --- a/Scripts/Items/Weapons/Maces/FireworksWand.cs +++ b/Scripts/Items/Weapons/Maces/FireworksWand.cs @@ -11,7 +11,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int Charges { - get{ return m_Charges; } + get => m_Charges; set{ m_Charges = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs b/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs index f483a4505..308e53c0c 100644 --- a/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs +++ b/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs @@ -14,7 +14,7 @@ namespace Server.Items public override WeaponType DefType => WeaponType.Polearm; public override WeaponAnimation DefAnimation => WeaponAnimation.Slash2H; - public virtual HarvestSystem HarvestSystem{ get{ return Lumberjacking.System; } } + public virtual HarvestSystem HarvestSystem => Lumberjacking.System; private int m_UsesRemaining; private bool m_ShowUsesRemaining; @@ -22,14 +22,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int UsesRemaining { - get { return m_UsesRemaining; } + get => m_UsesRemaining; set { m_UsesRemaining = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool ShowUsesRemaining { - get { return m_ShowUsesRemaining; } + get => m_ShowUsesRemaining; set { m_ShowUsesRemaining = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Weapons/Ranged/BaseRanged.cs b/Scripts/Items/Weapons/Ranged/BaseRanged.cs index a1641706d..132ec1517 100644 --- a/Scripts/Items/Weapons/Ranged/BaseRanged.cs +++ b/Scripts/Items/Weapons/Ranged/BaseRanged.cs @@ -27,14 +27,14 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool Balanced { - get{ return m_Balanced; } + get => m_Balanced; set{ m_Balanced = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int Velocity { - get{ return m_Velocity; } + get => m_Velocity; set{ m_Velocity = value; InvalidateProperties(); } } diff --git a/Scripts/Items/Weapons/Ranged/JukaBow.cs b/Scripts/Items/Weapons/Ranged/JukaBow.cs index 85759c0a8..cde4f8028 100644 --- a/Scripts/Items/Weapons/Ranged/JukaBow.cs +++ b/Scripts/Items/Weapons/Ranged/JukaBow.cs @@ -10,10 +10,7 @@ namespace Server.Items public override int OldDexterityReq => 80; [CommandProperty( AccessLevel.GameMaster )] - public bool IsModified - { - get{ return ( Hue == 0x453 ); } - } + public bool IsModified => ( Hue == 0x453 ); [Constructible] public JukaBow() diff --git a/Scripts/Items/Weapons/SlayerEntry.cs b/Scripts/Items/Weapons/SlayerEntry.cs index 15f5cd122..ac3fa6a7f 100644 --- a/Scripts/Items/Weapons/SlayerEntry.cs +++ b/Scripts/Items/Weapons/SlayerEntry.cs @@ -8,9 +8,11 @@ namespace Server.Items private SlayerName m_Name; private Type[] m_Types; - public SlayerGroup Group{ get{ return m_Group; } set{ m_Group = value; } } - public SlayerName Name{ get{ return m_Name; } } - public Type[] Types{ get{ return m_Types; } } + public SlayerGroup Group{ get => m_Group; + set => m_Group = value; + } + public SlayerName Name => m_Name; + public Type[] Types => m_Types; private static int[] m_AosTitles = new int[] { diff --git a/Scripts/Items/Weapons/SlayerGroup.cs b/Scripts/Items/Weapons/SlayerGroup.cs index 78f93aaf2..c934ba8ba 100644 --- a/Scripts/Items/Weapons/SlayerGroup.cs +++ b/Scripts/Items/Weapons/SlayerGroup.cs @@ -8,15 +8,9 @@ namespace Server.Items private static SlayerEntry[] m_TotalEntries; private static SlayerGroup[] m_Groups; - public static SlayerEntry[] TotalEntries - { - get{ return m_TotalEntries; } - } + public static SlayerEntry[] TotalEntries => m_TotalEntries; - public static SlayerGroup[] Groups - { - get{ return m_Groups; } - } + public static SlayerGroup[] Groups => m_Groups; public static SlayerEntry GetEntryByName( SlayerName name ) { @@ -183,10 +177,18 @@ namespace Server.Items private SlayerEntry[] m_Entries; private Type[] m_FoundOn; - public SlayerGroup[] Opposition{ get{ return m_Opposition; } set{ m_Opposition = value; } } - public SlayerEntry Super{ get{ return m_Super; } set{ m_Super = value; } } - public SlayerEntry[] Entries{ get{ return m_Entries; } set{ m_Entries = value; } } - public Type[] FoundOn{ get{ return m_FoundOn; } set{ m_FoundOn = value; } } + public SlayerGroup[] Opposition{ get => m_Opposition; + set => m_Opposition = value; + } + public SlayerEntry Super{ get => m_Super; + set => m_Super = value; + } + public SlayerEntry[] Entries{ get => m_Entries; + set => m_Entries = value; + } + public Type[] FoundOn{ get => m_FoundOn; + set => m_FoundOn = value; + } public bool OppositionSuperSlays( Mobile m ) { diff --git a/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs b/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs index f817d3387..930af368b 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs @@ -22,10 +22,7 @@ namespace Server.Items public override int VirtualDamageBonus => 25; - public override string DefaultName - { - get { return "a tribal spear"; } - } + public override string DefaultName => "a tribal spear"; [Constructible] public TribalSpear() : base( 0xF62 ) diff --git a/Scripts/Misc/AOS.cs b/Scripts/Misc/AOS.cs index f167fb050..98b0e17b0 100644 --- a/Scripts/Misc/AOS.cs +++ b/Scripts/Misc/AOS.cs @@ -345,8 +345,8 @@ namespace Server public int this[AosAttribute attribute] { - get { return GetValue( (int)attribute ); } - set { SetValue( (int)attribute, value ); } + get => GetValue( (int)attribute ); + set => SetValue( (int)attribute, value ); } public override string ToString() @@ -389,76 +389,124 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public int RegenHits { get { return this[AosAttribute.RegenHits]; } set { this[AosAttribute.RegenHits] = value; } } + public int RegenHits { get => this[AosAttribute.RegenHits]; + set => this[AosAttribute.RegenHits] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int RegenStam { get { return this[AosAttribute.RegenStam]; } set { this[AosAttribute.RegenStam] = value; } } + public int RegenStam { get => this[AosAttribute.RegenStam]; + set => this[AosAttribute.RegenStam] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int RegenMana { get { return this[AosAttribute.RegenMana]; } set { this[AosAttribute.RegenMana] = value; } } + public int RegenMana { get => this[AosAttribute.RegenMana]; + set => this[AosAttribute.RegenMana] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int DefendChance { get { return this[AosAttribute.DefendChance]; } set { this[AosAttribute.DefendChance] = value; } } + public int DefendChance { get => this[AosAttribute.DefendChance]; + set => this[AosAttribute.DefendChance] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int AttackChance { get { return this[AosAttribute.AttackChance]; } set { this[AosAttribute.AttackChance] = value; } } + public int AttackChance { get => this[AosAttribute.AttackChance]; + set => this[AosAttribute.AttackChance] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int BonusStr { get { return this[AosAttribute.BonusStr]; } set { this[AosAttribute.BonusStr] = value; } } + public int BonusStr { get => this[AosAttribute.BonusStr]; + set => this[AosAttribute.BonusStr] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int BonusDex { get { return this[AosAttribute.BonusDex]; } set { this[AosAttribute.BonusDex] = value; } } + public int BonusDex { get => this[AosAttribute.BonusDex]; + set => this[AosAttribute.BonusDex] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int BonusInt { get { return this[AosAttribute.BonusInt]; } set { this[AosAttribute.BonusInt] = value; } } + public int BonusInt { get => this[AosAttribute.BonusInt]; + set => this[AosAttribute.BonusInt] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int BonusHits { get { return this[AosAttribute.BonusHits]; } set { this[AosAttribute.BonusHits] = value; } } + public int BonusHits { get => this[AosAttribute.BonusHits]; + set => this[AosAttribute.BonusHits] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int BonusStam { get { return this[AosAttribute.BonusStam]; } set { this[AosAttribute.BonusStam] = value; } } + public int BonusStam { get => this[AosAttribute.BonusStam]; + set => this[AosAttribute.BonusStam] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int BonusMana { get { return this[AosAttribute.BonusMana]; } set { this[AosAttribute.BonusMana] = value; } } + public int BonusMana { get => this[AosAttribute.BonusMana]; + set => this[AosAttribute.BonusMana] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int WeaponDamage { get { return this[AosAttribute.WeaponDamage]; } set { this[AosAttribute.WeaponDamage] = value; } } + public int WeaponDamage { get => this[AosAttribute.WeaponDamage]; + set => this[AosAttribute.WeaponDamage] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int WeaponSpeed { get { return this[AosAttribute.WeaponSpeed]; } set { this[AosAttribute.WeaponSpeed] = value; } } + public int WeaponSpeed { get => this[AosAttribute.WeaponSpeed]; + set => this[AosAttribute.WeaponSpeed] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int SpellDamage { get { return this[AosAttribute.SpellDamage]; } set { this[AosAttribute.SpellDamage] = value; } } + public int SpellDamage { get => this[AosAttribute.SpellDamage]; + set => this[AosAttribute.SpellDamage] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int CastRecovery { get { return this[AosAttribute.CastRecovery]; } set { this[AosAttribute.CastRecovery] = value; } } + public int CastRecovery { get => this[AosAttribute.CastRecovery]; + set => this[AosAttribute.CastRecovery] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int CastSpeed { get { return this[AosAttribute.CastSpeed]; } set { this[AosAttribute.CastSpeed] = value; } } + public int CastSpeed { get => this[AosAttribute.CastSpeed]; + set => this[AosAttribute.CastSpeed] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int LowerManaCost { get { return this[AosAttribute.LowerManaCost]; } set { this[AosAttribute.LowerManaCost] = value; } } + public int LowerManaCost { get => this[AosAttribute.LowerManaCost]; + set => this[AosAttribute.LowerManaCost] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int LowerRegCost { get { return this[AosAttribute.LowerRegCost]; } set { this[AosAttribute.LowerRegCost] = value; } } + public int LowerRegCost { get => this[AosAttribute.LowerRegCost]; + set => this[AosAttribute.LowerRegCost] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ReflectPhysical { get { return this[AosAttribute.ReflectPhysical]; } set { this[AosAttribute.ReflectPhysical] = value; } } + public int ReflectPhysical { get => this[AosAttribute.ReflectPhysical]; + set => this[AosAttribute.ReflectPhysical] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int EnhancePotions { get { return this[AosAttribute.EnhancePotions]; } set { this[AosAttribute.EnhancePotions] = value; } } + public int EnhancePotions { get => this[AosAttribute.EnhancePotions]; + set => this[AosAttribute.EnhancePotions] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Luck { get { return this[AosAttribute.Luck]; } set { this[AosAttribute.Luck] = value; } } + public int Luck { get => this[AosAttribute.Luck]; + set => this[AosAttribute.Luck] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int SpellChanneling { get { return this[AosAttribute.SpellChanneling]; } set { this[AosAttribute.SpellChanneling] = value; } } + public int SpellChanneling { get => this[AosAttribute.SpellChanneling]; + set => this[AosAttribute.SpellChanneling] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int NightSight { get { return this[AosAttribute.NightSight]; } set { this[AosAttribute.NightSight] = value; } } + public int NightSight { get => this[AosAttribute.NightSight]; + set => this[AosAttribute.NightSight] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int IncreasedKarmaLoss { get { return this[AosAttribute.IncreasedKarmaLoss]; } set { this[AosAttribute.IncreasedKarmaLoss] = value; } } + public int IncreasedKarmaLoss { get => this[AosAttribute.IncreasedKarmaLoss]; + set => this[AosAttribute.IncreasedKarmaLoss] = value; + } } [Flags] @@ -541,8 +589,8 @@ namespace Server public int this[AosWeaponAttribute attribute] { - get { return GetValue( (int)attribute ); } - set { SetValue( (int)attribute, value ); } + get => GetValue( (int)attribute ); + set => SetValue( (int)attribute, value ); } public override string ToString() @@ -551,79 +599,129 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public int LowerStatReq { get { return this[AosWeaponAttribute.LowerStatReq]; } set { this[AosWeaponAttribute.LowerStatReq] = value; } } + public int LowerStatReq { get => this[AosWeaponAttribute.LowerStatReq]; + set => this[AosWeaponAttribute.LowerStatReq] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int SelfRepair { get { return this[AosWeaponAttribute.SelfRepair]; } set { this[AosWeaponAttribute.SelfRepair] = value; } } + public int SelfRepair { get => this[AosWeaponAttribute.SelfRepair]; + set => this[AosWeaponAttribute.SelfRepair] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitLeechHits { get { return this[AosWeaponAttribute.HitLeechHits]; } set { this[AosWeaponAttribute.HitLeechHits] = value; } } + public int HitLeechHits { get => this[AosWeaponAttribute.HitLeechHits]; + set => this[AosWeaponAttribute.HitLeechHits] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitLeechStam { get { return this[AosWeaponAttribute.HitLeechStam]; } set { this[AosWeaponAttribute.HitLeechStam] = value; } } + public int HitLeechStam { get => this[AosWeaponAttribute.HitLeechStam]; + set => this[AosWeaponAttribute.HitLeechStam] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitLeechMana { get { return this[AosWeaponAttribute.HitLeechMana]; } set { this[AosWeaponAttribute.HitLeechMana] = value; } } + public int HitLeechMana { get => this[AosWeaponAttribute.HitLeechMana]; + set => this[AosWeaponAttribute.HitLeechMana] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitLowerAttack { get { return this[AosWeaponAttribute.HitLowerAttack]; } set { this[AosWeaponAttribute.HitLowerAttack] = value; } } + public int HitLowerAttack { get => this[AosWeaponAttribute.HitLowerAttack]; + set => this[AosWeaponAttribute.HitLowerAttack] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitLowerDefend { get { return this[AosWeaponAttribute.HitLowerDefend]; } set { this[AosWeaponAttribute.HitLowerDefend] = value; } } + public int HitLowerDefend { get => this[AosWeaponAttribute.HitLowerDefend]; + set => this[AosWeaponAttribute.HitLowerDefend] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitMagicArrow { get { return this[AosWeaponAttribute.HitMagicArrow]; } set { this[AosWeaponAttribute.HitMagicArrow] = value; } } + public int HitMagicArrow { get => this[AosWeaponAttribute.HitMagicArrow]; + set => this[AosWeaponAttribute.HitMagicArrow] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitHarm { get { return this[AosWeaponAttribute.HitHarm]; } set { this[AosWeaponAttribute.HitHarm] = value; } } + public int HitHarm { get => this[AosWeaponAttribute.HitHarm]; + set => this[AosWeaponAttribute.HitHarm] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitFireball { get { return this[AosWeaponAttribute.HitFireball]; } set { this[AosWeaponAttribute.HitFireball] = value; } } + public int HitFireball { get => this[AosWeaponAttribute.HitFireball]; + set => this[AosWeaponAttribute.HitFireball] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitLightning { get { return this[AosWeaponAttribute.HitLightning]; } set { this[AosWeaponAttribute.HitLightning] = value; } } + public int HitLightning { get => this[AosWeaponAttribute.HitLightning]; + set => this[AosWeaponAttribute.HitLightning] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitDispel { get { return this[AosWeaponAttribute.HitDispel]; } set { this[AosWeaponAttribute.HitDispel] = value; } } + public int HitDispel { get => this[AosWeaponAttribute.HitDispel]; + set => this[AosWeaponAttribute.HitDispel] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitColdArea { get { return this[AosWeaponAttribute.HitColdArea]; } set { this[AosWeaponAttribute.HitColdArea] = value; } } + public int HitColdArea { get => this[AosWeaponAttribute.HitColdArea]; + set => this[AosWeaponAttribute.HitColdArea] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitFireArea { get { return this[AosWeaponAttribute.HitFireArea]; } set { this[AosWeaponAttribute.HitFireArea] = value; } } + public int HitFireArea { get => this[AosWeaponAttribute.HitFireArea]; + set => this[AosWeaponAttribute.HitFireArea] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitPoisonArea { get { return this[AosWeaponAttribute.HitPoisonArea]; } set { this[AosWeaponAttribute.HitPoisonArea] = value; } } + public int HitPoisonArea { get => this[AosWeaponAttribute.HitPoisonArea]; + set => this[AosWeaponAttribute.HitPoisonArea] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitEnergyArea { get { return this[AosWeaponAttribute.HitEnergyArea]; } set { this[AosWeaponAttribute.HitEnergyArea] = value; } } + public int HitEnergyArea { get => this[AosWeaponAttribute.HitEnergyArea]; + set => this[AosWeaponAttribute.HitEnergyArea] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int HitPhysicalArea { get { return this[AosWeaponAttribute.HitPhysicalArea]; } set { this[AosWeaponAttribute.HitPhysicalArea] = value; } } + public int HitPhysicalArea { get => this[AosWeaponAttribute.HitPhysicalArea]; + set => this[AosWeaponAttribute.HitPhysicalArea] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ResistPhysicalBonus { get { return this[AosWeaponAttribute.ResistPhysicalBonus]; } set { this[AosWeaponAttribute.ResistPhysicalBonus] = value; } } + public int ResistPhysicalBonus { get => this[AosWeaponAttribute.ResistPhysicalBonus]; + set => this[AosWeaponAttribute.ResistPhysicalBonus] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ResistFireBonus { get { return this[AosWeaponAttribute.ResistFireBonus]; } set { this[AosWeaponAttribute.ResistFireBonus] = value; } } + public int ResistFireBonus { get => this[AosWeaponAttribute.ResistFireBonus]; + set => this[AosWeaponAttribute.ResistFireBonus] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ResistColdBonus { get { return this[AosWeaponAttribute.ResistColdBonus]; } set { this[AosWeaponAttribute.ResistColdBonus] = value; } } + public int ResistColdBonus { get => this[AosWeaponAttribute.ResistColdBonus]; + set => this[AosWeaponAttribute.ResistColdBonus] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ResistPoisonBonus { get { return this[AosWeaponAttribute.ResistPoisonBonus]; } set { this[AosWeaponAttribute.ResistPoisonBonus] = value; } } + public int ResistPoisonBonus { get => this[AosWeaponAttribute.ResistPoisonBonus]; + set => this[AosWeaponAttribute.ResistPoisonBonus] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ResistEnergyBonus { get { return this[AosWeaponAttribute.ResistEnergyBonus]; } set { this[AosWeaponAttribute.ResistEnergyBonus] = value; } } + public int ResistEnergyBonus { get => this[AosWeaponAttribute.ResistEnergyBonus]; + set => this[AosWeaponAttribute.ResistEnergyBonus] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int UseBestSkill { get { return this[AosWeaponAttribute.UseBestSkill]; } set { this[AosWeaponAttribute.UseBestSkill] = value; } } + public int UseBestSkill { get => this[AosWeaponAttribute.UseBestSkill]; + set => this[AosWeaponAttribute.UseBestSkill] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int MageWeapon { get { return this[AosWeaponAttribute.MageWeapon]; } set { this[AosWeaponAttribute.MageWeapon] = value; } } + public int MageWeapon { get => this[AosWeaponAttribute.MageWeapon]; + set => this[AosWeaponAttribute.MageWeapon] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int DurabilityBonus { get { return this[AosWeaponAttribute.DurabilityBonus]; } set { this[AosWeaponAttribute.DurabilityBonus] = value; } } + public int DurabilityBonus { get => this[AosWeaponAttribute.DurabilityBonus]; + set => this[AosWeaponAttribute.DurabilityBonus] = value; + } } [Flags] @@ -685,8 +783,8 @@ namespace Server public int this[AosArmorAttribute attribute] { - get { return GetValue( (int)attribute ); } - set { SetValue( (int)attribute, value ); } + get => GetValue( (int)attribute ); + set => SetValue( (int)attribute, value ); } public override string ToString() @@ -695,16 +793,24 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public int LowerStatReq { get { return this[AosArmorAttribute.LowerStatReq]; } set { this[AosArmorAttribute.LowerStatReq] = value; } } + public int LowerStatReq { get => this[AosArmorAttribute.LowerStatReq]; + set => this[AosArmorAttribute.LowerStatReq] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int SelfRepair { get { return this[AosArmorAttribute.SelfRepair]; } set { this[AosArmorAttribute.SelfRepair] = value; } } + public int SelfRepair { get => this[AosArmorAttribute.SelfRepair]; + set => this[AosArmorAttribute.SelfRepair] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int MageArmor { get { return this[AosArmorAttribute.MageArmor]; } set { this[AosArmorAttribute.MageArmor] = value; } } + public int MageArmor { get => this[AosArmorAttribute.MageArmor]; + set => this[AosArmorAttribute.MageArmor] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int DurabilityBonus { get { return this[AosArmorAttribute.DurabilityBonus]; } set { this[AosArmorAttribute.DurabilityBonus] = value; } } + public int DurabilityBonus { get => this[AosArmorAttribute.DurabilityBonus]; + set => this[AosArmorAttribute.DurabilityBonus] = value; + } } public sealed class AosSkillBonuses : BaseAttributes @@ -911,34 +1017,54 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] - public double Skill_1_Value { get { return GetBonus( 0 ); } set { SetBonus( 0, value ); } } + public double Skill_1_Value { get => GetBonus( 0 ); + set => SetBonus( 0, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public SkillName Skill_1_Name { get { return GetSkill( 0 ); } set { SetSkill( 0, value ); } } + public SkillName Skill_1_Name { get => GetSkill( 0 ); + set => SetSkill( 0, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public double Skill_2_Value { get { return GetBonus( 1 ); } set { SetBonus( 1, value ); } } + public double Skill_2_Value { get => GetBonus( 1 ); + set => SetBonus( 1, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public SkillName Skill_2_Name { get { return GetSkill( 1 ); } set { SetSkill( 1, value ); } } + public SkillName Skill_2_Name { get => GetSkill( 1 ); + set => SetSkill( 1, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public double Skill_3_Value { get { return GetBonus( 2 ); } set { SetBonus( 2, value ); } } + public double Skill_3_Value { get => GetBonus( 2 ); + set => SetBonus( 2, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public SkillName Skill_3_Name { get { return GetSkill( 2 ); } set { SetSkill( 2, value ); } } + public SkillName Skill_3_Name { get => GetSkill( 2 ); + set => SetSkill( 2, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public double Skill_4_Value { get { return GetBonus( 3 ); } set { SetBonus( 3, value ); } } + public double Skill_4_Value { get => GetBonus( 3 ); + set => SetBonus( 3, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public SkillName Skill_4_Name { get { return GetSkill( 3 ); } set { SetSkill( 3, value ); } } + public SkillName Skill_4_Name { get => GetSkill( 3 ); + set => SetSkill( 3, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public double Skill_5_Value { get { return GetBonus( 4 ); } set { SetBonus( 4, value ); } } + public double Skill_5_Value { get => GetBonus( 4 ); + set => SetBonus( 4, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public SkillName Skill_5_Name { get { return GetSkill( 4 ); } set { SetSkill( 4, value ); } } + public SkillName Skill_5_Name { get => GetSkill( 4 ); + set => SetSkill( 4, value ); + } } [Flags] @@ -972,8 +1098,8 @@ namespace Server public int this[AosElementAttribute attribute] { - get { return GetValue( (int)attribute ); } - set { SetValue( (int)attribute, value ); } + get => GetValue( (int)attribute ); + set => SetValue( (int)attribute, value ); } public override string ToString() @@ -982,25 +1108,39 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public int Physical { get { return this[AosElementAttribute.Physical]; } set { this[AosElementAttribute.Physical] = value; } } + public int Physical { get => this[AosElementAttribute.Physical]; + set => this[AosElementAttribute.Physical] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Fire { get { return this[AosElementAttribute.Fire]; } set { this[AosElementAttribute.Fire] = value; } } + public int Fire { get => this[AosElementAttribute.Fire]; + set => this[AosElementAttribute.Fire] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Cold { get { return this[AosElementAttribute.Cold]; } set { this[AosElementAttribute.Cold] = value; } } + public int Cold { get => this[AosElementAttribute.Cold]; + set => this[AosElementAttribute.Cold] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Poison { get { return this[AosElementAttribute.Poison]; } set { this[AosElementAttribute.Poison] = value; } } + public int Poison { get => this[AosElementAttribute.Poison]; + set => this[AosElementAttribute.Poison] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Energy { get { return this[AosElementAttribute.Energy]; } set { this[AosElementAttribute.Energy] = value; } } + public int Energy { get => this[AosElementAttribute.Energy]; + set => this[AosElementAttribute.Energy] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Chaos { get { return this[AosElementAttribute.Chaos]; } set { this[AosElementAttribute.Chaos] = value; } } + public int Chaos { get => this[AosElementAttribute.Chaos]; + set => this[AosElementAttribute.Chaos] = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Direct { get { return this[AosElementAttribute.Direct]; } set { this[AosElementAttribute.Direct] = value; } } + public int Direct { get => this[AosElementAttribute.Direct]; + set => this[AosElementAttribute.Direct] = value; + } } [PropertyObject] @@ -1012,7 +1152,7 @@ namespace Server private static int[] m_Empty = new int[0]; - public bool IsEmpty { get { return (m_Names == 0); } } + public bool IsEmpty => (m_Names == 0); public Item Owner => m_Owner; public BaseAttributes( Item owner ) diff --git a/Scripts/Misc/AutoRestart.cs b/Scripts/Misc/AutoRestart.cs index bb0f403ab..e51ecabc1 100644 --- a/Scripts/Misc/AutoRestart.cs +++ b/Scripts/Misc/AutoRestart.cs @@ -15,10 +15,7 @@ namespace Server.Misc private static bool m_Restarting; private static DateTime m_RestartTime; - public static bool Restarting - { - get{ return m_Restarting; } - } + public static bool Restarting => m_Restarting; public static void Initialize() { diff --git a/Scripts/Misc/AutoSave.cs b/Scripts/Misc/AutoSave.cs index 42ed85314..35f809d41 100644 --- a/Scripts/Misc/AutoSave.cs +++ b/Scripts/Misc/AutoSave.cs @@ -20,8 +20,8 @@ namespace Server.Misc public static bool SavesEnabled { - get{ return m_SavesEnabled; } - set{ m_SavesEnabled = value; } + get => m_SavesEnabled; + set => m_SavesEnabled = value; } [Usage( "SetSaves " )] diff --git a/Scripts/Misc/ClientVerification.cs b/Scripts/Misc/ClientVerification.cs index 0d5e887d0..c8dbf4ff7 100644 --- a/Scripts/Misc/ClientVerification.cs +++ b/Scripts/Misc/ClientVerification.cs @@ -31,62 +31,32 @@ namespace Server.Misc public static ClientVersion Required { - get - { - return m_Required; - } - set - { - m_Required = value; - } + get => m_Required; + set => m_Required = value; } public static bool AllowRegular { - get - { - return m_AllowRegular; - } - set - { - m_AllowRegular = value; - } + get => m_AllowRegular; + set => m_AllowRegular = value; } public static bool AllowUOTD { - get - { - return m_AllowUOTD; - } - set - { - m_AllowUOTD = value; - } + get => m_AllowUOTD; + set => m_AllowUOTD = value; } public static bool AllowGod { - get - { - return m_AllowGod; - } - set - { - m_AllowGod = value; - } + get => m_AllowGod; + set => m_AllowGod = value; } public static TimeSpan KickDelay { - get - { - return m_KickDelay; - } - set - { - m_KickDelay = value; - } + get => m_KickDelay; + set => m_KickDelay = value; } public static void Initialize() diff --git a/Scripts/Misc/Emitter.cs b/Scripts/Misc/Emitter.cs index 4139a84eb..976f8771e 100644 --- a/Scripts/Misc/Emitter.cs +++ b/Scripts/Misc/Emitter.cs @@ -63,15 +63,9 @@ namespace Server private Type[] m_ArgumentTypes; - public TypeBuilder Type - { - get { return m_TypeBuilder; } - } + public TypeBuilder Type => m_TypeBuilder; - public ILGenerator Generator - { - get { return m_Generator; } - } + public ILGenerator Generator => m_Generator; private class CallInfo { @@ -95,10 +89,7 @@ namespace Server private Dictionary> m_Temps; - public MethodBuilder Method - { - get { return m_Builder; } - } + public MethodBuilder Method => m_Builder; public MethodEmitter( TypeBuilder typeBuilder ) { @@ -464,10 +455,7 @@ namespace Server m_Generator.Emit( OpCodes.Xor ); } - public Type Active - { - get { return m_Stack.Peek(); } - } + public Type Active => m_Stack.Peek(); public void Chain( Property prop ) { diff --git a/Scripts/Misc/Geometry.cs b/Scripts/Misc/Geometry.cs index 3031c4519..a722677ba 100644 --- a/Scripts/Misc/Geometry.cs +++ b/Scripts/Misc/Geometry.cs @@ -29,10 +29,10 @@ namespace Server.Misc private int angle; private int quadrant; - public Point2D Point{ get{ return point; } } - public int Angle{ get{ return angle; } } - public int Quadrant{ get{ return quadrant; } } - + public Point2D Point => point; + public int Angle => angle; + public int Quadrant => quadrant; + public CirclePoint( Point2D point, int angle, int quadrant ) { this.point = point; diff --git a/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs b/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs index 9bfc16910..d1cb42008 100644 --- a/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs +++ b/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs @@ -28,7 +28,9 @@ namespace Server.Items private string m_Dipper; [CommandProperty( AccessLevel.GameMaster )] - public string Dipper{ get{ return m_Dipper; } set{ m_Dipper = value; } } + public string Dipper{ get => m_Dipper; + set => m_Dipper = value; + } [Constructible] public LightOfTheWinterSolstice() : this( m_StaffNames[Utility.Random( m_StaffNames.Length )] ) diff --git a/Scripts/Misc/Gifts/Winter2004/Mistletoe.cs b/Scripts/Misc/Gifts/Winter2004/Mistletoe.cs index de55e87eb..1ceb7a429 100644 --- a/Scripts/Misc/Gifts/Winter2004/Mistletoe.cs +++ b/Scripts/Misc/Gifts/Winter2004/Mistletoe.cs @@ -74,10 +74,7 @@ namespace Server.Items } } - public Item Deed - { - get{ return new MistletoeDeed( this.Hue ); } - } + public Item Deed => new MistletoeDeed( this.Hue ); public override void OnDoubleClick( Mobile from ) { diff --git a/Scripts/Misc/Guild.cs b/Scripts/Misc/Guild.cs index d0b7265bf..5956a3ac9 100644 --- a/Scripts/Misc/Guild.cs +++ b/Scripts/Misc/Guild.cs @@ -39,17 +39,17 @@ namespace Server.Guilds new RankDefinition( 1062960, 3, RankFlags.Member | RankFlags.ControlWarStatus ), //Warlord new RankDefinition( 1062959, 4, RankFlags.All ) //Leader }; - public static RankDefinition Leader{ get{ return Ranks[4]; } } - public static RankDefinition Member{ get{ return Ranks[1]; } } - public static RankDefinition Lowest{ get{ return Ranks[0]; } } + public static RankDefinition Leader => Ranks[4]; + public static RankDefinition Member => Ranks[1]; + public static RankDefinition Lowest => Ranks[0]; private TextDefinition m_Name; private int m_Rank; private RankFlags m_Flags; - public TextDefinition Name{ get{ return m_Name; } } - public int Rank{ get{ return m_Rank; } } - public RankFlags Flags{ get{ return m_Flags; } } + public TextDefinition Name => m_Name; + public int Rank => m_Rank; + public RankFlags Flags => m_Flags; public RankDefinition( TextDefinition name, int rank, RankFlags flags ) { @@ -79,20 +79,14 @@ namespace Server.Guilds { private static Dictionary m_Alliances = new Dictionary(); - public static Dictionary Alliances - { - get{ return m_Alliances; } - } + public static Dictionary Alliances => m_Alliances; private string m_Name; private Guild m_Leader; private List m_Members; private List m_PendingMembers; - public string Name - { - get{ return m_Name; } - } + public string Name => m_Name; public void CalculateAllianceLeader() { @@ -374,7 +368,7 @@ namespace Server.Guilds public class AllianceRosterGump : GuildDiplomacyGump { - protected override bool AllowAdvancedSearch{ get{ return false; } } + protected override bool AllowAdvancedSearch => false; private AllianceInfo m_Alliance; @@ -427,36 +421,32 @@ namespace Server.Guilds public int Kills { - get{ return m_Kills; } - set{ m_Kills = value; } + get => m_Kills; + set => m_Kills = value; } public int MaxKills { - get{ return m_MaxKills; } - set{ m_MaxKills = value; } + get => m_MaxKills; + set => m_MaxKills = value; } public TimeSpan WarLength { - get{ return m_WarLength; } - set{ m_WarLength = value; } - } - public Guild Opponent - { - get{ return m_Opponent; } - } - public Guild Guild - { - get{ return m_Guild; } + get => m_WarLength; + set => m_WarLength = value; } + public Guild Opponent => m_Opponent; + + public Guild Guild => m_Guild; + public DateTime WarBeginning { - get{ return m_WarBeginning; } - set{ m_WarBeginning = value; } + get => m_WarBeginning; + set => m_WarBeginning = value; } public bool WarRequester { - get{ return m_WarRequester; } - set{ m_WarRequester = value; } + get => m_WarRequester; + set => m_WarRequester = value; } public WarDeclaration( Guild g, Guild opponent, int maxKills, TimeSpan warLength, bool warRequester ) @@ -673,8 +663,8 @@ namespace Server.Guilds } #endregion - public static bool NewGuildSystem{ get{ return Core.SE; } } - public static bool OrderChaos{ get{ return !Core.SE; } } + public static bool NewGuildSystem => Core.SE; + public static bool OrderChaos => !Core.SE; public static readonly int RegistrationFee = 25000; public static readonly int AbbrevLimit = 4; @@ -721,40 +711,16 @@ namespace Server.Guilds } [CommandProperty( AccessLevel.Counselor )] - public string AllianceName - { - get - { - return Alliance?.Name; - } - } + public string AllianceName => Alliance?.Name; [CommandProperty( AccessLevel.Counselor )] - public Guild AllianceLeader - { - get - { - return Alliance?.Leader; - } - } + public Guild AllianceLeader => Alliance?.Leader; [CommandProperty( AccessLevel.Counselor )] - public bool IsAllianceMember - { - get - { - return Alliance?.IsMember( this ) == true; - } - } + public bool IsAllianceMember => Alliance?.IsMember( this ) == true; [CommandProperty( AccessLevel.Counselor )] - public bool IsAlliancePendingMember - { - get - { - return Alliance?.IsPendingMember( this ) == true; - } - } + public bool IsAlliancePendingMember => Alliance?.IsPendingMember( this ) == true; public static Guild GetAllianceLeader( Guild g ) { @@ -770,14 +736,9 @@ namespace Server.Guilds #region New Wars - public List PendingWars - { - get{ return m_PendingWars; } - } - public List AcceptedWars - { - get{ return m_AcceptedWars; } - } + public List PendingWars => m_PendingWars; + + public List AcceptedWars => m_AcceptedWars; public WarDeclaration FindPendingWar( Guild g ) @@ -1047,13 +1008,7 @@ namespace Server.Guilds } - public override bool Disbanded - { - get - { - return ( m_Leader == null || m_Leader.Deleted ); - } - } + public override bool Disbanded => ( m_Leader == null || m_Leader.Deleted ); public override void OnDelete( Mobile mob ) { @@ -1600,36 +1555,21 @@ namespace Server.Guilds [CommandProperty( AccessLevel.GameMaster )] public Item Guildstone { - get - { - return m_Guildstone; - } - set - { - m_Guildstone = value; - } + get => m_Guildstone; + set => m_Guildstone = value; } [CommandProperty( AccessLevel.GameMaster )] public Item Teleporter { - get - { - return m_Teleporter; - } - set - { - m_Teleporter = value; - } + get => m_Teleporter; + set => m_Teleporter = value; } [CommandProperty( AccessLevel.GameMaster )] public override string Name { - get - { - return m_Name; - } + get => m_Name; set { m_Name = value; @@ -1643,23 +1583,14 @@ namespace Server.Guilds [CommandProperty( AccessLevel.GameMaster )] public string Website { - get - { - return m_Website; - } - set - { - m_Website = value; - } + get => m_Website; + set => m_Website = value; } [CommandProperty( AccessLevel.GameMaster )] public override string Abbreviation { - get - { - return m_Abbreviation; - } + get => m_Abbreviation; set { m_Abbreviation = value; @@ -1673,23 +1604,14 @@ namespace Server.Guilds [CommandProperty( AccessLevel.GameMaster )] public string Charter { - get - { - return m_Charter; - } - set - { - m_Charter = value; - } + get => m_Charter; + set => m_Charter = value; } [CommandProperty( AccessLevel.GameMaster )] public override GuildType Type { - get - { - return OrderChaos ? m_Type : GuildType.Regular; - } + get => OrderChaos ? m_Type : GuildType.Regular; set { if ( m_Type != value ) @@ -1705,96 +1627,31 @@ namespace Server.Guilds [CommandProperty( AccessLevel.GameMaster )] public DateTime LastFealty { - get - { - return m_LastFealty; - } - set - { - m_LastFealty = value; - } + get => m_LastFealty; + set => m_LastFealty = value; } [CommandProperty( AccessLevel.GameMaster )] - public DateTime TypeLastChange - { - get - { - return m_TypeLastChange; - } - } + public DateTime TypeLastChange => m_TypeLastChange; - public List Allies - { - get - { - return m_Allies; - } - } + public List Allies => m_Allies; - public List Enemies - { - get - { - return m_Enemies; - } - } + public List Enemies => m_Enemies; - public List AllyDeclarations - { - get - { - return m_AllyDeclarations; - } - } + public List AllyDeclarations => m_AllyDeclarations; - public List AllyInvitations - { - get - { - return m_AllyInvitations; - } - } + public List AllyInvitations => m_AllyInvitations; - public List WarDeclarations - { - get - { - return m_WarDeclarations; - } - } + public List WarDeclarations => m_WarDeclarations; - public List WarInvitations - { - get - { - return m_WarInvitations; - } - } + public List WarInvitations => m_WarInvitations; - public List Candidates - { - get - { - return m_Candidates; - } - } + public List Candidates => m_Candidates; - public List Accepted - { - get - { - return m_Accepted; - } - } + public List Accepted => m_Accepted; + + public List Members => m_Members; - public List Members - { - get - { - return m_Members; - } - } #endregion } } diff --git a/Scripts/Misc/HardwareInfo.cs b/Scripts/Misc/HardwareInfo.cs index 68d4a9110..b27ffcde9 100644 --- a/Scripts/Misc/HardwareInfo.cs +++ b/Scripts/Misc/HardwareInfo.cs @@ -22,81 +22,81 @@ namespace Server private DateTime m_TimeReceived; [CommandProperty( AccessLevel.GameMaster )] - public int CpuModel{ get{ return m_CpuModel; } } + public int CpuModel => m_CpuModel; [CommandProperty( AccessLevel.GameMaster )] - public int CpuClockSpeed{ get{ return m_CpuClockSpeed; } } + public int CpuClockSpeed => m_CpuClockSpeed; [CommandProperty( AccessLevel.GameMaster )] - public int CpuQuantity{ get{ return m_CpuQuantity; } } + public int CpuQuantity => m_CpuQuantity; [CommandProperty( AccessLevel.GameMaster )] - public int OSMajor{ get{ return m_OSMajor; } } + public int OSMajor => m_OSMajor; [CommandProperty( AccessLevel.GameMaster )] - public int OSMinor{ get{ return m_OSMinor; } } + public int OSMinor => m_OSMinor; [CommandProperty( AccessLevel.GameMaster )] - public int OSRevision{ get{ return m_OSRevision; } } + public int OSRevision => m_OSRevision; [CommandProperty( AccessLevel.GameMaster )] - public int InstanceID{ get{ return m_InstanceID; } } + public int InstanceID => m_InstanceID; [CommandProperty( AccessLevel.GameMaster )] - public int ScreenWidth{ get{ return m_ScreenWidth; } } + public int ScreenWidth => m_ScreenWidth; [CommandProperty( AccessLevel.GameMaster )] - public int ScreenHeight{ get{ return m_ScreenHeight; } } + public int ScreenHeight => m_ScreenHeight; [CommandProperty( AccessLevel.GameMaster )] - public int ScreenDepth{ get{ return m_ScreenDepth; } } + public int ScreenDepth => m_ScreenDepth; [CommandProperty( AccessLevel.GameMaster )] - public int PhysicalMemory{ get{ return m_PhysicalMemory; } } + public int PhysicalMemory => m_PhysicalMemory; [CommandProperty( AccessLevel.GameMaster )] - public int CpuManufacturer{ get{ return m_CpuManufacturer; } } + public int CpuManufacturer => m_CpuManufacturer; [CommandProperty( AccessLevel.GameMaster )] - public int CpuFamily{ get{ return m_CpuFamily; } } + public int CpuFamily => m_CpuFamily; [CommandProperty( AccessLevel.GameMaster )] - public int VCVendorID{ get{ return m_VCVendorID; } } + public int VCVendorID => m_VCVendorID; [CommandProperty( AccessLevel.GameMaster )] - public int VCDeviceID{ get{ return m_VCDeviceID; } } + public int VCDeviceID => m_VCDeviceID; [CommandProperty( AccessLevel.GameMaster )] - public int VCMemory{ get{ return m_VCMemory; } } + public int VCMemory => m_VCMemory; [CommandProperty( AccessLevel.GameMaster )] - public int DXMajor{ get{ return m_DXMajor; } } + public int DXMajor => m_DXMajor; [CommandProperty( AccessLevel.GameMaster )] - public int DXMinor{ get{ return m_DXMinor; } } + public int DXMinor => m_DXMinor; [CommandProperty( AccessLevel.GameMaster )] - public string VCDescription{ get{ return m_VCDescription; } } + public string VCDescription => m_VCDescription; [CommandProperty( AccessLevel.GameMaster )] - public string Language{ get{ return m_Language; } } + public string Language => m_Language; [CommandProperty( AccessLevel.GameMaster )] - public int Distribution{ get{ return m_Distribution; } } + public int Distribution => m_Distribution; [CommandProperty( AccessLevel.GameMaster )] - public int ClientsRunning{ get{ return m_ClientsRunning; } } + public int ClientsRunning => m_ClientsRunning; [CommandProperty( AccessLevel.GameMaster )] - public int ClientsInstalled{ get{ return m_ClientsInstalled; } } + public int ClientsInstalled => m_ClientsInstalled; [CommandProperty( AccessLevel.GameMaster )] - public int PartialInstalled{ get{ return m_PartialInstalled; } } + public int PartialInstalled => m_PartialInstalled; [CommandProperty( AccessLevel.GameMaster )] - public string Unknown{ get{ return m_Unknown; } } + public string Unknown => m_Unknown; - [CommandProperty( AccessLevel.GameMaster )] + [CommandProperty( AccessLevel.GameMaster )] public DateTime TimeReceived => m_TimeReceived; public static void Initialize() diff --git a/Scripts/Misc/InhumanSpeech.cs b/Scripts/Misc/InhumanSpeech.cs index dfb656dd6..2b43646b8 100644 --- a/Scripts/Misc/InhumanSpeech.cs +++ b/Scripts/Misc/InhumanSpeech.cs @@ -287,13 +287,13 @@ namespace Server.Misc public string[] Syllables { - get{ return m_Syllables; } - set{ m_Syllables = value; } + get => m_Syllables; + set => m_Syllables = value; } public string[] Keywords { - get{ return m_Keywords; } + get => m_Keywords; set { m_Keywords = value; @@ -305,26 +305,26 @@ namespace Server.Misc public string[] Responses { - get{ return m_Responses; } - set{ m_Responses = value; } + get => m_Responses; + set => m_Responses = value; } public int Hue { - get{ return m_Hue; } - set{ m_Hue = value; } + get => m_Hue; + set => m_Hue = value; } public int Sound { - get{ return m_Sound; } - set{ m_Sound = value; } + get => m_Sound; + set => m_Sound = value; } public IHSFlags Flags { - get{ return m_Flags; } - set{ m_Flags = value; } + get => m_Flags; + set => m_Flags = value; } public string GetRandomSyllable() diff --git a/Scripts/Misc/LanguageStatistics.cs b/Scripts/Misc/LanguageStatistics.cs index e07c5a1a3..120186968 100644 --- a/Scripts/Misc/LanguageStatistics.cs +++ b/Scripts/Misc/LanguageStatistics.cs @@ -33,11 +33,11 @@ namespace Server.Misc string m_Country_LocalName; bool m_HasLocalInfo; - public string Code{ get{ return m_Code; } } - public string Language{ get{ return m_Language; } } - public string Country{ get{ return m_Country; } } - public string Language_LocalName{ get{ return m_Language_LocalName; } } - public string Country_LocalName{ get{ return m_Country_LocalName; } } + public string Code => m_Code; + public string Language => m_Language; + public string Country => m_Country; + public string Language_LocalName => m_Language_LocalName; + public string Country_LocalName => m_Country_LocalName; public InternationalCode( string code, string language, string country ) : this( code, language, country, null, null ) { @@ -316,8 +316,8 @@ namespace Server.Misc private string m_Code; private int m_Count; - public string Code{ get{ return m_Code; } } - public int Count{ get{ return m_Count; } } + public string Code => m_Code; + public int Count => m_Count; public InternationalCodeCounter( string code ) { diff --git a/Scripts/Misc/LightCycle.cs b/Scripts/Misc/LightCycle.cs index 720f2c17b..efba55b8d 100644 --- a/Scripts/Misc/LightCycle.cs +++ b/Scripts/Misc/LightCycle.cs @@ -15,7 +15,7 @@ namespace Server public static int LevelOverride { - get{ return m_LevelOverride; } + get => m_LevelOverride; set { m_LevelOverride = value; diff --git a/Scripts/Misc/Loot.cs b/Scripts/Misc/Loot.cs index eea684b99..dc104334e 100644 --- a/Scripts/Misc/Loot.cs +++ b/Scripts/Misc/Loot.cs @@ -16,15 +16,15 @@ namespace Server typeof( WildStaff ) }; - public static Type[] MLWeaponTypes{ get{ return m_MLWeaponTypes; } } - + public static Type[] MLWeaponTypes => m_MLWeaponTypes; + private static Type[] m_MLRangedWeaponTypes = new Type[] { typeof( ElvenCompositeLongbow ), typeof( MagicalShortbow ) }; - public static Type[] MLRangedWeaponTypes{ get{ return m_MLRangedWeaponTypes; } } - + public static Type[] MLRangedWeaponTypes => m_MLRangedWeaponTypes; + private static Type[] m_MLArmorTypes = new Type[] { typeof( Circlet ), typeof( GemmedCirclet ), typeof( LeafTonlet ), @@ -37,7 +37,7 @@ namespace Server typeof( HidePauldrons ) }; - public static Type[] MLArmorTypes{ get{ return m_MLArmorTypes; } } + public static Type[] MLArmorTypes => m_MLArmorTypes; private static Type[] m_MLClothingTypes = new Type[] { @@ -46,7 +46,8 @@ namespace Server typeof( VultureHelm ), typeof( WoodlandBelt ) }; - public static Type[] MLClothingTypes{ get{ return m_MLClothingTypes; } } + public static Type[] MLClothingTypes => m_MLClothingTypes; + #endregion private static Type[] m_SEWeaponTypes = new Type[] @@ -57,7 +58,7 @@ namespace Server typeof( Tetsubo ), typeof( Wakizashi ) }; - public static Type[] SEWeaponTypes{ get{ return m_SEWeaponTypes; } } + public static Type[] SEWeaponTypes => m_SEWeaponTypes; private static Type[] m_AosWeaponTypes = new Type[] { @@ -66,7 +67,7 @@ namespace Server typeof( Lance ), typeof( CrescentBlade ) }; - public static Type[] AosWeaponTypes{ get{ return m_AosWeaponTypes; } } + public static Type[] AosWeaponTypes => m_AosWeaponTypes; private static Type[] m_WeaponTypes = new Type[] { @@ -84,28 +85,28 @@ namespace Server typeof( Dagger ), typeof( SkinningKnife ), typeof( ShepherdsCrook ) }; - public static Type[] WeaponTypes{ get{ return m_WeaponTypes; } } + public static Type[] WeaponTypes => m_WeaponTypes; private static Type[] m_SERangedWeaponTypes = new Type[] { typeof( Yumi ) }; - public static Type[] SERangedWeaponTypes{ get{ return m_SERangedWeaponTypes; } } + public static Type[] SERangedWeaponTypes => m_SERangedWeaponTypes; private static Type[] m_AosRangedWeaponTypes = new Type[] { typeof( CompositeBow ), typeof( RepeatingCrossbow ) }; - public static Type[] AosRangedWeaponTypes{ get{ return m_AosRangedWeaponTypes; } } + public static Type[] AosRangedWeaponTypes => m_AosRangedWeaponTypes; private static Type[] m_RangedWeaponTypes = new Type[] { typeof( Bow ), typeof( Crossbow ), typeof( HeavyCrossbow ) }; - public static Type[] RangedWeaponTypes{ get{ return m_RangedWeaponTypes; } } + public static Type[] RangedWeaponTypes => m_RangedWeaponTypes; private static Type[] m_SEArmorTypes = new Type[] { @@ -121,7 +122,7 @@ namespace Server typeof( StuddedSuneate ) }; - public static Type[] SEArmorTypes{ get{ return m_SEArmorTypes; } } + public static Type[] SEArmorTypes => m_SEArmorTypes; private static Type[] m_ArmorTypes = new Type[] { @@ -141,14 +142,14 @@ namespace Server typeof( StuddedGorget ), typeof( StuddedLegs ) }; - public static Type[] ArmorTypes{ get{ return m_ArmorTypes; } } + public static Type[] ArmorTypes => m_ArmorTypes; private static Type[] m_AosShieldTypes = new Type[] { typeof( ChaosShield ), typeof( OrderShield ) }; - public static Type[] AosShieldTypes{ get{ return m_AosShieldTypes; } } + public static Type[] AosShieldTypes => m_AosShieldTypes; private static Type[] m_ShieldTypes = new Type[] { @@ -157,7 +158,7 @@ namespace Server typeof( WoodenShield ) }; - public static Type[] ShieldTypes{ get{ return m_ShieldTypes; } } + public static Type[] ShieldTypes => m_ShieldTypes; private static Type[] m_GemTypes = new Type[] { @@ -166,7 +167,7 @@ namespace Server typeof( Sapphire ), typeof( StarSapphire ), typeof( Tourmaline ) }; - public static Type[] GemTypes{ get{ return m_GemTypes; } } + public static Type[] GemTypes => m_GemTypes; private static Type[] m_JewelryTypes = new Type[] { @@ -174,7 +175,7 @@ namespace Server typeof( SilverRing ), typeof( SilverBracelet ) }; - public static Type[] JewelryTypes{ get{ return m_JewelryTypes; } } + public static Type[] JewelryTypes => m_JewelryTypes; private static Type[] m_RegTypes = new Type[] { @@ -183,7 +184,7 @@ namespace Server typeof( SulfurousAsh ), typeof( SpidersSilk ) }; - public static Type[] RegTypes{ get{ return m_RegTypes; } } + public static Type[] RegTypes => m_RegTypes; private static Type[] m_NecroRegTypes = new Type[] { @@ -191,7 +192,7 @@ namespace Server typeof( NoxCrystal ), typeof( PigIron ) }; - public static Type[] NecroRegTypes{ get{ return m_NecroRegTypes; } } + public static Type[] NecroRegTypes => m_NecroRegTypes; private static Type[] m_PotionTypes = new Type[] { @@ -199,14 +200,14 @@ namespace Server typeof( LesserCurePotion ), typeof( LesserHealPotion ), typeof( LesserPoisonPotion ) }; - public static Type[] PotionTypes{ get{ return m_PotionTypes; } } + public static Type[] PotionTypes => m_PotionTypes; private static Type[] m_SEInstrumentTypes = new Type[] { typeof( BambooFlute ) }; - public static Type[] SEInstrumentTypes{ get{ return m_SEInstrumentTypes; } } + public static Type[] SEInstrumentTypes => m_SEInstrumentTypes; private static Type[] m_InstrumentTypes = new Type[] { @@ -214,7 +215,7 @@ namespace Server typeof( Lute ), typeof( Tambourine ), typeof( TambourineTassel ) }; - public static Type[] InstrumentTypes{ get{ return m_InstrumentTypes; } } + public static Type[] InstrumentTypes => m_InstrumentTypes; private static Type[] m_StatueTypes = new Type[] { @@ -223,7 +224,7 @@ namespace Server typeof( StatueSouthEast ), typeof( BustSouth ), typeof( BustEast ) }; - public static Type[] StatueTypes{ get{ return m_StatueTypes; } } + public static Type[] StatueTypes => m_StatueTypes; private static Type[] m_RegularScrollTypes = new Type[] { @@ -274,12 +275,14 @@ namespace Server }; #endregion - public static Type[] RegularScrollTypes{ get{ return m_RegularScrollTypes; } } - public static Type[] NecromancyScrollTypes{ get{ return m_NecromancyScrollTypes; } } - public static Type[] SENecromancyScrollTypes{ get{ return m_SENecromancyScrollTypes; } } - public static Type[] PaladinScrollTypes{ get{ return m_PaladinScrollTypes; } } + public static Type[] RegularScrollTypes => m_RegularScrollTypes; + public static Type[] NecromancyScrollTypes => m_NecromancyScrollTypes; + public static Type[] SENecromancyScrollTypes => m_SENecromancyScrollTypes; + public static Type[] PaladinScrollTypes => m_PaladinScrollTypes; + #region Mondain's Legacy - public static Type[] ArcanistScrollTypes{ get{ return m_ArcanistScrollTypes; } } + public static Type[] ArcanistScrollTypes => m_ArcanistScrollTypes; + #endregion private static Type[] m_GrimmochJournalTypes = new Type[] @@ -289,7 +292,7 @@ namespace Server typeof( GrimmochJournal14 ), typeof( GrimmochJournal17 ), typeof( GrimmochJournal23 ) }; - public static Type[] GrimmochJournalTypes{ get{ return m_GrimmochJournalTypes; } } + public static Type[] GrimmochJournalTypes => m_GrimmochJournalTypes; private static Type[] m_LysanderNotebookTypes = new Type[] { @@ -297,7 +300,7 @@ namespace Server typeof( LysanderNotebook7 ), typeof( LysanderNotebook8 ), typeof( LysanderNotebook11 ) }; - public static Type[] LysanderNotebookTypes{ get{ return m_LysanderNotebookTypes; } } + public static Type[] LysanderNotebookTypes => m_LysanderNotebookTypes; private static Type[] m_TavarasJournalTypes = new Type[] { @@ -308,7 +311,7 @@ namespace Server typeof( TavarasJournal19 ) }; - public static Type[] TavarasJournalTypes{ get{ return m_TavarasJournalTypes; } } + public static Type[] TavarasJournalTypes => m_TavarasJournalTypes; private static Type[] m_NewWandTypes = new Type[] @@ -316,20 +319,20 @@ namespace Server typeof( FireballWand ), typeof( LightningWand ), typeof( MagicArrowWand ), typeof( GreaterHealWand ), typeof( HarmWand ), typeof( HealWand ) }; - public static Type[] NewWandTypes{ get{ return m_NewWandTypes; } } + public static Type[] NewWandTypes => m_NewWandTypes; private static Type[] m_WandTypes = new Type[] { typeof( ClumsyWand ), typeof( FeebleWand ), typeof( ManaDrainWand ), typeof( WeaknessWand ) }; - public static Type[] WandTypes{ get{ return m_WandTypes; } } - + public static Type[] WandTypes => m_WandTypes; + private static Type[] m_OldWandTypes = new Type[] { typeof( IDWand ) }; - public static Type[] OldWandTypes{ get{ return m_OldWandTypes; } } + public static Type[] OldWandTypes => m_OldWandTypes; private static Type[] m_SEClothingTypes = new Type[] { @@ -339,7 +342,7 @@ namespace Server typeof( SamuraiTabi ), typeof( TattsukeHakama ), typeof( Waraji ) }; - public static Type[] SEClothingTypes{ get{ return m_SEClothingTypes; } } + public static Type[] SEClothingTypes => m_SEClothingTypes; private static Type[] m_AosClothingTypes = new Type[] { @@ -347,7 +350,7 @@ namespace Server typeof( GildedDress ), typeof( FurBoots ), typeof( FormalShirt ), }; - public static Type[] AosClothingTypes{ get{ return m_AosClothingTypes; } } + public static Type[] AosClothingTypes => m_AosClothingTypes; private static Type[] m_ClothingTypes = new Type[] { @@ -364,21 +367,21 @@ namespace Server typeof( PlainDress ), typeof( Robe ), typeof( ShortPants ), typeof( HalfApron ) }; - public static Type[] ClothingTypes{ get{ return m_ClothingTypes; } } + public static Type[] ClothingTypes => m_ClothingTypes; private static Type[] m_SEHatTypes = new Type[] { typeof( ClothNinjaHood ), typeof( Kasa ) }; - public static Type[] SEHatTypes{ get{ return m_SEHatTypes; } } + public static Type[] SEHatTypes => m_SEHatTypes; private static Type[] m_AosHatTypes = new Type[] { typeof( FlowerGarland ), typeof( BearMask ), typeof( DeerMask ) //Are Bear& Deer mask inside the Pre-AoS loottables too? }; - public static Type[] AosHatTypes{ get{ return m_AosHatTypes; } } + public static Type[] AosHatTypes => m_AosHatTypes; private static Type[] m_HatTypes = new Type[] { @@ -388,7 +391,7 @@ namespace Server typeof( FeatheredHat ), typeof( TricorneHat ), typeof( JesterHat ) }; - public static Type[] HatTypes{ get{ return m_HatTypes; } } + public static Type[] HatTypes => m_HatTypes; private static Type[] m_LibraryBookTypes = new Type[] { @@ -404,7 +407,7 @@ namespace Server typeof( VirtueBook ) }; - public static Type[] LibraryBookTypes{ get{ return m_LibraryBookTypes; } } + public static Type[] LibraryBookTypes => m_LibraryBookTypes; #endregion diff --git a/Scripts/Misc/LootPack.cs b/Scripts/Misc/LootPack.cs index 27f71e7ed..03ce3ecd8 100644 --- a/Scripts/Misc/LootPack.cs +++ b/Scripts/Misc/LootPack.cs @@ -465,13 +465,14 @@ namespace Server #endregion #region Generic accessors - public static LootPack Poor{ get{ return Core.SE ? SePoor : Core.AOS ? AosPoor : OldPoor; } } - public static LootPack Meager{ get{ return Core.SE ? SeMeager : Core.AOS ? AosMeager : OldMeager; } } - public static LootPack Average{ get{ return Core.SE ? SeAverage : Core.AOS ? AosAverage : OldAverage; } } - public static LootPack Rich{ get{ return Core.SE ? SeRich : Core.AOS ? AosRich : OldRich; } } - public static LootPack FilthyRich{ get{ return Core.SE ? SeFilthyRich : Core.AOS ? AosFilthyRich : OldFilthyRich; } } - public static LootPack UltraRich{ get{ return Core.SE ? SeUltraRich : Core.AOS ? AosUltraRich : OldUltraRich; } } - public static LootPack SuperBoss{ get{ return Core.SE ? SeSuperBoss : Core.AOS ? AosSuperBoss : OldSuperBoss; } } + public static LootPack Poor => Core.SE ? SePoor : Core.AOS ? AosPoor : OldPoor; + public static LootPack Meager => Core.SE ? SeMeager : Core.AOS ? AosMeager : OldMeager; + public static LootPack Average => Core.SE ? SeAverage : Core.AOS ? AosAverage : OldAverage; + public static LootPack Rich => Core.SE ? SeRich : Core.AOS ? AosRich : OldRich; + public static LootPack FilthyRich => Core.SE ? SeFilthyRich : Core.AOS ? AosFilthyRich : OldFilthyRich; + public static LootPack UltraRich => Core.SE ? SeUltraRich : Core.AOS ? AosUltraRich : OldUltraRich; + public static LootPack SuperBoss => Core.SE ? SeSuperBoss : Core.AOS ? AosSuperBoss : OldSuperBoss; + #endregion public static readonly LootPack LowScrolls = new LootPack( new LootPackEntry[] @@ -528,38 +529,38 @@ namespace Server public int Chance { - get{ return m_Chance; } - set{ m_Chance = value; } + get => m_Chance; + set => m_Chance = value; } public LootPackDice Quantity { - get{ return m_Quantity; } - set{ m_Quantity = value; } + get => m_Quantity; + set => m_Quantity = value; } public int MaxProps { - get{ return m_MaxProps; } - set{ m_MaxProps = value; } + get => m_MaxProps; + set => m_MaxProps = value; } public int MinIntensity { - get{ return m_MinIntensity; } - set{ m_MinIntensity = value; } + get => m_MinIntensity; + set => m_MinIntensity = value; } public int MaxIntensity { - get{ return m_MaxIntensity; } - set{ m_MaxIntensity = value; } + get => m_MaxIntensity; + set => m_MaxIntensity = value; } public LootPackItem[] Items { - get{ return m_Items; } - set{ m_Items = value; } + get => m_Items; + set => m_Items = value; } private static bool IsInTokuno( Mobile m ) @@ -795,14 +796,14 @@ namespace Server public Type Type { - get{ return m_Type; } - set{ m_Type = value; } + get => m_Type; + set => m_Type = value; } public int Chance { - get{ return m_Chance; } - set{ m_Chance = value; } + get => m_Chance; + set => m_Chance = value; } private static Type[] m_BlankTypes = new Type[]{ typeof( BlankScroll ) }; @@ -907,20 +908,20 @@ namespace Server public int Count { - get{ return m_Count; } - set{ m_Count = value; } + get => m_Count; + set => m_Count = value; } public int Sides { - get{ return m_Sides; } - set{ m_Sides = value; } + get => m_Sides; + set => m_Sides = value; } public int Bonus { - get{ return m_Bonus; } - set{ m_Bonus = value; } + get => m_Bonus; + set => m_Bonus = value; } public int Roll() diff --git a/Scripts/Misc/NameList.cs b/Scripts/Misc/NameList.cs index 06839633a..351bc09db 100644 --- a/Scripts/Misc/NameList.cs +++ b/Scripts/Misc/NameList.cs @@ -10,8 +10,8 @@ namespace Server private string m_Type; private string[] m_List; - public string Type{ get{ return m_Type; } } - public string[] List{ get{ return m_List; } } + public string Type => m_Type; + public string[] List => m_List; public bool ContainsName( string name ) { diff --git a/Scripts/Misc/Poison.cs b/Scripts/Misc/Poison.cs index 823eeab62..100324848 100644 --- a/Scripts/Misc/Poison.cs +++ b/Scripts/Misc/Poison.cs @@ -75,7 +75,9 @@ namespace Server private int m_LastDamage; private int m_Index; - public Mobile From{ get{ return m_From; } set{ m_From = value; } } + public Mobile From{ get => m_From; + set => m_From = value; + } public PoisonTimer( Mobile m, PoisonImpl p ) : base( p.m_Delay, p.m_Interval ) { diff --git a/Scripts/Misc/ProfanityProtection.cs b/Scripts/Misc/ProfanityProtection.cs index 487150265..ca7ad9f9f 100644 --- a/Scripts/Misc/ProfanityProtection.cs +++ b/Scripts/Misc/ProfanityProtection.cs @@ -59,9 +59,9 @@ namespace Server.Misc e.Blocked = !OnProfanityDetected( from, e.Speech ); } - public static char[] Exceptions{ get{ return m_Exceptions; } } - public static string[] StartDisallowed{ get{ return m_StartDisallowed; } } - public static string[] Disallowed{ get{ return m_Disallowed; } } + public static char[] Exceptions => m_Exceptions; + public static string[] StartDisallowed => m_StartDisallowed; + public static string[] Disallowed => m_Disallowed; private static char[] m_Exceptions = new char[] { diff --git a/Scripts/Misc/ResourceInfo.cs b/Scripts/Misc/ResourceInfo.cs index 65f91b858..07914269d 100644 --- a/Scripts/Misc/ResourceInfo.cs +++ b/Scripts/Misc/ResourceInfo.cs @@ -74,31 +74,77 @@ namespace Server.Items private int m_RunicMinIntensity; private int m_RunicMaxIntensity; - public int WeaponFireDamage{ get{ return m_WeaponFireDamage; } set{ m_WeaponFireDamage = value; } } - public int WeaponColdDamage{ get{ return m_WeaponColdDamage; } set{ m_WeaponColdDamage = value; } } - public int WeaponPoisonDamage{ get{ return m_WeaponPoisonDamage; } set{ m_WeaponPoisonDamage = value; } } - public int WeaponEnergyDamage{ get{ return m_WeaponEnergyDamage; } set{ m_WeaponEnergyDamage = value; } } - public int WeaponChaosDamage{ get{ return m_WeaponChaosDamage; } set{ m_WeaponChaosDamage = value; } } - public int WeaponDirectDamage{ get{ return m_WeaponDirectDamage; } set{ m_WeaponDirectDamage = value; } } - public int WeaponDurability{ get{ return m_WeaponDurability; } set{ m_WeaponDurability = value; } } - public int WeaponLuck{ get{ return m_WeaponLuck; } set{ m_WeaponLuck = value; } } - public int WeaponGoldIncrease{ get{ return m_WeaponGoldIncrease; } set{ m_WeaponGoldIncrease = value; } } - public int WeaponLowerRequirements{ get{ return m_WeaponLowerRequirements; } set{ m_WeaponLowerRequirements = value; } } + public int WeaponFireDamage{ get => m_WeaponFireDamage; + set => m_WeaponFireDamage = value; + } + public int WeaponColdDamage{ get => m_WeaponColdDamage; + set => m_WeaponColdDamage = value; + } + public int WeaponPoisonDamage{ get => m_WeaponPoisonDamage; + set => m_WeaponPoisonDamage = value; + } + public int WeaponEnergyDamage{ get => m_WeaponEnergyDamage; + set => m_WeaponEnergyDamage = value; + } + public int WeaponChaosDamage{ get => m_WeaponChaosDamage; + set => m_WeaponChaosDamage = value; + } + public int WeaponDirectDamage{ get => m_WeaponDirectDamage; + set => m_WeaponDirectDamage = value; + } + public int WeaponDurability{ get => m_WeaponDurability; + set => m_WeaponDurability = value; + } + public int WeaponLuck{ get => m_WeaponLuck; + set => m_WeaponLuck = value; + } + public int WeaponGoldIncrease{ get => m_WeaponGoldIncrease; + set => m_WeaponGoldIncrease = value; + } + public int WeaponLowerRequirements{ get => m_WeaponLowerRequirements; + set => m_WeaponLowerRequirements = value; + } - public int ArmorPhysicalResist{ get{ return m_ArmorPhysicalResist; } set{ m_ArmorPhysicalResist = value; } } - public int ArmorFireResist{ get{ return m_ArmorFireResist; } set{ m_ArmorFireResist = value; } } - public int ArmorColdResist{ get{ return m_ArmorColdResist; } set{ m_ArmorColdResist = value; } } - public int ArmorPoisonResist{ get{ return m_ArmorPoisonResist; } set{ m_ArmorPoisonResist = value; } } - public int ArmorEnergyResist{ get{ return m_ArmorEnergyResist; } set{ m_ArmorEnergyResist = value; } } - public int ArmorDurability{ get{ return m_ArmorDurability; } set{ m_ArmorDurability = value; } } - public int ArmorLuck{ get{ return m_ArmorLuck; } set{ m_ArmorLuck = value; } } - public int ArmorGoldIncrease{ get{ return m_ArmorGoldIncrease; } set{ m_ArmorGoldIncrease = value; } } - public int ArmorLowerRequirements{ get{ return m_ArmorLowerRequirements; } set{ m_ArmorLowerRequirements = value; } } + public int ArmorPhysicalResist{ get => m_ArmorPhysicalResist; + set => m_ArmorPhysicalResist = value; + } + public int ArmorFireResist{ get => m_ArmorFireResist; + set => m_ArmorFireResist = value; + } + public int ArmorColdResist{ get => m_ArmorColdResist; + set => m_ArmorColdResist = value; + } + public int ArmorPoisonResist{ get => m_ArmorPoisonResist; + set => m_ArmorPoisonResist = value; + } + public int ArmorEnergyResist{ get => m_ArmorEnergyResist; + set => m_ArmorEnergyResist = value; + } + public int ArmorDurability{ get => m_ArmorDurability; + set => m_ArmorDurability = value; + } + public int ArmorLuck{ get => m_ArmorLuck; + set => m_ArmorLuck = value; + } + public int ArmorGoldIncrease{ get => m_ArmorGoldIncrease; + set => m_ArmorGoldIncrease = value; + } + public int ArmorLowerRequirements{ get => m_ArmorLowerRequirements; + set => m_ArmorLowerRequirements = value; + } - public int RunicMinAttributes{ get{ return m_RunicMinAttributes; } set{ m_RunicMinAttributes = value; } } - public int RunicMaxAttributes{ get{ return m_RunicMaxAttributes; } set{ m_RunicMaxAttributes = value; } } - public int RunicMinIntensity{ get{ return m_RunicMinIntensity; } set{ m_RunicMinIntensity = value; } } - public int RunicMaxIntensity{ get{ return m_RunicMaxIntensity; } set{ m_RunicMaxIntensity = value; } } + public int RunicMinAttributes{ get => m_RunicMinAttributes; + set => m_RunicMinAttributes = value; + } + public int RunicMaxAttributes{ get => m_RunicMaxAttributes; + set => m_RunicMaxAttributes = value; + } + public int RunicMinIntensity{ get => m_RunicMinIntensity; + set => m_RunicMinIntensity = value; + } + public int RunicMaxIntensity{ get => m_RunicMaxIntensity; + set => m_RunicMaxIntensity = value; + } public CraftAttributeInfo() { @@ -399,12 +445,12 @@ namespace Server.Items private CraftResource m_Resource; private Type[] m_ResourceTypes; - public int Hue{ get{ return m_Hue; } } - public int Number{ get{ return m_Number; } } - public string Name{ get{ return m_Name; } } - public CraftAttributeInfo AttributeInfo{ get{ return m_AttributeInfo; } } - public CraftResource Resource{ get{ return m_Resource; } } - public Type[] ResourceTypes{ get{ return m_ResourceTypes; } } + public int Hue => m_Hue; + public int Number => m_Number; + public string Name => m_Name; + public CraftAttributeInfo AttributeInfo => m_AttributeInfo; + public CraftResource Resource => m_Resource; + public Type[] ResourceTypes => m_ResourceTypes; public CraftResourceInfo( int hue, int number, string name, CraftAttributeInfo attributeInfo, CraftResource resource, params Type[] resourceTypes ) { @@ -697,28 +743,10 @@ namespace Server.Items m_Name = name; } - public int Level - { - get - { - return m_Level; - } - } + public int Level => m_Level; - public int Hue - { - get - { - return m_Hue; - } - } + public int Hue => m_Hue; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; } } diff --git a/Scripts/Misc/ShardPoller.cs b/Scripts/Misc/ShardPoller.cs index d6d3892ef..4eabaa832 100644 --- a/Scripts/Misc/ShardPoller.cs +++ b/Scripts/Misc/ShardPoller.cs @@ -22,35 +22,35 @@ namespace Server.Misc public ShardPollOption[] Options { - get{ return m_Options; } - set{ m_Options = value; } + get => m_Options; + set => m_Options = value; } public IPAddress[] Addresses { - get{ return m_Addresses; } - set{ m_Addresses = value; } + get => m_Addresses; + set => m_Addresses = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public string Title { - get{ return m_Title; } - set{ m_Title = ShardPollPrompt.UrlToHref( value ); } + get => m_Title; + set => m_Title = ShardPollPrompt.UrlToHref( value ); } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public TimeSpan Duration { - get{ return m_Duration; } - set{ m_Duration = value; } + get => m_Duration; + set => m_Duration = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public DateTime StartTime { - get{ return m_StartTime; } - set{ m_StartTime = value; } + get => m_StartTime; + set => m_StartTime = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] @@ -80,7 +80,7 @@ namespace Server.Misc [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public bool Active { - get{ return m_Active; } + get => m_Active; set { if ( m_Active == value ) @@ -144,10 +144,7 @@ namespace Server.Misc m_Options[old.Length] = option; } - public override string DefaultName - { - get { return "shard poller"; } - } + public override string DefaultName => "shard poller"; [Constructible( AccessLevel.Administrator )] public ShardPoller() : base( 0x1047 ) @@ -291,11 +288,14 @@ namespace Server.Misc private int m_LineBreaks; private IPAddress[] m_Voters; - public string Title{ get{ return m_Title; } set{ m_Title = value; m_LineBreaks = GetBreaks( m_Title ); } } - public int LineBreaks{ get{ return m_LineBreaks; } } + public string Title{ get => m_Title; + set{ m_Title = value; m_LineBreaks = GetBreaks( m_Title ); } } + public int LineBreaks => m_LineBreaks; - public int Votes{ get{ return m_Voters.Length; } } - public IPAddress[] Voters{ get{ return m_Voters; } set{ m_Voters = value; } } + public int Votes => m_Voters.Length; + public IPAddress[] Voters{ get => m_Voters; + set => m_Voters = value; + } public ShardPollOption( string title ) { @@ -402,7 +402,7 @@ namespace Server.Misc private bool m_Editing; private Queue m_Polls; - public bool Editing{ get{ return m_Editing; } } + public bool Editing => m_Editing; public void QueuePoll( ShardPoller poller ) { diff --git a/Scripts/Misc/TextDefinition.cs b/Scripts/Misc/TextDefinition.cs index 049888f0d..76d2c4172 100644 --- a/Scripts/Misc/TextDefinition.cs +++ b/Scripts/Misc/TextDefinition.cs @@ -14,7 +14,7 @@ namespace Server public int Number => m_Number; public string String => m_String; - public bool IsEmpty { get { return ( m_Number <= 0 && m_String == null ); } } + public bool IsEmpty => ( m_Number <= 0 && m_String == null ); public TextDefinition() : this( 0, null ) { diff --git a/Scripts/Misc/ToggleItem.cs b/Scripts/Misc/ToggleItem.cs index 960e45e26..90fb69159 100644 --- a/Scripts/Misc/ToggleItem.cs +++ b/Scripts/Misc/ToggleItem.cs @@ -43,22 +43,22 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int InactiveItemID { - get { return m_InactiveItemID; } - set { m_InactiveItemID = value; } + get => m_InactiveItemID; + set => m_InactiveItemID = value; } [CommandProperty( AccessLevel.GameMaster )] public int ActiveItemID { - get { return m_ActiveItemID; } - set { m_ActiveItemID = value; } + get => m_ActiveItemID; + set => m_ActiveItemID = value; } [CommandProperty( AccessLevel.GameMaster )] public bool PlayersCanToggle { - get { return m_PlayersCanToggle; } - set { m_PlayersCanToggle = value; } + get => m_PlayersCanToggle; + set => m_PlayersCanToggle = value; } [Constructible] diff --git a/Scripts/Misc/Weather.cs b/Scripts/Misc/Weather.cs index 48a9f1d9a..68c9f3656 100644 --- a/Scripts/Misc/Weather.cs +++ b/Scripts/Misc/Weather.cs @@ -111,21 +111,37 @@ namespace Server.Misc private int m_ChanceOfPercipitation; private int m_ChanceOfExtremeTemperature; - public Map Facet{ get{ return m_Facet; } } - public Rectangle2D[] Area{ get{ return m_Area; } set{ m_Area = value; } } - public int Temperature{ get{ return m_Temperature; } set{ m_Temperature = value; } } - public int ChanceOfPercipitation{ get{ return m_ChanceOfPercipitation; } set{ m_ChanceOfPercipitation = value; } } - public int ChanceOfExtremeTemperature{ get{ return m_ChanceOfExtremeTemperature; } set{ m_ChanceOfExtremeTemperature = value; } } + public Map Facet => m_Facet; + public Rectangle2D[] Area{ get => m_Area; + set => m_Area = value; + } + public int Temperature{ get => m_Temperature; + set => m_Temperature = value; + } + public int ChanceOfPercipitation{ get => m_ChanceOfPercipitation; + set => m_ChanceOfPercipitation = value; + } + public int ChanceOfExtremeTemperature{ get => m_ChanceOfExtremeTemperature; + set => m_ChanceOfExtremeTemperature = value; + } // For dynamic weather: private Rectangle2D m_Bounds; private int m_MoveSpeed; private int m_MoveAngleX, m_MoveAngleY; - public Rectangle2D Bounds{ get{ return m_Bounds; } set{ m_Bounds = value; } } - public int MoveSpeed{ get{ return m_MoveSpeed; } set{ m_MoveSpeed = value; } } - public int MoveAngleX{ get{ return m_MoveAngleX; } set{ m_MoveAngleX = value; } } - public int MoveAngleY{ get{ return m_MoveAngleY; } set{ m_MoveAngleY = value; } } + public Rectangle2D Bounds{ get => m_Bounds; + set => m_Bounds = value; + } + public int MoveSpeed{ get => m_MoveSpeed; + set => m_MoveSpeed = value; + } + public int MoveAngleX{ get => m_MoveAngleX; + set => m_MoveAngleX = value; + } + public int MoveAngleY{ get => m_MoveAngleY; + set => m_MoveAngleY = value; + } public static bool CheckIntersection( Rectangle2D r1, Rectangle2D r2 ) { @@ -337,10 +353,7 @@ namespace Server.Misc public class WeatherMap : MapItem { - public override string DefaultName - { - get { return "weather map"; } - } + public override string DefaultName => "weather map"; [Constructible] public WeatherMap() diff --git a/Scripts/Misc/WeightOverloading.cs b/Scripts/Misc/WeightOverloading.cs index 94828c8f8..22ea443c2 100644 --- a/Scripts/Misc/WeightOverloading.cs +++ b/Scripts/Misc/WeightOverloading.cs @@ -20,8 +20,8 @@ namespace Server.Misc public static DFAlgorithm DFA { - get{ return m_DFA; } - set{ m_DFA = value; } + get => m_DFA; + set => m_DFA = value; } public static void FatigueOnDamage( Mobile m, int damage ) diff --git a/Scripts/Mobiles/AI/AIControlMobileTarget.cs b/Scripts/Mobiles/AI/AIControlMobileTarget.cs index 6b2add13f..564301d1c 100644 --- a/Scripts/Mobiles/AI/AIControlMobileTarget.cs +++ b/Scripts/Mobiles/AI/AIControlMobileTarget.cs @@ -9,11 +9,7 @@ namespace Server.Targets private List m_List; private OrderType m_Order; - public OrderType Order { - get { - return m_Order; - } - } + public OrderType Order => m_Order; public AIControlMobileTarget( BaseAI ai, OrderType order ) : base( -1, false, ( order == OrderType.Attack ? TargetFlags.Harmful : TargetFlags.None ) ) { diff --git a/Scripts/Mobiles/AI/BaseAI.cs b/Scripts/Mobiles/AI/BaseAI.cs index f97884fa1..6f40cae8b 100644 --- a/Scripts/Mobiles/AI/BaseAI.cs +++ b/Scripts/Mobiles/AI/BaseAI.cs @@ -71,10 +71,7 @@ namespace Server.Mobiles public ActionType Action { - get - { - return m_Action; - } + get => m_Action; set { m_Action = value; @@ -1992,8 +1989,8 @@ namespace Server.Mobiles public long NextMove { - get { return m_NextMove; } - set { m_NextMove = value; } + get => m_NextMove; + set => m_NextMove = value; } public virtual bool CheckMove() @@ -2697,7 +2694,7 @@ namespace Server.Mobiles private long m_NextDetectHidden; - public virtual bool CanDetectHidden { get { return m_Mobile.Skills[SkillName.DetectHidden].Value > 0; } } + public virtual bool CanDetectHidden => m_Mobile.Skills[SkillName.DetectHidden].Value > 0; /* * The Timer object diff --git a/Scripts/Mobiles/AI/MageAI.cs b/Scripts/Mobiles/AI/MageAI.cs index b497a51c2..80c986280 100644 --- a/Scripts/Mobiles/AI/MageAI.cs +++ b/Scripts/Mobiles/AI/MageAI.cs @@ -34,15 +34,9 @@ namespace Server.Mobiles return base.Think(); } - public virtual bool SmartAI - { - get { return ( m_Mobile is BaseVendor || m_Mobile is BaseEscortable || m_Mobile is Changeling ); } - } + public virtual bool SmartAI => ( m_Mobile is BaseVendor || m_Mobile is BaseEscortable || m_Mobile is Changeling ); - public virtual bool IsNecromancer - { - get { return ( Core.AOS && m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); } - } + public virtual bool IsNecromancer => ( Core.AOS && m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); private const double HealChance = 0.10; // 10% chance to heal at gm magery private const double TeleportChance = 0.05; // 5% chance to teleport at gm magery diff --git a/Scripts/Mobiles/AI/OppositionGroup.cs b/Scripts/Mobiles/AI/OppositionGroup.cs index 2116c19bb..8ae174bd7 100644 --- a/Scripts/Mobiles/AI/OppositionGroup.cs +++ b/Scripts/Mobiles/AI/OppositionGroup.cs @@ -62,10 +62,7 @@ namespace Server } } ); - public static OppositionGroup TerathansAndOphidians - { - get{ return m_TerathansAndOphidians; } - } + public static OppositionGroup TerathansAndOphidians => m_TerathansAndOphidians; private static OppositionGroup m_SavagesAndOrcs = new OppositionGroup( new Type[][] { @@ -88,11 +85,8 @@ namespace Server } } ); - public static OppositionGroup SavagesAndOrcs - { - get{ return m_SavagesAndOrcs; } - } - + public static OppositionGroup SavagesAndOrcs => m_SavagesAndOrcs; + private static OppositionGroup m_FeyAndUndead = new OppositionGroup( new Type[][] { new Type[] @@ -133,9 +127,6 @@ namespace Server } } ); - public static OppositionGroup FeyAndUndead - { - get{ return m_FeyAndUndead; } - } + public static OppositionGroup FeyAndUndead => m_FeyAndUndead; } } \ No newline at end of file diff --git a/Scripts/Mobiles/AI/SpeedInfo.cs b/Scripts/Mobiles/AI/SpeedInfo.cs index 3544f6655..f431e755f 100644 --- a/Scripts/Mobiles/AI/SpeedInfo.cs +++ b/Scripts/Mobiles/AI/SpeedInfo.cs @@ -16,20 +16,20 @@ namespace Server public double ActiveSpeed { - get{ return m_ActiveSpeed; } - set{ m_ActiveSpeed = value; } + get => m_ActiveSpeed; + set => m_ActiveSpeed = value; } public double PassiveSpeed { - get{ return m_PassiveSpeed; } - set{ m_PassiveSpeed = value; } + get => m_PassiveSpeed; + set => m_PassiveSpeed = value; } public Type[] Types { - get{ return m_Types; } - set{ m_Types = value; } + get => m_Types; + set => m_Types = value; } public SpeedInfo( double activeSpeed, double passiveSpeed, Type[] types ) diff --git a/Scripts/Mobiles/Animals/Cows/Cow.cs b/Scripts/Mobiles/Animals/Cows/Cow.cs index 821a3cff5..7ba8fd3f6 100644 --- a/Scripts/Mobiles/Animals/Cows/Cow.cs +++ b/Scripts/Mobiles/Animals/Cows/Cow.cs @@ -10,8 +10,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public DateTime MilkedOn { - get { return m_MilkedOn; } - set { m_MilkedOn = value; } + get => m_MilkedOn; + set => m_MilkedOn = value; } private int m_Milk; @@ -19,8 +19,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int Milk { - get { return m_Milk; } - set { m_Milk = value; } + get => m_Milk; + set => m_Milk = value; } public override string DefaultName => "a cow"; diff --git a/Scripts/Mobiles/Animals/Misc/Sheep.cs b/Scripts/Mobiles/Animals/Misc/Sheep.cs index b2be117c7..378d13b00 100644 --- a/Scripts/Mobiles/Animals/Misc/Sheep.cs +++ b/Scripts/Mobiles/Animals/Misc/Sheep.cs @@ -12,7 +12,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public DateTime NextWoolTime { - get{ return m_NextWoolTime; } + get => m_NextWoolTime; set{ m_NextWoolTime = value; Body = ( DateTime.UtcNow >= m_NextWoolTime ) ? 0xCF : 0xDF; } } diff --git a/Scripts/Mobiles/Animals/Mounts/BaseMount.cs b/Scripts/Mobiles/Animals/Mounts/BaseMount.cs index 2f9802437..35ee00897 100644 --- a/Scripts/Mobiles/Animals/Mounts/BaseMount.cs +++ b/Scripts/Mobiles/Animals/Mounts/BaseMount.cs @@ -15,14 +15,14 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public DateTime NextMountAbility { - get { return m_NextMountAbility; } - set { m_NextMountAbility = value; } + get => m_NextMountAbility; + set => m_NextMountAbility = value; } - protected Item InternalItem { get { return m_InternalItem; } } + protected Item InternalItem => m_InternalItem; - public virtual bool AllowMaleRider{ get{ return true; } } - public virtual bool AllowFemaleRider{ get{ return true; } } + public virtual bool AllowMaleRider => true; + public virtual bool AllowFemaleRider => true; public BaseMount( string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed ) : base ( aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed ) { @@ -35,10 +35,7 @@ namespace Server.Mobiles [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { - get - { - return base.Hue; - } + get => base.Hue; set { base.Hue = value; @@ -190,10 +187,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int ItemID { - get - { - return m_InternalItem?.ItemID ?? 0; - } + get => m_InternalItem?.ItemID ?? 0; set { if ( m_InternalItem != null ) @@ -212,10 +206,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile Rider { - get - { - return m_Rider; - } + get => m_Rider; set { if ( m_Rider != value ) @@ -367,13 +358,7 @@ namespace Server.Mobiles } } - public IMount Mount - { - get - { - return m_Mount; - } - } + public IMount Mount => m_Mount; } } diff --git a/Scripts/Mobiles/Animals/Mounts/Beetle.cs b/Scripts/Mobiles/Animals/Mounts/Beetle.cs index 01c5fd8a6..feb1f9eec 100644 --- a/Scripts/Mobiles/Animals/Mounts/Beetle.cs +++ b/Scripts/Mobiles/Animals/Mounts/Beetle.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Beetle : BaseMount { public override string CorpseName => "a giant beetle corpse"; - public virtual double BoostedSpeed{ get{ return 0.1; } } + public virtual double BoostedSpeed => 0.1; [Constructible] public Beetle() : this( "a giant beetle" ) diff --git a/Scripts/Mobiles/Animals/Mounts/Ethereals.cs b/Scripts/Mobiles/Animals/Mounts/Ethereals.cs index 11aca12ac..08e99dae2 100644 --- a/Scripts/Mobiles/Animals/Mounts/Ethereals.cs +++ b/Scripts/Mobiles/Animals/Mounts/Ethereals.cs @@ -16,19 +16,16 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { - get { return m_IsRewardItem; } - set { m_IsRewardItem = value; } + get => m_IsRewardItem; + set => m_IsRewardItem = value; } - public override double DefaultWeight - { - get { return 1.0; } - } + public override double DefaultWeight => 1.0; [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public bool IsDonationItem { - get { return m_IsDonationItem; } + get => m_IsDonationItem; set { m_IsDonationItem = value; InvalidateProperties(); } } @@ -61,10 +58,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int MountedID { - get - { - return m_MountedID; - } + get => m_MountedID; set { if ( m_MountedID != value ) @@ -80,10 +74,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int RegularID { - get - { - return m_RegularID; - } + get => m_RegularID; set { if ( m_RegularID != value ) @@ -253,10 +244,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile Rider { - get - { - return m_Rider; - } + get => m_Rider; set { if ( value != m_Rider ) @@ -334,13 +322,7 @@ namespace Server.Mobiles ProcessDelta(); } - public IMount Mount - { - get - { - return this; - } - } + public IMount Mount => this; public static void StopMounting( Mobile mob ) { @@ -375,13 +357,7 @@ namespace Server.Mobiles public override double CastDelayFastScalar => 0; - public override TimeSpan CastDelayBase - { - get - { - return TimeSpan.FromSeconds( ( ( m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3 ) ? ( 7.5 + ( Core.AOS ? 3.0 : 2.0 ) ) : ( Core.AOS ? 3.0 : 2.0 ) ) ); - } - } + public override TimeSpan CastDelayBase => TimeSpan.FromSeconds( ( ( m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3 ) ? ( 7.5 + ( Core.AOS ? 3.0 : 2.0 ) ) : ( Core.AOS ? 3.0 : 2.0 ) ) ); public override int GetMana() { diff --git a/Scripts/Mobiles/Animals/Mounts/Kirin.cs b/Scripts/Mobiles/Animals/Mounts/Kirin.cs index 6333972fe..2187fb655 100644 --- a/Scripts/Mobiles/Animals/Mounts/Kirin.cs +++ b/Scripts/Mobiles/Animals/Mounts/Kirin.cs @@ -98,10 +98,7 @@ namespace Server.Mobiles c.DropItem( new KirinBrains() ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int Meat => 3; public override int Hides => 10; diff --git a/Scripts/Mobiles/Animals/Mounts/SwampDragon.cs b/Scripts/Mobiles/Animals/Mounts/SwampDragon.cs index 1f2936cd4..cf3f5af4a 100644 --- a/Scripts/Mobiles/Animals/Mounts/SwampDragon.cs +++ b/Scripts/Mobiles/Animals/Mounts/SwampDragon.cs @@ -14,28 +14,28 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile BardingCrafter { - get{ return m_BardingCrafter; } + get => m_BardingCrafter; set{ m_BardingCrafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool BardingExceptional { - get{ return m_BardingExceptional; } + get => m_BardingExceptional; set{ m_BardingExceptional = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int BardingHP { - get{ return m_BardingHP; } + get => m_BardingHP; set{ m_BardingHP = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool HasBarding { - get{ return m_HasBarding; } + get => m_HasBarding; set { m_HasBarding = value; @@ -60,7 +60,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public CraftResource BardingResource { - get{ return m_BardingResource; } + get => m_BardingResource; set { m_BardingResource = value; @@ -73,10 +73,7 @@ namespace Server.Mobiles } [CommandProperty( AccessLevel.GameMaster )] - public int BardingMaxHP - { - get{ return m_BardingExceptional ? 2500 : 1000; } - } + public int BardingMaxHP => m_BardingExceptional ? 2500 : 1000; [Constructible] public SwampDragon() : this( "a swamp dragon" ) diff --git a/Scripts/Mobiles/Animals/Mounts/Unicorn.cs b/Scripts/Mobiles/Animals/Mounts/Unicorn.cs index 8963d4b93..b5592e34b 100644 --- a/Scripts/Mobiles/Animals/Mounts/Unicorn.cs +++ b/Scripts/Mobiles/Animals/Mounts/Unicorn.cs @@ -107,10 +107,7 @@ namespace Server.Mobiles c.DropItem( new UnicornRibs() ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Lethal; public override int Meat => 3; diff --git a/Scripts/Mobiles/BaseCreature.cs b/Scripts/Mobiles/BaseCreature.cs index 330d539a1..6ec9b9d1f 100644 --- a/Scripts/Mobiles/BaseCreature.cs +++ b/Scripts/Mobiles/BaseCreature.cs @@ -270,7 +270,7 @@ namespace Server.Mobiles } } - public virtual InhumanSpeech SpeechType{ get{ return null; } } + public virtual InhumanSpeech SpeechType => null; /* Do not serialize this till the code is finalized */ @@ -279,27 +279,21 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool SeeksHome { - get - { - return m_SeeksHome; - } - set - { - m_SeeksHome = value; - } + get => m_SeeksHome; + set => m_SeeksHome = value; } [CommandProperty( AccessLevel.GameMaster )] public string CorpseNameOverride { - get { return m_CorpseNameOverride; } - set { m_CorpseNameOverride = value; } + get => m_CorpseNameOverride; + set => m_CorpseNameOverride = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public bool IsStabled { - get{ return m_IsStabled; } + get => m_IsStabled; set { m_IsStabled = value; @@ -311,25 +305,25 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public Mobile StabledBy { - get { return m_StabledBy; } - set { m_StabledBy = value; } + get => m_StabledBy; + set => m_StabledBy = value; } [CommandProperty( AccessLevel.GameMaster )] public bool IsPrisoner { - get{ return m_IsPrisoner; } - set{ m_IsPrisoner = value; } + get => m_IsPrisoner; + set => m_IsPrisoner = value; } protected DateTime SummonEnd { - get { return m_SummonEnd; } - set { m_SummonEnd = value; } + get => m_SummonEnd; + set => m_SummonEnd = value; } - public virtual Faction FactionAllegiance{ get{ return null; } } - public virtual int FactionSilverWorth{ get{ return 30; } } + public virtual Faction FactionAllegiance => null; + public virtual int FactionSilverWorth => 30; #region ML Quest System @@ -354,7 +348,7 @@ namespace Server.Mobiles } } - public virtual bool CanGiveMLQuest { get { return ( MLQuests.Count != 0 ); } } + public virtual bool CanGiveMLQuest => ( MLQuests.Count != 0 ); public virtual bool StaticMLQuester => true; protected virtual List ConstructQuestList() @@ -402,9 +396,9 @@ namespace Server.Mobiles #region Bonding public const bool BondingEnabled = true; - public virtual bool IsBondable{ get{ return ( BondingEnabled && !Summoned ); } } - public virtual TimeSpan BondingDelay{ get{ return TimeSpan.FromDays( 7.0 ); } } - public virtual TimeSpan BondingAbandonDelay{ get{ return TimeSpan.FromDays( 1.0 ); } } + public virtual bool IsBondable => ( BondingEnabled && !Summoned ); + public virtual TimeSpan BondingDelay => TimeSpan.FromDays( 7.0 ); + public virtual TimeSpan BondingAbandonDelay => TimeSpan.FromDays( 1.0 ); public override bool CanRegenHits => !m_IsDeadPet && base.CanRegenHits; public override bool CanRegenStam => !IsParagon && !m_IsDeadPet && base.CanRegenStam; @@ -420,10 +414,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Spawner MySpawner { - get - { - return Spawner as Spawner; - } + get => Spawner as Spawner; set { } @@ -444,28 +435,28 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool IsBonded { - get{ return m_IsBonded; } + get => m_IsBonded; set{ m_IsBonded = value; InvalidateProperties(); } } public bool IsDeadPet { - get{ return m_IsDeadPet; } - set{ m_IsDeadPet = value; } + get => m_IsDeadPet; + set => m_IsDeadPet = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime BondingBegin { - get{ return m_BondingBegin; } - set{ m_BondingBegin = value; } + get => m_BondingBegin; + set => m_BondingBegin = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime OwnerAbandonTime { - get{ return m_OwnerAbandonTime; } - set{ m_OwnerAbandonTime = value; } + get => m_OwnerAbandonTime; + set => m_OwnerAbandonTime = value; } #endregion @@ -521,7 +512,7 @@ namespace Server.Mobiles #endregion - public virtual double WeaponAbilityChance{ get{ return 0.4; } } + public virtual double WeaponAbilityChance => 0.4; public virtual WeaponAbility GetWeaponAbility() { @@ -537,47 +528,66 @@ namespace Server.Mobiles public override int BaseEnergyResistance => m_EnergyResistance; [CommandProperty( AccessLevel.GameMaster )] - public int PhysicalResistanceSeed{ get{ return m_PhysicalResistance; } set{ m_PhysicalResistance = value; UpdateResistances(); } } + public int PhysicalResistanceSeed{ get => m_PhysicalResistance; + set{ m_PhysicalResistance = value; UpdateResistances(); } } [CommandProperty( AccessLevel.GameMaster )] - public int FireResistSeed{ get{ return m_FireResistance; } set{ m_FireResistance = value; UpdateResistances(); } } + public int FireResistSeed{ get => m_FireResistance; + set{ m_FireResistance = value; UpdateResistances(); } } [CommandProperty( AccessLevel.GameMaster )] - public int ColdResistSeed{ get{ return m_ColdResistance; } set{ m_ColdResistance = value; UpdateResistances(); } } + public int ColdResistSeed{ get => m_ColdResistance; + set{ m_ColdResistance = value; UpdateResistances(); } } [CommandProperty( AccessLevel.GameMaster )] - public int PoisonResistSeed{ get{ return m_PoisonResistance; } set{ m_PoisonResistance = value; UpdateResistances(); } } + public int PoisonResistSeed{ get => m_PoisonResistance; + set{ m_PoisonResistance = value; UpdateResistances(); } } [CommandProperty( AccessLevel.GameMaster )] - public int EnergyResistSeed{ get{ return m_EnergyResistance; } set{ m_EnergyResistance = value; UpdateResistances(); } } + public int EnergyResistSeed{ get => m_EnergyResistance; + set{ m_EnergyResistance = value; UpdateResistances(); } } [CommandProperty( AccessLevel.GameMaster )] - public int PhysicalDamage{ get{ return m_PhysicalDamage; } set{ m_PhysicalDamage = value; } } + public int PhysicalDamage{ get => m_PhysicalDamage; + set => m_PhysicalDamage = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int FireDamage{ get{ return m_FireDamage; } set{ m_FireDamage = value; } } + public int FireDamage{ get => m_FireDamage; + set => m_FireDamage = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ColdDamage{ get{ return m_ColdDamage; } set{ m_ColdDamage = value; } } + public int ColdDamage{ get => m_ColdDamage; + set => m_ColdDamage = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int PoisonDamage{ get{ return m_PoisonDamage; } set{ m_PoisonDamage = value; } } + public int PoisonDamage{ get => m_PoisonDamage; + set => m_PoisonDamage = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int EnergyDamage{ get{ return m_EnergyDamage; } set{ m_EnergyDamage = value; } } + public int EnergyDamage{ get => m_EnergyDamage; + set => m_EnergyDamage = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int ChaosDamage{ get{ return m_ChaosDamage; } set{ m_ChaosDamage = value; } } + public int ChaosDamage{ get => m_ChaosDamage; + set => m_ChaosDamage = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int DirectDamage{ get{ return m_DirectDamage; } set{ m_DirectDamage = value; } } + public int DirectDamage{ get => m_DirectDamage; + set => m_DirectDamage = value; + } #endregion [CommandProperty( AccessLevel.GameMaster )] public bool IsParagon { - get{ return m_Paragon; } + get => m_Paragon; set { if ( m_Paragon == value ) @@ -595,88 +605,92 @@ namespace Server.Mobiles public virtual bool HasManaOveride => false; - public virtual FoodType FavoriteFood{ get{ return FoodType.Meat; } } - public virtual PackInstinct PackInstinct{ get{ return PackInstinct.None; } } + public virtual FoodType FavoriteFood => FoodType.Meat; + public virtual PackInstinct PackInstinct => PackInstinct.None; public List Owners => m_Owners; - public virtual bool AllowMaleTamer{ get{ return true; } } - public virtual bool AllowFemaleTamer{ get{ return true; } } - public virtual bool SubdueBeforeTame{ get{ return false; } } - public virtual bool StatLossAfterTame{ get{ return SubdueBeforeTame; } } - public virtual bool ReduceSpeedWithDamage{ get{ return true; } } - public virtual bool IsSubdued{ get{ return SubdueBeforeTame && ( Hits < ( HitsMax / 10 ) ); } } + public virtual bool AllowMaleTamer => true; + public virtual bool AllowFemaleTamer => true; + public virtual bool SubdueBeforeTame => false; + public virtual bool StatLossAfterTame => SubdueBeforeTame; + public virtual bool ReduceSpeedWithDamage => true; + public virtual bool IsSubdued => SubdueBeforeTame && ( Hits < ( HitsMax / 10 ) ); - public virtual bool Commandable{ get{ return true; } } + public virtual bool Commandable => true; - public virtual Poison HitPoison{ get{ return null; } } - public virtual double HitPoisonChance{ get{ return 0.5; } } - public virtual Poison PoisonImmune{ get{ return null; } } + public virtual Poison HitPoison => null; + public virtual double HitPoisonChance => 0.5; + public virtual Poison PoisonImmune => null; - public virtual bool BardImmune{ get{ return false; } } - public virtual bool Unprovokable{ get{ return BardImmune || m_IsDeadPet; } } - public virtual bool Uncalmable{ get{ return BardImmune || m_IsDeadPet; } } - public virtual bool AreaPeaceImmune { get { return BardImmune || m_IsDeadPet; } } + public virtual bool BardImmune => false; + public virtual bool Unprovokable => BardImmune || m_IsDeadPet; + public virtual bool Uncalmable => BardImmune || m_IsDeadPet; + public virtual bool AreaPeaceImmune => BardImmune || m_IsDeadPet; - public virtual bool BleedImmune{ get{ return false; } } - public virtual double BonusPetDamageScalar{ get{ return 1.0; } } + public virtual bool BleedImmune => false; + public virtual double BonusPetDamageScalar => 1.0; - public virtual bool DeathAdderCharmable{ get{ return false; } } + public virtual bool DeathAdderCharmable => false; //TODO: Find the pub 31 tweaks to the DispelDifficulty and apply them of course. - public virtual double DispelDifficulty{ get{ return 0.0; } } // at this skill level we dispel 50% chance - public virtual double DispelFocus{ get{ return 20.0; } } // at difficulty - focus we have 0%, at difficulty + focus we have 100% - public virtual bool DisplayWeight{ get{ return Backpack is StrongBackpack; } } + public virtual double DispelDifficulty // at this skill level we dispel 50% chance + => 0.0; + + public virtual double DispelFocus // at difficulty - focus we have 0%, at difficulty + focus we have 100% + => 20.0; + + public virtual bool DisplayWeight => Backpack is StrongBackpack; #region Breath ability, like dragon fire breath private long m_NextBreathTime; // Must be overridden in subclass to enable - public virtual bool HasBreath{ get{ return false; } } + public virtual bool HasBreath => false; // Base damage given is: CurrentHitPoints * BreathDamageScalar - public virtual double BreathDamageScalar{ get{ return (Core.AOS ? 0.16 : 0.05); } } + public virtual double BreathDamageScalar => (Core.AOS ? 0.16 : 0.05); // Min/max seconds until next breath - public virtual double BreathMinDelay{ get{ return 30.0; } } - public virtual double BreathMaxDelay{ get{ return 45.0; } } + public virtual double BreathMinDelay => 30.0; + public virtual double BreathMaxDelay => 45.0; // Creature stops moving for 1.0 seconds while breathing - public virtual double BreathStallTime{ get{ return 1.0; } } + public virtual double BreathStallTime => 1.0; // Effect is sent 1.3 seconds after BreathAngerSound and BreathAngerAnimation is played - public virtual double BreathEffectDelay{ get{ return 1.3; } } + public virtual double BreathEffectDelay => 1.3; // Damage is given 1.0 seconds after effect is sent - public virtual double BreathDamageDelay{ get{ return 1.0; } } + public virtual double BreathDamageDelay => 1.0; - public virtual int BreathRange{ get{ return RangePerception; } } + public virtual int BreathRange => RangePerception; // Damage types public virtual int BreathChaosDamage => 0; - public virtual int BreathPhysicalDamage{ get{ return 0; } } - public virtual int BreathFireDamage{ get{ return 100; } } - public virtual int BreathColdDamage{ get{ return 0; } } - public virtual int BreathPoisonDamage{ get{ return 0; } } - public virtual int BreathEnergyDamage{ get{ return 0; } } + public virtual int BreathPhysicalDamage => 0; + public virtual int BreathFireDamage => 100; + public virtual int BreathColdDamage => 0; + public virtual int BreathPoisonDamage => 0; + public virtual int BreathEnergyDamage => 0; // Is immune to breath damages - public virtual bool BreathImmune{ get{ return false; } } + public virtual bool BreathImmune => false; // Effect details and sound - public virtual int BreathEffectItemID{ get{ return 0x36D4; } } - public virtual int BreathEffectSpeed{ get{ return 5; } } - public virtual int BreathEffectDuration{ get{ return 0; } } - public virtual bool BreathEffectExplodes{ get{ return false; } } - public virtual bool BreathEffectFixedDir{ get{ return false; } } - public virtual int BreathEffectHue{ get{ return 0; } } - public virtual int BreathEffectRenderMode{ get{ return 0; } } + public virtual int BreathEffectItemID => 0x36D4; + public virtual int BreathEffectSpeed => 5; + public virtual int BreathEffectDuration => 0; + public virtual bool BreathEffectExplodes => false; + public virtual bool BreathEffectFixedDir => false; + public virtual int BreathEffectHue => 0; + public virtual int BreathEffectRenderMode => 0; - public virtual int BreathEffectSound{ get{ return 0x227; } } + public virtual int BreathEffectSound => 0x227; // Anger sound/animations - public virtual int BreathAngerSound{ get{ return GetAngerSound(); } } - public virtual int BreathAngerAnimation{ get{ return 12; } } + public virtual int BreathAngerSound => GetAngerSound(); + public virtual int BreathAngerAnimation => 12; public virtual void BreathStart( Mobile target ) { @@ -847,14 +861,14 @@ namespace Server.Mobiles #endregion #region Flee!!! - public virtual bool CanFlee{ get{ return !m_Paragon; } } + public virtual bool CanFlee => !m_Paragon; private DateTime m_EndFlee; public DateTime EndFleeTime { - get{ return m_EndFlee; } - set{ m_EndFlee = value; } + get => m_EndFlee; + set => m_EndFlee = value; } public virtual void StopFlee() @@ -885,22 +899,16 @@ namespace Server.Mobiles public virtual bool IsInvulnerable => false; - public BaseAI AIObject{ get{ return m_AI; } } + public BaseAI AIObject => m_AI; public const int MaxOwners = 5; - public virtual OppositionGroup OppositionGroup - { - get{ return null; } - } + public virtual OppositionGroup OppositionGroup => null; #region Friends public List Friends => m_Friends; - public virtual bool AllowNewPetFriend - { - get{ return ( m_Friends == null || m_Friends.Count < 5 ); } - } + public virtual bool AllowNewPetFriend => ( m_Friends == null || m_Friends.Count < 5 ); public virtual bool IsPetFriend( Mobile m ) { @@ -1167,13 +1175,7 @@ namespace Server.Mobiles } } - public virtual bool DeleteCorpseOnDeath - { - get - { - return !Core.AOS && m_bSummoned; - } - } + public virtual bool DeleteCorpseOnDeath => !Core.AOS && m_bSummoned; public override void SetLocation( Point3D newLocation, bool isTeleport ) { @@ -1223,81 +1225,43 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int Loyalty { - get - { - return m_Loyalty; - } - set - { - m_Loyalty = Math.Min( Math.Max( value, 0 ), MaxLoyalty ); - } + get => m_Loyalty; + set => m_Loyalty = Math.Min( Math.Max( value, 0 ), MaxLoyalty ); } [CommandProperty( AccessLevel.GameMaster )] public WayPoint CurrentWayPoint { - get - { - return m_CurrentWayPoint; - } - set - { - m_CurrentWayPoint = value; - } + get => m_CurrentWayPoint; + set => m_CurrentWayPoint = value; } [CommandProperty( AccessLevel.GameMaster )] public IPoint2D TargetLocation { - get - { - return m_TargetLocation; - } - set - { - m_TargetLocation = value; - } + get => m_TargetLocation; + set => m_TargetLocation = value; } - public virtual Mobile ConstantFocus{ get{ return null; } } + public virtual Mobile ConstantFocus => null; - public virtual bool DisallowAllMoves - { - get - { - return false; - } - } + public virtual bool DisallowAllMoves => false; - public virtual bool InitialInnocent - { - get - { - return false; - } - } + public virtual bool InitialInnocent => false; - public virtual bool AlwaysMurderer - { - get - { - return false; - } - } + public virtual bool AlwaysMurderer => false; - public virtual bool AlwaysAttackable - { - get - { - return false; - } + public virtual bool AlwaysAttackable => false; + + [CommandProperty( AccessLevel.GameMaster )] + public virtual int DamageMin{ get => m_DamageMin; + set => m_DamageMin = value; } [CommandProperty( AccessLevel.GameMaster )] - public virtual int DamageMin{ get{ return m_DamageMin; } set{ m_DamageMin = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public virtual int DamageMax{ get{ return m_DamageMax; } set{ m_DamageMax = value; } } + public virtual int DamageMax{ get => m_DamageMax; + set => m_DamageMax = value; + } [CommandProperty( AccessLevel.GameMaster )] public override int HitsMax @@ -1322,8 +1286,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int HitsMaxSeed { - get{ return m_HitsMax; } - set{ m_HitsMax = value; } + get => m_HitsMax; + set => m_HitsMax = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -1349,8 +1313,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int StamMaxSeed { - get{ return m_StamMax; } - set{ m_StamMax = value; } + get => m_StamMax; + set => m_StamMax = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -1376,34 +1340,15 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int ManaMaxSeed { - get{ return m_ManaMax; } - set{ m_ManaMax = value; } + get => m_ManaMax; + set => m_ManaMax = value; } - public virtual bool CanOpenDoors - { - get - { - return !this.Body.IsAnimal && !this.Body.IsSea; - } - } + public virtual bool CanOpenDoors => !this.Body.IsAnimal && !this.Body.IsSea; - public virtual bool CanMoveOverObstacles - { - get - { - return Core.AOS || this.Body.IsMonster; - } - } + public virtual bool CanMoveOverObstacles => Core.AOS || this.Body.IsMonster; - public virtual bool CanDestroyObstacles - { - get - { - // to enable breaking of furniture, 'return CanMoveOverObstacles;' - return false; - } - } + public virtual bool CanDestroyObstacles => false; public void Unpacify() { @@ -1413,7 +1358,9 @@ namespace Server.Mobiles private HonorContext m_ReceivedHonorContext; - public HonorContext ReceivedHonorContext{ get{ return m_ReceivedHonorContext; } set{ m_ReceivedHonorContext = value; } } + public HonorContext ReceivedHonorContext{ get => m_ReceivedHonorContext; + set => m_ReceivedHonorContext = value; + } /* @@ -1426,7 +1373,7 @@ namespace Server.Mobiles */ - public virtual bool CanBeDistracted { get { return !Core.ML ; } } + public virtual bool CanBeDistracted => !Core.ML; public virtual void CheckDistracted( Mobile from ) { @@ -2327,7 +2274,7 @@ namespace Server.Mobiles return false; } - public virtual bool CanAngerOnTame{ get{ return false; } } + public virtual bool CanAngerOnTame => false; #region OnAction[...] @@ -2375,7 +2322,7 @@ namespace Server.Mobiles return base.OnDragDrop( from, dropped ); } - protected virtual BaseAI ForcedAI { get { return null; } } + protected virtual BaseAI ForcedAI => null; public void ChangeAIType( AIType NewAI ) { @@ -2430,10 +2377,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public AIType AI { - get - { - return m_CurrentAI; - } + get => m_CurrentAI; set { m_CurrentAI = value; @@ -2450,23 +2394,14 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.Administrator )] public bool Debug { - get - { - return m_DebugAI; - } - set - { - m_DebugAI = value; - } + get => m_DebugAI; + set => m_DebugAI = value; } [CommandProperty( AccessLevel.GameMaster )] public int Team { - get - { - return m_Team; - } + get => m_Team; set { m_Team = value; @@ -2482,92 +2417,50 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile FocusMob { - get - { - return m_FocusMob; - } - set - { - m_FocusMob = value; - } + get => m_FocusMob; + set => m_FocusMob = value; } [CommandProperty( AccessLevel.GameMaster )] public FightMode FightMode { - get - { - return m_FightMode; - } - set - { - m_FightMode = value; - } + get => m_FightMode; + set => m_FightMode = value; } [CommandProperty( AccessLevel.GameMaster )] public int RangePerception { - get - { - return m_RangePerception; - } - set - { - m_RangePerception = value; - } + get => m_RangePerception; + set => m_RangePerception = value; } [CommandProperty( AccessLevel.GameMaster )] public int RangeFight { - get - { - return m_RangeFight; - } - set - { - m_RangeFight = value; - } + get => m_RangeFight; + set => m_RangeFight = value; } [CommandProperty( AccessLevel.GameMaster )] public int RangeHome { - get - { - return m_RangeHome; - } - set - { - m_RangeHome = value; - } + get => m_RangeHome; + set => m_RangeHome = value; } [CommandProperty( AccessLevel.GameMaster )] public double ActiveSpeed { - get - { - return m_ActiveSpeed; - } - set - { - m_ActiveSpeed = value; - } + get => m_ActiveSpeed; + set => m_ActiveSpeed = value; } [CommandProperty( AccessLevel.GameMaster )] public double PassiveSpeed { - get - { - return m_PassiveSpeed; - } - set - { - m_PassiveSpeed = value; - } + get => m_PassiveSpeed; + set => m_PassiveSpeed = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -2594,36 +2487,21 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Point3D Home { - get - { - return m_Home; - } - set - { - m_Home = value; - } + get => m_Home; + set => m_Home = value; } [CommandProperty(AccessLevel.GameMaster)] public Map HomeMap { - get - { - return m_HomeMap; - } - set - { - m_HomeMap = value; - } + get => m_HomeMap; + set => m_HomeMap = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Controlled { - get - { - return m_Controlled; - } + get => m_Controlled; set { if ( m_Controlled == value ) @@ -2694,10 +2572,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile ControlMaster { - get - { - return m_ControlMaster; - } + get => m_ControlMaster; set { if ( m_ControlMaster == value || this == value ) @@ -2716,10 +2591,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile SummonMaster { - get - { - return m_SummonMaster; - } + get => m_SummonMaster; set { if ( m_SummonMaster == value || this == value ) @@ -2736,36 +2608,21 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile ControlTarget { - get - { - return m_ControlTarget; - } - set - { - m_ControlTarget = value; - } + get => m_ControlTarget; + set => m_ControlTarget = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D ControlDest { - get - { - return m_ControlDest; - } - set - { - m_ControlDest = value; - } + get => m_ControlDest; + set => m_ControlDest = value; } [CommandProperty( AccessLevel.GameMaster )] public OrderType ControlOrder { - get - { - return m_ControlOrder; - } + get => m_ControlOrder; set { m_ControlOrder = value; @@ -2781,101 +2638,56 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool BardProvoked { - get - { - return m_bBardProvoked; - } - set - { - m_bBardProvoked = value; - } + get => m_bBardProvoked; + set => m_bBardProvoked = value; } [CommandProperty( AccessLevel.GameMaster )] public bool BardPacified { - get - { - return m_bBardPacified; - } - set - { - m_bBardPacified = value; - } + get => m_bBardPacified; + set => m_bBardPacified = value; } [CommandProperty( AccessLevel.GameMaster )] public Mobile BardMaster { - get - { - return m_bBardMaster; - } - set - { - m_bBardMaster = value; - } + get => m_bBardMaster; + set => m_bBardMaster = value; } [CommandProperty( AccessLevel.GameMaster )] public Mobile BardTarget { - get - { - return m_bBardTarget; - } - set - { - m_bBardTarget = value; - } + get => m_bBardTarget; + set => m_bBardTarget = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime BardEndTime { - get - { - return m_timeBardEnd; - } - set - { - m_timeBardEnd = value; - } + get => m_timeBardEnd; + set => m_timeBardEnd = value; } [CommandProperty( AccessLevel.GameMaster )] public double MinTameSkill { - get - { - return m_MinTameSkill; - } - set - { - m_MinTameSkill = value; - } + get => m_MinTameSkill; + set => m_MinTameSkill = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Tamable { - get - { - return m_bTamable && !m_Paragon; - } - set - { - m_bTamable = value; - } + get => m_bTamable && !m_Paragon; + set => m_bTamable = value; } [CommandProperty( AccessLevel.Administrator )] public bool Summoned { - get - { - return m_bSummoned; - } + get => m_bSummoned; set { if ( m_bSummoned == value ) @@ -2893,40 +2705,35 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.Administrator )] public int ControlSlots { - get - { - return m_iControlSlots; - } - set - { - m_iControlSlots = value; - } + get => m_iControlSlots; + set => m_iControlSlots = value; } - public virtual bool NoHouseRestrictions{ get{ return false; } } - public virtual bool IsHouseSummonable{ get{ return false; } } + public virtual bool NoHouseRestrictions => false; + public virtual bool IsHouseSummonable => false; #region Corpse Resources - public virtual int Feathers{ get{ return 0; } } - public virtual int Wool{ get{ return 0; } } + public virtual int Feathers => 0; + public virtual int Wool => 0; - public virtual MeatType MeatType{ get{ return MeatType.Ribs; } } - public virtual int Meat{ get{ return 0; } } + public virtual MeatType MeatType => MeatType.Ribs; + public virtual int Meat => 0; - public virtual int Hides{ get{ return 0; } } - public virtual HideType HideType{ get{ return HideType.Regular; } } + public virtual int Hides => 0; + public virtual HideType HideType => HideType.Regular; + + public virtual int Scales => 0; + public virtual ScaleType ScaleType => ScaleType.Red; - public virtual int Scales{ get{ return 0; } } - public virtual ScaleType ScaleType{ get{ return ScaleType.Red; } } #endregion - public virtual bool AutoDispel{ get{ return false; } } - public virtual double AutoDispelChance{ get { return ((Core.SE) ? .10 : 1.0); } } + public virtual bool AutoDispel => false; + public virtual double AutoDispelChance => ((Core.SE) ? .10 : 1.0); - public virtual bool IsScaryToPets{ get{ return false; } } - public virtual bool IsScaredOfScaryThings{ get{ return true; } } + public virtual bool IsScaryToPets => false; + public virtual bool IsScaredOfScaryThings => true; - public virtual bool CanRummageCorpses{ get{ return false; } } + public virtual bool CanRummageCorpses => false; public virtual void OnGotMeleeAttack( Mobile attacker ) { @@ -2942,7 +2749,7 @@ namespace Server.Mobiles m.Delete(); } - public virtual bool DeleteOnRelease{ get{ return m_bSummoned; } } + public virtual bool DeleteOnRelease => m_bSummoned; public virtual void OnGaveMeleeAttack( Mobile defender ) { @@ -3099,7 +2906,7 @@ namespace Server.Mobiles } #region Teaching - public virtual bool CanTeach{ get{ return false; } } + public virtual bool CanTeach => false; public virtual bool CheckTeach( SkillName skill, Mobile from ) { @@ -4463,8 +4270,8 @@ namespace Server.Mobiles base.OnSingleClick( from ); } - public virtual double TreasureMapChance{ get{ return TreasureMap.LootChance; } } - public virtual int TreasureMapLevel{ get{ return -1; } } + public virtual double TreasureMapChance => TreasureMap.LootChance; + public virtual int TreasureMapLevel => -1; public virtual bool IgnoreYoungProtection => false; @@ -4535,8 +4342,8 @@ namespace Server.Mobiles public bool NoKillAwards { - get{ return m_NoKillAwards; } - set{ m_NoKillAwards = value; } + get => m_NoKillAwards; + set => m_NoKillAwards = value; } public int ComputeBonusDamage( List list, Mobile m ) @@ -4674,7 +4481,8 @@ namespace Server.Mobiles } #region Mondain's Legacy - public virtual bool GivesMLMinorArtifact{ get{ return false; } } + public virtual bool GivesMLMinorArtifact => false; + #endregion public virtual void OnKilledBy( Mobile mob ) @@ -4886,10 +4694,12 @@ namespace Server.Mobiles private long m_NextReacquireTime; - public long NextReacquireTime { get { return m_NextReacquireTime; } set { m_NextReacquireTime = value; } } + public long NextReacquireTime { get => m_NextReacquireTime; + set => m_NextReacquireTime = value; + } - public virtual TimeSpan ReacquireDelay{ get{ return TimeSpan.FromSeconds( 10.0 ); } } - public virtual bool ReacquireOnMovement{ get{ return false; } } + public virtual TimeSpan ReacquireDelay => TimeSpan.FromSeconds( 10.0 ); + public virtual bool ReacquireOnMovement => false; public virtual bool AcquireOnApproach => m_Paragon; public virtual int AcquireOnApproachRange => 10; @@ -5003,8 +4813,8 @@ namespace Server.Mobiles public static bool Summoning { - get{ return m_Summoning; } - set{ m_Summoning = value; } + get => m_Summoning; + set => m_Summoning = value; } public static bool Summon( BaseCreature creature, Mobile caster, Point3D p, int sound, TimeSpan duration ) @@ -5068,8 +4878,8 @@ namespace Server.Mobiles private long m_NextRummageTime; - public virtual bool CanBreath { get { return HasBreath && !Summoned; } } - public virtual bool IsDispellable { get { return Summoned && !IsAnimatedDead; } } + public virtual bool CanBreath => HasBreath && !Summoned; + public virtual bool IsDispellable => Summoned && !IsAnimatedDead; #region Healing public virtual bool CanHeal => false; @@ -5092,7 +4902,7 @@ namespace Server.Mobiles private long m_NextHealOwnerTime = Core.TickCount; private Timer m_HealTimer = null; - public bool IsHealing { get { return ( m_HealTimer != null ); } } + public bool IsHealing => ( m_HealTimer != null ); public virtual void HealStart( Mobile patient ) { @@ -5206,7 +5016,7 @@ namespace Server.Mobiles private long m_NextAura; public virtual bool HasAura => false; - public virtual TimeSpan AuraInterval { get { return TimeSpan.FromSeconds( 5 ); } } + public virtual TimeSpan AuraInterval => TimeSpan.FromSeconds( 5 ); public virtual int AuraRange => 4; public virtual int AuraBaseDamage => 5; @@ -5537,7 +5347,8 @@ namespace Server.Mobiles return base.CanBeDamaged(); } - public virtual bool PlayerRangeSensitive{ get{ return (this.CurrentWayPoint == null); } } //If they are following a waypoint, they'll continue to follow it even if players aren't around + public virtual bool PlayerRangeSensitive //If they are following a waypoint, they'll continue to follow it even if players aren't around + => (this.CurrentWayPoint == null); /* until we are sure about who should be getting deleted, move them instead */ /* On OSI, they despawn */ @@ -5551,13 +5362,7 @@ namespace Server.Mobiles !Controlled && !Summoned && Spawner is Spawner spawner && spawner.Map == Map; } - public virtual bool ReturnsToHome - { - get - { - return ( m_SeeksHome && ( Home != Point3D.Zero ) && !m_ReturnQueued && !Controlled && !Summoned ); - } - } + public virtual bool ReturnsToHome => ( m_SeeksHome && ( Home != Point3D.Zero ) && !m_ReturnQueued && !Controlled && !Summoned ); public override void OnSectorDeactivate() { @@ -5609,10 +5414,14 @@ namespace Server.Mobiles private int m_RemoveStep; [CommandProperty( AccessLevel.GameMaster )] - public bool RemoveIfUntamed{ get{ return m_RemoveIfUntamed; } set{ m_RemoveIfUntamed = value; } } + public bool RemoveIfUntamed{ get => m_RemoveIfUntamed; + set => m_RemoveIfUntamed = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int RemoveStep { get { return m_RemoveStep; } set { m_RemoveStep = value; } } + public int RemoveStep { get => m_RemoveStep; + set => m_RemoveStep = value; + } } public class LoyaltyTimer : Timer diff --git a/Scripts/Mobiles/Guards/ArcherGuard.cs b/Scripts/Mobiles/Guards/ArcherGuard.cs index 59fdefe31..104c5bd50 100644 --- a/Scripts/Mobiles/Guards/ArcherGuard.cs +++ b/Scripts/Mobiles/Guards/ArcherGuard.cs @@ -90,10 +90,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public override Mobile Focus { - get - { - return m_Focus; - } + get => m_Focus; set { if ( Deleted ) diff --git a/Scripts/Mobiles/Guards/WarriorGuard.cs b/Scripts/Mobiles/Guards/WarriorGuard.cs index ae382c600..5a3a5e4a6 100644 --- a/Scripts/Mobiles/Guards/WarriorGuard.cs +++ b/Scripts/Mobiles/Guards/WarriorGuard.cs @@ -105,10 +105,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public override Mobile Focus { - get - { - return m_Focus; - } + get => m_Focus; set { if ( Deleted ) diff --git a/Scripts/Mobiles/Healers/BaseHealer.cs b/Scripts/Mobiles/Healers/BaseHealer.cs index 53c329dd9..7fb5a16f4 100644 --- a/Scripts/Mobiles/Healers/BaseHealer.cs +++ b/Scripts/Mobiles/Healers/BaseHealer.cs @@ -8,7 +8,7 @@ namespace Server.Mobiles public abstract class BaseHealer : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override bool IsActiveVendor => false; public override bool IsInvulnerable => false; @@ -73,7 +73,7 @@ namespace Server.Mobiles AddItem( new Robe( GetRobeColor() ) ); } - public virtual bool HealsYoungPlayers{ get{ return true; } } + public virtual bool HealsYoungPlayers => true; public virtual bool CheckResurrect( Mobile m ) { diff --git a/Scripts/Mobiles/Healers/PricedHealer.cs b/Scripts/Mobiles/Healers/PricedHealer.cs index 3f8a5d3cc..a006ff997 100644 --- a/Scripts/Mobiles/Healers/PricedHealer.cs +++ b/Scripts/Mobiles/Healers/PricedHealer.cs @@ -9,8 +9,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int Price { - get{ return m_Price; } - set{ m_Price = value; } + get => m_Price; + set => m_Price = value; } [Constructible] diff --git a/Scripts/Mobiles/Monsters/AOS/ShadowKnight.cs b/Scripts/Mobiles/Monsters/AOS/ShadowKnight.cs index 308d05c42..5ba3bef3c 100644 --- a/Scripts/Mobiles/Monsters/AOS/ShadowKnight.cs +++ b/Scripts/Mobiles/Monsters/AOS/ShadowKnight.cs @@ -54,10 +54,7 @@ namespace Server.Mobiles AddLoot( LootPack.UltraRich, 2 ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void OnDeath( Container c ) { diff --git a/Scripts/Mobiles/Monsters/AOS/Treefellow.cs b/Scripts/Mobiles/Monsters/AOS/Treefellow.cs index 933ca7775..20056d6ea 100644 --- a/Scripts/Mobiles/Monsters/AOS/Treefellow.cs +++ b/Scripts/Mobiles/Monsters/AOS/Treefellow.cs @@ -40,10 +40,7 @@ namespace Server.Mobiles PackItem( new Log( Utility.RandomMinMax( 23, 34 ) ) ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int GetIdleSound() { diff --git a/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs b/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs index ef8867ba7..aa240125f 100644 --- a/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs +++ b/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles { public override string CorpseName => "a solen queen corpse"; private bool m_BurstSac; - public bool BurstSac{ get{ return m_BurstSac; } } + public bool BurstSac => m_BurstSac; public override string DefaultName => "a black solen queen"; diff --git a/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs b/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs index 838d187c1..6dba169a7 100644 --- a/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs +++ b/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles { public override string CorpseName => "a solen warrior corpse"; private bool m_BurstSac; - public bool BurstSac{ get{ return m_BurstSac; } } + public bool BurstSac => m_BurstSac; public override string DefaultName => "a black solen warrior"; diff --git a/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs b/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs index 2ca087c42..2e7ab3c59 100644 --- a/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs +++ b/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles { public override string CorpseName => "a solen queen corpse"; private bool m_BurstSac; - public bool BurstSac{ get{ return m_BurstSac; } } + public bool BurstSac => m_BurstSac; public override string DefaultName => "a red solen queen"; diff --git a/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs b/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs index 4168a0e53..78ca5f9e3 100644 --- a/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs +++ b/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles { public override string CorpseName => "a solen warrior corpse"; private bool m_BurstSac; - public bool BurstSac{ get{ return m_BurstSac; } } + public bool BurstSac => m_BurstSac; public override string DefaultName => "a red solen warrior"; diff --git a/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanAvenger.cs b/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanAvenger.cs index 01d203782..bb1887296 100644 --- a/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanAvenger.cs +++ b/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanAvenger.cs @@ -52,10 +52,7 @@ namespace Server.Mobiles public override int TreasureMapLevel => 3; public override int Meat => 2; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public TerathanAvenger( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanMatriarch.cs b/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanMatriarch.cs index f4b1d6fc9..46e56d653 100644 --- a/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanMatriarch.cs +++ b/Scripts/Mobiles/Monsters/Arachnid/Magic/TerathanMatriarch.cs @@ -52,10 +52,7 @@ namespace Server.Mobiles public override int TreasureMapLevel => 4; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public TerathanMatriarch( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanDrone.cs b/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanDrone.cs index d5ce60354..5c9950091 100644 --- a/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanDrone.cs +++ b/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanDrone.cs @@ -51,10 +51,7 @@ namespace Server.Mobiles public override int Meat => 4; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public TerathanDrone( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanWarrior.cs b/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanWarrior.cs index 6d2125ccd..2f52527cb 100644 --- a/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanWarrior.cs +++ b/Scripts/Mobiles/Monsters/Arachnid/Melee/TerathanWarrior.cs @@ -50,10 +50,7 @@ namespace Server.Mobiles public override int TreasureMapLevel => 1; public override int Meat => 4; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public TerathanWarrior( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/AncientLich.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/AncientLich.cs index f88ed4736..c2112002c 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/AncientLich.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/AncientLich.cs @@ -46,10 +46,7 @@ namespace Server.Mobiles } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int GetIdleSound() { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/Bogle.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/Bogle.cs index e19c19cf1..a30bf46f4 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/Bogle.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/Bogle.cs @@ -47,10 +47,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/BoneMagi.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/BoneMagi.cs index 4f18fc0ee..a7d685213 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/BoneMagi.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/BoneMagi.cs @@ -57,10 +57,7 @@ namespace Server.Mobiles public override bool BleedImmune => true; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Regular; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/Lich.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/Lich.cs index 5947fd9cc..6b518485b 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/Lich.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/Lich.cs @@ -55,10 +55,7 @@ namespace Server.Mobiles AddLoot( LootPack.MedScrolls, 2 ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override bool CanRummageCorpses => true; public override bool BleedImmune => true; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/LichLord.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/LichLord.cs index 788a5baaa..3af8e5c69 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/LichLord.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/LichLord.cs @@ -48,10 +48,7 @@ namespace Server.Mobiles PackNecroReg( 12, 40 ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void GenerateLoot() { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/OrcishMage.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/OrcishMage.cs index dd53fbe3e..8bacd0981 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/OrcishMage.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/OrcishMage.cs @@ -60,10 +60,7 @@ namespace Server.Mobiles public override int TreasureMapLevel => 1; public override int Meat => 1; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs index d2806b831..1aea739b7 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs @@ -66,10 +66,7 @@ namespace Server.Mobiles public override bool AlwaysMurderer => true; public override bool ShowFameTitle => false; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/Shade.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/Shade.cs index dacf4113a..c3d353e20 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/Shade.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/Shade.cs @@ -48,10 +48,7 @@ namespace Server.Mobiles public override bool BleedImmune => true; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Lethal; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/SkeletalMage.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/SkeletalMage.cs index fc601da54..906fcc82d 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/SkeletalMage.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/SkeletalMage.cs @@ -55,10 +55,7 @@ namespace Server.Mobiles public override bool BleedImmune => true; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Regular; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/Spectre.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/Spectre.cs index a282b7b77..fdd615f9b 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/Spectre.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/Spectre.cs @@ -48,10 +48,7 @@ namespace Server.Mobiles public override bool BleedImmune => true; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Lethal; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/Wraith.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/Wraith.cs index e2da794b7..dcb0666ac 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/Wraith.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/Wraith.cs @@ -48,10 +48,7 @@ namespace Server.Mobiles public override bool BleedImmune => true; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Lethal; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs index fb4ee2e59..5a9b657b5 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs @@ -66,10 +66,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Ghoul.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Ghoul.cs index 7cf0eeecd..88be9a236 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Ghoul.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Ghoul.cs @@ -51,10 +51,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Mummy.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Mummy.cs index f437dc495..eeb644745 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Mummy.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Mummy.cs @@ -60,10 +60,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Orc.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Orc.cs index a26e05378..273b563ff 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Orc.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Orc.cs @@ -72,10 +72,7 @@ namespace Server.Mobiles public override int TreasureMapLevel => 1; public override int Meat => 1; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs index b5c059595..20dc4d497 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs @@ -62,10 +62,7 @@ namespace Server.Mobiles public override bool CanRummageCorpses => true; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBrute.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBrute.cs index c603d2599..9276edaf9 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBrute.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcBrute.cs @@ -61,10 +61,7 @@ namespace Server.Mobiles public override Poison PoisonImmune => Poison.Lethal; public override int Meat => 2; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcCaptain.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcCaptain.cs index 00192959f..f5840bb9f 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcCaptain.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcCaptain.cs @@ -73,10 +73,7 @@ namespace Server.Mobiles public override bool CanRummageCorpses => true; public override int Meat => 1; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcishLord.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcishLord.cs index de80b1d0e..94633fcc0 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcishLord.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/OrcishLord.cs @@ -69,10 +69,7 @@ namespace Server.Mobiles public override int TreasureMapLevel => 1; public override int Meat => 1; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/RottingCorpse.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/RottingCorpse.cs index db2643bdb..2c4d43591 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/RottingCorpse.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/RottingCorpse.cs @@ -56,10 +56,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Savage.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Savage.cs index 4493b2a03..d047f46a7 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Savage.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Savage.cs @@ -60,10 +60,7 @@ namespace Server.Mobiles public override bool AlwaysMurderer => true; public override bool ShowFameTitle => false; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool IsEnemy( Mobile m ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/SavageRider.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/SavageRider.cs index 2d0fa11e7..90b52b66d 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/SavageRider.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/SavageRider.cs @@ -57,10 +57,7 @@ namespace Server.Mobiles public override bool AlwaysMurderer => true; public override bool ShowFameTitle => false; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.SavagesAndOrcs; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs; public override bool OnBeforeDeath() { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/SkeletalKnight.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/SkeletalKnight.cs index 1e0c03064..ce24ddf3e 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/SkeletalKnight.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/SkeletalKnight.cs @@ -65,10 +65,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Skeleton.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Skeleton.cs index 3a40792bd..7ef77b08d 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Skeleton.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Skeleton.cs @@ -60,10 +60,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs index 41bb798af..d4ed53f71 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs @@ -63,10 +63,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusMinion.cs b/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusMinion.cs index 3c18bc840..4b725103f 100644 --- a/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusMinion.cs +++ b/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusMinion.cs @@ -6,8 +6,9 @@ namespace Server.Mobiles { public override string CorpseName => "a minion's corpse"; private bool m_FieldActive; - public bool FieldActive{ get{ return m_FieldActive; } } - public bool CanUseField{ get{ return Hits >= HitsMax * 9 / 10; } } // TODO: an OSI bug prevents to verify this + public bool FieldActive => m_FieldActive; + public bool CanUseField // TODO: an OSI bug prevents to verify this + => Hits >= HitsMax * 9 / 10; public override bool IsScaredOfScaryThings => false; public override bool IsScaryToPets => true; diff --git a/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusOverseer.cs b/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusOverseer.cs index d0698a23d..a125799fd 100644 --- a/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusOverseer.cs +++ b/Scripts/Mobiles/Monsters/LBR/Exodus/ExodusOverseer.cs @@ -6,8 +6,9 @@ namespace Server.Mobiles { public override string CorpseName => "an overseer's corpse"; private bool m_FieldActive; - public bool FieldActive{ get{ return m_FieldActive; } } - public bool CanUseField{ get{ return Hits >= HitsMax * 9 / 10; } } // TODO: an OSI bug prevents to verify this + public bool FieldActive => m_FieldActive; + public bool CanUseField // TODO: an OSI bug prevents to verify this + => Hits >= HitsMax * 9 / 10; public override bool IsScaredOfScaryThings => false; public override bool IsScaryToPets => true; diff --git a/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/MLDryad.cs b/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/MLDryad.cs index 0458e4887..3a5575c02 100644 --- a/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/MLDryad.cs +++ b/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/MLDryad.cs @@ -8,10 +8,7 @@ namespace Server.Mobiles public override string CorpseName => "a dryad's corpse"; public override bool InitialInnocent => true; - public override OppositionGroup OppositionGroup - { - get { return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override string DefaultName => "a dryad"; diff --git a/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/Satyr.cs b/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/Satyr.cs index 7857608e1..2912760ce 100644 --- a/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/Satyr.cs +++ b/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/Satyr.cs @@ -42,10 +42,7 @@ namespace Server.Mobiles PackArcanceScroll( 0.05 ); } - public override OppositionGroup OppositionGroup - { - get { return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void GenerateLoot() { diff --git a/Scripts/Mobiles/Monsters/ML/Humanoid/Melee/FerelTreefellow.cs b/Scripts/Mobiles/Monsters/ML/Humanoid/Melee/FerelTreefellow.cs index 80b4f0d9d..438ad1216 100644 --- a/Scripts/Mobiles/Monsters/ML/Humanoid/Melee/FerelTreefellow.cs +++ b/Scripts/Mobiles/Monsters/ML/Humanoid/Melee/FerelTreefellow.cs @@ -41,10 +41,7 @@ namespace Server.Mobiles PackItem( new Log( Utility.RandomMinMax( 23, 34 ) ) ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int GetIdleSound() { diff --git a/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs b/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs index 489550d0b..b56acb94a 100644 --- a/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs +++ b/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs @@ -323,8 +323,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool Corrosive { - get { return m_Corrosive; } - set { m_Corrosive = value; } + get => m_Corrosive; + set => m_Corrosive = value; } [Constructible] diff --git a/Scripts/Mobiles/Monsters/ML/Special/Twaulo.cs b/Scripts/Mobiles/Monsters/ML/Special/Twaulo.cs index 6123ff1ef..ffbf34d0e 100644 --- a/Scripts/Mobiles/Monsters/ML/Special/Twaulo.cs +++ b/Scripts/Mobiles/Monsters/ML/Special/Twaulo.cs @@ -67,10 +67,7 @@ namespace Server.Mobiles AddLoot(LootPack.Gems); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override bool Unprovokable => true; public override Poison PoisonImmune => Poison.Regular; diff --git a/Scripts/Mobiles/Monsters/ML/Twisted Weald/Changeling.cs b/Scripts/Mobiles/Monsters/ML/Twisted Weald/Changeling.cs index 1c2bbda48..1a94a720c 100644 --- a/Scripts/Mobiles/Monsters/ML/Twisted Weald/Changeling.cs +++ b/Scripts/Mobiles/Monsters/ML/Twisted Weald/Changeling.cs @@ -74,7 +74,7 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile MorphedInto { - get { return m_MorphedInto; } + get => m_MorphedInto; set { if ( value == this ) diff --git a/Scripts/Mobiles/Monsters/Misc/Magic/DarkWisp.cs b/Scripts/Mobiles/Monsters/Misc/Magic/DarkWisp.cs index 53487ba69..3009cc719 100644 --- a/Scripts/Mobiles/Monsters/Misc/Magic/DarkWisp.cs +++ b/Scripts/Mobiles/Monsters/Misc/Magic/DarkWisp.cs @@ -58,10 +58,7 @@ namespace Server.Mobiles AddLoot( LootPack.Average ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public DarkWisp( Serial serial ) : base( serial ) diff --git a/Scripts/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs b/Scripts/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs index 80b5ffaf5..025352cd0 100644 --- a/Scripts/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs +++ b/Scripts/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs @@ -77,10 +77,7 @@ namespace Server.Mobiles } } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int Feathers => 100; diff --git a/Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs b/Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs index 5d59cd929..d8cb179b7 100644 --- a/Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs +++ b/Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs @@ -67,10 +67,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs b/Scripts/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs index a2ec0a1b6..dbcffa84d 100644 --- a/Scripts/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs +++ b/Scripts/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs @@ -60,10 +60,7 @@ namespace Server.Mobiles { } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs b/Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs index ce2fff668..8f78a0138 100644 --- a/Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs +++ b/Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs @@ -63,10 +63,7 @@ namespace Server.Mobiles AddLoot( LootPack.Average ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public Wisp( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs b/Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs index 849a2b60b..e04e80979 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs @@ -49,10 +49,7 @@ namespace Server.Mobiles AddLoot( LootPack.Gems ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int Meat => 1; public override int Hides => 8; diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs index 8069be1c5..2a9ed2766 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs @@ -14,22 +14,19 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int TotalDevoured { - get { return m_DevourTotal; } - set { m_DevourTotal = value; } + get => m_DevourTotal; + set => m_DevourTotal = value; } [CommandProperty( AccessLevel.GameMaster )] public int DevourGoal { - get { return ( IsParagon ? m_DevourGoal + 25 : m_DevourGoal ); } - set { m_DevourGoal = value; } + get => ( IsParagon ? m_DevourGoal + 25 : m_DevourGoal ); + set => m_DevourGoal = value; } [CommandProperty( AccessLevel.GameMaster )] - public bool HasMetalChest - { - get { return m_HasMetalChest; } - } + public bool HasMetalChest => m_HasMetalChest; public override string DefaultName => "a plague beast"; diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs index 493b1118f..94922d4af 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs @@ -14,8 +14,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile OpenedBy { - get { return m_OpenedBy; } - set { m_OpenedBy = value; } + get => m_OpenedBy; + set => m_OpenedBy = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -296,15 +296,9 @@ namespace Server.Mobiles private int m_Count; private int m_Deadline; - public int Count - { - get { return m_Count; } - } + public int Count => m_Count; - public int Deadline - { - get { return m_Deadline; } - } + public int Deadline => m_Deadline; public DecayTimer( PlagueBeastLord lord ) : this( lord, 0, 120 ) { diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs index a26d0bb50..05955b337 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs @@ -13,15 +13,15 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime ExpireTime { - get{ return m_ExpireTime; } - set{ m_ExpireTime = value; } + get => m_ExpireTime; + set => m_ExpireTime = value; } [Constructible] diff --git a/Scripts/Mobiles/Monsters/Ore Elementals/AgapiteElemental.cs b/Scripts/Mobiles/Monsters/Ore Elementals/AgapiteElemental.cs index 1d12427d4..6859e0549 100644 --- a/Scripts/Mobiles/Monsters/Ore Elementals/AgapiteElemental.cs +++ b/Scripts/Mobiles/Monsters/Ore Elementals/AgapiteElemental.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class AgapiteElemental : BaseCreature { public override string CorpseName => "an ore elemental corpse"; - public override string DefaultName{ get { return "an agapite elemental"; } } + public override string DefaultName => "an agapite elemental"; [Constructible] public AgapiteElemental() : this( 2 ) diff --git a/Scripts/Mobiles/Monsters/Reptile/Magic/Leviathan.cs b/Scripts/Mobiles/Monsters/Reptile/Magic/Leviathan.cs index cedb1cac7..56bacc26c 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Magic/Leviathan.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Magic/Leviathan.cs @@ -10,8 +10,8 @@ namespace Server.Mobiles public Mobile Fisher { - get{ return m_Fisher; } - set{ m_Fisher = value; } + get => m_Fisher; + set => m_Fisher = value; } public override string DefaultName => "a leviathan"; diff --git a/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianArchmage.cs b/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianArchmage.cs index b1af1c739..f71a7bd01 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianArchmage.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianArchmage.cs @@ -57,10 +57,7 @@ namespace Server.Mobiles public override int Meat => 1; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public OphidianArchmage( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMage.cs b/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMage.cs index 3c89bba6b..4308137b5 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMage.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMage.cs @@ -58,10 +58,7 @@ namespace Server.Mobiles public override int Meat => 1; public override int TreasureMapLevel => 2; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public OphidianMage( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMatriarch.cs b/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMatriarch.cs index ceaf61e62..0960f4c3a 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMatriarch.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Magic/OphidianMatriarch.cs @@ -50,10 +50,7 @@ namespace Server.Mobiles public override Poison PoisonImmune => Poison.Greater; public override int TreasureMapLevel => 4; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public OphidianMatriarch( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianKnight.cs b/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianKnight.cs index a11135377..c75b8e511 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianKnight.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianKnight.cs @@ -60,10 +60,7 @@ namespace Server.Mobiles public override Poison HitPoison => Poison.Lethal; public override int TreasureMapLevel => 3; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public OphidianKnight( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianWarrior.cs b/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianWarrior.cs index d70127848..c395b2af6 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianWarrior.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Melee/OphidianWarrior.cs @@ -53,10 +53,7 @@ namespace Server.Mobiles public override int Meat => 1; public override int TreasureMapLevel => 1; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.TerathansAndOphidians; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.TerathansAndOphidians; public OphidianWarrior( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Monsters/SE/BakeKitsune.cs b/Scripts/Mobiles/Monsters/SE/BakeKitsune.cs index bfff010b7..fa67bee05 100644 --- a/Scripts/Mobiles/Monsters/SE/BakeKitsune.cs +++ b/Scripts/Mobiles/Monsters/SE/BakeKitsune.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class BakeKitsune : BaseCreature { public override string CorpseName => "a bake kitsune corpse"; - public override string DefaultName{ get { return "a bake kitsune"; } } + public override string DefaultName => "a bake kitsune"; [Constructible] public BakeKitsune() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 ) diff --git a/Scripts/Mobiles/Monsters/SE/FireBeetle.cs b/Scripts/Mobiles/Monsters/SE/FireBeetle.cs index b6e412236..f97493b3a 100644 --- a/Scripts/Mobiles/Monsters/SE/FireBeetle.cs +++ b/Scripts/Mobiles/Monsters/SE/FireBeetle.cs @@ -8,7 +8,7 @@ namespace Server.Mobiles public override string CorpseName => "a fire beetle corpse"; public override bool SubdueBeforeTame => true; // Must be beaten into submission public override bool StatLossAfterTame => true; - public virtual double BoostedSpeed{ get{ return 0.1; } } + public virtual double BoostedSpeed => 0.1; public override bool ReduceSpeedWithDamage => false; [Constructible] diff --git a/Scripts/Mobiles/PlayerMobile.cs b/Scripts/Mobiles/PlayerMobile.cs index da9a96731..aba67f3d1 100644 --- a/Scripts/Mobiles/PlayerMobile.cs +++ b/Scripts/Mobiles/PlayerMobile.cs @@ -163,10 +163,11 @@ namespace Server.Mobiles { } - public DateTime TimeStamp { get{ return m_Stamp; } } + public DateTime TimeStamp => m_Stamp; + public int Count { - get { return m_Count; } + get => m_Count; set { m_Count = value; m_Stamp = DateTime.UtcNow; } } } @@ -203,28 +204,16 @@ namespace Server.Mobiles public List RecentlyReported { - get - { - return m_RecentlyReported; - } - set - { - m_RecentlyReported = value; - } + get => m_RecentlyReported; + set => m_RecentlyReported = value; } public List AutoStabled => m_AutoStabled; public bool NinjaWepCooldown { - get - { - return m_NinjaWepCooldown; - } - set - { - m_NinjaWepCooldown = value; - } + get => m_NinjaWepCooldown; + set => m_NinjaWepCooldown = value; } public List AllFollowers @@ -246,50 +235,47 @@ namespace Server.Mobiles else return m_GuildRank; } - set{ m_GuildRank = value; } + set => m_GuildRank = value; } [CommandProperty( AccessLevel.GameMaster )] public int GuildMessageHue { - get{ return m_GuildMessageHue; } - set{ m_GuildMessageHue = value; } + get => m_GuildMessageHue; + set => m_GuildMessageHue = value; } [CommandProperty( AccessLevel.GameMaster )] public int AllianceMessageHue { - get { return m_AllianceMessageHue; } - set { m_AllianceMessageHue = value; } + get => m_AllianceMessageHue; + set => m_AllianceMessageHue = value; } [CommandProperty( AccessLevel.GameMaster )] public int Profession { - get{ return m_Profession; } - set{ m_Profession = value; } + get => m_Profession; + set => m_Profession = value; } public int StepsTaken { - get{ return m_StepsTaken; } - set{ m_StepsTaken = value; } + get => m_StepsTaken; + set => m_StepsTaken = value; } [CommandProperty( AccessLevel.GameMaster )] public bool IsStealthing // IsStealthing should be moved to Server.Mobiles { - get { return m_IsStealthing; } - set { m_IsStealthing = value; } + get => m_IsStealthing; + set => m_IsStealthing = value; } [CommandProperty( AccessLevel.GameMaster )] public bool IgnoreMobiles // IgnoreMobiles should be moved to Server.Mobiles { - get - { - return m_IgnoreMobiles; - } + get => m_IgnoreMobiles; set { if ( m_IgnoreMobiles != value ) @@ -303,42 +289,39 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public NpcGuild NpcGuild { - get{ return m_NpcGuild; } - set{ m_NpcGuild = value; } + get => m_NpcGuild; + set => m_NpcGuild = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime NpcGuildJoinTime { - get{ return m_NpcGuildJoinTime; } - set{ m_NpcGuildJoinTime = value; } + get => m_NpcGuildJoinTime; + set => m_NpcGuildJoinTime = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime NextBODTurnInTime { - get{ return m_NextBODTurnInTime; } - set{ m_NextBODTurnInTime = value; } + get => m_NextBODTurnInTime; + set => m_NextBODTurnInTime = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime LastOnline { - get{ return m_LastOnline; } - set{ m_LastOnline = value; } + get => m_LastOnline; + set => m_LastOnline = value; } [CommandProperty( AccessLevel.GameMaster )] - public long LastMoved - { - get{ return LastMoveTime; } - } + public long LastMoved => LastMoveTime; [CommandProperty( AccessLevel.GameMaster )] public TimeSpan NpcGuildGameTime { - get{ return m_NpcGuildGameTime; } - set{ m_NpcGuildGameTime = value; } + get => m_NpcGuildGameTime; + set => m_NpcGuildGameTime = value; } private int m_ToTItemsTurnedIn; @@ -346,8 +329,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int ToTItemsTurnedIn { - get { return m_ToTItemsTurnedIn; } - set { m_ToTItemsTurnedIn = value; } + get => m_ToTItemsTurnedIn; + set => m_ToTItemsTurnedIn = value; } private int m_ToTTotalMonsterFame; @@ -355,21 +338,21 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public int ToTTotalMonsterFame { - get { return m_ToTTotalMonsterFame; } - set { m_ToTTotalMonsterFame = value; } + get => m_ToTTotalMonsterFame; + set => m_ToTTotalMonsterFame = value; } public int ExecutesLightningStrike { - get { return m_ExecutesLightningStrike; } - set { m_ExecutesLightningStrike = value; } + get => m_ExecutesLightningStrike; + set => m_ExecutesLightningStrike = value; } [CommandProperty( AccessLevel.GameMaster )] public int ToothAche { - get { return CandyCane.GetToothAche( this ); } - set { CandyCane.SetToothAche( this, value ); } + get => CandyCane.GetToothAche( this ); + set => CandyCane.SetToothAche( this, value ); } #endregion @@ -377,109 +360,106 @@ namespace Server.Mobiles #region PlayerFlags public PlayerFlag Flags { - get{ return m_Flags; } - set{ m_Flags = value; } + get => m_Flags; + set => m_Flags = value; } [CommandProperty( AccessLevel.GameMaster )] public bool PagingSquelched { - get{ return GetFlag( PlayerFlag.PagingSquelched ); } - set{ SetFlag( PlayerFlag.PagingSquelched, value ); } + get => GetFlag( PlayerFlag.PagingSquelched ); + set => SetFlag( PlayerFlag.PagingSquelched, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool Glassblowing { - get{ return GetFlag( PlayerFlag.Glassblowing ); } - set{ SetFlag( PlayerFlag.Glassblowing, value ); } + get => GetFlag( PlayerFlag.Glassblowing ); + set => SetFlag( PlayerFlag.Glassblowing, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool Masonry { - get{ return GetFlag( PlayerFlag.Masonry ); } - set{ SetFlag( PlayerFlag.Masonry, value ); } + get => GetFlag( PlayerFlag.Masonry ); + set => SetFlag( PlayerFlag.Masonry, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool SandMining { - get{ return GetFlag( PlayerFlag.SandMining ); } - set{ SetFlag( PlayerFlag.SandMining, value ); } + get => GetFlag( PlayerFlag.SandMining ); + set => SetFlag( PlayerFlag.SandMining, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool StoneMining { - get{ return GetFlag( PlayerFlag.StoneMining ); } - set{ SetFlag( PlayerFlag.StoneMining, value ); } + get => GetFlag( PlayerFlag.StoneMining ); + set => SetFlag( PlayerFlag.StoneMining, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool ToggleMiningStone { - get{ return GetFlag( PlayerFlag.ToggleMiningStone ); } - set{ SetFlag( PlayerFlag.ToggleMiningStone, value ); } + get => GetFlag( PlayerFlag.ToggleMiningStone ); + set => SetFlag( PlayerFlag.ToggleMiningStone, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool KarmaLocked { - get{ return GetFlag( PlayerFlag.KarmaLocked ); } - set{ SetFlag( PlayerFlag.KarmaLocked, value ); } + get => GetFlag( PlayerFlag.KarmaLocked ); + set => SetFlag( PlayerFlag.KarmaLocked, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool AutoRenewInsurance { - get{ return GetFlag( PlayerFlag.AutoRenewInsurance ); } - set{ SetFlag( PlayerFlag.AutoRenewInsurance, value ); } + get => GetFlag( PlayerFlag.AutoRenewInsurance ); + set => SetFlag( PlayerFlag.AutoRenewInsurance, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool UseOwnFilter { - get{ return GetFlag( PlayerFlag.UseOwnFilter ); } - set{ SetFlag( PlayerFlag.UseOwnFilter, value ); } + get => GetFlag( PlayerFlag.UseOwnFilter ); + set => SetFlag( PlayerFlag.UseOwnFilter, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool PublicMyRunUO { - get{ return GetFlag( PlayerFlag.PublicMyRunUO ); } + get => GetFlag( PlayerFlag.PublicMyRunUO ); set{ SetFlag( PlayerFlag.PublicMyRunUO, value ); InvalidateMyRunUO(); } } [CommandProperty( AccessLevel.GameMaster )] public bool AcceptGuildInvites { - get{ return GetFlag( PlayerFlag.AcceptGuildInvites ); } - set{ SetFlag( PlayerFlag.AcceptGuildInvites, value ); } + get => GetFlag( PlayerFlag.AcceptGuildInvites ); + set => SetFlag( PlayerFlag.AcceptGuildInvites, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool HasStatReward { - get{ return GetFlag( PlayerFlag.HasStatReward ); } - set{ SetFlag( PlayerFlag.HasStatReward, value ); } + get => GetFlag( PlayerFlag.HasStatReward ); + set => SetFlag( PlayerFlag.HasStatReward, value ); } [CommandProperty( AccessLevel.GameMaster )] public bool RefuseTrades { - get{ return GetFlag( PlayerFlag.RefuseTrades ); } - set{ SetFlag( PlayerFlag.RefuseTrades, value ); } + get => GetFlag( PlayerFlag.RefuseTrades ); + set => SetFlag( PlayerFlag.RefuseTrades, value ); } #endregion #region Auto Arrow Recovery private Dictionary m_RecoverableAmmo = new Dictionary(); - public Dictionary RecoverableAmmo - { - get { return m_RecoverableAmmo; } - } + public Dictionary RecoverableAmmo => m_RecoverableAmmo; public void RecoverAmmo() { @@ -535,23 +515,20 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public DateTime AnkhNextUse { - get{ return m_AnkhNextUse; } - set{ m_AnkhNextUse = value; } + get => m_AnkhNextUse; + set => m_AnkhNextUse = value; } [CommandProperty( AccessLevel.GameMaster )] - public TimeSpan DisguiseTimeLeft - { - get{ return DisguiseTimers.TimeRemaining( this ); } - } + public TimeSpan DisguiseTimeLeft => DisguiseTimers.TimeRemaining( this ); private DateTime m_PeacedUntil; [CommandProperty( AccessLevel.GameMaster )] public DateTime PeacedUntil { - get { return m_PeacedUntil; } - set { m_PeacedUntil = value; } + get => m_PeacedUntil; + set => m_PeacedUntil = value; } #region Scroll of Alacrity @@ -560,8 +537,8 @@ namespace Server.Mobiles [CommandProperty(AccessLevel.GameMaster)] public DateTime AcceleratedStart { - get { return m_AcceleratedStart; } - set { m_AcceleratedStart = value; } + get => m_AcceleratedStart; + set => m_AcceleratedStart = value; } private SkillName m_AcceleratedSkill; @@ -569,8 +546,8 @@ namespace Server.Mobiles [CommandProperty(AccessLevel.GameMaster)] public SkillName AcceleratedSkill { - get { return m_AcceleratedSkill; } - set { m_AcceleratedSkill = value; } + get => m_AcceleratedSkill; + set => m_AcceleratedSkill = value; } #endregion @@ -704,8 +681,8 @@ namespace Server.Mobiles public DesignContext DesignContext { - get{ return m_DesignContext; } - set{ m_DesignContext = value; } + get => m_DesignContext; + set => m_DesignContext = value; } public static void Initialize() @@ -741,13 +718,7 @@ namespace Server.Mobiles private MountBlock m_MountBlock; - public BlockMountType MountBlockReason - { - get - { - return ( CheckBlock( m_MountBlock ) ) ? m_MountBlock.m_Type : BlockMountType.None; - } - } + public BlockMountType MountBlockReason => ( CheckBlock( m_MountBlock ) ) ? m_MountBlock.m_Type : BlockMountType.None; private static bool CheckBlock( MountBlock block ) { @@ -1411,16 +1382,11 @@ namespace Server.Mobiles } [CommandProperty( AccessLevel.GameMaster )] - public override int StamMax - { - get{ return base.StamMax + AosAttributes.GetValue( this, AosAttribute.BonusStam ); } - } + public override int StamMax => base.StamMax + AosAttributes.GetValue( this, AosAttribute.BonusStam ); [CommandProperty( AccessLevel.GameMaster )] - public override int ManaMax - { - get{ return base.ManaMax + AosAttributes.GetValue( this, AosAttribute.BonusMana ) + ((Core.ML && Race == Race.Elf) ? 20 : 0); } - } + public override int ManaMax => base.ManaMax + AosAttributes.GetValue( this, AosAttribute.BonusMana ) + ((Core.ML && Race == Race.Elf) ? 20 : 0); + #endregion #region Stat Getters/Setters @@ -1435,10 +1401,7 @@ namespace Server.Mobiles return base.Str; } - set - { - base.Str = value; - } + set => base.Str = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -1451,10 +1414,7 @@ namespace Server.Mobiles return base.Int; } - set - { - base.Int = value; - } + set => base.Int = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -1467,10 +1427,7 @@ namespace Server.Mobiles return base.Dex; } - set - { - base.Dex = value; - } + set => base.Dex = value; } #endregion @@ -1542,7 +1499,7 @@ namespace Server.Mobiles return DesignContext.Check( this ); } - public SkillName[] AnimalFormRestrictedSkills{ get{ return m_AnimalFormRestrictedSkills; } } + public SkillName[] AnimalFormRestrictedSkills => m_AnimalFormRestrictedSkills; private SkillName[] m_AnimalFormRestrictedSkills = new SkillName[] { @@ -2618,10 +2575,7 @@ namespace Server.Mobiles private List m_EquipSnapshot; - public List EquipSnapshot - { - get { return m_EquipSnapshot; } - } + public List EquipSnapshot => m_EquipSnapshot; private bool FindItems_Callback(Item item) { @@ -2953,8 +2907,8 @@ namespace Server.Mobiles public SkillName Learning { - get{ return m_Learning; } - set{ m_Learning = value; } + get => m_Learning; + set => m_Learning = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -2969,10 +2923,7 @@ namespace Server.Mobiles return ts; } - set - { - m_SavagePaintExpiration = DateTime.UtcNow + value; - } + set => m_SavagePaintExpiration = DateTime.UtcNow + value; } [CommandProperty( AccessLevel.GameMaster )] @@ -3016,15 +2967,15 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public DateTime LastEscortTime { - get{ return m_LastEscortTime; } - set{ m_LastEscortTime = value; } + get => m_LastEscortTime; + set => m_LastEscortTime = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime LastPetBallTime { - get{ return m_LastPetBallTime; } - set{ m_LastPetBallTime = value; } + get => m_LastPetBallTime; + set => m_LastPetBallTime = value; } public PlayerMobile() @@ -3221,15 +3172,9 @@ namespace Server.Mobiles InvalidateMyRunUO(); } - public List VisibilityList - { - get{ return m_VisList; } - } + public List VisibilityList => m_VisList; - public List PermaFlags - { - get{ return m_PermaFlags; } - } + public List PermaFlags => m_PermaFlags; public override int Luck => AosAttributes.GetValue( this, AosAttribute.Luck ); @@ -3292,10 +3237,7 @@ namespace Server.Mobiles private Engines.BulkOrders.BOBFilter m_BOBFilter; - public Engines.BulkOrders.BOBFilter BOBFilter - { - get{ return m_BOBFilter; } - } + public Engines.BulkOrders.BOBFilter BOBFilter => m_BOBFilter; public override void Deserialize( GenericReader reader ) { @@ -3767,10 +3709,7 @@ namespace Server.Mobiles } [CommandProperty( AccessLevel.GameMaster )] - public DateTime SessionStart - { - get{ return m_SessionStart; } - } + public DateTime SessionStart => m_SessionStart; [CommandProperty( AccessLevel.GameMaster )] public TimeSpan GameTime @@ -3962,17 +3901,14 @@ namespace Server.Mobiles public bool BedrollLogout { - get{ return m_BedrollLogout; } - set{ m_BedrollLogout = value; } + get => m_BedrollLogout; + set => m_BedrollLogout = value; } [CommandProperty( AccessLevel.GameMaster )] public override bool Paralyzed { - get - { - return base.Paralyzed; - } + get => base.Paralyzed; set { base.Paralyzed = value; @@ -3990,8 +3926,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Ethics.Player EthicPlayer { - get { return m_EthicPlayer; } - set { m_EthicPlayer = value; } + get => m_EthicPlayer; + set => m_EthicPlayer = value; } #endregion @@ -4000,8 +3936,8 @@ namespace Server.Mobiles public PlayerState FactionPlayerState { - get{ return m_FactionPlayerState; } - set{ m_FactionPlayerState = value; } + get => m_FactionPlayerState; + set => m_FactionPlayerState = value; } #endregion @@ -4009,14 +3945,11 @@ namespace Server.Mobiles private Engines.ConPVP.DuelContext m_DuelContext; private Engines.ConPVP.DuelPlayer m_DuelPlayer; - public Engines.ConPVP.DuelContext DuelContext - { - get{ return m_DuelContext; } - } + public Engines.ConPVP.DuelContext DuelContext => m_DuelContext; public Engines.ConPVP.DuelPlayer DuelPlayer { - get{ return m_DuelPlayer; } + get => m_DuelPlayer; set { bool wasInTourny = ( m_DuelContext != null && !m_DuelContext.Finished && m_DuelContext.m_Tournament != null ); @@ -4043,21 +3976,21 @@ namespace Server.Mobiles public QuestSystem Quest { - get{ return m_Quest; } - set{ m_Quest = value; } + get => m_Quest; + set => m_Quest = value; } public List DoneQuests { - get{ return m_DoneQuests; } - set{ m_DoneQuests = value; } + get => m_DoneQuests; + set => m_DoneQuests = value; } [CommandProperty( AccessLevel.GameMaster )] public SolenFriendship SolenFriendship { - get{ return m_SolenFriendship; } - set{ m_SolenFriendship = value; } + get => m_SolenFriendship; + set => m_SolenFriendship = value; } #endregion @@ -4066,8 +3999,8 @@ namespace Server.Mobiles public bool ChangedMyRunUO { - get{ return m_ChangedMyRunUO; } - set{ m_ChangedMyRunUO = value; } + get => m_ChangedMyRunUO; + set => m_ChangedMyRunUO = value; } public void InvalidateMyRunUO() @@ -4159,7 +4092,7 @@ namespace Server.Mobiles private long m_NextMovementTime; private bool m_HasMoved; - public virtual bool UsesFastwalkPrevention{ get{ return ( AccessLevel < AccessLevel.Counselor ); } } + public virtual bool UsesFastwalkPrevention => ( AccessLevel < AccessLevel.Counselor ); public override int ComputeMovementSpeed( Direction dir, bool checkTurning ) { @@ -4216,7 +4149,7 @@ namespace Server.Mobiles public Type EnemyOfOneType { - get{ return m_EnemyOfOneType; } + get => m_EnemyOfOneType; set { Type oldType = m_EnemyOfOneType; @@ -4233,8 +4166,8 @@ namespace Server.Mobiles public bool WaitingForEnemy { - get{ return m_WaitingForEnemy; } - set{ m_WaitingForEnemy = value; } + get => m_WaitingForEnemy; + set => m_WaitingForEnemy = value; } private void DeltaEnemies( Type oldType, Type newType ) @@ -4325,32 +4258,50 @@ namespace Server.Mobiles private DateTime m_LastSacrificeLoss; private int m_AvailableResurrects; - public DateTime LastSacrificeGain{ get{ return m_LastSacrificeGain; } set{ m_LastSacrificeGain = value; } } - public DateTime LastSacrificeLoss{ get{ return m_LastSacrificeLoss; } set{ m_LastSacrificeLoss = value; } } + public DateTime LastSacrificeGain{ get => m_LastSacrificeGain; + set => m_LastSacrificeGain = value; + } + public DateTime LastSacrificeLoss{ get => m_LastSacrificeLoss; + set => m_LastSacrificeLoss = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int AvailableResurrects{ get{ return m_AvailableResurrects; } set{ m_AvailableResurrects = value; } } + public int AvailableResurrects{ get => m_AvailableResurrects; + set => m_AvailableResurrects = value; + } private DateTime m_NextJustAward; private DateTime m_LastJusticeLoss; private List m_JusticeProtectors; - public DateTime LastJusticeLoss{ get{ return m_LastJusticeLoss; } set{ m_LastJusticeLoss = value; } } - public List JusticeProtectors { get { return m_JusticeProtectors; } set { m_JusticeProtectors = value; } } + public DateTime LastJusticeLoss{ get => m_LastJusticeLoss; + set => m_LastJusticeLoss = value; + } + public List JusticeProtectors { get => m_JusticeProtectors; + set => m_JusticeProtectors = value; + } private DateTime m_LastCompassionLoss; private DateTime m_NextCompassionDay; private int m_CompassionGains; - public DateTime LastCompassionLoss{ get{ return m_LastCompassionLoss; } set{ m_LastCompassionLoss = value; } } + public DateTime LastCompassionLoss{ get => m_LastCompassionLoss; + set => m_LastCompassionLoss = value; + } [CommandProperty( AccessLevel.GameMaster )] - public DateTime NextCompassionDay{ get{ return m_NextCompassionDay; } set{ m_NextCompassionDay = value; } } + public DateTime NextCompassionDay{ get => m_NextCompassionDay; + set => m_NextCompassionDay = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int CompassionGains{ get{ return m_CompassionGains; } set{ m_CompassionGains = value; } } + public int CompassionGains{ get => m_CompassionGains; + set => m_CompassionGains = value; + } private DateTime m_LastValorLoss; - public DateTime LastValorLoss { get { return m_LastValorLoss; } set { m_LastValorLoss = value; } } + public DateTime LastValorLoss { get => m_LastValorLoss; + set => m_LastValorLoss = value; + } private DateTime m_LastHonorLoss; private DateTime m_LastHonorUse; @@ -4359,18 +4310,28 @@ namespace Server.Mobiles private HonorContext m_SentHonorContext; public DateTime m_hontime; - public DateTime LastHonorLoss{ get{ return m_LastHonorLoss; } set{ m_LastHonorLoss = value; } } - public DateTime LastHonorUse{ get{ return m_LastHonorUse; } set{ m_LastHonorUse = value; } } - public bool HonorActive{ get{ return m_HonorActive; } set{ m_HonorActive = value; } } - public HonorContext ReceivedHonorContext{ get{ return m_ReceivedHonorContext; } set{ m_ReceivedHonorContext = value; } } - public HonorContext SentHonorContext{ get{ return m_SentHonorContext; } set{ m_SentHonorContext = value; } } + public DateTime LastHonorLoss{ get => m_LastHonorLoss; + set => m_LastHonorLoss = value; + } + public DateTime LastHonorUse{ get => m_LastHonorUse; + set => m_LastHonorUse = value; + } + public bool HonorActive{ get => m_HonorActive; + set => m_HonorActive = value; + } + public HonorContext ReceivedHonorContext{ get => m_ReceivedHonorContext; + set => m_ReceivedHonorContext = value; + } + public HonorContext SentHonorContext{ get => m_SentHonorContext; + set => m_SentHonorContext = value; + } #endregion #region Young system [CommandProperty( AccessLevel.GameMaster )] public bool Young { - get{ return GetFlag( PlayerFlag.Young ); } + get => GetFlag( PlayerFlag.Young ); set{ SetFlag( PlayerFlag.Young, value ); InvalidateProperties(); } } @@ -4570,7 +4531,7 @@ namespace Server.Mobiles #region Speech log private SpeechLog m_SpeechLog; - public SpeechLog SpeechLog{ get{ return m_SpeechLog; } } + public SpeechLog SpeechLog => m_SpeechLog; public override void OnSpeech( SpeechEventArgs e ) { @@ -4589,14 +4550,15 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public bool DisplayChampionTitle { - get { return GetFlag( PlayerFlag.DisplayChampionTitle ); } - set { SetFlag( PlayerFlag.DisplayChampionTitle, value ); } + get => GetFlag( PlayerFlag.DisplayChampionTitle ); + set => SetFlag( PlayerFlag.DisplayChampionTitle, value ); } private ChampionTitleInfo m_ChampionTitles; [CommandProperty( AccessLevel.GameMaster )] - public ChampionTitleInfo ChampionTitles { get { return m_ChampionTitles; } set { } } + public ChampionTitleInfo ChampionTitles { get => m_ChampionTitles; + set { } } private void ToggleChampionTitleDisplay() { @@ -4622,8 +4584,12 @@ namespace Server.Mobiles private int m_Value; private DateTime m_LastDecay; - public int Value { get { return m_Value; } set { m_Value = value; } } - public DateTime LastDecay { get { return m_LastDecay; } set { m_LastDecay = value; } } + public int Value { get => m_Value; + set => m_Value = value; + } + public DateTime LastDecay { get => m_LastDecay; + set => m_LastDecay = value; + } public TitleInfo() { @@ -4753,31 +4719,49 @@ namespace Server.Mobiles } [CommandProperty(AccessLevel.GameMaster)] - public int Pestilence { get { return GetValue(ChampionSpawnType.Pestilence); } set { SetValue(ChampionSpawnType.Pestilence, value); } } + public int Pestilence { get => GetValue(ChampionSpawnType.Pestilence); + set => SetValue(ChampionSpawnType.Pestilence, value); + } [CommandProperty( AccessLevel.GameMaster )] - public int Abyss { get { return GetValue( ChampionSpawnType.Abyss ); } set { SetValue( ChampionSpawnType.Abyss, value ); } } + public int Abyss { get => GetValue( ChampionSpawnType.Abyss ); + set => SetValue( ChampionSpawnType.Abyss, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int Arachnid { get { return GetValue( ChampionSpawnType.Arachnid ); } set { SetValue( ChampionSpawnType.Arachnid, value ); } } + public int Arachnid { get => GetValue( ChampionSpawnType.Arachnid ); + set => SetValue( ChampionSpawnType.Arachnid, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int ColdBlood { get { return GetValue( ChampionSpawnType.ColdBlood ); } set { SetValue( ChampionSpawnType.ColdBlood, value ); } } + public int ColdBlood { get => GetValue( ChampionSpawnType.ColdBlood ); + set => SetValue( ChampionSpawnType.ColdBlood, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int ForestLord { get { return GetValue( ChampionSpawnType.ForestLord ); } set { SetValue( ChampionSpawnType.ForestLord, value ); } } + public int ForestLord { get => GetValue( ChampionSpawnType.ForestLord ); + set => SetValue( ChampionSpawnType.ForestLord, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int SleepingDragon { get { return GetValue( ChampionSpawnType.SleepingDragon ); } set { SetValue( ChampionSpawnType.SleepingDragon, value ); } } + public int SleepingDragon { get => GetValue( ChampionSpawnType.SleepingDragon ); + set => SetValue( ChampionSpawnType.SleepingDragon, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int UnholyTerror { get { return GetValue( ChampionSpawnType.UnholyTerror ); } set { SetValue( ChampionSpawnType.UnholyTerror, value ); } } + public int UnholyTerror { get => GetValue( ChampionSpawnType.UnholyTerror ); + set => SetValue( ChampionSpawnType.UnholyTerror, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int VerminHorde { get { return GetValue( ChampionSpawnType.VerminHorde ); } set { SetValue( ChampionSpawnType.VerminHorde, value ); } } + public int VerminHorde { get => GetValue( ChampionSpawnType.VerminHorde ); + set => SetValue( ChampionSpawnType.VerminHorde, value ); + } [CommandProperty( AccessLevel.GameMaster )] - public int Harrower { get { return m_Harrower; } set { m_Harrower = value; } } + public int Harrower { get => m_Harrower; + set => m_Harrower = value; + } public ChampionTitleInfo() { diff --git a/Scripts/Mobiles/Special/Barracoon.cs b/Scripts/Mobiles/Special/Barracoon.cs index 54c5c515d..1e31cb40e 100644 --- a/Scripts/Mobiles/Special/Barracoon.cs +++ b/Scripts/Mobiles/Special/Barracoon.cs @@ -11,10 +11,11 @@ namespace Server.Mobiles public override ChampionSkullType SkullType => ChampionSkullType.Greed; public override Type[] UniqueList => new Type[] { typeof( FangOfRactus ) }; - public override Type[] SharedList{ get{ return new Type[] { typeof( EmbroideredOakLeafCloak ), - typeof( DjinnisRing ), - typeof( DetectiveBoots ), - typeof( GuantletsOfAnger ) }; } } + public override Type[] SharedList => new Type[] { typeof( EmbroideredOakLeafCloak ), + typeof( DjinnisRing ), + typeof( DetectiveBoots ), + typeof( GuantletsOfAnger ) }; + public override Type[] DecorativeList => new Type[] { typeof( SwampTile ), typeof( MonsterStatuette ) }; public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { MonsterStatuetteType.Slime }; diff --git a/Scripts/Mobiles/Special/BaseChampion.cs b/Scripts/Mobiles/Special/BaseChampion.cs index 2df704f37..30ed8ab38 100644 --- a/Scripts/Mobiles/Special/BaseChampion.cs +++ b/Scripts/Mobiles/Special/BaseChampion.cs @@ -29,7 +29,7 @@ namespace Server.Mobiles public abstract Type[] DecorativeList{ get; } public abstract MonsterStatuetteType[] StatueTypes{ get; } - public virtual bool NoGoodies{ get{ return false; } } + public virtual bool NoGoodies => false; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Mobiles/Special/DarkGuardian.cs b/Scripts/Mobiles/Special/DarkGuardian.cs index dbeddb31b..b1a43f544 100644 --- a/Scripts/Mobiles/Special/DarkGuardian.cs +++ b/Scripts/Mobiles/Special/DarkGuardian.cs @@ -55,10 +55,7 @@ namespace Server.Mobiles AddLoot( LootPack.MedScrolls, 2 ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override int TreasureMapLevel => 2; public override bool BleedImmune => true; diff --git a/Scripts/Mobiles/Special/Harrower.cs b/Scripts/Mobiles/Special/Harrower.cs index e3bc16b68..89ac2f24c 100644 --- a/Scripts/Mobiles/Special/Harrower.cs +++ b/Scripts/Mobiles/Special/Harrower.cs @@ -7,9 +7,9 @@ namespace Server.Mobiles { public class Harrower : BaseCreature { - public Type[] UniqueList{ get{ return new Type[] { typeof( AcidProofRobe ) }; } } - public Type[] SharedList{ get{ return new Type[] { typeof( TheRobeOfBritanniaAri ) }; } } - public Type[] DecorativeList{ get{ return new Type[] { typeof( EvilIdolSkull ), typeof( SkullPole ) }; } } + public Type[] UniqueList => new Type[] { typeof( AcidProofRobe ) }; + public Type[] SharedList => new Type[] { typeof( TheRobeOfBritanniaAri ) }; + public Type[] DecorativeList => new Type[] { typeof( EvilIdolSkull ), typeof( SkullPole ) }; private bool m_TrueForm; private Item m_GateItem; @@ -49,7 +49,7 @@ namespace Server.Mobiles private static ArrayList m_Instances = new ArrayList(); - public static ArrayList Instances{ get{ return m_Instances; } } + public static ArrayList Instances => m_Instances; public static Harrower Spawn( Point3D platLoc, Map platMap ) { @@ -67,13 +67,7 @@ namespace Server.Mobiles return harrower; } - public static bool CanSpawn - { - get - { - return ( m_Instances.Count == 0 ); - } - } + public static bool CanSpawn => ( m_Instances.Count == 0 ); public override string DefaultName => "the harrower"; diff --git a/Scripts/Mobiles/Special/HarrowerTentacles.cs b/Scripts/Mobiles/Special/HarrowerTentacles.cs index 6fdae0e24..f200f0cb6 100644 --- a/Scripts/Mobiles/Special/HarrowerTentacles.cs +++ b/Scripts/Mobiles/Special/HarrowerTentacles.cs @@ -13,14 +13,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile Harrower { - get - { - return m_Harrower; - } - set - { - m_Harrower = value; - } + get => m_Harrower; + set => m_Harrower = value; } public override string DefaultName => "tentacles of the harrower"; diff --git a/Scripts/Mobiles/Special/LordOaks.cs b/Scripts/Mobiles/Special/LordOaks.cs index 3ba4565e2..ad95a1e90 100644 --- a/Scripts/Mobiles/Special/LordOaks.cs +++ b/Scripts/Mobiles/Special/LordOaks.cs @@ -12,16 +12,17 @@ namespace Server.Mobiles public override ChampionSkullType SkullType => ChampionSkullType.Enlightenment; public override Type[] UniqueList => new Type[] { typeof( OrcChieftainHelm ) }; - public override Type[] SharedList{ get{ return new Type[] { typeof( RoyalGuardSurvivalKnife ), - typeof( DjinnisRing ), - typeof( LieutenantOfTheBritannianRoyalGuard ), - typeof( SamaritanRobe ), - typeof( DetectiveBoots ), - typeof( TheMostKnowledgePerson ) }; } } - public override Type[] DecorativeList{ get{ return new Type[] { typeof( WaterTile ), - typeof( WindSpirit ), - typeof( Pier ), - typeof( DirtPatch )}; } } + public override Type[] SharedList => new Type[] { typeof( RoyalGuardSurvivalKnife ), + typeof( DjinnisRing ), + typeof( LieutenantOfTheBritannianRoyalGuard ), + typeof( SamaritanRobe ), + typeof( DetectiveBoots ), + typeof( TheMostKnowledgePerson ) }; + + public override Type[] DecorativeList => new Type[] { typeof( WaterTile ), + typeof( WindSpirit ), + typeof( Pier ), + typeof( DirtPatch )}; public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { }; @@ -73,10 +74,7 @@ namespace Server.Mobiles public override bool BardImmune => !Core.SE; public override bool Unprovokable => Core.SE; public override bool Uncalmable => Core.SE; - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override Poison PoisonImmune => Poison.Deadly; diff --git a/Scripts/Mobiles/Special/Neira.cs b/Scripts/Mobiles/Special/Neira.cs index f6c90b911..808ae83c7 100644 --- a/Scripts/Mobiles/Special/Neira.cs +++ b/Scripts/Mobiles/Special/Neira.cs @@ -9,9 +9,10 @@ namespace Server.Mobiles public override ChampionSkullType SkullType => ChampionSkullType.Death; public override Type[] UniqueList => new Type[] { typeof( ShroudOfDeciet ) }; - public override Type[] SharedList{ get{ return new Type[] { typeof( ANecromancerShroud ), + public override Type[] SharedList => new Type[] { typeof( ANecromancerShroud ), + + typeof( CaptainJohnsHat ) }; - typeof( CaptainJohnsHat ) }; } } public override Type[] DecorativeList => new Type[] { typeof( WallBlood ), typeof( TatteredAncientMummyWrapping ) }; public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { }; @@ -127,7 +128,7 @@ namespace Server.Mobiles public Mobile Rider { - get { return m_Item.Rider; } + get => m_Item.Rider; set { } } @@ -159,10 +160,7 @@ namespace Server.Mobiles m_Mount = new VirtualMount( this ); } - public IMount Mount - { - get { return m_Mount; } - } + public IMount Mount => m_Mount; public VirtualMountItem( Serial serial ) : base( serial ) diff --git a/Scripts/Mobiles/Special/Rikktor.cs b/Scripts/Mobiles/Special/Rikktor.cs index dc341173e..20cf9ff18 100644 --- a/Scripts/Mobiles/Special/Rikktor.cs +++ b/Scripts/Mobiles/Special/Rikktor.cs @@ -10,15 +10,16 @@ namespace Server.Mobiles public override ChampionSkullType SkullType => ChampionSkullType.Power; public override Type[] UniqueList => new Type[] { typeof( CrownOfTalKeesh ) }; - public override Type[] SharedList{ get{ return new Type[] { typeof( TheMostKnowledgePerson ), - typeof( BraveKnightOfTheBritannia ), - typeof( LieutenantOfTheBritannianRoyalGuard ) }; } } - public override Type[] DecorativeList{ get{ return new Type[] { typeof( LavaTile ), - typeof( MonsterStatuette ), - typeof( MonsterStatuette ) }; } } + public override Type[] SharedList => new Type[] { typeof( TheMostKnowledgePerson ), + typeof( BraveKnightOfTheBritannia ), + typeof( LieutenantOfTheBritannianRoyalGuard ) }; - public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.OphidianArchMage, - MonsterStatuetteType.OphidianWarrior }; } } + public override Type[] DecorativeList => new Type[] { typeof( LavaTile ), + typeof( MonsterStatuette ), + typeof( MonsterStatuette ) }; + + public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { MonsterStatuetteType.OphidianArchMage, + MonsterStatuetteType.OphidianWarrior }; public override string DefaultName => "Rikktor"; diff --git a/Scripts/Mobiles/Special/Serado.cs b/Scripts/Mobiles/Special/Serado.cs index 380b30eef..f8069bcde 100644 --- a/Scripts/Mobiles/Special/Serado.cs +++ b/Scripts/Mobiles/Special/Serado.cs @@ -10,10 +10,11 @@ namespace Server.Mobiles public override ChampionSkullType SkullType => ChampionSkullType.Power; public override Type[] UniqueList => new Type[] { typeof( Pacify ) }; - public override Type[] SharedList{ get{ return new Type[] { typeof( BraveKnightOfTheBritannia ), - typeof( DetectiveBoots ), - typeof( EmbroideredOakLeafCloak ), - typeof( LieutenantOfTheBritannianRoyalGuard ) }; } } + public override Type[] SharedList => new Type[] { typeof( BraveKnightOfTheBritannia ), + typeof( DetectiveBoots ), + typeof( EmbroideredOakLeafCloak ), + typeof( LieutenantOfTheBritannianRoyalGuard ) }; + public override Type[] DecorativeList => new Type[] { typeof( Futon ), typeof( SwampTile ) }; public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { }; @@ -71,7 +72,7 @@ namespace Server.Mobiles public override Poison HitPoison => Poison.Lethal; public override Poison PoisonImmune => Poison.Lethal; - public override double HitPoisonChance{ get{ return 0.8; } } + public override double HitPoisonChance => 0.8; public override int Feathers => 30; diff --git a/Scripts/Mobiles/Special/Silvani.cs b/Scripts/Mobiles/Special/Silvani.cs index 89a9ea3e8..75b858fee 100644 --- a/Scripts/Mobiles/Special/Silvani.cs +++ b/Scripts/Mobiles/Special/Silvani.cs @@ -45,10 +45,7 @@ namespace Server.Mobiles AddLoot( LootPack.UltraRich, 2 ); } - public override OppositionGroup OppositionGroup - { - get{ return OppositionGroup.FeyAndUndead; } - } + public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead; public override bool CanFly => true; public override bool Unprovokable => true; diff --git a/Scripts/Mobiles/Townfolk/Banker.cs b/Scripts/Mobiles/Townfolk/Banker.cs index 9b35fa9c4..afa5bde86 100644 --- a/Scripts/Mobiles/Townfolk/Banker.cs +++ b/Scripts/Mobiles/Townfolk/Banker.cs @@ -12,7 +12,7 @@ namespace Server.Mobiles public class Banker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.MerchantsGuild; diff --git a/Scripts/Mobiles/Townfolk/BaseEscortable.cs b/Scripts/Mobiles/Townfolk/BaseEscortable.cs index 5628187df..688f5fee2 100644 --- a/Scripts/Mobiles/Townfolk/BaseEscortable.cs +++ b/Scripts/Mobiles/Townfolk/BaseEscortable.cs @@ -97,10 +97,7 @@ namespace Server.Mobiles private bool m_DeleteCorpse = false; - public bool IsBeingDeleted - { - get { return ( m_DeleteTimer != null ); } - } + public bool IsBeingDeleted => ( m_DeleteTimer != null ); public override bool Commandable => false; // Our master cannot boss us around! public override bool DeleteCorpseOnDeath => m_DeleteCorpse; @@ -108,7 +105,7 @@ namespace Server.Mobiles [CommandProperty(AccessLevel.GameMaster)] public string Destination { - get { return m_Destination == null ? null : m_Destination.Name; } + get => m_Destination == null ? null : m_Destination.Name; set { m_DestinationString = value; m_Destination = EDI.Find(value); } } @@ -236,10 +233,7 @@ namespace Server.Mobiles private static Hashtable m_EscortTable = new Hashtable(); - public static Hashtable EscortTable - { - get { return m_EscortTable; } - } + public static Hashtable EscortTable => m_EscortTable; public virtual bool AcceptEscorter(Mobile m) { @@ -661,15 +655,9 @@ namespace Server.Mobiles private Region m_Region; //private Rectangle2D[] m_Bounds; - public string Name - { - get { return m_Name; } - } + public string Name => m_Name; - public Region Region - { - get { return m_Region; } - } + public Region Region => m_Region; /*public Rectangle2D[] Bounds { diff --git a/Scripts/Mobiles/Townfolk/TownCrier.cs b/Scripts/Mobiles/Townfolk/TownCrier.cs index 11a3bb5f7..13f2f3f5e 100644 --- a/Scripts/Mobiles/Townfolk/TownCrier.cs +++ b/Scripts/Mobiles/Townfolk/TownCrier.cs @@ -44,7 +44,7 @@ namespace Server.Mobiles } } - public bool IsEmpty{ get{ return ( m_Entries == null || m_Entries.Count == 0 ); } } + public bool IsEmpty => ( m_Entries == null || m_Entries.Count == 0 ); public GlobalTownCrierEntryList() { @@ -52,10 +52,7 @@ namespace Server.Mobiles private List m_Entries; - public List Entries - { - get{ return m_Entries; } - } + public List Entries => m_Entries; public TownCrierEntry GetRandomEntry() { @@ -113,9 +110,9 @@ namespace Server.Mobiles private string[] m_Lines; private DateTime m_ExpireTime; - public string[] Lines{ get{ return m_Lines; } } - public DateTime ExpireTime{ get{ return m_ExpireTime; } } - public bool Expired{ get{ return ( DateTime.UtcNow >= m_ExpireTime ); } } + public string[] Lines => m_Lines; + public DateTime ExpireTime => m_ExpireTime; + public bool Expired => ( DateTime.UtcNow >= m_ExpireTime ); public TownCrierEntry( string[] lines, TimeSpan duration ) { @@ -325,10 +322,7 @@ namespace Server.Mobiles private Timer m_NewsTimer; private Timer m_AutoShoutTimer; - public List Entries - { - get{ return m_Entries; } - } + public List Entries => m_Entries; public TownCrierEntry GetRandomEntry() { @@ -472,10 +466,7 @@ namespace Server.Mobiles private static List m_Instances = new List(); - public static List Instances - { - get{ return m_Instances; } - } + public static List Instances => m_Instances; [Constructible] public TownCrier() diff --git a/Scripts/Mobiles/Vendors/AnimalBuy.cs b/Scripts/Mobiles/Vendors/AnimalBuy.cs index 6f895d828..b2c57235d 100644 --- a/Scripts/Mobiles/Vendors/AnimalBuy.cs +++ b/Scripts/Mobiles/Vendors/AnimalBuy.cs @@ -15,12 +15,6 @@ namespace Server.Mobiles m_ControlSlots = controlSlots; } - public override int ControlSlots - { - get - { - return m_ControlSlots; - } - } + public override int ControlSlots => m_ControlSlots; } } \ No newline at end of file diff --git a/Scripts/Mobiles/Vendors/BaseVendor.cs b/Scripts/Mobiles/Vendors/BaseVendor.cs index 23d1ade38..fec9d97e8 100644 --- a/Scripts/Mobiles/Vendors/BaseVendor.cs +++ b/Scripts/Mobiles/Vendors/BaseVendor.cs @@ -48,7 +48,9 @@ namespace Server.Mobiles public override bool IsInvulnerable => true; - public virtual DateTime NextTrickOrTreat { get { return m_NextTrickOrTreat; } set { m_NextTrickOrTreat = value; } } + public virtual DateTime NextTrickOrTreat { get => m_NextTrickOrTreat; + set => m_NextTrickOrTreat = value; + } public override bool ShowFameTitle => false; @@ -186,23 +188,11 @@ namespace Server.Mobiles public DateTime LastRestock { - get - { - return m_LastRestock; - } - set - { - m_LastRestock = value; - } + get => m_LastRestock; + set => m_LastRestock = value; } - public virtual TimeSpan RestockDelay - { - get - { - return TimeSpan.FromHours( 1 ); - } - } + public virtual TimeSpan RestockDelay => TimeSpan.FromHours( 1 ); public Container BuyPack { @@ -220,7 +210,7 @@ namespace Server.Mobiles public abstract void InitSBInfo(); - public virtual bool IsTokunoVendor { get { return ( Map == Map.Tokuno ); } } + public virtual bool IsTokunoVendor => ( Map == Map.Tokuno ); protected void LoadSBInfo() { @@ -292,10 +282,7 @@ namespace Server.Mobiles return Utility.RandomNeutralHue(); } - public virtual VendorShoeType ShoeType - { - get { return VendorShoeType.Shoes; } - } + public virtual VendorShoeType ShoeType => VendorShoeType.Shoes; public virtual void CheckMorph() { diff --git a/Scripts/Mobiles/Vendors/GenericBuy.cs b/Scripts/Mobiles/Vendors/GenericBuy.cs index d49d334aa..dcacec965 100644 --- a/Scripts/Mobiles/Vendors/GenericBuy.cs +++ b/Scripts/Mobiles/Vendors/GenericBuy.cs @@ -110,9 +110,10 @@ namespace Server.Mobiles private object[] m_Args; private IEntity m_DisplayEntity; - public virtual int ControlSlots{ get{ return 0; } } + public virtual int ControlSlots => 0; - public virtual bool CanCacheDisplay{ get{ return false; } } //return ( m_Args == null || m_Args.Length == 0 ); } + public virtual bool CanCacheDisplay //return ( m_Args == null || m_Args.Length == 0 ); } + => false; private bool IsDeleted( IEntity obj ) { @@ -148,24 +149,24 @@ namespace Server.Mobiles public Type Type { - get{ return m_Type; } - set{ m_Type = value; } + get => m_Type; + set => m_Type = value; } public string Name { - get{ return m_Name; } - set{ m_Name = value; } + get => m_Name; + set => m_Name = value; } - public int DefaultPrice{ get{ return m_PriceScalar; } } + public int DefaultPrice => m_PriceScalar; private int m_PriceScalar; public int PriceScalar { - get{ return m_PriceScalar; } - set{ m_PriceScalar = value; } + get => m_PriceScalar; + set => m_PriceScalar = value; } public int Price @@ -193,37 +194,37 @@ namespace Server.Mobiles return m_Price; } - set{ m_Price = value; } + set => m_Price = value; } public int ItemID { - get{ return m_ItemID; } - set{ m_ItemID = value; } + get => m_ItemID; + set => m_ItemID = value; } public int Hue { - get{ return m_Hue; } - set{ m_Hue = value; } + get => m_Hue; + set => m_Hue = value; } public int Amount { - get{ return m_Amount; } + get => m_Amount; set{ if ( value < 0 ) value = 0; m_Amount = value; } } public int MaxAmount { - get{ return m_MaxAmount; } - set{ m_MaxAmount = value; } + get => m_MaxAmount; + set => m_MaxAmount = value; } public object[] Args { - get{ return m_Args; } - set{ m_Args = value; } + get => m_Args; + set => m_Args = value; } public GenericBuyInfo( Type type, int price, int amount, int itemID, int hue ) : this( null, type, price, amount, itemID, hue, null ) diff --git a/Scripts/Mobiles/Vendors/NPC/Alchemist.cs b/Scripts/Mobiles/Vendors/NPC/Alchemist.cs index 6c5f1c6ca..39509201e 100644 --- a/Scripts/Mobiles/Vendors/NPC/Alchemist.cs +++ b/Scripts/Mobiles/Vendors/NPC/Alchemist.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Alchemist : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.MagesGuild; @@ -21,10 +21,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBAlchemist() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs b/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs index b686a53e2..e7816680c 100644 --- a/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs +++ b/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs @@ -11,7 +11,7 @@ namespace Server.Mobiles public class AnimalTrainer : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public AnimalTrainer() : base( "the animal trainer" ) @@ -26,10 +26,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBAnimalTrainer() ); } - public override VendorShoeType ShoeType - { - get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } - } + public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; public override int GetShoeHue() { diff --git a/Scripts/Mobiles/Vendors/NPC/Architect.cs b/Scripts/Mobiles/Vendors/NPC/Architect.cs index 1bd353cd3..985da8934 100644 --- a/Scripts/Mobiles/Vendors/NPC/Architect.cs +++ b/Scripts/Mobiles/Vendors/NPC/Architect.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Architect : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.TinkersGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/Armorer.cs b/Scripts/Mobiles/Vendors/NPC/Armorer.cs index fa0055270..4772ab7ad 100644 --- a/Scripts/Mobiles/Vendors/NPC/Armorer.cs +++ b/Scripts/Mobiles/Vendors/NPC/Armorer.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Armorer : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Armorer() : base( "the armorer" ) @@ -60,10 +60,7 @@ namespace Server.Mobiles } } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.Boots; } - } + public override VendorShoeType ShoeType => VendorShoeType.Boots; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Baker.cs b/Scripts/Mobiles/Vendors/NPC/Baker.cs index a3da58664..48766c918 100644 --- a/Scripts/Mobiles/Vendors/NPC/Baker.cs +++ b/Scripts/Mobiles/Vendors/NPC/Baker.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Baker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Baker() : base( "the baker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Bard.cs b/Scripts/Mobiles/Vendors/NPC/Bard.cs index 3818f6f1e..627d6d870 100644 --- a/Scripts/Mobiles/Vendors/NPC/Bard.cs +++ b/Scripts/Mobiles/Vendors/NPC/Bard.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Bard : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.BardsGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs b/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs index cfdced256..bbe7944dd 100644 --- a/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class Barkeeper : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override void InitSBInfo() { diff --git a/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs b/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs index f94478fbc..82fb67c77 100644 --- a/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Beekeeper : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Beekeeper() : base( "the beekeeper" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs b/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs index df7c5f32e..854da9d0a 100644 --- a/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs +++ b/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Blacksmith : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.BlacksmithsGuild; @@ -52,10 +52,7 @@ namespace Server.Mobiles } } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.None; } - } + public override VendorShoeType ShoeType => VendorShoeType.None; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Bowyer.cs b/Scripts/Mobiles/Vendors/NPC/Bowyer.cs index 5ad3a256d..9dcf7f11f 100644 --- a/Scripts/Mobiles/Vendors/NPC/Bowyer.cs +++ b/Scripts/Mobiles/Vendors/NPC/Bowyer.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class Bowyer : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Bowyer() : base( "the bowyer" ) @@ -15,10 +15,7 @@ namespace Server.Mobiles SetSkill( SkillName.Archery, 80.0, 100.0 ); } - public override VendorShoeType ShoeType - { - get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } - } + public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; public override int GetShoeHue() { diff --git a/Scripts/Mobiles/Vendors/NPC/Butcher.cs b/Scripts/Mobiles/Vendors/NPC/Butcher.cs index 628b4eb68..ffb64676f 100644 --- a/Scripts/Mobiles/Vendors/NPC/Butcher.cs +++ b/Scripts/Mobiles/Vendors/NPC/Butcher.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Butcher : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Butcher() : base( "the butcher" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Carpenter.cs b/Scripts/Mobiles/Vendors/NPC/Carpenter.cs index fb553ea82..bea241485 100644 --- a/Scripts/Mobiles/Vendors/NPC/Carpenter.cs +++ b/Scripts/Mobiles/Vendors/NPC/Carpenter.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Carpenter : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.TinkersGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/Cobbler.cs b/Scripts/Mobiles/Vendors/NPC/Cobbler.cs index 21e475192..3c47375a9 100644 --- a/Scripts/Mobiles/Vendors/NPC/Cobbler.cs +++ b/Scripts/Mobiles/Vendors/NPC/Cobbler.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Cobbler : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Cobbler() : base( "the cobbler" ) @@ -18,10 +18,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBCobbler() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; public Cobbler( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Vendors/NPC/Cook.cs b/Scripts/Mobiles/Vendors/NPC/Cook.cs index e1b2de14c..6673461e2 100644 --- a/Scripts/Mobiles/Vendors/NPC/Cook.cs +++ b/Scripts/Mobiles/Vendors/NPC/Cook.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Cook : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Cook() : base( "the cook" ) @@ -22,10 +22,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBSECook() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs b/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs index f35d3ac4f..c2f553fe1 100644 --- a/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs +++ b/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs @@ -8,7 +8,7 @@ namespace Server.Mobiles public class CustomHairstylist : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override bool ClickTitle => false; @@ -59,10 +59,7 @@ namespace Server.Mobiles return Utility.RandomBrightHue(); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { @@ -103,12 +100,12 @@ namespace Server.Mobiles private Type m_GumpType; private object[] m_GumpArgs; - public int Title{ get{ return m_Title; } } - public string TitleString{ get{ return m_TitleString; } } - public int Price{ get{ return m_Price; } } - public bool FacialHair{ get{ return m_FacialHair; } } - public Type GumpType{ get{ return m_GumpType; } } - public object[] GumpArgs{ get{ return m_GumpArgs; } } + public int Title => m_Title; + public string TitleString => m_TitleString; + public int Price => m_Price; + public bool FacialHair => m_FacialHair; + public Type GumpType => m_GumpType; + public object[] GumpArgs => m_GumpArgs; public HairstylistBuyInfo( int title, int price, bool facialHair, Type gumpType, object[] args ) { @@ -236,8 +233,8 @@ namespace Server.Mobiles private string m_Name; private int[] m_Hues; - public string Name{ get{ return m_Name; } } - public int[] Hues{ get{ return m_Hues; } } + public string Name => m_Name; + public int[] Hues => m_Hues; public ChangeHairHueEntry( string name, int[] hues ) { @@ -396,10 +393,10 @@ namespace Server.Mobiles private int m_GumpID; private int m_X, m_Y; - public int ItemID{ get{ return m_ItemID; } } - public int GumpID{ get{ return m_GumpID; } } - public int X{ get{ return m_X; } } - public int Y{ get{ return m_Y; } } + public int ItemID => m_ItemID; + public int GumpID => m_GumpID; + public int X => m_X; + public int Y => m_Y; public ChangeHairstyleEntry( int gumpID, int x, int y, int itemID ) { diff --git a/Scripts/Mobiles/Vendors/NPC/Farmer.cs b/Scripts/Mobiles/Vendors/NPC/Farmer.cs index 75517a6bc..0e8d049f9 100644 --- a/Scripts/Mobiles/Vendors/NPC/Farmer.cs +++ b/Scripts/Mobiles/Vendors/NPC/Farmer.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Farmer : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Farmer() : base( "the farmer" ) @@ -20,10 +20,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBFarmer() ); } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.ThighBoots; } - } + public override VendorShoeType ShoeType => VendorShoeType.ThighBoots; public override int GetShoeHue() { diff --git a/Scripts/Mobiles/Vendors/NPC/Fisherman.cs b/Scripts/Mobiles/Vendors/NPC/Fisherman.cs index 97a998d02..3ba180801 100644 --- a/Scripts/Mobiles/Vendors/NPC/Fisherman.cs +++ b/Scripts/Mobiles/Vendors/NPC/Fisherman.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Fisherman : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.FishermensGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/Furtrader.cs b/Scripts/Mobiles/Vendors/NPC/Furtrader.cs index ef1538690..067c74322 100644 --- a/Scripts/Mobiles/Vendors/NPC/Furtrader.cs +++ b/Scripts/Mobiles/Vendors/NPC/Furtrader.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Furtrader : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Furtrader() : base( "the furtrader" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Glassblower.cs b/Scripts/Mobiles/Vendors/NPC/Glassblower.cs index 956ff8e0e..ed3a0bcfc 100644 --- a/Scripts/Mobiles/Vendors/NPC/Glassblower.cs +++ b/Scripts/Mobiles/Vendors/NPC/Glassblower.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class Glassblower : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.MagesGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs b/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs index 81f2471c6..0026c6ddc 100644 --- a/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs +++ b/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class GolemCrafter : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public GolemCrafter() : base( "the golem crafter" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs b/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs index f4b9c5655..06373e5a5 100644 --- a/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs +++ b/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs @@ -8,18 +8,18 @@ namespace Server.Mobiles public abstract class BaseGuildmaster : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override bool IsActiveVendor => false; public override bool ClickTitle => false; - public virtual int JoinCost{ get{ return 500; } } + public virtual int JoinCost => 500; - public virtual TimeSpan JoinAge{ get{ return TimeSpan.FromDays( 0.0 ); } } - public virtual TimeSpan JoinGameAge{ get{ return TimeSpan.FromDays( 2.0 ); } } - public virtual TimeSpan QuitAge{ get{ return TimeSpan.FromDays( 7.0 ); } } - public virtual TimeSpan QuitGameAge{ get{ return TimeSpan.FromDays( 4.0 ); } } + public virtual TimeSpan JoinAge => TimeSpan.FromDays( 0.0 ); + public virtual TimeSpan JoinGameAge => TimeSpan.FromDays( 2.0 ); + public virtual TimeSpan QuitAge => TimeSpan.FromDays( 7.0 ); + public virtual TimeSpan QuitGameAge => TimeSpan.FromDays( 4.0 ); public override void InitSBInfo() { diff --git a/Scripts/Mobiles/Vendors/NPC/Guildmasters/BlacksmithGuildmaster.cs b/Scripts/Mobiles/Vendors/NPC/Guildmasters/BlacksmithGuildmaster.cs index ef2989ad0..9cfbec0c3 100644 --- a/Scripts/Mobiles/Vendors/NPC/Guildmasters/BlacksmithGuildmaster.cs +++ b/Scripts/Mobiles/Vendors/NPC/Guildmasters/BlacksmithGuildmaster.cs @@ -21,10 +21,7 @@ namespace Server.Mobiles SBInfos.Add( new SBBlacksmith() ); } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.ThighBoots; } - } + public override VendorShoeType ShoeType => VendorShoeType.ThighBoots; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Guildmasters/HealerGuildmaster.cs b/Scripts/Mobiles/Vendors/NPC/Guildmasters/HealerGuildmaster.cs index a760e917d..366f43f40 100644 --- a/Scripts/Mobiles/Vendors/NPC/Guildmasters/HealerGuildmaster.cs +++ b/Scripts/Mobiles/Vendors/NPC/Guildmasters/HealerGuildmaster.cs @@ -14,10 +14,7 @@ namespace Server.Mobiles SetSkill( SkillName.SpiritSpeak, 65.0, 88.0 ); } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Guildmasters/MageGuildmaster.cs b/Scripts/Mobiles/Vendors/NPC/Guildmasters/MageGuildmaster.cs index ffaf52bba..6cc308320 100644 --- a/Scripts/Mobiles/Vendors/NPC/Guildmasters/MageGuildmaster.cs +++ b/Scripts/Mobiles/Vendors/NPC/Guildmasters/MageGuildmaster.cs @@ -16,10 +16,7 @@ namespace Server.Mobiles SetSkill( SkillName.Macing, 36.0, 68.0 ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs b/Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs index a1b0db061..a456135b1 100644 --- a/Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs +++ b/Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs @@ -11,10 +11,7 @@ namespace Server.Mobiles Title = "the gypsy animal herder"; } - public override VendorShoeType ShoeType - { - get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } - } + public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; public override int GetShoeHue() { diff --git a/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs b/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs index c680c9ca9..5efb26b11 100644 --- a/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs +++ b/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class GypsyMaiden : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public GypsyMaiden() : base( "the gypsy maiden" ) diff --git a/Scripts/Mobiles/Vendors/NPC/HairStylist.cs b/Scripts/Mobiles/Vendors/NPC/HairStylist.cs index a180e71a5..a09ede1ac 100644 --- a/Scripts/Mobiles/Vendors/NPC/HairStylist.cs +++ b/Scripts/Mobiles/Vendors/NPC/HairStylist.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class HairStylist : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public HairStylist() : base( "the hair stylist" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Herbalist.cs b/Scripts/Mobiles/Vendors/NPC/Herbalist.cs index 5e9e3b71d..211423e75 100644 --- a/Scripts/Mobiles/Vendors/NPC/Herbalist.cs +++ b/Scripts/Mobiles/Vendors/NPC/Herbalist.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Herbalist : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.MagesGuild; @@ -22,10 +22,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBHerbalist() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public Herbalist( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Vendors/NPC/HolyMage.cs b/Scripts/Mobiles/Vendors/NPC/HolyMage.cs index 7fb87f821..831a21f7b 100644 --- a/Scripts/Mobiles/Vendors/NPC/HolyMage.cs +++ b/Scripts/Mobiles/Vendors/NPC/HolyMage.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class HolyMage : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public HolyMage() : base( "the Holy Mage" ) diff --git a/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs b/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs index ecf1f3529..0918970cb 100644 --- a/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class InnKeeper : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public InnKeeper() : base( "the innkeeper" ) @@ -20,10 +20,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBSEFood() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; public InnKeeper( Serial serial ) : base( serial ) { diff --git a/Scripts/Mobiles/Vendors/NPC/IronWorker.cs b/Scripts/Mobiles/Vendors/NPC/IronWorker.cs index 60eaad638..bd1bc6850 100644 --- a/Scripts/Mobiles/Vendors/NPC/IronWorker.cs +++ b/Scripts/Mobiles/Vendors/NPC/IronWorker.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class IronWorker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public IronWorker() : base( "the iron worker" ) @@ -40,10 +40,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBLeatherArmor() ); } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.None; } - } + public override VendorShoeType ShoeType => VendorShoeType.None; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Jeweler.cs b/Scripts/Mobiles/Vendors/NPC/Jeweler.cs index 3989a7051..766ffcf79 100644 --- a/Scripts/Mobiles/Vendors/NPC/Jeweler.cs +++ b/Scripts/Mobiles/Vendors/NPC/Jeweler.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Jeweler : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Jeweler() : base( "the jeweler" ) diff --git a/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs b/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs index d2e3c4729..4b3feee63 100644 --- a/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs +++ b/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class KeeperOfChivalry : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public KeeperOfChivalry() : base( "the Keeper of Chivalry" ) diff --git a/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs b/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs index 1fe246df9..72f4858a0 100644 --- a/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs +++ b/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class LeatherWorker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public LeatherWorker() : base( "the leather worker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Mage.cs b/Scripts/Mobiles/Vendors/NPC/Mage.cs index 5e4701b95..a1cae0d85 100644 --- a/Scripts/Mobiles/Vendors/NPC/Mage.cs +++ b/Scripts/Mobiles/Vendors/NPC/Mage.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Mage : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.MagesGuild; @@ -25,10 +25,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBMage() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs b/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs index 1a09834c4..e3369142a 100644 --- a/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs +++ b/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Mapmaker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Mapmaker() : base( "the mapmaker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Miller.cs b/Scripts/Mobiles/Vendors/NPC/Miller.cs index 1d48be52e..b9239d827 100644 --- a/Scripts/Mobiles/Vendors/NPC/Miller.cs +++ b/Scripts/Mobiles/Vendors/NPC/Miller.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Miller : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Miller() : base( "the miller" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Miner.cs b/Scripts/Mobiles/Vendors/NPC/Miner.cs index 31fdefb8d..d9138cb31 100644 --- a/Scripts/Mobiles/Vendors/NPC/Miner.cs +++ b/Scripts/Mobiles/Vendors/NPC/Miner.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Miner : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Miner() : base( "the miner" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Monk.cs b/Scripts/Mobiles/Vendors/NPC/Monk.cs index 6fd404b6c..5abb802ca 100644 --- a/Scripts/Mobiles/Vendors/NPC/Monk.cs +++ b/Scripts/Mobiles/Vendors/NPC/Monk.cs @@ -6,8 +6,8 @@ namespace Server.Mobiles public class Monk : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } - + protected override List SBInfos => m_SBInfos; + [Constructible] public Monk() : base( "the Monk" ) { diff --git a/Scripts/Mobiles/Vendors/NPC/Provisioner.cs b/Scripts/Mobiles/Vendors/NPC/Provisioner.cs index 99196cef2..aca28c914 100644 --- a/Scripts/Mobiles/Vendors/NPC/Provisioner.cs +++ b/Scripts/Mobiles/Vendors/NPC/Provisioner.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Provisioner : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Provisioner() : base( "the provisioner" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Rancher.cs b/Scripts/Mobiles/Vendors/NPC/Rancher.cs index e7d82da78..88a8981c0 100644 --- a/Scripts/Mobiles/Vendors/NPC/Rancher.cs +++ b/Scripts/Mobiles/Vendors/NPC/Rancher.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Rancher : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Rancher() : base( "the rancher" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Ranger.cs b/Scripts/Mobiles/Vendors/NPC/Ranger.cs index cf1253774..7060a352e 100644 --- a/Scripts/Mobiles/Vendors/NPC/Ranger.cs +++ b/Scripts/Mobiles/Vendors/NPC/Ranger.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Ranger : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Ranger() : base( "the ranger" ) diff --git a/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs b/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs index 1f601c84d..53a646298 100644 --- a/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs +++ b/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs @@ -10,7 +10,7 @@ namespace Server.Mobiles public class RealEstateBroker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public RealEstateBroker() : base( "the real estate broker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Scribe.cs b/Scripts/Mobiles/Vendors/NPC/Scribe.cs index fda3aaa63..7d4ae6378 100644 --- a/Scripts/Mobiles/Vendors/NPC/Scribe.cs +++ b/Scripts/Mobiles/Vendors/NPC/Scribe.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class Scribe : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.MagesGuild; @@ -25,10 +25,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBScribe() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; public override void InitOutfit() { diff --git a/Scripts/Mobiles/Vendors/NPC/Shipwright.cs b/Scripts/Mobiles/Vendors/NPC/Shipwright.cs index ed29c4b1c..6d18b58c5 100644 --- a/Scripts/Mobiles/Vendors/NPC/Shipwright.cs +++ b/Scripts/Mobiles/Vendors/NPC/Shipwright.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Shipwright : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Shipwright() : base( "the shipwright" ) diff --git a/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs b/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs index 4be9ac5e5..1a0d6ec7e 100644 --- a/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs +++ b/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class StoneCrafter : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.TinkersGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/Tailor.cs b/Scripts/Mobiles/Vendors/NPC/Tailor.cs index ea07f8b6c..baae46b46 100644 --- a/Scripts/Mobiles/Vendors/NPC/Tailor.cs +++ b/Scripts/Mobiles/Vendors/NPC/Tailor.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Tailor : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.TailorsGuild; @@ -22,10 +22,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBTailor() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; #region Bulk Orders public override Item CreateBulkOrder( Mobile from, bool fromContextMenu ) diff --git a/Scripts/Mobiles/Vendors/NPC/Tanner.cs b/Scripts/Mobiles/Vendors/NPC/Tanner.cs index 8a1bb75f9..98b9f0e27 100644 --- a/Scripts/Mobiles/Vendors/NPC/Tanner.cs +++ b/Scripts/Mobiles/Vendors/NPC/Tanner.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Tanner : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Tanner() : base( "the tanner" ) diff --git a/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs b/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs index 12126ebe2..93dfb39ff 100644 --- a/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class TavernKeeper : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public TavernKeeper() : base( "the tavern keeper" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Thief.cs b/Scripts/Mobiles/Vendors/NPC/Thief.cs index ba45e2ff2..7d19bb297 100644 --- a/Scripts/Mobiles/Vendors/NPC/Thief.cs +++ b/Scripts/Mobiles/Vendors/NPC/Thief.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Thief : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Thief() : base( "the thief" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Tinker.cs b/Scripts/Mobiles/Vendors/NPC/Tinker.cs index 14cf356f7..56859ad47 100644 --- a/Scripts/Mobiles/Vendors/NPC/Tinker.cs +++ b/Scripts/Mobiles/Vendors/NPC/Tinker.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Tinker : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.TinkersGuild; diff --git a/Scripts/Mobiles/Vendors/NPC/Vagabond.cs b/Scripts/Mobiles/Vendors/NPC/Vagabond.cs index 8deb73f0a..15f826a57 100644 --- a/Scripts/Mobiles/Vendors/NPC/Vagabond.cs +++ b/Scripts/Mobiles/Vendors/NPC/Vagabond.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class Vagabond : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Vagabond() : base( "the vagabond" ) diff --git a/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs b/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs index b91251f81..bf5523dd3 100644 --- a/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs +++ b/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class VarietyDealer : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public VarietyDealer() : base( "the variety dealer" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs b/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs index 929e5e457..65cf0126d 100644 --- a/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs +++ b/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Veterinarian : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Veterinarian() : base( "the vet" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Waiter.cs b/Scripts/Mobiles/Vendors/NPC/Waiter.cs index 7ff6ef880..3d43a164a 100644 --- a/Scripts/Mobiles/Vendors/NPC/Waiter.cs +++ b/Scripts/Mobiles/Vendors/NPC/Waiter.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class Waiter : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Waiter() : base( "the waiter" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs b/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs index a9b17eb28..d29bce48c 100644 --- a/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs +++ b/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Weaponsmith : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; [Constructible] public Weaponsmith() : base( "the weaponsmith" ) @@ -28,10 +28,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBSEWeapons() ); } - public override VendorShoeType ShoeType - { - get{ return Utility.RandomBool() ? VendorShoeType.Boots : VendorShoeType.ThighBoots; } - } + public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Boots : VendorShoeType.ThighBoots; public override int GetShoeHue() { diff --git a/Scripts/Mobiles/Vendors/NPC/Weaver.cs b/Scripts/Mobiles/Vendors/NPC/Weaver.cs index 0ec881065..2cdd6df32 100644 --- a/Scripts/Mobiles/Vendors/NPC/Weaver.cs +++ b/Scripts/Mobiles/Vendors/NPC/Weaver.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Weaver : BaseVendor { private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override NpcGuild NpcGuild => NpcGuild.TailorsGuild; @@ -22,10 +22,7 @@ namespace Server.Mobiles m_SBInfos.Add( new SBWeaver() ); } - public override VendorShoeType ShoeType - { - get{ return VendorShoeType.Sandals; } - } + public override VendorShoeType ShoeType => VendorShoeType.Sandals; #region Bulk Orders public override Item CreateBulkOrder( Mobile from, bool fromContextMenu ) diff --git a/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs b/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs index f8f8cc674..20bf5b08c 100644 --- a/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs +++ b/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs @@ -87,8 +87,12 @@ namespace Server.Mobiles private string m_Message; private string m_Keyword; - public string Message{ get{ return m_Message; } set{ m_Message = value; } } - public string Keyword{ get{ return m_Keyword; } set{ m_Keyword = value; } } + public string Message{ get => m_Message; + set => m_Message = value; + } + public string Keyword{ get => m_Keyword; + set => m_Keyword = value; + } public BarkeeperRumor( string message, string keyword ) { @@ -147,13 +151,13 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } public BaseHouse House { - get{ return m_House; } + get => m_House; set { if ( m_House != null ) @@ -169,8 +173,8 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public string TipMessage { - get{ return m_TipMessage; } - set{ m_TipMessage = value; } + get => m_TipMessage; + set => m_TipMessage = value; } public override bool IsActiveBuyer => false; @@ -179,7 +183,7 @@ namespace Server.Mobiles public override bool DisallowAllMoves => true; public override bool NoHouseRestrictions => true; - public BarkeeperRumor[] Rumors{ get{ return m_Rumors; } } + public BarkeeperRumor[] Rumors => m_Rumors; public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.ThighBoots : VendorShoeType.Boots; @@ -488,7 +492,7 @@ namespace Server.Mobiles } private List m_SBInfos = new List(); - protected override List SBInfos{ get { return m_SBInfos; } } + protected override List SBInfos => m_SBInfos; public override void InitSBInfo() { diff --git a/Scripts/Mobiles/Vendors/PlayerVendor.cs b/Scripts/Mobiles/Vendors/PlayerVendor.cs index e9afe43a0..0690b12cd 100644 --- a/Scripts/Mobiles/Vendors/PlayerVendor.cs +++ b/Scripts/Mobiles/Vendors/PlayerVendor.cs @@ -28,8 +28,8 @@ namespace Server.Mobiles private bool m_Valid; - public Item Item{ get{ return m_Item; } } - public int Price{ get{ return m_Price; } } + public Item Item => m_Item; + public int Price => m_Price; public string FormattedPrice { @@ -44,7 +44,7 @@ namespace Server.Mobiles public string Description { - get{ return m_Description; } + get => m_Description; set { if ( value != null ) @@ -57,12 +57,12 @@ namespace Server.Mobiles } } - public DateTime Created{ get{ return m_Created; } } + public DateTime Created => m_Created; - public bool IsForSale{ get{ return Price >= 0; } } - public bool IsForFree{ get{ return Price == 0; } } + public bool IsForSale => Price >= 0; + public bool IsForFree => Price == 0; - public bool Valid{ get{ return m_Valid; } } + public bool Valid => m_Valid; public VendorItem( Item item, int price, string description, DateTime created ) { @@ -511,28 +511,28 @@ namespace Server.Mobiles [CommandProperty( AccessLevel.GameMaster )] public Mobile Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } [CommandProperty( AccessLevel.GameMaster )] public int BankAccount { - get{ return m_BankAccount; } - set{ m_BankAccount = value; } + get => m_BankAccount; + set => m_BankAccount = value; } [CommandProperty( AccessLevel.GameMaster )] public int HoldGold { - get{ return m_HoldGold; } - set{ m_HoldGold = value; } + get => m_HoldGold; + set => m_HoldGold = value; } [CommandProperty( AccessLevel.GameMaster )] public string ShopName { - get{ return m_ShopName; } + get => m_ShopName; set { if ( value == null ) @@ -545,20 +545,17 @@ namespace Server.Mobiles } [CommandProperty( AccessLevel.GameMaster )] - public DateTime NextPayTime - { - get{ return m_NextPayTime; } - } + public DateTime NextPayTime => m_NextPayTime; public PlayerVendorPlaceholder Placeholder { - get{ return m_Placeholder; } - set{ m_Placeholder = value; } + get => m_Placeholder; + set => m_Placeholder = value; } public BaseHouse House { - get{ return m_House; } + get => m_House; set { if ( m_House != null ) @@ -1661,7 +1658,7 @@ namespace Server.Mobiles private ExpireTimer m_Timer; [CommandProperty( AccessLevel.GameMaster )] - public PlayerVendor Vendor{ get{ return m_Vendor; } } + public PlayerVendor Vendor => m_Vendor; public PlayerVendorPlaceholder( PlayerVendor vendor ) : base( 0x1F28 ) { diff --git a/Scripts/Mobiles/Vendors/RentedVendor.cs b/Scripts/Mobiles/Vendors/RentedVendor.cs index 50f4a6b12..e6f98d033 100644 --- a/Scripts/Mobiles/Vendors/RentedVendor.cs +++ b/Scripts/Mobiles/Vendors/RentedVendor.cs @@ -21,8 +21,8 @@ namespace Server.Mobiles private TimeSpan m_Duration; private int m_Name; - public TimeSpan Duration{ get{ return m_Duration; } } - public int Name{ get{ return m_Name; } } + public TimeSpan Duration => m_Duration; + public int Name => m_Name; public int ID { @@ -76,57 +76,48 @@ namespace Server.Mobiles { } - public VendorRentalDuration RentalDuration - { - get{ return m_RentalDuration; } - } + public VendorRentalDuration RentalDuration => m_RentalDuration; [CommandProperty( AccessLevel.GameMaster )] public int RentalPrice { - get{ return m_RentalPrice; } - set{ m_RentalPrice = value; } + get => m_RentalPrice; + set => m_RentalPrice = value; } [CommandProperty( AccessLevel.GameMaster )] public bool LandlordRenew { - get{ return m_LandlordRenew; } - set{ m_LandlordRenew = value; } + get => m_LandlordRenew; + set => m_LandlordRenew = value; } [CommandProperty( AccessLevel.GameMaster )] public bool RenterRenew { - get{ return m_RenterRenew; } - set{ m_RenterRenew = value; } + get => m_RenterRenew; + set => m_RenterRenew = value; } [CommandProperty( AccessLevel.GameMaster )] - public bool Renew - { - get{ return LandlordRenew && RenterRenew && House != null && House.DecayType != DecayType.Condemned; } - } + public bool Renew => LandlordRenew && RenterRenew && House != null && House.DecayType != DecayType.Condemned; [CommandProperty( AccessLevel.GameMaster )] public int RenewalPrice { - get{ return m_RenewalPrice; } - set{ m_RenewalPrice = value; } + get => m_RenewalPrice; + set => m_RenewalPrice = value; } [CommandProperty( AccessLevel.GameMaster )] public int RentalGold { - get{ return m_RentalGold; } - set{ m_RentalGold = value; } + get => m_RentalGold; + set => m_RentalGold = value; } [CommandProperty( AccessLevel.GameMaster )] - public DateTime RentalExpireTime - { - get{ return m_RentalExpireTime; } - } + public DateTime RentalExpireTime => m_RentalExpireTime; public override bool IsOwner( Mobile m ) { diff --git a/Scripts/Mobiles/Vendors/VendorInventory.cs b/Scripts/Mobiles/Vendors/VendorInventory.cs index 8de3443b9..589d23ceb 100644 --- a/Scripts/Mobiles/Vendors/VendorInventory.cs +++ b/Scripts/Mobiles/Vendors/VendorInventory.cs @@ -35,43 +35,37 @@ namespace Server.Mobiles public BaseHouse House { - get{ return m_House; } - set{ m_House = value; } + get => m_House; + set => m_House = value; } public string VendorName { - get{ return m_VendorName; } - set{ m_VendorName = value; } + get => m_VendorName; + set => m_VendorName = value; } public string ShopName { - get{ return m_ShopName; } - set{ m_ShopName = value; } + get => m_ShopName; + set => m_ShopName = value; } public Mobile Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } - public List Items - { - get{ return m_Items; } - } + public List Items => m_Items; public int Gold { - get{ return m_Gold; } - set{ m_Gold = value; } + get => m_Gold; + set => m_Gold = value; } - public DateTime ExpireTime - { - get{ return m_ExpireTime; } - } + public DateTime ExpireTime => m_ExpireTime; public void AddItem( Item item ) { diff --git a/Scripts/Multis/BaseHouse.cs b/Scripts/Multis/BaseHouse.cs index 387a4ec11..350479e68 100644 --- a/Scripts/Multis/BaseHouse.cs +++ b/Scripts/Multis/BaseHouse.cs @@ -17,11 +17,12 @@ namespace Server.Multis { public abstract class BaseHouse : BaseMulti { - public static bool NewVendorSystem{ get{ return Core.AOS; } } // Is new player vendor system enabled? + public static bool NewVendorSystem // Is new player vendor system enabled? + => Core.AOS; public const int MaxCoOwners = 15; - public static int MaxFriends { get { return !Core.AOS ? 50 : 140; } } - public static int MaxBans { get { return !Core.AOS ? 50 : 140; } } + public static int MaxFriends => !Core.AOS ? 50 : 140; + public static int MaxBans => !Core.AOS ? 50 : 140; #region Dynamic decay system private DecayLevel m_CurrentStage; @@ -30,8 +31,8 @@ namespace Server.Multis [CommandProperty( AccessLevel.GameMaster )] public DateTime NextDecayStage { - get { return m_NextDecayStage; } - set { m_NextDecayStage = value; } + get => m_NextDecayStage; + set => m_NextDecayStage = value; } public void ResetDynamicDecay() @@ -65,18 +66,18 @@ namespace Server.Multis [CommandProperty( AccessLevel.GameMaster )] public DateTime LastRefreshed { - get{ return m_LastRefreshed; } - set{ m_LastRefreshed = value; } + get => m_LastRefreshed; + set => m_LastRefreshed = value; } [CommandProperty( AccessLevel.GameMaster )] public bool RestrictDecay { - get{ return m_RestrictDecay; } - set{ m_RestrictDecay = value; } + get => m_RestrictDecay; + set => m_RestrictDecay = value; } - public virtual TimeSpan DecayPeriod{ get{ return TimeSpan.FromDays( 5.0 ); } } + public virtual TimeSpan DecayPeriod => TimeSpan.FromDays( 5.0 ); public virtual DecayType DecayType { @@ -276,10 +277,10 @@ namespace Server.Multis Delete(); } - public virtual TimeSpan RestrictedPlacingTime { get { return TimeSpan.FromHours( 1.0 ); } } + public virtual TimeSpan RestrictedPlacingTime => TimeSpan.FromHours( 1.0 ); [CommandProperty( AccessLevel.GameMaster )] - public virtual double BonusStorageScalar { get { return (Core.ML ? 1.2 : 1.0); } } + public virtual double BonusStorageScalar => (Core.ML ? 1.2 : 1.0); private bool m_Public; @@ -322,9 +323,9 @@ namespace Server.Multis private static Dictionary> m_Table = new Dictionary>(); - public virtual bool IsAosRules{ get{ return Core.AOS; } } + public virtual bool IsAosRules => Core.AOS; - public virtual bool IsActive{ get{ return true; } } + public virtual bool IsActive => true; public virtual HousePlacementEntry GetAosEntry() { @@ -1205,10 +1206,7 @@ namespace Server.Multis private static List m_AllHouses = new List(); - public static List AllHouses - { - get { return m_AllHouses; } - } + public static List AllHouses => m_AllHouses; public BaseHouse( int multiID, Mobile owner, int MaxLockDown, int MaxSecure ) : base( multiID ) { @@ -1651,10 +1649,7 @@ namespace Server.Multis { private BaseHouse m_House; - public override string DefaultName - { - get { return "a house transfer contract"; } - } + public override string DefaultName => "a house transfer contract"; public TransferItem( BaseHouse house ) : base( 0x14F0 ) { @@ -2074,13 +2069,7 @@ namespace Server.Multis m.SendLocalizedMessage( 501717 );//This isn't secure... } - public override bool Decays - { - get - { - return false; - } - } + public override bool Decays => false; public void AddStrongBox( Mobile from ) { @@ -2808,10 +2797,7 @@ namespace Server.Multis [CommandProperty( AccessLevel.GameMaster )] public Mobile Owner { - get - { - return m_Owner; - } + get => m_Owner; set { if ( m_Owner != null ) @@ -2846,17 +2832,14 @@ namespace Server.Multis [CommandProperty( AccessLevel.GameMaster )] public int Visits { - get{ return m_Visits; } - set{ m_Visits = value; } + get => m_Visits; + set => m_Visits = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Public { - get - { - return m_Public; - } + get => m_Public; set { if ( m_Public != value ) @@ -2875,14 +2858,8 @@ namespace Server.Multis [CommandProperty( AccessLevel.GameMaster )] public int MaxSecures { - get - { - return m_MaxSecures; - } - set - { - m_MaxSecures = value; - } + get => m_MaxSecures; + set => m_MaxSecures = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -2896,19 +2873,13 @@ namespace Server.Multis Point3D rel = m_RelativeBanLocation; return new Point3D( this.X + rel.X, this.Y + rel.Y, this.Z + rel.Z ); } - set - { - this.RelativeBanLocation = new Point3D( value.X - this.X, value.Y - this.Y, value.Z - this.Z ); - } + set => this.RelativeBanLocation = new Point3D( value.X - this.X, value.Y - this.Y, value.Z - this.Z ); } [CommandProperty( AccessLevel.GameMaster )] public Point3D RelativeBanLocation { - get - { - return m_RelativeBanLocation; - } + get => m_RelativeBanLocation; set { m_RelativeBanLocation = value; @@ -2921,22 +2892,26 @@ namespace Server.Multis [CommandProperty( AccessLevel.GameMaster )] public int MaxLockDowns { - get - { - return m_MaxLockDowns; - } - set - { - m_MaxLockDowns = value; - } + get => m_MaxLockDowns; + set => m_MaxLockDowns = value; } - public Region Region{ get{ return m_Region; } } - public ArrayList CoOwners{ get{ return m_CoOwners; } set{ m_CoOwners = value; } } - public ArrayList Friends{ get{ return m_Friends; } set{ m_Friends = value; } } - public ArrayList Access{ get{ return m_Access; } set{ m_Access = value; } } - public ArrayList Bans{ get{ return m_Bans; } set{ m_Bans = value; } } - public ArrayList Doors{ get{ return m_Doors; } set{ m_Doors = value; } } + public Region Region => m_Region; + public ArrayList CoOwners{ get => m_CoOwners; + set => m_CoOwners = value; + } + public ArrayList Friends{ get => m_Friends; + set => m_Friends = value; + } + public ArrayList Access{ get => m_Access; + set => m_Access = value; + } + public ArrayList Bans{ get => m_Bans; + set => m_Bans = value; + } + public ArrayList Doors{ get => m_Doors; + set => m_Doors = value; + } public int GetLockdowns() { @@ -3011,28 +2986,34 @@ namespace Server.Multis } } - public ArrayList Addons{ get{ return m_Addons; } set{ m_Addons = value; } } - public ArrayList LockDowns{ get{ return m_LockDowns; } } - public ArrayList Secures{ get{ return m_Secures; } } - public HouseSign Sign{ get{ return m_Sign; } set{ m_Sign = value; } } - public ArrayList PlayerVendors{ get{ return m_PlayerVendors; } } - public ArrayList PlayerBarkeepers{ get{ return m_PlayerBarkeepers; } } - public ArrayList VendorRentalContracts{ get{ return m_VendorRentalContracts; } } - public ArrayList VendorInventories{ get{ return m_VendorInventories; } } - public ArrayList RelocatedEntities{ get{ return m_RelocatedEntities; } } - public MovingCrate MovingCrate{ get{ return m_MovingCrate; } set{ m_MovingCrate = value; } } - public ArrayList InternalizedVendors{ get{ return m_InternalizedVendors; } } + public ArrayList Addons{ get => m_Addons; + set => m_Addons = value; + } + public ArrayList LockDowns => m_LockDowns; + public ArrayList Secures => m_Secures; + public HouseSign Sign{ get => m_Sign; + set => m_Sign = value; + } + public ArrayList PlayerVendors => m_PlayerVendors; + public ArrayList PlayerBarkeepers => m_PlayerBarkeepers; + public ArrayList VendorRentalContracts => m_VendorRentalContracts; + public ArrayList VendorInventories => m_VendorInventories; + public ArrayList RelocatedEntities => m_RelocatedEntities; + public MovingCrate MovingCrate{ get => m_MovingCrate; + set => m_MovingCrate = value; + } + public ArrayList InternalizedVendors => m_InternalizedVendors; public DateTime BuiltOn { - get{ return m_BuiltOn; } - set{ m_BuiltOn = value; } + get => m_BuiltOn; + set => m_BuiltOn = value; } public DateTime LastTraded { - get{ return m_LastTraded; } - set{ m_LastTraded = value; } + get => m_LastTraded; + set => m_LastTraded = value; } public override void OnDelete() @@ -3342,15 +3323,17 @@ namespace Server.Multis } } - public virtual HousePlacementEntry ConvertEntry{ get{ return null; } } - public virtual int ConvertOffsetX{ get{ return 0; } } - public virtual int ConvertOffsetY{ get{ return 0; } } - public virtual int ConvertOffsetZ{ get{ return 0; } } + public virtual HousePlacementEntry ConvertEntry => null; + public virtual int ConvertOffsetX => 0; + public virtual int ConvertOffsetY => 0; + public virtual int ConvertOffsetZ => 0; - public virtual int DefaultPrice{ get{ return 0; } } + public virtual int DefaultPrice => 0; [CommandProperty( AccessLevel.GameMaster )] - public int Price{ get{ return m_Price; } set{ m_Price = value; } } + public int Price{ get => m_Price; + set => m_Price = value; + } public virtual HouseDeed GetDeed() { @@ -3514,8 +3497,10 @@ namespace Server.Multis private Container m_Item; private SecureLevel m_Level; - public Container Item{ get{ return m_Item; } } - public SecureLevel Level{ get{ return m_Level; } set{ m_Level = value; } } + public Container Item => m_Item; + public SecureLevel Level{ get => m_Level; + set => m_Level = value; + } public SecureInfo( Container item, SecureLevel level ) { @@ -3541,15 +3526,9 @@ namespace Server.Multis private IEntity m_Entity; private Point3D m_RelativeLocation; - public IEntity Entity - { - get{ return m_Entity; } - } + public IEntity Entity => m_Entity; - public Point3D RelativeLocation - { - get{ return m_RelativeLocation; } - } + public Point3D RelativeLocation => m_RelativeLocation; public RelocatedEntity( IEntity entity, Point3D relativeLocation ) { diff --git a/Scripts/Multis/Boats/BaseBoat.cs b/Scripts/Multis/Boats/BaseBoat.cs index c2f5a1745..07d85ba43 100644 --- a/Scripts/Multis/Boats/BaseBoat.cs +++ b/Scripts/Multis/Boats/BaseBoat.cs @@ -61,49 +61,75 @@ namespace Server.Multis private Timer m_MoveTimer; [CommandProperty( AccessLevel.GameMaster )] - public Hold Hold{ get{ return m_Hold; } set{ m_Hold = value; } } + public Hold Hold{ get => m_Hold; + set => m_Hold = value; + } [CommandProperty( AccessLevel.GameMaster )] - public TillerMan TillerMan{ get{ return m_TillerMan; } set{ m_TillerMan = value; } } + public TillerMan TillerMan{ get => m_TillerMan; + set => m_TillerMan = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Plank PPlank{ get{ return m_PPlank; } set{ m_PPlank = value; } } + public Plank PPlank{ get => m_PPlank; + set => m_PPlank = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Plank SPlank{ get{ return m_SPlank; } set{ m_SPlank = value; } } + public Plank SPlank{ get => m_SPlank; + set => m_SPlank = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Mobile Owner{ get{ return m_Owner; } set{ m_Owner = value; } } + public Mobile Owner{ get => m_Owner; + set => m_Owner = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Direction Facing{ get{ return m_Facing; } set{ SetFacing( value ); } } + public Direction Facing{ get => m_Facing; + set => SetFacing( value ); + } [CommandProperty( AccessLevel.GameMaster )] - public Direction Moving{ get{ return m_Moving; } set{ m_Moving = value; } } + public Direction Moving{ get => m_Moving; + set => m_Moving = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool IsMoving{ get{ return ( m_MoveTimer != null ); } } + public bool IsMoving => ( m_MoveTimer != null ); [CommandProperty( AccessLevel.GameMaster )] - public int Speed{ get{ return m_Speed; } set{ m_Speed = value; } } + public int Speed{ get => m_Speed; + set => m_Speed = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool Anchored{ get{ return m_Anchored; } set{ m_Anchored = value; } } + public bool Anchored{ get => m_Anchored; + set => m_Anchored = value; + } [CommandProperty( AccessLevel.GameMaster )] - public string ShipName{ get{ return m_ShipName; } set{ m_ShipName = value; if ( m_TillerMan != null ) m_TillerMan.InvalidateProperties(); } } + public string ShipName{ get => m_ShipName; + set{ m_ShipName = value; if ( m_TillerMan != null ) m_TillerMan.InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] - public BoatOrder Order{ get{ return m_Order; } set{ m_Order = value; } } + public BoatOrder Order{ get => m_Order; + set => m_Order = value; + } [CommandProperty( AccessLevel.GameMaster )] - public MapItem MapItem{ get{ return m_MapItem; } set{ m_MapItem = value; } } + public MapItem MapItem{ get => m_MapItem; + set => m_MapItem = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int NextNavPoint{ get{ return m_NextNavPoint; } set{ m_NextNavPoint = value; } } + public int NextNavPoint{ get => m_NextNavPoint; + set => m_NextNavPoint = value; + } [CommandProperty( AccessLevel.GameMaster )] - public DateTime TimeOfDecay{ get{ return m_DecayTime; } set{ m_DecayTime = value; if ( m_TillerMan != null ) m_TillerMan.InvalidateProperties(); } } + public DateTime TimeOfDecay{ get => m_DecayTime; + set{ m_DecayTime = value; if ( m_TillerMan != null ) m_TillerMan.InvalidateProperties(); } } public int Status { @@ -130,22 +156,22 @@ namespace Server.Multis } } - public virtual int NorthID{ get{ return 0; } } - public virtual int EastID{ get{ return 0; } } - public virtual int SouthID{ get{ return 0; } } - public virtual int WestID{ get{ return 0; } } + public virtual int NorthID => 0; + public virtual int EastID => 0; + public virtual int SouthID => 0; + public virtual int WestID => 0; - public virtual int HoldDistance{ get{ return 0; } } - public virtual int TillerManDistance{ get{ return 0; } } - public virtual Point2D StarboardOffset{ get{ return Point2D.Zero; } } - public virtual Point2D PortOffset{ get{ return Point2D.Zero; } } - public virtual Point3D MarkOffset{ get{ return Point3D.Zero; } } + public virtual int HoldDistance => 0; + public virtual int TillerManDistance => 0; + public virtual Point2D StarboardOffset => Point2D.Zero; + public virtual Point2D PortOffset => Point2D.Zero; + public virtual Point3D MarkOffset => Point3D.Zero; - public virtual BaseDockedBoat DockedBoat{ get{ return null; } } + public virtual BaseDockedBoat DockedBoat => null; private static List m_Instances = new List(); - public static List Boats{ get{ return m_Instances; } } + public static List Boats => m_Instances; public BaseBoat() : base( 0x0 ) { @@ -433,7 +459,7 @@ namespace Server.Multis * 'walking' in piloting mode has a 1s interval, speed 0x2 */ - private static bool NewBoatMovement { get { return Core.HS; } } + private static bool NewBoatMovement => Core.HS; private static TimeSpan SlowInterval = TimeSpan.FromSeconds( NewBoatMovement ? 0.50 : 0.75 ); private static TimeSpan FastInterval = TimeSpan.FromSeconds( NewBoatMovement ? 0.25 : 0.75 ); @@ -1739,10 +1765,7 @@ namespace Server.Multis #region High Seas - public override bool AllowsRelativeDrop - { - get { return true; } - } + public override bool AllowsRelativeDrop => true; /* * OSI sends the 0xF7 packet instead, holding 0xF3 packets diff --git a/Scripts/Multis/Boats/BaseBoatDeed.cs b/Scripts/Multis/Boats/BaseBoatDeed.cs index b86ffd9e0..9498f6600 100644 --- a/Scripts/Multis/Boats/BaseBoatDeed.cs +++ b/Scripts/Multis/Boats/BaseBoatDeed.cs @@ -11,10 +11,14 @@ namespace Server.Multis private Point3D m_Offset; [CommandProperty( AccessLevel.GameMaster )] - public int MultiID{ get{ return m_MultiID; } set{ m_MultiID = value; } } + public int MultiID{ get => m_MultiID; + set => m_MultiID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D Offset{ get{ return m_Offset; } set{ m_Offset = value; } } + public Point3D Offset{ get => m_Offset; + set => m_Offset = value; + } public BaseBoatDeed( int id, Point3D offset ) : base( 0x14F2 ) { diff --git a/Scripts/Multis/Boats/BaseDockedBoat.cs b/Scripts/Multis/Boats/BaseDockedBoat.cs index c1e188463..bf7114ad3 100644 --- a/Scripts/Multis/Boats/BaseDockedBoat.cs +++ b/Scripts/Multis/Boats/BaseDockedBoat.cs @@ -11,13 +11,18 @@ namespace Server.Multis private string m_ShipName; [CommandProperty( AccessLevel.GameMaster )] - public int MultiID{ get{ return m_MultiID; } set{ m_MultiID = value; } } + public int MultiID{ get => m_MultiID; + set => m_MultiID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public Point3D Offset{ get{ return m_Offset; } set{ m_Offset = value; } } + public Point3D Offset{ get => m_Offset; + set => m_Offset = value; + } [CommandProperty( AccessLevel.GameMaster )] - public string ShipName{ get{ return m_ShipName; } set{ m_ShipName = value; InvalidateProperties(); } } + public string ShipName{ get => m_ShipName; + set{ m_ShipName = value; InvalidateProperties(); } } public BaseDockedBoat( int id, Point3D offset, BaseBoat boat ) : base( 0x14F4 ) { diff --git a/Scripts/Multis/Boats/Hold.cs b/Scripts/Multis/Boats/Hold.cs index df9923000..5a6111d10 100644 --- a/Scripts/Multis/Boats/Hold.cs +++ b/Scripts/Multis/Boats/Hold.cs @@ -84,10 +84,7 @@ namespace Server.Items } } - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Multis/Boats/Plank.cs b/Scripts/Multis/Boats/Plank.cs index 80c5e1a2f..c241f85f4 100644 --- a/Scripts/Multis/Boats/Plank.cs +++ b/Scripts/Multis/Boats/Plank.cs @@ -71,22 +71,30 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public BaseBoat Boat{ get{ return m_Boat; } set{ m_Boat = value; } } + public BaseBoat Boat{ get => m_Boat; + set => m_Boat = value; + } [CommandProperty( AccessLevel.GameMaster )] - public PlankSide Side{ get{ return m_Side; } set{ m_Side = value; } } + public PlankSide Side{ get => m_Side; + set => m_Side = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool Locked{ get{ return m_Locked; } set{ m_Locked = value; } } + public bool Locked{ get => m_Locked; + set => m_Locked = value; + } [CommandProperty( AccessLevel.GameMaster )] - public uint KeyValue{ get{ return m_KeyValue; } set{ m_KeyValue = value; } } + public uint KeyValue{ get => m_KeyValue; + set => m_KeyValue = value; + } [CommandProperty( AccessLevel.GameMaster )] - public bool IsOpen{ get{ return ( ItemID == 0x3ED5 || ItemID == 0x3ED4 || ItemID == 0x3E84 || ItemID == 0x3E89 ); } } + public bool IsOpen => ( ItemID == 0x3ED5 || ItemID == 0x3ED4 || ItemID == 0x3E84 || ItemID == 0x3E89 ); [CommandProperty( AccessLevel.GameMaster )] - public bool Starboard{ get{ return ( m_Side == PlankSide.Starboard ); } } + public bool Starboard => ( m_Side == PlankSide.Starboard ); public void SetFacing( Direction dir ) { diff --git a/Scripts/Multis/Camps/BaseCamp.cs b/Scripts/Multis/Camps/BaseCamp.cs index 752eac95f..10f57e402 100644 --- a/Scripts/Multis/Camps/BaseCamp.cs +++ b/Scripts/Multis/Camps/BaseCamp.cs @@ -13,14 +13,11 @@ namespace Server.Multis private Timer m_DecayTimer; private TimeSpan m_DecayDelay; - public virtual int EventRange{ get{ return 10; } } + public virtual int EventRange => 10; public virtual TimeSpan DecayDelay { - get - { - return m_DecayDelay; - } + get => m_DecayDelay; set { m_DecayDelay = value; diff --git a/Scripts/Multis/Camps/BrigandCamp.cs b/Scripts/Multis/Camps/BrigandCamp.cs index bb3842f62..7ee1fa3af 100644 --- a/Scripts/Multis/Camps/BrigandCamp.cs +++ b/Scripts/Multis/Camps/BrigandCamp.cs @@ -6,9 +6,9 @@ namespace Server.Multis { public class BrigandCamp : BaseCamp { - public virtual Mobile Brigands{ get{ return new Brigand(); } } - public virtual Mobile Executioners{ get{ return new Executioner(); } } - + public virtual Mobile Brigands => new Brigand(); + public virtual Mobile Executioners => new Executioner(); + private Mobile m_Prisoner; [Constructible] diff --git a/Scripts/Multis/Camps/LizardmenCamp.cs b/Scripts/Multis/Camps/LizardmenCamp.cs index fe79befba..1e965857e 100644 --- a/Scripts/Multis/Camps/LizardmenCamp.cs +++ b/Scripts/Multis/Camps/LizardmenCamp.cs @@ -6,8 +6,8 @@ namespace Server.Multis { public class LizardmenCamp : BaseCamp { - public virtual Mobile Lizardmen{ get{ return new Lizardman(); } } - + public virtual Mobile Lizardmen => new Lizardman(); + private Mobile m_Prisoner; [Constructible] diff --git a/Scripts/Multis/Camps/OrcCamp.cs b/Scripts/Multis/Camps/OrcCamp.cs index f8ae265d4..2ff86313e 100644 --- a/Scripts/Multis/Camps/OrcCamp.cs +++ b/Scripts/Multis/Camps/OrcCamp.cs @@ -6,7 +6,7 @@ namespace Server.Multis { public class OrcCamp : BaseCamp { - public virtual Mobile Orcs{ get{ return new Orc(); } } + public virtual Mobile Orcs => new Orc(); private Mobile m_Prisoner; diff --git a/Scripts/Multis/Camps/RatCamp.cs b/Scripts/Multis/Camps/RatCamp.cs index c55131fbf..8af654b2f 100644 --- a/Scripts/Multis/Camps/RatCamp.cs +++ b/Scripts/Multis/Camps/RatCamp.cs @@ -6,7 +6,7 @@ namespace Server.Multis { public class RatCamp : BaseCamp { - public virtual Mobile Ratmen{ get{ return new Ratman(); } } + public virtual Mobile Ratmen => new Ratman(); private Mobile m_Prisoner; diff --git a/Scripts/Multis/ComponentVerification.cs b/Scripts/Multis/ComponentVerification.cs index 43419dabc..0231c8883 100644 --- a/Scripts/Multis/ComponentVerification.cs +++ b/Scripts/Multis/ComponentVerification.cs @@ -231,13 +231,7 @@ namespace Server.Multis return this[name] as string; } - public object this[string name] - { - get - { - return this[m_Spreadsheet.GetColumnID( name )]; - } - } + public object this[string name] => this[m_Spreadsheet.GetColumnID( name )]; public object this[int id] { diff --git a/Scripts/Multis/Deeds.cs b/Scripts/Multis/Deeds.cs index f1a8b6880..8c84ff99b 100644 --- a/Scripts/Multis/Deeds.cs +++ b/Scripts/Multis/Deeds.cs @@ -48,27 +48,15 @@ namespace Server.Multis.Deeds [CommandProperty( AccessLevel.GameMaster )] public int MultiID { - get - { - return m_MultiID; - } - set - { - m_MultiID = value; - } + get => m_MultiID; + set => m_MultiID = value; } [CommandProperty( AccessLevel.GameMaster )] public Point3D Offset { - get - { - return m_Offset; - } - set - { - m_Offset = value; - } + get => m_Offset; + set => m_Offset = value; } public HouseDeed( int id, Point3D offset ) : base( 0x14F0 ) diff --git a/Scripts/Multis/DynamicDecay.cs b/Scripts/Multis/DynamicDecay.cs index a2877f32b..7117e26c0 100644 --- a/Scripts/Multis/DynamicDecay.cs +++ b/Scripts/Multis/DynamicDecay.cs @@ -54,15 +54,9 @@ namespace Server.Multis private TimeSpan m_MinDuration; private TimeSpan m_MaxDuration; - public TimeSpan MinDuration - { - get { return m_MinDuration; } - } + public TimeSpan MinDuration => m_MinDuration; - public TimeSpan MaxDuration - { - get { return m_MaxDuration; } - } + public TimeSpan MaxDuration => m_MaxDuration; public DecayStageInfo( TimeSpan min, TimeSpan max ) { diff --git a/Scripts/Multis/HouseFoundation.cs b/Scripts/Multis/HouseFoundation.cs index 415b1974f..6e4a1c729 100644 --- a/Scripts/Multis/HouseFoundation.cs +++ b/Scripts/Multis/HouseFoundation.cs @@ -37,19 +37,27 @@ namespace Server.Multis private FoundationType m_Type; // Graphic type of this foundation. private Mobile m_Customizer; // Who is currently customizing this -or- null if not customizing. - public FoundationType Type { get { return m_Type; } set { m_Type = value; } } - public int LastRevision { get { return m_LastRevision; } set { m_LastRevision = value; } } + public FoundationType Type { get => m_Type; + set => m_Type = value; + } + public int LastRevision { get => m_LastRevision; + set => m_LastRevision = value; + } public List Fixtures => m_Fixtures; public Item SignHanger => m_SignHanger; public Item Signpost => m_Signpost; - public int SignpostGraphic { get { return m_SignpostGraphic; } set { m_SignpostGraphic = value; } } - public Mobile Customizer { get { return m_Customizer; } set { m_Customizer = value; } } + public int SignpostGraphic { get => m_SignpostGraphic; + set => m_SignpostGraphic = value; + } + public Mobile Customizer { get => m_Customizer; + set => m_Customizer = value; + } public override bool IsAosRules => true; public override bool IsActive => Customizer == null; - public virtual int CustomizationCost { get { return (Core.AOS ? 0 : 10000); } } + public virtual int CustomizationCost => (Core.AOS ? 0 : 10000); public bool IsFixture( Item item ) { @@ -89,19 +97,19 @@ namespace Server.Multis public DesignState CurrentState { get { if ( m_Current == null ) SetInitialState(); return m_Current; } - set { m_Current = value; } + set => m_Current = value; } public DesignState DesignState { get { if ( m_Design == null ) SetInitialState(); return m_Design; } - set { m_Design = value; } + set => m_Design = value; } public DesignState BackupState { get { if ( m_Backup == null ) SetInitialState(); return m_Backup; } - set { m_Backup = value; } + set => m_Backup = value; } public void SetInitialState() @@ -1685,7 +1693,7 @@ namespace Server.Multis public Packet PacketCache { - get { return m_PacketCache; } + get => m_PacketCache; set { if ( m_PacketCache == value ) @@ -1701,7 +1709,9 @@ namespace Server.Multis public HouseFoundation Foundation => m_Foundation; public MultiComponentList Components => m_Components; public MultiTileEntry[] Fixtures => m_Fixtures; - public int Revision { get { return m_Revision; } set { m_Revision = value; } } + public int Revision { get => m_Revision; + set => m_Revision = value; + } public DesignState( HouseFoundation foundation, MultiComponentList components ) { @@ -1980,7 +1990,9 @@ namespace Server.Multis private int m_Level; public HouseFoundation Foundation => m_Foundation; - public int Level { get { return m_Level; } set { m_Level = value; } } + public int Level { get => m_Level; + set => m_Level = value; + } public int MaxLevels => m_Foundation.MaxLevels; public DesignContext( HouseFoundation foundation ) diff --git a/Scripts/Multis/HousePlacementTool.cs b/Scripts/Multis/HousePlacementTool.cs index ab843b62b..20d027362 100644 --- a/Scripts/Multis/HousePlacementTool.cs +++ b/Scripts/Multis/HousePlacementTool.cs @@ -281,16 +281,16 @@ namespace Server.Items private int m_MultiID; private Point3D m_Offset; - public Type Type{ get{ return m_Type; } } + public Type Type => m_Type; - public int Description{ get{ return m_Description; } } - public int Storage{ get{ return BaseHouse.NewVendorSystem ? m_NewStorage : m_Storage; } } - public int Lockdowns{ get{ return BaseHouse.NewVendorSystem ? m_NewLockdowns : m_Lockdowns; } } - public int Vendors{ get{ return m_Vendors; } } - public int Cost{ get{ return m_Cost; } } + public int Description => m_Description; + public int Storage => BaseHouse.NewVendorSystem ? m_NewStorage : m_Storage; + public int Lockdowns => BaseHouse.NewVendorSystem ? m_NewLockdowns : m_Lockdowns; + public int Vendors => m_Vendors; + public int Cost => m_Cost; - public int MultiID{ get{ return m_MultiID; } } - public Point3D Offset{ get{ return m_Offset; } } + public int MultiID => m_MultiID; + public Point3D Offset => m_Offset; public HousePlacementEntry( Type type, int description, int storage, int lockdowns, int newStorage, int newLockdowns, int vendors, int cost, int xOffset, int yOffset, int zOffset, int multiID ) { @@ -666,10 +666,7 @@ namespace Server.Items new HousePlacementEntry( typeof( Castle ), 1011314, 4076, 2038, 4688, 2344, 78, 865250, 0, 16, 0, 0x007E ) }; - public static HousePlacementEntry[] ClassicHouses{ get{ return m_ClassicHouses; } } - - - + public static HousePlacementEntry[] ClassicHouses => m_ClassicHouses; private static HousePlacementEntry[] m_TwoStoryFoundations = new HousePlacementEntry[] @@ -723,10 +720,7 @@ namespace Server.Items new HousePlacementEntry( typeof( HouseFoundation ), 1060319, 1300, 650, 1495, 747, 28, 96500, 0, 7, 0, 0x143A ) // 13x13 2-Story Customizable House }; - public static HousePlacementEntry[] TwoStoryFoundations{ get{ return m_TwoStoryFoundations; } } - - - + public static HousePlacementEntry[] TwoStoryFoundations => m_TwoStoryFoundations; private static HousePlacementEntry[] m_ThreeStoryFoundations = new HousePlacementEntry[] @@ -788,6 +782,6 @@ namespace Server.Items new HousePlacementEntry( typeof( HouseFoundation ), 1060384, 2119, 1059, 2437, 1218, 42, 179000, 0, 10, 0, 0x147B ) // 18x18 3-Story Customizable House }; - public static HousePlacementEntry[] ThreeStoryFoundations{ get{ return m_ThreeStoryFoundations; } } + public static HousePlacementEntry[] ThreeStoryFoundations => m_ThreeStoryFoundations; } } diff --git a/Scripts/Multis/HouseSign.cs b/Scripts/Multis/HouseSign.cs index eb45a56a2..6c509c1ea 100644 --- a/Scripts/Multis/HouseSign.cs +++ b/Scripts/Multis/HouseSign.cs @@ -29,29 +29,17 @@ namespace Server.Multis return Name; } - public BaseHouse Owner - { - get - { - return m_Owner; - } - } + public BaseHouse Owner => m_Owner; [CommandProperty( AccessLevel.GameMaster )] public bool RestrictDecay { - get{ return ( m_Owner != null && m_Owner.RestrictDecay ); } + get => ( m_Owner != null && m_Owner.RestrictDecay ); set{ if ( m_Owner != null ) m_Owner.RestrictDecay = value; } } [CommandProperty( AccessLevel.GameMaster )] - public Mobile OriginalOwner - { - get - { - return m_OrgOwner; - } - } + public Mobile OriginalOwner => m_OrgOwner; public override void OnAfterDelete() { @@ -70,10 +58,7 @@ namespace Server.Multis private bool m_GettingProperties; - public bool GettingProperties - { - get { return m_GettingProperties; } - } + public bool GettingProperties => m_GettingProperties; public override void GetProperties( ObjectPropertyList list ) { diff --git a/Scripts/Multis/HouseTeleporter.cs b/Scripts/Multis/HouseTeleporter.cs index 75f740132..52334eb36 100644 --- a/Scripts/Multis/HouseTeleporter.cs +++ b/Scripts/Multis/HouseTeleporter.cs @@ -14,15 +14,15 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public Item Target { - get{ return m_Target; } - set{ m_Target = value; } + get => m_Target; + set => m_Target = value; } [CommandProperty( AccessLevel.GameMaster )] public SecureLevel Level { - get{ return m_Level; } - set{ m_Level = value; } + get => m_Level; + set => m_Level = value; } [Constructible] diff --git a/Scripts/Multis/MovingCrate.cs b/Scripts/Multis/MovingCrate.cs index 4cea9ed0c..e3af9a044 100644 --- a/Scripts/Multis/MovingCrate.cs +++ b/Scripts/Multis/MovingCrate.cs @@ -21,8 +21,8 @@ namespace Server.Multis public BaseHouse House { - get{ return m_House; } - set{ m_House = value; } + get => m_House; + set => m_House = value; } public override int DefaultMaxItems => 0; @@ -142,10 +142,7 @@ namespace Server.Multis return Point3D.Zero; } - public override bool IsDecoContainer - { - get{ return false; } - } + public override bool IsDecoContainer => false; public override bool CheckHold( Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight ) { @@ -279,10 +276,7 @@ namespace Server.Multis public override int DefaultGumpID => 0x4B; public override int DefaultDropSound => 0x42; - public override Rectangle2D Bounds - { - get{ return new Rectangle2D( 16, 51, 168, 73 ); } - } + public override Rectangle2D Bounds => new Rectangle2D( 16, 51, 168, 73 ); public override int DefaultMaxItems => 0; public override int DefaultMaxWeight => 0; diff --git a/Scripts/Regions/BaseRegion.cs b/Scripts/Regions/BaseRegion.cs index 06362b71a..cbbf3cdd3 100644 --- a/Scripts/Regions/BaseRegion.cs +++ b/Scripts/Regions/BaseRegion.cs @@ -35,13 +35,17 @@ namespace Server.Regions private SpawnZLevel m_SpawnZLevel; private bool m_ExcludeFromParentSpawns; - public string RuneName{ get{ return m_RuneName; } set{ m_RuneName = value; } } + public string RuneName{ get => m_RuneName; + set => m_RuneName = value; + } - public bool NoLogoutDelay{ get{ return m_NoLogoutDelay; } set{ m_NoLogoutDelay = value; } } + public bool NoLogoutDelay{ get => m_NoLogoutDelay; + set => m_NoLogoutDelay = value; + } public SpawnEntry[] Spawns { - get{ return m_Spawns; } + get => m_Spawns; set { if ( m_Spawns != null ) @@ -54,9 +58,13 @@ namespace Server.Regions } } - public SpawnZLevel SpawnZLevel{ get{ return m_SpawnZLevel; } set{ m_SpawnZLevel = value; } } + public SpawnZLevel SpawnZLevel{ get => m_SpawnZLevel; + set => m_SpawnZLevel = value; + } - public bool ExcludeFromParentSpawns{ get{ return m_ExcludeFromParentSpawns; } set{ m_ExcludeFromParentSpawns = value; } } + public bool ExcludeFromParentSpawns{ get => m_ExcludeFromParentSpawns; + set => m_ExcludeFromParentSpawns = value; + } public override void OnUnregister() { diff --git a/Scripts/Regions/DungeonRegion.cs b/Scripts/Regions/DungeonRegion.cs index 853917174..b4d050e45 100644 --- a/Scripts/Regions/DungeonRegion.cs +++ b/Scripts/Regions/DungeonRegion.cs @@ -9,8 +9,12 @@ namespace Server.Regions private Point3D m_EntranceLocation; private Map m_EntranceMap; - public Point3D EntranceLocation{ get{ return m_EntranceLocation; } set{ m_EntranceLocation = value; } } - public Map EntranceMap{ get{ return m_EntranceMap; } set{ m_EntranceMap = value; } } + public Point3D EntranceLocation{ get => m_EntranceLocation; + set => m_EntranceLocation = value; + } + public Map EntranceMap{ get => m_EntranceMap; + set => m_EntranceMap = value; + } public DungeonRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent ) { diff --git a/Scripts/Regions/GuardedRegion.cs b/Scripts/Regions/GuardedRegion.cs index d39e67acf..2a344aec6 100644 --- a/Scripts/Regions/GuardedRegion.cs +++ b/Scripts/Regions/GuardedRegion.cs @@ -12,7 +12,9 @@ namespace Server.Regions private Type m_GuardType; private bool m_Disabled; - public bool Disabled{ get{ return m_Disabled; } set{ m_Disabled = value; } } + public bool Disabled{ get => m_Disabled; + set => m_Disabled = value; + } public virtual bool IsDisabled() { @@ -99,7 +101,7 @@ namespace Server.Regions return reg; } - public virtual bool AllowReds{ get{ return Core.AOS; } } + public virtual bool AllowReds => Core.AOS; public virtual bool CheckVendorAccess( BaseVendor vendor, Mobile from ) { diff --git a/Scripts/Regions/HouseRegion.cs b/Scripts/Regions/HouseRegion.cs index 0c0022a45..7eb816ecd 100644 --- a/Scripts/Regions/HouseRegion.cs +++ b/Scripts/Regions/HouseRegion.cs @@ -417,12 +417,6 @@ namespace Server.Regions return base.OnSingleClick( from, o ); } - public BaseHouse House - { - get - { - return m_House; - } - } + public BaseHouse House => m_House; } } diff --git a/Scripts/Regions/NoHousingRegion.cs b/Scripts/Regions/NoHousingRegion.cs index d72ade948..3617c856c 100644 --- a/Scripts/Regions/NoHousingRegion.cs +++ b/Scripts/Regions/NoHousingRegion.cs @@ -9,7 +9,7 @@ namespace Server.Regions */ private bool m_SmartChecking; - public bool SmartChecking{ get{ return m_SmartChecking; } } + public bool SmartChecking => m_SmartChecking; public NoHousingRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent ) { diff --git a/Scripts/Regions/Spawning/SpawnDefinition.cs b/Scripts/Regions/Spawning/SpawnDefinition.cs index 3f1e8a379..6ace98bc7 100644 --- a/Scripts/Regions/Spawning/SpawnDefinition.cs +++ b/Scripts/Regions/Spawning/SpawnDefinition.cs @@ -84,7 +84,7 @@ namespace Server.Regions private Type m_Type; private bool m_Init; - public Type Type{ get{ return m_Type; } } + public Type Type => m_Type; public abstract int Height{ get; } public abstract bool Land{ get; } @@ -261,8 +261,8 @@ namespace Server.Regions private int m_ItemID; private BaseTreasureChest.TreasureLevel m_Level; - public int ItemID{ get{ return m_ItemID; } } - public BaseTreasureChest.TreasureLevel Level{ get{ return m_Level; } } + public int ItemID => m_ItemID; + public BaseTreasureChest.TreasureLevel Level => m_Level; public SpawnTreasureChest( int itemID, BaseTreasureChest.TreasureLevel level ) : base( typeof( BaseTreasureChest ) ) { @@ -286,8 +286,8 @@ namespace Server.Regions private SpawnDefinition m_SpawnDefinition; private int m_Weight; - public SpawnDefinition SpawnDefinition{ get{ return m_SpawnDefinition; } } - public int Weight{ get{ return m_Weight; } } + public SpawnDefinition SpawnDefinition => m_SpawnDefinition; + public int Weight => m_Weight; public SpawnGroupElement( SpawnDefinition spawnDefinition, int weight ) { @@ -300,7 +300,7 @@ namespace Server.Regions { private static Hashtable m_Table = new Hashtable(); - public static Hashtable Table{ get{ return m_Table; } } + public static Hashtable Table => m_Table; public static void Register( SpawnGroup group ) { @@ -365,8 +365,8 @@ namespace Server.Regions private SpawnGroupElement[] m_Elements; private int m_TotalWeight; - public string Name{ get{ return m_Name; } } - public SpawnGroupElement[] Elements{ get{ return m_Elements; } } + public string Name => m_Name; + public SpawnGroupElement[] Elements => m_Elements; public SpawnGroup( string name, SpawnGroupElement[] elements ) { diff --git a/Scripts/Regions/Spawning/SpawnEntry.cs b/Scripts/Regions/Spawning/SpawnEntry.cs index b085f32b6..99a2a806a 100644 --- a/Scripts/Regions/Spawning/SpawnEntry.cs +++ b/Scripts/Regions/Spawning/SpawnEntry.cs @@ -13,17 +13,17 @@ namespace Server.Regions private static Hashtable m_Table = new Hashtable(); - public static Hashtable Table{ get{ return m_Table; } } + public static Hashtable Table => m_Table; // When a creature's AI is deactivated (PlayerRangeSensitive optimization) does it return home? - public bool ReturnOnDeactivate{ get{ return true; } } + public bool ReturnOnDeactivate => true; // Are creatures unlinked on taming (true) or should they also go out of the region (false)? - public bool UnlinkOnTaming{ get{ return false; } } + public bool UnlinkOnTaming => false; // Are unlinked and untamed creatures removed after 20 hours? - public bool RemoveIfUntamed{ get{ return true; } } + public bool RemoveIfUntamed => true; public static readonly Direction InvalidDirection = Direction.Running; @@ -43,21 +43,21 @@ namespace Server.Regions private DateTime m_NextSpawn; private Timer m_SpawnTimer; - public int ID{ get{ return m_ID; } } - public BaseRegion Region{ get{ return m_Region; } } - Region ISpawner.Region{ get{ return m_Region; } } - public Point3D HomeLocation{ get{ return m_Home; } } - public int HomeRange{ get{ return m_Range; } } - public Direction Direction{ get{ return m_Direction; } } - public SpawnDefinition Definition{ get{ return m_Definition; } } - public List SpawnedObjects{ get{ return m_SpawnedObjects; } } - public int Max{ get{ return m_Max; } } - public TimeSpan MinSpawnTime{ get{ return m_MinSpawnTime; } } - public TimeSpan MaxSpawnTime{ get{ return m_MaxSpawnTime; } } - public bool Running{ get{ return m_Running; } } + public int ID => m_ID; + public BaseRegion Region => m_Region; + Region ISpawner.Region => m_Region; + public Point3D HomeLocation => m_Home; + public int HomeRange => m_Range; + public Direction Direction => m_Direction; + public SpawnDefinition Definition => m_Definition; + public List SpawnedObjects => m_SpawnedObjects; + public int Max => m_Max; + public TimeSpan MinSpawnTime => m_MinSpawnTime; + public TimeSpan MaxSpawnTime => m_MaxSpawnTime; + public bool Running => m_Running; - public bool Complete{ get{ return m_SpawnedObjects.Count >= m_Max; } } - public bool Spawning{ get{ return m_Running && !this.Complete; } } + public bool Complete => m_SpawnedObjects.Count >= m_Max; + public bool Spawning => m_Running && !this.Complete; public SpawnEntry( int id, BaseRegion region, Point3D home, int range, Direction direction, SpawnDefinition definition, int max, TimeSpan minSpawnTime, TimeSpan maxSpawnTime ) { diff --git a/Scripts/Regions/Spawning/SpawnPersistence.cs b/Scripts/Regions/Spawning/SpawnPersistence.cs index 92aad402c..6460e2ed1 100644 --- a/Scripts/Regions/Spawning/SpawnPersistence.cs +++ b/Scripts/Regions/Spawning/SpawnPersistence.cs @@ -5,7 +5,7 @@ namespace Server.Regions { private static SpawnPersistence m_Instance; - public SpawnPersistence Instance{ get{ return m_Instance; } } + public SpawnPersistence Instance => m_Instance; public static void EnsureExistence() { @@ -13,10 +13,7 @@ namespace Server.Regions m_Instance = new SpawnPersistence(); } - public override string DefaultName - { - get { return "Region spawn persistence - Internal"; } - } + public override string DefaultName => "Region spawn persistence - Internal"; private SpawnPersistence() : base( 1 ) { diff --git a/Scripts/Skills/AnimalTaming.cs b/Scripts/Skills/AnimalTaming.cs index b56abb673..4e8f74fa3 100644 --- a/Scripts/Skills/AnimalTaming.cs +++ b/Scripts/Skills/AnimalTaming.cs @@ -22,8 +22,8 @@ namespace Server.SkillHandlers public static bool DisableMessage { - get{ return m_DisableMessage; } - set{ m_DisableMessage = value; } + get => m_DisableMessage; + set => m_DisableMessage = value; } public static TimeSpan OnUse( Mobile m ) diff --git a/Scripts/Skills/Hiding.cs b/Scripts/Skills/Hiding.cs index 4d9d20486..3e0dd3e5e 100644 --- a/Scripts/Skills/Hiding.cs +++ b/Scripts/Skills/Hiding.cs @@ -10,8 +10,8 @@ namespace Server.SkillHandlers public static bool CombatOverride { - get{ return m_CombatOverride; } - set{ m_CombatOverride = value; } + get => m_CombatOverride; + set => m_CombatOverride = value; } public static void Initialize() diff --git a/Scripts/Skills/Stealing.cs b/Scripts/Skills/Stealing.cs index d6312d553..d4b4cc295 100644 --- a/Scripts/Skills/Stealing.cs +++ b/Scripts/Skills/Stealing.cs @@ -406,12 +406,12 @@ namespace Server.SkillHandlers private Mobile m_Victim; private DateTime m_Expires; - public Item Stolen{ get{ return m_Stolen; } } - public Mobile Thief{ get{ return m_Thief; } } - public Mobile Victim{ get{ return m_Victim; } } - public DateTime Expires{ get{ return m_Expires; } } + public Item Stolen => m_Stolen; + public Mobile Thief => m_Thief; + public Mobile Victim => m_Victim; + public DateTime Expires => m_Expires; - public bool IsExpired{ get{ return ( DateTime.UtcNow >= m_Expires ); } } + public bool IsExpired => ( DateTime.UtcNow >= m_Expires ); public StolenItem( Item stolen, Mobile thief, Mobile victim ) { diff --git a/Scripts/Skills/Stealth.cs b/Scripts/Skills/Stealth.cs index 5a3d7d743..5311e27c0 100644 --- a/Scripts/Skills/Stealth.cs +++ b/Scripts/Skills/Stealth.cs @@ -11,7 +11,7 @@ namespace Server.SkillHandlers SkillInfo.Table[(int)SkillName.Stealth].Callback = new SkillUseCallback( OnUse ); } - public static double HidingRequirement { get { return ( Core.ML ? 30.0 : ( Core.SE ? 50.0 : 80.0 ) ); } } + public static double HidingRequirement => ( Core.ML ? 30.0 : ( Core.SE ? 50.0 : 80.0 ) ); public static int[,] ArmorTable => m_ArmorTable; private static int[,] m_ArmorTable = new int[,] diff --git a/Scripts/SpecialSystems/Engines/GiftGiving.cs b/Scripts/SpecialSystems/Engines/GiftGiving.cs index 28d9c49ec..c54a231df 100644 --- a/Scripts/SpecialSystems/Engines/GiftGiving.cs +++ b/Scripts/SpecialSystems/Engines/GiftGiving.cs @@ -55,7 +55,7 @@ namespace Server.Misc public abstract class GiftGiver { - public virtual TimeSpan MinimumAge{ get{ return TimeSpan.FromDays( 30.0 ); } } + public virtual TimeSpan MinimumAge => TimeSpan.FromDays( 30.0 ); public abstract DateTime Start{ get; } public abstract DateTime Finish{ get; } diff --git a/Scripts/SpecialSystems/Engines/TestCenter.cs b/Scripts/SpecialSystems/Engines/TestCenter.cs index 72c3a7c68..f2eb15704 100644 --- a/Scripts/SpecialSystems/Engines/TestCenter.cs +++ b/Scripts/SpecialSystems/Engines/TestCenter.cs @@ -9,7 +9,7 @@ namespace Server.Misc public class TestCenter { private const bool m_Enabled = false; - public static bool Enabled { get{ return m_Enabled; } } + public static bool Enabled => m_Enabled; public static void Initialize() { diff --git a/Scripts/SpecialSystems/Items/Resurrection/ResGate.cs b/Scripts/SpecialSystems/Items/Resurrection/ResGate.cs index 1f21cb333..d346f78d6 100644 --- a/Scripts/SpecialSystems/Items/Resurrection/ResGate.cs +++ b/Scripts/SpecialSystems/Items/Resurrection/ResGate.cs @@ -4,10 +4,7 @@ namespace Server.Items { public class ResGate : Item { - public override string DefaultName - { - get { return "a resurrection gate"; } - } + public override string DefaultName => "a resurrection gate"; [Constructible] public ResGate() : base( 0xF6C ) diff --git a/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs b/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs index a84541926..b3a83ced0 100644 --- a/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class AlchemyStone : Item { - public override string DefaultName - { - get { return "an Alchemist Supply Stone"; } - } + public override string DefaultName => "an Alchemist Supply Stone"; [Constructible] public AlchemyStone() : base( 0xED4 ) diff --git a/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs b/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs index ab7a597fa..7c0c0987d 100644 --- a/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs @@ -7,10 +7,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int GamblePot { - get - { - return m_GamblePot; - } + get => m_GamblePot; set { m_GamblePot = value; @@ -18,10 +15,7 @@ namespace Server.Items } } - public override string DefaultName - { - get { return "a gambling stone"; } - } + public override string DefaultName => "a gambling stone"; [Constructible] public GamblingStone() diff --git a/Scripts/SpecialSystems/Items/Stones/IngotStone.cs b/Scripts/SpecialSystems/Items/Stones/IngotStone.cs index f5aafb708..74dbb1118 100644 --- a/Scripts/SpecialSystems/Items/Stones/IngotStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/IngotStone.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class IngotStone : Item { - public override string DefaultName - { - get { return "an Ingot stone"; } - } + public override string DefaultName => "an Ingot stone"; [Constructible] public IngotStone() : base( 0xED4 ) diff --git a/Scripts/SpecialSystems/Items/Stones/RegStone.cs b/Scripts/SpecialSystems/Items/Stones/RegStone.cs index b1c0e9bfa..81d3c3280 100644 --- a/Scripts/SpecialSystems/Items/Stones/RegStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/RegStone.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class RegStone : Item { - public override string DefaultName - { - get { return "a reagent stone"; } - } + public override string DefaultName => "a reagent stone"; [Constructible] public RegStone() : base( 0xED4 ) diff --git a/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs b/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs index 4c5e435d0..d6774b82c 100644 --- a/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class ScribeStone : Item { - public override string DefaultName - { - get { return "a Scribe Supply Stone"; } - } + public override string DefaultName => "a Scribe Supply Stone"; [Constructible] public ScribeStone() : base( 0xED4 ) diff --git a/Scripts/SpecialSystems/Items/Stones/SmithStone.cs b/Scripts/SpecialSystems/Items/Stones/SmithStone.cs index 4d519bd25..3e4b02636 100644 --- a/Scripts/SpecialSystems/Items/Stones/SmithStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/SmithStone.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class SmithStone : Item { - public override string DefaultName - { - get { return "a Blacksmith Supply Stone"; } - } + public override string DefaultName => "a Blacksmith Supply Stone"; [Constructible] public SmithStone() : base( 0xED4 ) diff --git a/Scripts/SpecialSystems/Items/Stones/TailorStone.cs b/Scripts/SpecialSystems/Items/Stones/TailorStone.cs index 0f2d71194..f5a805e98 100644 --- a/Scripts/SpecialSystems/Items/Stones/TailorStone.cs +++ b/Scripts/SpecialSystems/Items/Stones/TailorStone.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class TailorStone : Item { - public override string DefaultName - { - get { return "a Tailor Supply Stone"; } - } + public override string DefaultName => "a Tailor Supply Stone"; [Constructible] public TailorStone() : base( 0xED4 ) diff --git a/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs index 8c7016ff0..bece244cd 100644 --- a/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs +++ b/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class AlchemyBag : Bag { - public override string DefaultName - { - get { return "an Alchemy Kit"; } - } + public override string DefaultName => "an Alchemy Kit"; [Constructible] public AlchemyBag() : this( 1 ) diff --git a/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs index 66658563e..7f232f5f7 100644 --- a/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs +++ b/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class ScribeBag : Bag { - public override string DefaultName - { - get { return "a Scribe Kit"; } - } + public override string DefaultName => "a Scribe Kit"; [Constructible] public ScribeBag() : this( 1 ) diff --git a/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs index a76f8538a..48ff12ae5 100644 --- a/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs +++ b/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs @@ -2,10 +2,7 @@ namespace Server.Items { public class TailorBag : Bag { - public override string DefaultName - { - get { return "a Tailoring Kit"; } - } + public override string DefaultName => "a Tailoring Kit"; [Constructible] public TailorBag() : this( 1 ) diff --git a/Scripts/Spells/Base/MagerySpell.cs b/Scripts/Spells/Base/MagerySpell.cs index 8d7d80404..45ac05bd8 100644 --- a/Scripts/Spells/Base/MagerySpell.cs +++ b/Scripts/Spells/Base/MagerySpell.cs @@ -104,12 +104,6 @@ namespace Server.Spells return base.GetCastDelay(); } - public override TimeSpan CastDelayBase - { - get - { - return TimeSpan.FromSeconds( (3 + (int)Circle) * CastDelaySecondsPerTick ); - } - } + public override TimeSpan CastDelayBase => TimeSpan.FromSeconds( (3 + (int)Circle) * CastDelaySecondsPerTick ); } } diff --git a/Scripts/Spells/Base/SpecialMove.cs b/Scripts/Spells/Base/SpecialMove.cs index 2689e5ce3..52afbe83f 100644 --- a/Scripts/Spells/Base/SpecialMove.cs +++ b/Scripts/Spells/Base/SpecialMove.cs @@ -9,15 +9,15 @@ namespace Server.Spells { public abstract class SpecialMove { - public virtual int BaseMana{ get{ return 0; } } + public virtual int BaseMana => 0; - public virtual SkillName MoveSkill{ get{ return SkillName.Bushido; } } - public virtual double RequiredSkill{ get{ return 0.0; } } + public virtual SkillName MoveSkill => SkillName.Bushido; + public virtual double RequiredSkill => 0.0; - public virtual TextDefinition AbilityMessage{ get{ return 0; } } + public virtual TextDefinition AbilityMessage => 0; - public virtual bool BlockedByAnimalForm{ get{ return true; } } - public virtual bool DelayedContext{ get{ return false; } } + public virtual bool BlockedByAnimalForm => true; + public virtual bool DelayedContext => false; public virtual int GetAccuracyBonus( Mobile attacker ) { @@ -189,7 +189,7 @@ namespace Server.Spells private static Dictionary m_Table = new Dictionary(); - public static Dictionary Table{ get{ return m_Table; } } + public static Dictionary Table => m_Table; public static void ClearAllMoves( Mobile m ) { @@ -344,8 +344,8 @@ namespace Server.Spells private Timer m_Timer; private Type m_Type; - public Timer Timer{ get{ return m_Timer; } } - public Type Type{ get{ return m_Type; } } + public Timer Timer => m_Timer; + public Type Type => m_Type; public SpecialMoveContext( Timer timer, Type type ) { diff --git a/Scripts/Spells/Base/Spell.cs b/Scripts/Spells/Base/Spell.cs index c35ca7a6b..1558664c2 100644 --- a/Scripts/Spells/Base/Spell.cs +++ b/Scripts/Spells/Base/Spell.cs @@ -20,28 +20,30 @@ namespace Server.Spells private SpellState m_State; private long m_StartCastTime; - public SpellState State{ get{ return m_State; } set{ m_State = value; } } - public Mobile Caster{ get{ return m_Caster; } } - public SpellInfo Info{ get{ return m_Info; } } - public string Name{ get{ return m_Info.Name; } } - public string Mantra{ get{ return m_Info.Mantra; } } - public Type[] Reagents{ get{ return m_Info.Reagents; } } - public Item Scroll{ get{ return m_Scroll; } } + public SpellState State{ get => m_State; + set => m_State = value; + } + public Mobile Caster => m_Caster; + public SpellInfo Info => m_Info; + public string Name => m_Info.Name; + public string Mantra => m_Info.Mantra; + public Type[] Reagents => m_Info.Reagents; + public Item Scroll => m_Scroll; public long StartCastTime => m_StartCastTime; private static TimeSpan NextSpellDelay = TimeSpan.FromSeconds( 0.75 ); private static TimeSpan AnimateDelay = TimeSpan.FromSeconds( 1.5 ); - public virtual SkillName CastSkill{ get{ return SkillName.Magery; } } - public virtual SkillName DamageSkill{ get{ return SkillName.EvalInt; } } + public virtual SkillName CastSkill => SkillName.Magery; + public virtual SkillName DamageSkill => SkillName.EvalInt; - public virtual bool RevealOnCast{ get{ return true; } } - public virtual bool ClearHandsOnCast{ get{ return true; } } - public virtual bool ShowHandMovement{ get{ return true; } } + public virtual bool RevealOnCast => true; + public virtual bool ClearHandsOnCast => true; + public virtual bool ShowHandMovement => true; - public virtual bool DelayedDamage{ get{ return false; } } + public virtual bool DelayedDamage => false; - public virtual bool DelayedDamageStacking => true; + public virtual bool DelayedDamageStacking => true; //In reality, it's ANY delayed Damage spell Post-AoS that can't stack, but, only //Expo & Magic Arrow have enough delay and a short enough cast time to bring up //the possibility of stacking 'em. Note that a MA & an Explosion will stack, but @@ -158,7 +160,7 @@ namespace Server.Spells return damage / 100; } - public virtual bool IsCasting{ get{ return m_State == SpellState.Casting; } } + public virtual bool IsCasting => m_State == SpellState.Casting; public virtual void OnCasterHurt() { @@ -469,11 +471,11 @@ namespace Server.Spells m_Caster.PublicOverheadMessage( MessageType.Spell, m_Caster.SpeechHue, true, m_Info.Mantra, false ); } - public virtual bool BlockedByHorrificBeast{ get{ return true; } } - public virtual bool BlockedByAnimalForm{ get{ return true; } } - public virtual bool BlocksMovement{ get{ return true; } } + public virtual bool BlockedByHorrificBeast => true; + public virtual bool BlockedByAnimalForm => true; + public virtual bool BlocksMovement => true; - public virtual bool CheckNextSpellTime{ get{ return !(m_Scroll is BaseWand); } } + public virtual bool CheckNextSpellTime => !(m_Scroll is BaseWand); public bool Cast() { @@ -636,10 +638,10 @@ namespace Server.Spells return TimeSpan.FromSeconds( delay ); } - public virtual int CastRecoveryBase{ get{ return 6; } } - public virtual int CastRecoveryFastScalar{ get{ return 1; } } - public virtual int CastRecoveryPerSecond{ get{ return 4; } } - public virtual int CastRecoveryMinimum{ get{ return 0; } } + public virtual int CastRecoveryBase => 6; + public virtual int CastRecoveryFastScalar => 1; + public virtual int CastRecoveryPerSecond => 4; + public virtual int CastRecoveryMinimum => 0; public virtual TimeSpan GetCastRecovery() { @@ -664,7 +666,7 @@ namespace Server.Spells public virtual double CastDelayFastScalar => 1; public virtual double CastDelaySecondsPerTick => 0.25; - public virtual TimeSpan CastDelayMinimum { get { return TimeSpan.FromSeconds( 0.25 ); } } + public virtual TimeSpan CastDelayMinimum => TimeSpan.FromSeconds( 0.25 ); //public virtual int CastDelayBase{ get{ return 3; } } //public virtual int CastDelayFastScalar{ get{ return 1; } } diff --git a/Scripts/Spells/Base/SpellHelper.cs b/Scripts/Spells/Base/SpellHelper.cs index bc7e2df6a..517786189 100644 --- a/Scripts/Spells/Base/SpellHelper.cs +++ b/Scripts/Spells/Base/SpellHelper.cs @@ -280,8 +280,8 @@ namespace Server.Spells public static bool DisableSkillCheck { - get { return m_DisableSkillCheck; } - set { m_DisableSkillCheck = value; } + get => m_DisableSkillCheck; + set => m_DisableSkillCheck = value; } public static double GetOffsetScalar( Mobile caster, Mobile target, bool curse ) diff --git a/Scripts/Spells/Base/SpellInfo.cs b/Scripts/Spells/Base/SpellInfo.cs index ca80b64ce..18c14482b 100644 --- a/Scripts/Spells/Base/SpellInfo.cs +++ b/Scripts/Spells/Base/SpellInfo.cs @@ -53,13 +53,29 @@ namespace Server.Spells m_Amounts[i] = 1; } - public int Action{ get{ return m_Action; } set{ m_Action = value; } } - public bool AllowTown{ get{ return m_AllowTown; } set{ m_AllowTown = value; } } - public int[] Amounts{ get{ return m_Amounts; } set{ m_Amounts = value; } } - public string Mantra{ get{ return m_Mantra; } set{ m_Mantra = value; } } - public string Name{ get{ return m_Name; } set{ m_Name = value; } } - public Type[] Reagents{ get{ return m_Reagents; } set{ m_Reagents = value; } } - public int LeftHandEffect{ get{ return m_LeftHandEffect; } set{ m_LeftHandEffect = value; } } - public int RightHandEffect{ get{ return m_RightHandEffect; } set{ m_RightHandEffect = value; } } + public int Action{ get => m_Action; + set => m_Action = value; + } + public bool AllowTown{ get => m_AllowTown; + set => m_AllowTown = value; + } + public int[] Amounts{ get => m_Amounts; + set => m_Amounts = value; + } + public string Mantra{ get => m_Mantra; + set => m_Mantra = value; + } + public string Name{ get => m_Name; + set => m_Name = value; + } + public Type[] Reagents{ get => m_Reagents; + set => m_Reagents = value; + } + public int LeftHandEffect{ get => m_LeftHandEffect; + set => m_LeftHandEffect = value; + } + public int RightHandEffect{ get => m_RightHandEffect; + set => m_RightHandEffect = value; + } } } \ No newline at end of file diff --git a/Scripts/Spells/First/CreateFood.cs b/Scripts/Spells/First/CreateFood.cs index 7917e6158..3711c7baa 100644 --- a/Scripts/Spells/First/CreateFood.cs +++ b/Scripts/Spells/First/CreateFood.cs @@ -62,8 +62,12 @@ namespace Server.Spells.First private Type m_Type; private string m_Name; - public Type Type{ get{ return m_Type; } set{ m_Type = value; } } - public string Name{ get{ return m_Name; } set{ m_Name = value; } } + public Type Type{ get => m_Type; + set => m_Type = value; + } + public string Name{ get => m_Name; + set => m_Name = value; + } public FoodInfo( Type type, string name ) { diff --git a/Scripts/Spells/Gargoyle/SpellDefinitions/FlySpell.cs b/Scripts/Spells/Gargoyle/SpellDefinitions/FlySpell.cs index f0ef5e3ea..7f0111694 100644 --- a/Scripts/Spells/Gargoyle/SpellDefinitions/FlySpell.cs +++ b/Scripts/Spells/Gargoyle/SpellDefinitions/FlySpell.cs @@ -11,35 +11,15 @@ namespace Server.Spells { } - public override bool ClearHandsOnCast - { - get - { - return false; - } - } - public override bool RevealOnCast - { - get - { - return false; - } - } - public override double CastDelayFastScalar - { - get - { - return 0; - } - } - public override TimeSpan CastDelayBase - { - get - { - return TimeSpan.FromSeconds(.25); - } - } - public override TimeSpan GetCastRecovery() + public override bool ClearHandsOnCast => false; + + public override bool RevealOnCast => false; + + public override double CastDelayFastScalar => 0; + + public override TimeSpan CastDelayBase => TimeSpan.FromSeconds(.25); + + public override TimeSpan GetCastRecovery() { return TimeSpan.Zero; } diff --git a/Scripts/Spells/Necromancy/SummonFamiliar.cs b/Scripts/Spells/Necromancy/SummonFamiliar.cs index 244520383..1b281c7a4 100644 --- a/Scripts/Spells/Necromancy/SummonFamiliar.cs +++ b/Scripts/Spells/Necromancy/SummonFamiliar.cs @@ -28,7 +28,7 @@ namespace Server.Spells.Necromancy private static Hashtable m_Table = new Hashtable(); - public static Hashtable Table{ get{ return m_Table; } } + public static Hashtable Table => m_Table; public override bool CheckCast() { @@ -63,7 +63,7 @@ namespace Server.Spells.Necromancy new SummonFamiliarEntry( typeof( VampireBatFamiliar ), 1060144, 100.0, 100.0 ) // Vampire Bat }; - public static SummonFamiliarEntry[] Entries{ get{ return m_Entries; } } + public static SummonFamiliarEntry[] Entries => m_Entries; } public class SummonFamiliarEntry @@ -73,10 +73,10 @@ namespace Server.Spells.Necromancy private double m_ReqNecromancy; private double m_ReqSpiritSpeak; - public Type Type{ get{ return m_Type; } } - public object Name{ get{ return m_Name; } } - public double ReqNecromancy{ get{ return m_ReqNecromancy; } } - public double ReqSpiritSpeak{ get{ return m_ReqSpiritSpeak; } } + public Type Type => m_Type; + public object Name => m_Name; + public double ReqNecromancy => m_ReqNecromancy; + public double ReqSpiritSpeak => m_ReqSpiritSpeak; public SummonFamiliarEntry( Type type, object name, double reqNecromancy, double reqSpiritSpeak ) { diff --git a/Scripts/Spells/Necromancy/TransformationSpell.cs b/Scripts/Spells/Necromancy/TransformationSpell.cs index a143b8535..a15abe2a9 100644 --- a/Scripts/Spells/Necromancy/TransformationSpell.cs +++ b/Scripts/Spells/Necromancy/TransformationSpell.cs @@ -3,13 +3,13 @@ namespace Server.Spells.Necromancy public abstract class TransformationSpell : NecromancerSpell, ITransformationSpell { public abstract int Body{ get; } - public virtual int Hue{ get{ return 0; } } + public virtual int Hue => 0; - public virtual int PhysResistOffset{ get{ return 0; } } - public virtual int FireResistOffset{ get{ return 0; } } - public virtual int ColdResistOffset{ get{ return 0; } } - public virtual int PoisResistOffset{ get{ return 0; } } - public virtual int NrgyResistOffset{ get{ return 0; } } + public virtual int PhysResistOffset => 0; + public virtual int FireResistOffset => 0; + public virtual int ColdResistOffset => 0; + public virtual int PoisResistOffset => 0; + public virtual int NrgyResistOffset => 0; public TransformationSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, scroll, info ) { @@ -32,7 +32,7 @@ namespace Server.Spells.Necromancy FinishSequence(); } - public virtual double TickRate{ get{ return 1.0; } } + public virtual double TickRate => 1.0; public virtual void OnTick( Mobile m ) { diff --git a/Scripts/Spells/Ninjitsu/AnimalForm.cs b/Scripts/Spells/Ninjitsu/AnimalForm.cs index 56dc5f785..aafdd4182 100644 --- a/Scripts/Spells/Ninjitsu/AnimalForm.cs +++ b/Scripts/Spells/Ninjitsu/AnimalForm.cs @@ -339,7 +339,7 @@ namespace Server.Spells.Ninjitsu public int Tooltip => m_Tooltip; public double ReqSkill => m_ReqSkill; public int BodyMod => m_BodyMod; - public int HueMod { get { return Utility.RandomMinMax( m_HueModMin, m_HueModMax ); } } + public int HueMod => Utility.RandomMinMax( m_HueModMin, m_HueModMax ); public bool StealthBonus => m_StealthBonus; public bool SpeedBoost => m_SpeedBoost; public bool StealingBonus => m_StealingBonus; diff --git a/Scripts/Spells/Ninjitsu/MirrorImage.cs b/Scripts/Spells/Ninjitsu/MirrorImage.cs index 6d7a45f57..e11c80d57 100644 --- a/Scripts/Spells/Ninjitsu/MirrorImage.cs +++ b/Scripts/Spells/Ninjitsu/MirrorImage.cs @@ -173,7 +173,7 @@ namespace Server.Mobiles MirrorImage.AddClone( m_Caster ); } - protected override BaseAI ForcedAI { get { return new CloneAI( this ); } } + protected override BaseAI ForcedAI => new CloneAI( this ); public override bool IsHumanInTown() { return false; } diff --git a/Scripts/Spells/Reagent.cs b/Scripts/Spells/Reagent.cs index d9b111940..ce3166e8a 100644 --- a/Scripts/Spells/Reagent.cs +++ b/Scripts/Spells/Reagent.cs @@ -25,111 +25,108 @@ namespace Server.Spells typeof( DaemonBone ) }; - public Type[] Types - { - get{ return m_Types; } - } + public Type[] Types => m_Types; public static Type BlackPearl { - get{ return m_Types[0]; } - set{ m_Types[0] = value; } + get => m_Types[0]; + set => m_Types[0] = value; } public static Type Bloodmoss { - get{ return m_Types[1]; } - set{ m_Types[1] = value; } + get => m_Types[1]; + set => m_Types[1] = value; } public static Type Garlic { - get{ return m_Types[2]; } - set{ m_Types[2] = value; } + get => m_Types[2]; + set => m_Types[2] = value; } public static Type Ginseng { - get{ return m_Types[3]; } - set{ m_Types[3] = value; } + get => m_Types[3]; + set => m_Types[3] = value; } public static Type MandrakeRoot { - get{ return m_Types[4]; } - set{ m_Types[4] = value; } + get => m_Types[4]; + set => m_Types[4] = value; } public static Type Nightshade { - get{ return m_Types[5]; } - set{ m_Types[5] = value; } + get => m_Types[5]; + set => m_Types[5] = value; } public static Type SulfurousAsh { - get{ return m_Types[6]; } - set{ m_Types[6] = value; } + get => m_Types[6]; + set => m_Types[6] = value; } public static Type SpidersSilk { - get{ return m_Types[7]; } - set{ m_Types[7] = value; } + get => m_Types[7]; + set => m_Types[7] = value; } public static Type BatWing { - get{ return m_Types[8]; } - set{ m_Types[8] = value; } + get => m_Types[8]; + set => m_Types[8] = value; } public static Type GraveDust { - get{ return m_Types[9]; } - set{ m_Types[9] = value; } + get => m_Types[9]; + set => m_Types[9] = value; } public static Type DaemonBlood { - get{ return m_Types[10]; } - set{ m_Types[10] = value; } + get => m_Types[10]; + set => m_Types[10] = value; } public static Type NoxCrystal { - get{ return m_Types[11]; } - set{ m_Types[11] = value; } + get => m_Types[11]; + set => m_Types[11] = value; } public static Type PigIron { - get{ return m_Types[12]; } - set{ m_Types[12] = value; } + get => m_Types[12]; + set => m_Types[12] = value; } public static Type Bone { - get{ return m_Types[13]; } - set{ m_Types[13] = value; } + get => m_Types[13]; + set => m_Types[13] = value; } public static Type FertileDirt { - get{ return m_Types[14]; } - set{ m_Types[14] = value; } + get => m_Types[14]; + set => m_Types[14] = value; } public static Type DragonsBlood { - get{ return m_Types[15]; } - set{ m_Types[15] = value; } + get => m_Types[15]; + set => m_Types[15] = value; } public static Type DaemonBone { - get{ return m_Types[16]; } - set{ m_Types[16] = value; } + get => m_Types[16]; + set => m_Types[16] = value; } } } diff --git a/Scripts/Spells/Spellweaving/ArcaneForm.cs b/Scripts/Spells/Spellweaving/ArcaneForm.cs index 5d08d1e72..60bfee2d1 100644 --- a/Scripts/Spells/Spellweaving/ArcaneForm.cs +++ b/Scripts/Spells/Spellweaving/ArcaneForm.cs @@ -30,10 +30,7 @@ namespace Server.Spells.Spellweaving FinishSequence(); } - public virtual double TickRate - { - get { return 1.0; } - } + public virtual double TickRate => 1.0; public virtual void OnTick( Mobile m ) { diff --git a/Scripts/Spells/Spellweaving/ArcanistSpell.cs b/Scripts/Spells/Spellweaving/ArcanistSpell.cs index 1a33e4e3c..19ff1fe0a 100644 --- a/Scripts/Spells/Spellweaving/ArcanistSpell.cs +++ b/Scripts/Spells/Spellweaving/ArcanistSpell.cs @@ -22,10 +22,7 @@ namespace Server.Spells.Spellweaving { } - public virtual int FocusLevel - { - get { return m_CastTimeFocusLevel; } - } + public virtual int FocusLevel => m_CastTimeFocusLevel; public static int GetFocusLevel( Mobile from ) { diff --git a/Scripts/Spells/Spellweaving/GiftOfLife.cs b/Scripts/Spells/Spellweaving/GiftOfLife.cs index c0bb78027..fa3827afc 100644 --- a/Scripts/Spells/Spellweaving/GiftOfLife.cs +++ b/Scripts/Spells/Spellweaving/GiftOfLife.cs @@ -141,7 +141,7 @@ namespace Server.Spells.Spellweaving } - public double HitsScalar { get { return ((Caster.Skills.Spellweaving.Value/2.4) + FocusLevel)/100; } } + public double HitsScalar => ((Caster.Skills.Spellweaving.Value/2.4) + FocusLevel)/100; public static void OnLogin( LoginEventArgs e ) { diff --git a/Scripts/Spells/Spellweaving/Items/ArcaneFocus.cs b/Scripts/Spells/Spellweaving/Items/ArcaneFocus.cs index 4e3845ae6..d003394f6 100644 --- a/Scripts/Spells/Spellweaving/Items/ArcaneFocus.cs +++ b/Scripts/Spells/Spellweaving/Items/ArcaneFocus.cs @@ -11,8 +11,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int StrengthBonus { - get { return m_StrengthBonus; } - set { m_StrengthBonus = value; } + get => m_StrengthBonus; + set => m_StrengthBonus = value; } [Constructible] diff --git a/Scripts/Spells/Spellweaving/Items/TransientItem.cs b/Scripts/Spells/Spellweaving/Items/TransientItem.cs index 071a954f5..46c42ef11 100644 --- a/Scripts/Spells/Spellweaving/Items/TransientItem.cs +++ b/Scripts/Spells/Spellweaving/Items/TransientItem.cs @@ -9,8 +9,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public TimeSpan LifeSpan { - get { return m_LifeSpan; } - set { m_LifeSpan = value; } + get => m_LifeSpan; + set => m_LifeSpan = value; } private DateTime m_CreationTime; @@ -18,8 +18,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public DateTime CreationTime { - get { return m_CreationTime; } - set { m_CreationTime = value; } + get => m_CreationTime; + set => m_CreationTime = value; } private Timer m_Timer; diff --git a/Scripts/Spells/Spellweaving/ReaperForm.cs b/Scripts/Spells/Spellweaving/ReaperForm.cs index dd94c8d8d..6a01e5a20 100644 --- a/Scripts/Spells/Spellweaving/ReaperForm.cs +++ b/Scripts/Spells/Spellweaving/ReaperForm.cs @@ -33,8 +33,8 @@ namespace Server.Spells.Spellweaving public override int PoisResistOffset => 5 + FocusLevel; public override int NrgyResistOffset => 5 + FocusLevel; - public virtual int SwingSpeedBonus { get { return 10 + FocusLevel; } } - public virtual int SpellDamageBonus { get { return 10 + FocusLevel; } } + public virtual int SwingSpeedBonus => 10 + FocusLevel; + public virtual int SpellDamageBonus => 10 + FocusLevel; public ReaperFormSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info ) { diff --git a/Server/AggressorInfo.cs b/Server/AggressorInfo.cs index 83fa5cc05..35b79eaee 100644 --- a/Server/AggressorInfo.cs +++ b/Server/AggressorInfo.cs @@ -86,8 +86,8 @@ namespace Server public static TimeSpan ExpireDelay { - get{ return m_ExpireDelay; } - set{ m_ExpireDelay = value; } + get => m_ExpireDelay; + set => m_ExpireDelay = value; } public static void DumpAccess() diff --git a/Server/Attributes.cs b/Server/Attributes.cs index 9eaeb25a6..3008be8d2 100644 --- a/Server/Attributes.cs +++ b/Server/Attributes.cs @@ -63,8 +63,8 @@ namespace Server public int Priority { - get{ return m_Priority; } - set{ m_Priority = value; } + get => m_Priority; + set => m_Priority = value; } public CallPriorityAttribute( int priority ) @@ -117,13 +117,7 @@ namespace Server { private string[] m_Aliases; - public string[] Aliases - { - get - { - return m_Aliases; - } - } + public string[] Aliases => m_Aliases; public TypeAliasAttribute( params string[] aliases ) { @@ -144,13 +138,7 @@ namespace Server { private string[] m_Names; - public string[] Names - { - get - { - return m_Names; - } - } + public string[] Names => m_Names; public CustomEnumAttribute( string[] names ) { @@ -165,8 +153,8 @@ namespace Server public AccessLevel AccessLevel { - get { return m_AccessLevel; } - set { m_AccessLevel = value; } + get => m_AccessLevel; + set => m_AccessLevel = value; } public ConstructibleAttribute() : this( AccessLevel.Player ) //Lowest accesslevel for current functionality (Level determined by access to [add) @@ -185,29 +173,11 @@ namespace Server private AccessLevel m_ReadLevel, m_WriteLevel; private bool m_ReadOnly; - public AccessLevel ReadLevel - { - get - { - return m_ReadLevel; - } - } + public AccessLevel ReadLevel => m_ReadLevel; - public AccessLevel WriteLevel - { - get - { - return m_WriteLevel; - } - } + public AccessLevel WriteLevel => m_WriteLevel; - public bool ReadOnly - { - get - { - return m_ReadOnly; - } - } + public bool ReadOnly => m_ReadOnly; public CommandPropertyAttribute( AccessLevel level, bool readOnly ) { diff --git a/Server/BaseVendor.cs b/Server/BaseVendor.cs index 2b55cae57..59733af74 100644 --- a/Server/BaseVendor.cs +++ b/Server/BaseVendor.cs @@ -45,21 +45,9 @@ namespace Server.Mobiles m_Amount = amount; } - public Serial Serial - { - get - { - return m_Serial; - } - } + public Serial Serial => m_Serial; - public int Amount - { - get - { - return m_Amount; - } - } + public int Amount => m_Amount; } public class SellItemResponse @@ -73,21 +61,9 @@ namespace Server.Mobiles m_Amount = amount; } - public Item Item - { - get - { - return m_Item; - } - } + public Item Item => m_Item; - public int Amount - { - get - { - return m_Amount; - } - } + public int Amount => m_Amount; } public class SellItemState @@ -103,29 +79,11 @@ namespace Server.Mobiles m_Name = name; } - public Item Item - { - get - { - return m_Item; - } - } + public Item Item => m_Item; - public int Price - { - get - { - return m_Price; - } - } + public int Price => m_Price; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; } public class BuyItemState @@ -149,60 +107,18 @@ namespace Server.Mobiles m_Hue = hue; } - public int Price - { - get - { - return m_Price; - } - } + public int Price => m_Price; - public Serial MySerial - { - get - { - return m_MySer; - } - } + public Serial MySerial => m_MySer; - public Serial ContainerSerial - { - get - { - return m_ContSer; - } - } + public Serial ContainerSerial => m_ContSer; - public int ItemID - { - get - { - return m_ItemID; - } - } + public int ItemID => m_ItemID; - public int Amount - { - get - { - return m_Amount; - } - } + public int Amount => m_Amount; - public int Hue - { - get - { - return m_Hue; - } - } + public int Hue => m_Hue; - public string Description - { - get - { - return m_Desc; - } - } + public string Description => m_Desc; } } diff --git a/Server/Body.cs b/Server/Body.cs index 16615e251..1adbe8290 100644 --- a/Server/Body.cs +++ b/Server/Body.cs @@ -95,137 +95,71 @@ namespace Server } } - public bool IsHuman - { - get - { - return m_BodyID >= 0 - && m_BodyID < m_Types.Length - && m_Types[m_BodyID] == BodyType.Human - && m_BodyID != 402 - && m_BodyID != 403 - && m_BodyID != 607 - && m_BodyID != 608 - && m_BodyID != 694 - && m_BodyID != 695 - && m_BodyID != 970; - } - } + public bool IsHuman => m_BodyID >= 0 + && m_BodyID < m_Types.Length + && m_Types[m_BodyID] == BodyType.Human + && m_BodyID != 402 + && m_BodyID != 403 + && m_BodyID != 607 + && m_BodyID != 608 + && m_BodyID != 694 + && m_BodyID != 695 + && m_BodyID != 970; - public bool IsGargoyle - { - get - { - return m_BodyID == 666 - || m_BodyID == 667 - || m_BodyID == 694 - || m_BodyID == 695; - } - } + public bool IsGargoyle => m_BodyID == 666 + || m_BodyID == 667 + || m_BodyID == 694 + || m_BodyID == 695; - public bool IsMale - { - get - { - return m_BodyID == 183 - || m_BodyID == 185 - || m_BodyID == 400 - || m_BodyID == 402 - || m_BodyID == 605 - || m_BodyID == 607 - || m_BodyID == 666 - || m_BodyID == 694 - || m_BodyID == 750; - } - } + public bool IsMale => m_BodyID == 183 + || m_BodyID == 185 + || m_BodyID == 400 + || m_BodyID == 402 + || m_BodyID == 605 + || m_BodyID == 607 + || m_BodyID == 666 + || m_BodyID == 694 + || m_BodyID == 750; - public bool IsFemale - { - get - { - return m_BodyID == 184 - || m_BodyID == 186 - || m_BodyID == 401 - || m_BodyID == 403 - || m_BodyID == 606 - || m_BodyID == 608 - || m_BodyID == 667 - || m_BodyID == 695 - || m_BodyID == 751; - } - } + public bool IsFemale => m_BodyID == 184 + || m_BodyID == 186 + || m_BodyID == 401 + || m_BodyID == 403 + || m_BodyID == 606 + || m_BodyID == 608 + || m_BodyID == 667 + || m_BodyID == 695 + || m_BodyID == 751; - public bool IsGhost - { - get - { - return m_BodyID == 402 - || m_BodyID == 403 - || m_BodyID == 607 - || m_BodyID == 608 - || m_BodyID == 694 - || m_BodyID == 695 - || m_BodyID == 970; - } - } + public bool IsGhost => m_BodyID == 402 + || m_BodyID == 403 + || m_BodyID == 607 + || m_BodyID == 608 + || m_BodyID == 694 + || m_BodyID == 695 + || m_BodyID == 970; - public bool IsMonster - { - get - { - return m_BodyID >= 0 - && m_BodyID < m_Types.Length - && m_Types[m_BodyID] == BodyType.Monster; - } - } + public bool IsMonster => m_BodyID >= 0 + && m_BodyID < m_Types.Length + && m_Types[m_BodyID] == BodyType.Monster; - public bool IsAnimal - { - get - { - return m_BodyID >= 0 - && m_BodyID < m_Types.Length - && m_Types[m_BodyID] == BodyType.Animal; - } - } + public bool IsAnimal => m_BodyID >= 0 + && m_BodyID < m_Types.Length + && m_Types[m_BodyID] == BodyType.Animal; - public bool IsEmpty - { - get - { - return m_BodyID >= 0 - && m_BodyID < m_Types.Length - && m_Types[m_BodyID] == BodyType.Empty; - } - } + public bool IsEmpty => m_BodyID >= 0 + && m_BodyID < m_Types.Length + && m_Types[m_BodyID] == BodyType.Empty; - public bool IsSea - { - get - { - return m_BodyID >= 0 - && m_BodyID < m_Types.Length - && m_Types[m_BodyID] == BodyType.Sea; - } - } + public bool IsSea => m_BodyID >= 0 + && m_BodyID < m_Types.Length + && m_Types[m_BodyID] == BodyType.Sea; - public bool IsEquipment - { - get - { - return m_BodyID >= 0 - && m_BodyID < m_Types.Length - && m_Types[m_BodyID] == BodyType.Equipment; - } - } + public bool IsEquipment => m_BodyID >= 0 + && m_BodyID < m_Types.Length + && m_Types[m_BodyID] == BodyType.Equipment; - public int BodyID - { - get - { - return m_BodyID; - } - } + public int BodyID => m_BodyID; public static implicit operator int( Body a ) { diff --git a/Server/ClientVersion.cs b/Server/ClientVersion.cs index 72ae412f0..e3028c384 100644 --- a/Server/ClientVersion.cs +++ b/Server/ClientVersion.cs @@ -38,53 +38,17 @@ namespace Server private ClientType m_Type; private string m_SourceString; - public int Major - { - get - { - return m_Major; - } - } + public int Major => m_Major; - public int Minor - { - get - { - return m_Minor; - } - } + public int Minor => m_Minor; - public int Revision - { - get - { - return m_Revision; - } - } + public int Revision => m_Revision; - public int Patch - { - get - { - return m_Patch; - } - } + public int Patch => m_Patch; - public ClientType Type - { - get - { - return m_Type; - } - } + public ClientType Type => m_Type; - public string SourceString - { - get - { - return m_SourceString; - } - } + public string SourceString => m_SourceString; public ClientVersion( int maj, int min, int rev, int pat ) : this( maj, min, rev, pat, ClientType.Regular ) { diff --git a/Server/Commands.cs b/Server/Commands.cs index d2f7d9c97..302747ff4 100644 --- a/Server/Commands.cs +++ b/Server/Commands.cs @@ -32,45 +32,15 @@ namespace Server.Commands private string m_Command, m_ArgString; private string[] m_Arguments; - public Mobile Mobile - { - get - { - return m_Mobile; - } - } + public Mobile Mobile => m_Mobile; - public string Command - { - get - { - return m_Command; - } - } + public string Command => m_Command; - public string ArgString - { - get - { - return m_ArgString; - } - } + public string ArgString => m_ArgString; - public string[] Arguments - { - get - { - return m_Arguments; - } - } + public string[] Arguments => m_Arguments; - public int Length - { - get - { - return m_Arguments.Length; - } - } + public int Length => m_Arguments.Length; public string GetString( int index ) { @@ -127,29 +97,11 @@ namespace Server.Commands private CommandEventHandler m_Handler; private AccessLevel m_AccessLevel; - public string Command - { - get - { - return m_Command; - } - } + public string Command => m_Command; - public CommandEventHandler Handler - { - get - { - return m_Handler; - } - } + public CommandEventHandler Handler => m_Handler; - public AccessLevel AccessLevel - { - get - { - return m_AccessLevel; - } - } + public AccessLevel AccessLevel => m_AccessLevel; public CommandEntry( string command, CommandEventHandler handler, AccessLevel accessLevel ) { @@ -178,14 +130,8 @@ namespace Server.Commands public static string Prefix { - get - { - return m_Prefix; - } - set - { - m_Prefix = value; - } + get => m_Prefix; + set => m_Prefix = value; } public static string[] Split( string value ) @@ -243,13 +189,7 @@ namespace Server.Commands private static Dictionary m_Entries; - public static Dictionary Entries - { - get - { - return m_Entries; - } - } + public static Dictionary Entries => m_Entries; static CommandSystem() { @@ -263,7 +203,9 @@ namespace Server.Commands private static AccessLevel m_BadCommandIngoreLevel = AccessLevel.Player; - public static AccessLevel BadCommandIgnoreLevel{ get{ return m_BadCommandIngoreLevel; } set{ m_BadCommandIngoreLevel = value; } } + public static AccessLevel BadCommandIgnoreLevel{ get => m_BadCommandIngoreLevel; + set => m_BadCommandIngoreLevel = value; + } public static bool Handle( Mobile from, string text ) { diff --git a/Server/ContextMenus/ContextMenu.cs b/Server/ContextMenus/ContextMenu.cs index 4c954c59f..90451b74c 100644 --- a/Server/ContextMenus/ContextMenu.cs +++ b/Server/ContextMenus/ContextMenu.cs @@ -35,26 +35,17 @@ namespace Server.ContextMenus /// /// Gets the who opened this ContextMenu. /// - public Mobile From - { - get{ return m_From; } - } + public Mobile From => m_From; /// /// Gets an object of the or for which this ContextMenu is on. /// - public object Target - { - get{ return m_Target; } - } + public object Target => m_Target; /// /// Gets the list of entries contained in this ContextMenu. /// - public ContextMenuEntry[] Entries - { - get{ return m_Entries; } - } + public ContextMenuEntry[] Entries => m_Entries; /// /// Instantiates a new ContextMenu instance. diff --git a/Server/ContextMenus/ContextMenuEntry.cs b/Server/ContextMenus/ContextMenuEntry.cs index ffb1508ba..8b0dd7ef0 100644 --- a/Server/ContextMenus/ContextMenuEntry.cs +++ b/Server/ContextMenus/ContextMenuEntry.cs @@ -40,8 +40,8 @@ namespace Server.ContextMenus /// public CMEFlags Flags { - get{ return m_Flags; } - set{ m_Flags = value; } + get => m_Flags; + set => m_Flags = value; } /// @@ -49,8 +49,8 @@ namespace Server.ContextMenus /// public ContextMenu Owner { - get{ return m_Owner; } - set{ m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } /// @@ -58,8 +58,8 @@ namespace Server.ContextMenus /// public int Number { - get{ return m_Number; } - set{ m_Number = value; } + get => m_Number; + set => m_Number = value; } /// @@ -67,8 +67,8 @@ namespace Server.ContextMenus /// public int Range { - get{ return m_Range; } - set{ m_Range = value; } + get => m_Range; + set => m_Range = value; } /// @@ -76,8 +76,8 @@ namespace Server.ContextMenus /// public int Color { - get{ return m_Color; } - set{ m_Color = value; } + get => m_Color; + set => m_Color = value; } /// @@ -85,17 +85,14 @@ namespace Server.ContextMenus /// public bool Enabled { - get{ return m_Enabled; } - set{ m_Enabled = value; } + get => m_Enabled; + set => m_Enabled = value; } /// /// Gets a value indicating if non local use of this entry is permitted. /// - public virtual bool NonLocalUse - { - get{ return false; } - } + public virtual bool NonLocalUse => false; /// /// Instantiates a new ContextMenuEntry with a given localization number (). No maximum range is used. diff --git a/Server/Diagnostics/BaseProfile.cs b/Server/Diagnostics/BaseProfile.cs index d40a95f89..e990cb054 100644 --- a/Server/Diagnostics/BaseProfile.cs +++ b/Server/Diagnostics/BaseProfile.cs @@ -47,35 +47,15 @@ namespace Server.Diagnostics { private Stopwatch _stopwatch; - public string Name { - get { - return _name; - } - } + public string Name => _name; - public long Count { - get { - return _count; - } - } + public long Count => _count; - public TimeSpan AverageTime { - get { - return TimeSpan.FromTicks( _totalTime.Ticks / Math.Max( 1, _count ) ); - } - } + public TimeSpan AverageTime => TimeSpan.FromTicks( _totalTime.Ticks / Math.Max( 1, _count ) ); - public TimeSpan PeakTime { - get { - return _peakTime; - } - } + public TimeSpan PeakTime => _peakTime; - public TimeSpan TotalTime { - get { - return _totalTime; - } - } + public TimeSpan TotalTime => _totalTime; protected BaseProfile( string name ) { _name = name; diff --git a/Server/Diagnostics/GumpProfile.cs b/Server/Diagnostics/GumpProfile.cs index f5159edb9..3ba62e302 100644 --- a/Server/Diagnostics/GumpProfile.cs +++ b/Server/Diagnostics/GumpProfile.cs @@ -25,11 +25,7 @@ namespace Server.Diagnostics { public class GumpProfile : BaseProfile { private static Dictionary _profiles = new Dictionary(); - public static IEnumerable Profiles { - get { - return _profiles.Values; - } - } + public static IEnumerable Profiles => _profiles.Values; public static GumpProfile Acquire( Type type ) { if ( !Core.Profiling ) { diff --git a/Server/Diagnostics/PacketProfile.cs b/Server/Diagnostics/PacketProfile.cs index 893dc28c0..2c5a805f2 100644 --- a/Server/Diagnostics/PacketProfile.cs +++ b/Server/Diagnostics/PacketProfile.cs @@ -28,17 +28,9 @@ namespace Server.Diagnostics { public abstract class BasePacketProfile : BaseProfile { private long _totalLength; - public long TotalLength { - get { - return _totalLength; - } - } + public long TotalLength => _totalLength; - public double AverageLength { - get { - return ( double ) _totalLength / Math.Max( 1, this.Count ); - } - } + public double AverageLength => ( double ) _totalLength / Math.Max( 1, this.Count ); protected BasePacketProfile(string name) : base( name ) { @@ -60,11 +52,7 @@ namespace Server.Diagnostics { public class PacketSendProfile : BasePacketProfile { private static Dictionary _profiles = new Dictionary(); - public static IEnumerable Profiles { - get { - return _profiles.Values; - } - } + public static IEnumerable Profiles => _profiles.Values; [MethodImpl(MethodImplOptions.Synchronized)] public static PacketSendProfile Acquire( Type type ) { @@ -97,11 +85,7 @@ namespace Server.Diagnostics { public class PacketReceiveProfile : BasePacketProfile { private static Dictionary _profiles = new Dictionary(); - public static IEnumerable Profiles { - get { - return _profiles.Values; - } - } + public static IEnumerable Profiles => _profiles.Values; [MethodImpl(MethodImplOptions.Synchronized)] public static PacketReceiveProfile Acquire( int packetId ) { diff --git a/Server/Diagnostics/TargetProfile.cs b/Server/Diagnostics/TargetProfile.cs index 426c66c0d..6089b4b12 100644 --- a/Server/Diagnostics/TargetProfile.cs +++ b/Server/Diagnostics/TargetProfile.cs @@ -25,11 +25,7 @@ namespace Server.Diagnostics { public class TargetProfile : BaseProfile { private static Dictionary _profiles = new Dictionary(); - public static IEnumerable Profiles { - get { - return _profiles.Values; - } - } + public static IEnumerable Profiles => _profiles.Values; public static TargetProfile Acquire( Type type ) { if ( !Core.Profiling ) { diff --git a/Server/Diagnostics/TimerProfile.cs b/Server/Diagnostics/TimerProfile.cs index 4e7204e48..e90d6dee1 100644 --- a/Server/Diagnostics/TimerProfile.cs +++ b/Server/Diagnostics/TimerProfile.cs @@ -25,11 +25,7 @@ namespace Server.Diagnostics { public class TimerProfile : BaseProfile { private static Dictionary _profiles = new Dictionary(); - public static IEnumerable Profiles { - get { - return _profiles.Values; - } - } + public static IEnumerable Profiles => _profiles.Values; public static TimerProfile Acquire( string name ) { if ( !Core.Profiling ) { @@ -48,30 +44,18 @@ namespace Server.Diagnostics { private long _created, _started, _stopped; public long Created { - get { - return _created; - } - set { - _created = value; - } + get => _created; + set => _created = value; } public long Started { - get { - return _started; - } - set { - _started = value; - } + get => _started; + set => _started = value; } public long Stopped { - get { - return _stopped; - } - set { - _stopped = value; - } + get => _stopped; + set => _stopped = value; } public TimerProfile( string name ) diff --git a/Server/Effects.cs b/Server/Effects.cs index afa1fdac3..a96ac73e9 100644 --- a/Server/Effects.cs +++ b/Server/Effects.cs @@ -46,8 +46,8 @@ namespace Server public static ParticleSupportType ParticleSupportType { - get{ return m_ParticleSupportType; } - set{ m_ParticleSupportType = value; } + get => m_ParticleSupportType; + set => m_ParticleSupportType = value; } public static bool SendParticlesTo( NetState state ) diff --git a/Server/EventSink.cs b/Server/EventSink.cs index d48021f61..830a03f57 100644 --- a/Server/EventSink.cs +++ b/Server/EventSink.cs @@ -77,8 +77,8 @@ namespace Server private NetState m_State; private ClientVersion m_Version; - public NetState State { get { return m_State; } } - public ClientVersion Version { get { return m_Version; } } + public NetState State => m_State; + public ClientVersion Version => m_Version; public ClientVersionReceivedArgs( NetState state, ClientVersion cv ) { @@ -90,10 +90,14 @@ namespace Server public class CreateGuildEventArgs : EventArgs { private int m_Id; - public int Id { get { return m_Id; } set { m_Id = value; } } + public int Id { get => m_Id; + set => m_Id = value; + } private BaseGuild m_Guild; - public BaseGuild Guild { get { return m_Guild; } set { m_Guild = value; } } + public BaseGuild Guild { get => m_Guild; + set => m_Guild = value; + } public CreateGuildEventArgs( int id ) { @@ -105,7 +109,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public GuildGumpRequestArgs( Mobile mobile ) { @@ -117,7 +121,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile { get { return m_Mobile; } } + public Mobile Mobile => m_Mobile; public QuestGumpRequestArgs( Mobile mobile ) { @@ -130,8 +134,8 @@ namespace Server private Mobile m_Mobile; private int m_Index; - public Mobile Mobile{ get{ return m_Mobile; } } - public int Index{ get{ return m_Index; } } + public Mobile Mobile => m_Mobile; + public int Index => m_Index; public SetAbilityEventArgs( Mobile mobile, int index ) { @@ -145,8 +149,8 @@ namespace Server private NetState m_State; private int m_Index; - public NetState State{ get{ return m_State; } } - public int Index{ get{ return m_Index; } } + public NetState State => m_State; + public int Index => m_Index; public DeleteRequestEventArgs( NetState state, int index ) { @@ -163,11 +167,15 @@ namespace Server private bool m_Accepted; private CityInfo[] m_CityInfo; - public NetState State{ get{ return m_State; } } - public string Username{ get{ return m_Username; } } - public string Password{ get{ return m_Password; } } - public bool Accepted{ get{ return m_Accepted; } set{ m_Accepted = value; } } - public CityInfo[] CityInfo{ get{ return m_CityInfo; } set{ m_CityInfo = value; } } + public NetState State => m_State; + public string Username => m_Username; + public string Password => m_Password; + public bool Accepted{ get => m_Accepted; + set => m_Accepted = value; + } + public CityInfo[] CityInfo{ get => m_CityInfo; + set => m_CityInfo = value; + } public GameLoginEventArgs( NetState state, string un, string pw ) { @@ -183,9 +191,9 @@ namespace Server private Mobile m_Aggressor; private bool m_Criminal; - public Mobile Aggressed{ get{ return m_Aggressed; } } - public Mobile Aggressor{ get{ return m_Aggressor; } } - public bool Criminal{ get{ return m_Criminal; } } + public Mobile Aggressed => m_Aggressed; + public Mobile Aggressor => m_Aggressor; + public bool Criminal => m_Criminal; private static Queue m_Pool = new Queue(); @@ -227,8 +235,8 @@ namespace Server private Mobile m_Beholder; private Mobile m_Beheld; - public Mobile Beholder{ get{ return m_Beholder; } } - public Mobile Beheld{ get{ return m_Beheld; } } + public Mobile Beholder => m_Beholder; + public Mobile Beheld => m_Beheld; public ProfileRequestEventArgs( Mobile beholder, Mobile beheld ) { @@ -243,9 +251,9 @@ namespace Server private Mobile m_Beheld; private string m_Text; - public Mobile Beholder{ get{ return m_Beholder; } } - public Mobile Beheld{ get{ return m_Beheld; } } - public string Text{ get{ return m_Text; } } + public Mobile Beholder => m_Beholder; + public Mobile Beheld => m_Beheld; + public string Text => m_Text; public ChangeProfileRequestEventArgs( Mobile beholder, Mobile beheld, string text ) { @@ -260,8 +268,8 @@ namespace Server private Mobile m_Beholder; private Mobile m_Beheld; - public Mobile Beholder{ get{ return m_Beholder; } } - public Mobile Beheld{ get{ return m_Beheld; } } + public Mobile Beholder => m_Beholder; + public Mobile Beheld => m_Beheld; public PaperdollRequestEventArgs( Mobile beholder, Mobile beheld ) { @@ -279,11 +287,15 @@ namespace Server private bool m_Accepted; private ALRReason m_RejectReason; - public NetState State{ get{ return m_State; } } - public string Username{ get{ return m_Username; } } - public string Password{ get{ return m_Password; } } - public bool Accepted{ get{ return m_Accepted; } set{ m_Accepted = value; } } - public ALRReason RejectReason{ get{ return m_RejectReason; } set{ m_RejectReason = value; } } + public NetState State => m_State; + public string Username => m_Username; + public string Password => m_Password; + public bool Accepted{ get => m_Accepted; + set => m_Accepted = value; + } + public ALRReason RejectReason{ get => m_RejectReason; + set => m_RejectReason = value; + } public AccountLoginEventArgs( NetState state, string username, string password ) { @@ -299,9 +311,9 @@ namespace Server private Mobile m_Beheld; private int m_GumpID; - public Mobile Beholder{ get{ return m_Beholder; } } - public Mobile Beheld{ get{ return m_Beheld; } } - public int GumpID{ get{ return m_GumpID; } } + public Mobile Beholder => m_Beholder; + public Mobile Beheld => m_Beheld; + public int GumpID => m_GumpID; public VirtueItemRequestEventArgs( Mobile beholder, Mobile beheld, int gumpID ) { @@ -315,8 +327,8 @@ namespace Server { private Mobile m_Beholder, m_Beheld; - public Mobile Beholder{ get{ return m_Beholder; } } - public Mobile Beheld{ get{ return m_Beheld; } } + public Mobile Beholder => m_Beholder; + public Mobile Beheld => m_Beheld; public VirtueGumpRequestEventArgs( Mobile beholder, Mobile beheld ) { @@ -330,8 +342,8 @@ namespace Server private Mobile m_Mobile; private int m_VirtueID; - public Mobile Mobile{ get{ return m_Mobile; } } - public int VirtueID{ get{ return m_VirtueID; } } + public Mobile Mobile => m_Mobile; + public int VirtueID => m_VirtueID; public VirtueMacroRequestEventArgs( Mobile mobile, int virtueID ) { @@ -344,7 +356,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public ChatRequestEventArgs( Mobile mobile ) { @@ -356,7 +368,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public PlayerDeathEventArgs( Mobile mobile ) { @@ -369,9 +381,9 @@ namespace Server private Mobile m_From, m_Target; private string m_Name; - public Mobile From{ get{ return m_From; } } - public Mobile Target{ get{ return m_Target; } } - public string Name{ get{ return m_Name; } } + public Mobile From => m_From; + public Mobile Target => m_Target; + public string Name => m_Name; public RenameRequestEventArgs( Mobile from, Mobile target, string name ) { @@ -385,7 +397,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public LogoutEventArgs( Mobile m ) { @@ -398,8 +410,10 @@ namespace Server private Socket m_Socket; private bool m_AllowConnection; - public Socket Socket{ get{ return m_Socket; } } - public bool AllowConnection{ get { return m_AllowConnection; } set { m_AllowConnection = value; } } + public Socket Socket => m_Socket; + public bool AllowConnection{ get => m_AllowConnection; + set => m_AllowConnection = value; + } public SocketConnectEventArgs( Socket s ) { @@ -412,7 +426,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public ConnectedEventArgs( Mobile m ) { @@ -424,7 +438,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public DisconnectedEventArgs( Mobile m ) { @@ -437,8 +451,8 @@ namespace Server private Mobile m_Mobile; private string m_Action; - public Mobile Mobile{ get{ return m_Mobile; } } - public string Action{ get{ return m_Action; } } + public Mobile Mobile => m_Mobile; + public string Action => m_Action; public AnimateRequestEventArgs( Mobile m, string action ) { @@ -453,9 +467,9 @@ namespace Server private Item m_Spellbook; private int m_SpellID; - public Mobile Mobile{ get{ return m_Mobile; } } - public Item Spellbook{ get{ return m_Spellbook; } } - public int SpellID{ get{ return m_SpellID; } } + public Mobile Mobile => m_Mobile; + public Item Spellbook => m_Spellbook; + public int SpellID => m_SpellID; public CastSpellRequestEventArgs( Mobile m, int spellID, Item book ) { @@ -471,9 +485,9 @@ namespace Server private Item m_Bandage; private Mobile m_Target; - public Mobile Mobile { get { return m_Mobile; } } - public Item Bandage { get { return m_Bandage; } } - public Mobile Target { get { return m_Target; } } + public Mobile Mobile => m_Mobile; + public Item Bandage => m_Bandage; + public Mobile Target => m_Target; public BandageTargetRequestEventArgs(Mobile m, Item bandage, Mobile target) { @@ -488,8 +502,8 @@ namespace Server private Mobile m_Mobile; private int m_Type; - public Mobile Mobile{ get{ return m_Mobile; } } - public int Type{ get{ return m_Type; } } + public Mobile Mobile => m_Mobile; + public int Type => m_Type; public OpenSpellbookRequestEventArgs( Mobile m, int type ) { @@ -502,7 +516,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public StunRequestEventArgs( Mobile m ) { @@ -514,7 +528,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public DisarmRequestEventArgs( Mobile m ) { @@ -526,7 +540,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public HelpRequestEventArgs( Mobile m ) { @@ -546,8 +560,10 @@ namespace Server private Exception m_Exception; private bool m_Close; - public Exception Exception{ get{ return m_Exception; } } - public bool Close{ get{ return m_Close; } set{ m_Close = value; } } + public Exception Exception => m_Exception; + public bool Close{ get => m_Close; + set => m_Close = value; + } public CrashedEventArgs( Exception e ) { @@ -560,8 +576,8 @@ namespace Server private Mobile m_Mobile; private int m_OldValue; - public Mobile Mobile{ get{ return m_Mobile; } } - public int OldValue{ get{ return m_OldValue; } } + public Mobile Mobile => m_Mobile; + public int OldValue => m_OldValue; public HungerChangedEventArgs( Mobile mobile, int oldValue ) { @@ -576,9 +592,11 @@ namespace Server private Direction m_Direction; private bool m_Blocked; - public Mobile Mobile{ get{ return m_Mobile; } } - public Direction Direction{ get{ return m_Direction; } } - public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } } + public Mobile Mobile => m_Mobile; + public Direction Direction => m_Direction; + public bool Blocked{ get => m_Blocked; + set => m_Blocked = value; + } private static Queue m_Pool = new Queue(); @@ -621,10 +639,12 @@ namespace Server private bool m_Rejected; private List m_Servers; - public NetState State{ get{ return m_State; } } - public IAccount Account{ get{ return m_Account; } } - public bool Rejected{ get{ return m_Rejected; } set{ m_Rejected = value; } } - public List Servers{ get{ return m_Servers; } } + public NetState State => m_State; + public IAccount Account => m_Account; + public bool Rejected{ get => m_Rejected; + set => m_Rejected = value; + } + public List Servers => m_Servers; public void AddServer( string name, IPEndPoint address ) { @@ -649,8 +669,8 @@ namespace Server private SkillName m_Name; private int m_Value; - public SkillName Name{ get{ return m_Name; } } - public int Value{ get{ return m_Value; } } + public SkillName Name => m_Name; + public int Value => m_Value; public SkillNameValue( SkillName name, int value ) { @@ -677,25 +697,29 @@ namespace Server private Race m_Race; - public NetState State{ get{ return m_State; } } - public IAccount Account{ get{ return m_Account; } } - public Mobile Mobile{ get{ return m_Mobile; } set{ m_Mobile = value; } } - public string Name{ get{ return m_Name; } } - public bool Female{ get{ return m_Female; } } - public int Hue{ get{ return m_Hue; } } - public int Str{ get{ return m_Str; } } - public int Dex{ get{ return m_Dex; } } - public int Int{ get{ return m_Int; } } - public CityInfo City{ get{ return m_City; } } - public SkillNameValue[] Skills{ get{ return m_Skills; } } - public int ShirtHue{ get{ return m_ShirtHue; } } - public int PantsHue{ get{ return m_PantsHue; } } - public int HairID{ get{ return m_HairID; } } - public int HairHue{ get{ return m_HairHue; } } - public int BeardID{ get{ return m_BeardID; } } - public int BeardHue{ get{ return m_BeardHue; } } - public int Profession{ get{ return m_Profession; } set{ m_Profession = value; }} - public Race Race { get { return m_Race; } } + public NetState State => m_State; + public IAccount Account => m_Account; + public Mobile Mobile{ get => m_Mobile; + set => m_Mobile = value; + } + public string Name => m_Name; + public bool Female => m_Female; + public int Hue => m_Hue; + public int Str => m_Str; + public int Dex => m_Dex; + public int Int => m_Int; + public CityInfo City => m_City; + public SkillNameValue[] Skills => m_Skills; + public int ShirtHue => m_ShirtHue; + public int PantsHue => m_PantsHue; + public int HairID => m_HairID; + public int HairHue => m_HairHue; + public int BeardID => m_BeardID; + public int BeardHue => m_BeardHue; + public int Profession{ get => m_Profession; + set => m_Profession = value; + } + public Race Race => m_Race; public CharacterCreatedEventArgs( NetState state, IAccount a, string name, bool female, int hue, int str, int dex, int intel, CityInfo city, SkillNameValue[] skills, int shirtHue, int pantsHue, int hairID, int hairHue, int beardID, int beardHue, int profession, Race race ) { @@ -724,7 +748,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public OpenDoorMacroEventArgs( Mobile mobile ) { @@ -742,13 +766,19 @@ namespace Server private bool m_Handled; private bool m_Blocked; - public Mobile Mobile{ get{ return m_Mobile; } } - public string Speech{ get{ return m_Speech; } set{ m_Speech = value; } } - public MessageType Type{ get{ return m_Type; } } - public int Hue{ get{ return m_Hue; } } - public int[] Keywords{ get{ return m_Keywords; } } - public bool Handled{ get{ return m_Handled; } set{ m_Handled = value; } } - public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } } + public Mobile Mobile => m_Mobile; + public string Speech{ get => m_Speech; + set => m_Speech = value; + } + public MessageType Type => m_Type; + public int Hue => m_Hue; + public int[] Keywords => m_Keywords; + public bool Handled{ get => m_Handled; + set => m_Handled = value; + } + public bool Blocked{ get => m_Blocked; + set => m_Blocked = value; + } public bool HasKeyword( int keyword ) { @@ -773,7 +803,7 @@ namespace Server { private Mobile m_Mobile; - public Mobile Mobile{ get{ return m_Mobile; } } + public Mobile Mobile => m_Mobile; public LoginEventArgs( Mobile mobile ) { @@ -785,7 +815,7 @@ namespace Server { private bool m_Msg; - public bool Message{ get{ return m_Msg; } } + public bool Message => m_Msg; public WorldSaveEventArgs( bool msg ) { @@ -804,8 +834,10 @@ namespace Server m_Blocked = false; } - public NetState NetState{ get{ return m_State; } } - public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } } + public NetState NetState => m_State; + public bool Blocked{ get => m_Blocked; + set => m_Blocked = value; + } } public static class EventSink diff --git a/Server/ExpansionInfo.cs b/Server/ExpansionInfo.cs index 98a70811a..d68a42fc0 100644 --- a/Server/ExpansionInfo.cs +++ b/Server/ExpansionInfo.cs @@ -153,7 +153,7 @@ namespace Server public class ExpansionInfo { - public static ExpansionInfo CoreExpansion { get { return GetInfo(Core.Expansion); } } + public static ExpansionInfo CoreExpansion => GetInfo(Core.Expansion); public static ExpansionInfo[] Table { get; private set; } diff --git a/Server/Geometry.cs b/Server/Geometry.cs index 2a0a29370..df5a383e1 100644 --- a/Server/Geometry.cs +++ b/Server/Geometry.cs @@ -43,27 +43,15 @@ namespace Server [CommandProperty( AccessLevel.Counselor )] public int X { - get - { - return m_X; - } - set - { - m_X = value; - } + get => m_X; + set => m_X = value; } [CommandProperty( AccessLevel.Counselor )] public int Y { - get - { - return m_Y; - } - set - { - m_Y = value; - } + get => m_Y; + set => m_Y = value; } public override string ToString() @@ -248,40 +236,22 @@ namespace Server [CommandProperty( AccessLevel.Counselor )] public int X { - get - { - return m_X; - } - set - { - m_X = value; - } + get => m_X; + set => m_X = value; } [CommandProperty( AccessLevel.Counselor )] public int Y { - get - { - return m_Y; - } - set - { - m_Y = value; - } + get => m_Y; + set => m_Y = value; } [CommandProperty( AccessLevel.Counselor )] public int Z { - get - { - return m_Z; - } - set - { - m_Z = value; - } + get => m_Z; + set => m_Z = value; } public override string ToString() @@ -430,79 +400,43 @@ namespace Server [CommandProperty( AccessLevel.Counselor )] public Point2D Start { - get - { - return m_Start; - } - set - { - m_Start = value; - } + get => m_Start; + set => m_Start = value; } [CommandProperty( AccessLevel.Counselor )] public Point2D End { - get - { - return m_End; - } - set - { - m_End = value; - } + get => m_End; + set => m_End = value; } [CommandProperty( AccessLevel.Counselor )] public int X { - get - { - return m_Start.m_X; - } - set - { - m_Start.m_X = value; - } + get => m_Start.m_X; + set => m_Start.m_X = value; } [CommandProperty( AccessLevel.Counselor )] public int Y { - get - { - return m_Start.m_Y; - } - set - { - m_Start.m_Y = value; - } + get => m_Start.m_Y; + set => m_Start.m_Y = value; } [CommandProperty( AccessLevel.Counselor )] public int Width { - get - { - return m_End.m_X - m_Start.m_X; - } - set - { - m_End.m_X = m_Start.m_X + value; - } + get => m_End.m_X - m_Start.m_X; + set => m_End.m_X = m_Start.m_X + value; } [CommandProperty( AccessLevel.Counselor )] public int Height { - get - { - return m_End.m_Y - m_Start.m_Y; - } - set - { - m_End.m_Y = m_Start.m_Y + value; - } + get => m_End.m_Y - m_Start.m_Y; + set => m_End.m_Y = m_Start.m_Y + value; } public void MakeHold( Rectangle2D r ) @@ -565,55 +499,25 @@ namespace Server [CommandProperty( AccessLevel.Counselor )] public Point3D Start { - get - { - return m_Start; - } - set - { - m_Start = value; - } + get => m_Start; + set => m_Start = value; } [CommandProperty( AccessLevel.Counselor )] public Point3D End { - get - { - return m_End; - } - set - { - m_End = value; - } + get => m_End; + set => m_End = value; } [CommandProperty( AccessLevel.Counselor )] - public int Width - { - get - { - return m_End.X - m_Start.X; - } - } + public int Width => m_End.X - m_Start.X; [CommandProperty( AccessLevel.Counselor )] - public int Height - { - get - { - return m_End.Y - m_Start.Y; - } - } + public int Height => m_End.Y - m_Start.Y; [CommandProperty( AccessLevel.Counselor )] - public int Depth - { - get - { - return m_End.Z - m_Start.Z; - } - } + public int Depth => m_End.Z - m_Start.Z; public bool Contains( Point3D p ) { diff --git a/Server/Guild.cs b/Server/Guild.cs index adcc4ca82..8a379caab 100644 --- a/Server/Guild.cs +++ b/Server/Guild.cs @@ -49,15 +49,11 @@ namespace Server.Guilds } [CommandProperty( AccessLevel.Counselor )] - public int Id { get { return m_Id; } } + public int Id => m_Id; - int ISerializable.TypeReference { - get { return 0; } - } + int ISerializable.TypeReference => 0; - int ISerializable.SerialIdentity { - get { return m_Id; } - } + int ISerializable.SerialIdentity => m_Id; public abstract void Deserialize( GenericReader reader ); public abstract void Serialize( GenericWriter writer ); @@ -71,13 +67,7 @@ namespace Server.Guilds private static Dictionary m_GuildList = new Dictionary(); private static int m_NextID = 1; - public static Dictionary List - { - get - { - return m_GuildList; - } - } + public static Dictionary List => m_GuildList; public static BaseGuild Find( int id ) { diff --git a/Server/Gumps/Gump.cs b/Server/Gumps/Gump.cs index d870cd305..db1813b87 100644 --- a/Server/Gumps/Gump.cs +++ b/Server/Gumps/Gump.cs @@ -70,25 +70,13 @@ namespace Server.Gumps // m_Strings.Clear(); } - public int TypeID - { - get - { - return m_TypeID; - } - } + public int TypeID => m_TypeID; - public List Entries - { - get{ return m_Entries; } - } + public List Entries => m_Entries; public int Serial { - get - { - return m_Serial; - } + get => m_Serial; set { if ( m_Serial != value ) @@ -101,10 +89,7 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } + get => m_X; set { if ( m_X != value ) @@ -117,10 +102,7 @@ namespace Server.Gumps public int Y { - get - { - return m_Y; - } + get => m_Y; set { if ( m_Y != value ) @@ -133,10 +115,7 @@ namespace Server.Gumps public bool Disposable { - get - { - return m_Disposable; - } + get => m_Disposable; set { if ( m_Disposable != value ) @@ -149,10 +128,7 @@ namespace Server.Gumps public bool Resizable { - get - { - return m_Resizable; - } + get => m_Resizable; set { if ( m_Resizable != value ) @@ -165,10 +141,7 @@ namespace Server.Gumps public bool Dragable { - get - { - return m_Dragable; - } + get => m_Dragable; set { if ( m_Dragable != value ) @@ -181,10 +154,7 @@ namespace Server.Gumps public bool Closable { - get - { - return m_Closable; - } + get => m_Closable; set { if ( m_Closable != value ) diff --git a/Server/Gumps/GumpAlphaRegion.cs b/Server/Gumps/GumpAlphaRegion.cs index 52cf6b2ce..8c6ef4f1a 100644 --- a/Server/Gumps/GumpAlphaRegion.cs +++ b/Server/Gumps/GumpAlphaRegion.cs @@ -30,50 +30,26 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public GumpAlphaRegion( int x, int y, int width, int height ) diff --git a/Server/Gumps/GumpBackground.cs b/Server/Gumps/GumpBackground.cs index 9869ef437..e1ef25293 100644 --- a/Server/Gumps/GumpBackground.cs +++ b/Server/Gumps/GumpBackground.cs @@ -31,62 +31,32 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int GumpID { - get - { - return m_GumpID; - } - set - { - Delta( ref m_GumpID, value ); - } + get => m_GumpID; + set => Delta( ref m_GumpID, value ); } public GumpBackground( int x, int y, int width, int height, int gumpID ) diff --git a/Server/Gumps/GumpButton.cs b/Server/Gumps/GumpButton.cs index 4b2dea5cb..6a1ee1ee9 100644 --- a/Server/Gumps/GumpButton.cs +++ b/Server/Gumps/GumpButton.cs @@ -50,70 +50,37 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int NormalID { - get - { - return m_ID1; - } - set - { - Delta( ref m_ID1, value ); - } + get => m_ID1; + set => Delta( ref m_ID1, value ); } public int PressedID { - get - { - return m_ID2; - } - set - { - Delta( ref m_ID2, value ); - } + get => m_ID2; + set => Delta( ref m_ID2, value ); } public int ButtonID { - get - { - return m_ButtonID; - } - set - { - Delta( ref m_ButtonID, value ); - } + get => m_ButtonID; + set => Delta( ref m_ButtonID, value ); } public GumpButtonType Type { - get - { - return m_Type; - } + get => m_Type; set { if ( m_Type != value ) @@ -132,14 +99,8 @@ namespace Server.Gumps public int Param { - get - { - return m_Param; - } - set - { - Delta( ref m_Param, value ); - } + get => m_Param; + set => Delta( ref m_Param, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpCheck.cs b/Server/Gumps/GumpCheck.cs index 11f809a1b..576b3ec1c 100644 --- a/Server/Gumps/GumpCheck.cs +++ b/Server/Gumps/GumpCheck.cs @@ -32,74 +32,38 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int InactiveID { - get - { - return m_ID1; - } - set - { - Delta( ref m_ID1, value ); - } + get => m_ID1; + set => Delta( ref m_ID1, value ); } public int ActiveID { - get - { - return m_ID2; - } - set - { - Delta( ref m_ID2, value ); - } + get => m_ID2; + set => Delta( ref m_ID2, value ); } public bool InitialState { - get - { - return m_InitialState; - } - set - { - Delta( ref m_InitialState, value ); - } + get => m_InitialState; + set => Delta( ref m_InitialState, value ); } public int SwitchID { - get - { - return m_SwitchID; - } - set - { - Delta( ref m_SwitchID, value ); - } + get => m_SwitchID; + set => Delta( ref m_SwitchID, value ); } public GumpCheck( int x, int y, int inactiveID, int activeID, bool initialState, int switchID ) diff --git a/Server/Gumps/GumpEntry.cs b/Server/Gumps/GumpEntry.cs index c065af1b7..e4826bae7 100644 --- a/Server/Gumps/GumpEntry.cs +++ b/Server/Gumps/GumpEntry.cs @@ -64,10 +64,7 @@ namespace Server.Gumps public Gump Parent { - get - { - return m_Parent; - } + get => m_Parent; set { if ( m_Parent != value ) diff --git a/Server/Gumps/GumpGroup.cs b/Server/Gumps/GumpGroup.cs index 3bbfedd8b..bc502304d 100644 --- a/Server/Gumps/GumpGroup.cs +++ b/Server/Gumps/GumpGroup.cs @@ -34,14 +34,8 @@ namespace Server.Gumps public int Group { - get - { - return m_Group; - } - set - { - Delta( ref m_Group, value ); - } + get => m_Group; + set => Delta( ref m_Group, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpHtml.cs b/Server/Gumps/GumpHtml.cs index e790aa723..e0600e2bf 100644 --- a/Server/Gumps/GumpHtml.cs +++ b/Server/Gumps/GumpHtml.cs @@ -32,86 +32,44 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public string Text { - get - { - return m_Text; - } - set - { - Delta( ref m_Text, value ); - } + get => m_Text; + set => Delta( ref m_Text, value ); } public bool Background { - get - { - return m_Background; - } - set - { - Delta( ref m_Background, value ); - } + get => m_Background; + set => Delta( ref m_Background, value ); } public bool Scrollbar { - get - { - return m_Scrollbar; - } - set - { - Delta( ref m_Scrollbar, value ); - } + get => m_Scrollbar; + set => Delta( ref m_Scrollbar, value ); } public GumpHtml( int x, int y, int width, int height, string text, bool background, bool scrollbar ) diff --git a/Server/Gumps/GumpHtmlLocalized.cs b/Server/Gumps/GumpHtmlLocalized.cs index 93d0e9b8d..058ab104f 100644 --- a/Server/Gumps/GumpHtmlLocalized.cs +++ b/Server/Gumps/GumpHtmlLocalized.cs @@ -43,118 +43,61 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int Number { - get - { - return m_Number; - } - set - { - Delta( ref m_Number, value ); - } + get => m_Number; + set => Delta( ref m_Number, value ); } public string Args { - get - { - return m_Args; - } - set - { - Delta( ref m_Args, value ); - } + get => m_Args; + set => Delta( ref m_Args, value ); } public int Color { - get - { - return m_Color; - } - set - { - Delta( ref m_Color, value ); - } + get => m_Color; + set => Delta( ref m_Color, value ); } public bool Background { - get - { - return m_Background; - } - set - { - Delta( ref m_Background, value ); - } + get => m_Background; + set => Delta( ref m_Background, value ); } public bool Scrollbar { - get - { - return m_Scrollbar; - } - set - { - Delta( ref m_Scrollbar, value ); - } + get => m_Scrollbar; + set => Delta( ref m_Scrollbar, value ); } public GumpHtmlLocalizedType Type { - get - { - return m_Type; - } + get => m_Type; set { if ( m_Type != value ) diff --git a/Server/Gumps/GumpImage.cs b/Server/Gumps/GumpImage.cs index 30274ca0a..5be7e7ed9 100644 --- a/Server/Gumps/GumpImage.cs +++ b/Server/Gumps/GumpImage.cs @@ -43,50 +43,26 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int GumpID { - get - { - return m_GumpID; - } - set - { - Delta( ref m_GumpID, value ); - } + get => m_GumpID; + set => Delta( ref m_GumpID, value ); } public int Hue { - get - { - return m_Hue; - } - set - { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpImageTileButton.cs b/Server/Gumps/GumpImageTileButton.cs index 4a83a4fd2..1957cd2a1 100644 --- a/Server/Gumps/GumpImageTileButton.cs +++ b/Server/Gumps/GumpImageTileButton.cs @@ -62,70 +62,37 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int NormalID { - get - { - return m_ID1; - } - set - { - Delta( ref m_ID1, value ); - } + get => m_ID1; + set => Delta( ref m_ID1, value ); } public int PressedID { - get - { - return m_ID2; - } - set - { - Delta( ref m_ID2, value ); - } + get => m_ID2; + set => Delta( ref m_ID2, value ); } public int ButtonID { - get - { - return m_ButtonID; - } - set - { - Delta( ref m_ButtonID, value ); - } + get => m_ButtonID; + set => Delta( ref m_ButtonID, value ); } public GumpButtonType Type { - get - { - return m_Type; - } + get => m_Type; set { if ( m_Type != value ) @@ -144,74 +111,38 @@ namespace Server.Gumps public int Param { - get - { - return m_Param; - } - set - { - Delta( ref m_Param, value ); - } + get => m_Param; + set => Delta( ref m_Param, value ); } public int ItemID { - get - { - return m_ItemID; - } - set - { - Delta( ref m_ItemID, value ); - } + get => m_ItemID; + set => Delta( ref m_ItemID, value ); } public int Hue { - get - { - return m_Hue; - } - set - { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int LocalizedTooltip { - get - { - return m_LocalizedTooltip; - } - set - { - m_LocalizedTooltip = value; - } + get => m_LocalizedTooltip; + set => m_LocalizedTooltip = value; } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpImageTiled.cs b/Server/Gumps/GumpImageTiled.cs index 3b4d3d30e..abca2111d 100644 --- a/Server/Gumps/GumpImageTiled.cs +++ b/Server/Gumps/GumpImageTiled.cs @@ -40,62 +40,32 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int GumpID { - get - { - return m_GumpID; - } - set - { - Delta( ref m_GumpID, value ); - } + get => m_GumpID; + set => Delta( ref m_GumpID, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpItem.cs b/Server/Gumps/GumpItem.cs index 443298d52..8da9a48fc 100644 --- a/Server/Gumps/GumpItem.cs +++ b/Server/Gumps/GumpItem.cs @@ -43,50 +43,26 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int ItemID { - get - { - return m_ItemID; - } - set - { - Delta( ref m_ItemID, value ); - } + get => m_ItemID; + set => Delta( ref m_ItemID, value ); } public int Hue { - get - { - return m_Hue; - } - set - { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpItemProperty.cs b/Server/Gumps/GumpItemProperty.cs index bd78bf944..36f19b050 100644 --- a/Server/Gumps/GumpItemProperty.cs +++ b/Server/Gumps/GumpItemProperty.cs @@ -34,14 +34,8 @@ namespace Server.Gumps public int Serial { - get - { - return m_Serial; - } - set - { - Delta( ref m_Serial, value ); - } + get => m_Serial; + set => Delta( ref m_Serial, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpLabel.cs b/Server/Gumps/GumpLabel.cs index 2fa55c0ca..f64c98e53 100644 --- a/Server/Gumps/GumpLabel.cs +++ b/Server/Gumps/GumpLabel.cs @@ -39,50 +39,26 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Hue { - get - { - return m_Hue; - } - set - { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public string Text { - get - { - return m_Text; - } - set - { - Delta( ref m_Text, value ); - } + get => m_Text; + set => Delta( ref m_Text, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpLabelCropped.cs b/Server/Gumps/GumpLabelCropped.cs index 6c1c988c6..6a4b894e7 100644 --- a/Server/Gumps/GumpLabelCropped.cs +++ b/Server/Gumps/GumpLabelCropped.cs @@ -32,74 +32,38 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int Hue { - get - { - return m_Hue; - } - set - { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public string Text { - get - { - return m_Text; - } - set - { - Delta( ref m_Text, value ); - } + get => m_Text; + set => Delta( ref m_Text, value ); } public GumpLabelCropped( int x, int y, int width, int height, int hue, string text ) diff --git a/Server/Gumps/GumpPage.cs b/Server/Gumps/GumpPage.cs index ae39b1829..8b6fd6ca3 100644 --- a/Server/Gumps/GumpPage.cs +++ b/Server/Gumps/GumpPage.cs @@ -34,14 +34,8 @@ namespace Server.Gumps public int Page { - get - { - return m_Page; - } - set - { - Delta( ref m_Page, value ); - } + get => m_Page; + set => Delta( ref m_Page, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/GumpRadio.cs b/Server/Gumps/GumpRadio.cs index a54299ef6..5298e092e 100644 --- a/Server/Gumps/GumpRadio.cs +++ b/Server/Gumps/GumpRadio.cs @@ -32,74 +32,38 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int InactiveID { - get - { - return m_ID1; - } - set - { - Delta( ref m_ID1, value ); - } + get => m_ID1; + set => Delta( ref m_ID1, value ); } public int ActiveID { - get - { - return m_ID2; - } - set - { - Delta( ref m_ID2, value ); - } + get => m_ID2; + set => Delta( ref m_ID2, value ); } public bool InitialState { - get - { - return m_InitialState; - } - set - { - Delta( ref m_InitialState, value ); - } + get => m_InitialState; + set => Delta( ref m_InitialState, value ); } public int SwitchID { - get - { - return m_SwitchID; - } - set - { - Delta( ref m_SwitchID, value ); - } + get => m_SwitchID; + set => Delta( ref m_SwitchID, value ); } public GumpRadio( int x, int y, int inactiveID, int activeID, bool initialState, int switchID ) diff --git a/Server/Gumps/GumpTextEntry.cs b/Server/Gumps/GumpTextEntry.cs index 29f5a659e..aae663794 100644 --- a/Server/Gumps/GumpTextEntry.cs +++ b/Server/Gumps/GumpTextEntry.cs @@ -33,86 +33,44 @@ namespace Server.Gumps public int X { - get - { - return m_X; - } - set - { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get - { - return m_Y; - } - set - { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get - { - return m_Width; - } - set - { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get - { - return m_Height; - } - set - { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int Hue { - get - { - return m_Hue; - } - set - { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public int EntryID { - get - { - return m_EntryID; - } - set - { - Delta( ref m_EntryID, value ); - } + get => m_EntryID; + set => Delta( ref m_EntryID, value ); } public string InitialText { - get - { - return m_InitialText; - } - set - { - Delta( ref m_InitialText, value ); - } + get => m_InitialText; + set => Delta( ref m_InitialText, value ); } public GumpTextEntry( int x, int y, int width, int height, int hue, int entryID, string initialText ) diff --git a/Server/Gumps/GumpTextEntryLimited.cs b/Server/Gumps/GumpTextEntryLimited.cs index 8efe8361d..b7fa84003 100644 --- a/Server/Gumps/GumpTextEntryLimited.cs +++ b/Server/Gumps/GumpTextEntryLimited.cs @@ -31,75 +31,43 @@ namespace Server.Gumps { private int m_Size; public int X { - get { - return m_X; - } - set { - Delta( ref m_X, value ); - } + get => m_X; + set => Delta( ref m_X, value ); } public int Y { - get { - return m_Y; - } - set { - Delta( ref m_Y, value ); - } + get => m_Y; + set => Delta( ref m_Y, value ); } public int Width { - get { - return m_Width; - } - set { - Delta( ref m_Width, value ); - } + get => m_Width; + set => Delta( ref m_Width, value ); } public int Height { - get { - return m_Height; - } - set { - Delta( ref m_Height, value ); - } + get => m_Height; + set => Delta( ref m_Height, value ); } public int Hue { - get { - return m_Hue; - } - set { - Delta( ref m_Hue, value ); - } + get => m_Hue; + set => Delta( ref m_Hue, value ); } public int EntryID { - get { - return m_EntryID; - } - set { - Delta( ref m_EntryID, value ); - } + get => m_EntryID; + set => Delta( ref m_EntryID, value ); } public string InitialText { - get { - return m_InitialText; - } - set { - Delta( ref m_InitialText, value ); - } + get => m_InitialText; + set => Delta( ref m_InitialText, value ); } public int Size { - get { - return m_Size; - } - set { - Delta( ref m_Size, value ); - } + get => m_Size; + set => Delta( ref m_Size, value ); } public GumpTextEntryLimited( int x, int y, int width, int height, int hue, int entryID, string initialText, int size ) { diff --git a/Server/Gumps/GumpTooltip.cs b/Server/Gumps/GumpTooltip.cs index 171b2a3cf..e4bee65a8 100644 --- a/Server/Gumps/GumpTooltip.cs +++ b/Server/Gumps/GumpTooltip.cs @@ -34,14 +34,8 @@ namespace Server.Gumps public int Number { - get - { - return m_Number; - } - set - { - Delta( ref m_Number, value ); - } + get => m_Number; + set => Delta( ref m_Number, value ); } public override string Compile( NetState ns ) diff --git a/Server/Gumps/RelayInfo.cs b/Server/Gumps/RelayInfo.cs index 3b0d92bca..b568e5085 100644 --- a/Server/Gumps/RelayInfo.cs +++ b/Server/Gumps/RelayInfo.cs @@ -31,21 +31,9 @@ namespace Server.Gumps m_Text = text; } - public int EntryID - { - get - { - return m_EntryID; - } - } + public int EntryID => m_EntryID; - public string Text - { - get - { - return m_Text; - } - } + public string Text => m_Text; } public class RelayInfo @@ -61,29 +49,11 @@ namespace Server.Gumps m_TextEntries = textEntries; } - public int ButtonID - { - get - { - return m_ButtonID; - } - } + public int ButtonID => m_ButtonID; - public int[] Switches - { - get - { - return m_Switches; - } - } + public int[] Switches => m_Switches; - public TextRelay[] TextEntries - { - get - { - return m_TextEntries; - } - } + public TextRelay[] TextEntries => m_TextEntries; public bool IsSwitched( int switchID ) { diff --git a/Server/HuePicker.cs b/Server/HuePicker.cs index 581b33780..2b7a24c28 100644 --- a/Server/HuePicker.cs +++ b/Server/HuePicker.cs @@ -29,21 +29,9 @@ namespace Server.HuePickers private int m_Serial; private int m_ItemID; - public int Serial - { - get - { - return m_Serial; - } - } + public int Serial => m_Serial; - public int ItemID - { - get - { - return m_ItemID; - } - } + public int ItemID => m_ItemID; public HuePicker( int itemID ) { diff --git a/Server/IEntity.cs b/Server/IEntity.cs index c244165b2..11610ce7a 100644 --- a/Server/IEntity.cs +++ b/Server/IEntity.cs @@ -70,41 +70,17 @@ namespace Server m_Deleted = false; } - public Serial Serial { - get { - return m_Serial; - } - } + public Serial Serial => m_Serial; - public Point3D Location { - get { - return m_Location; - } - } + public Point3D Location => m_Location; - public int X { - get { - return m_Location.X; - } - } + public int X => m_Location.X; - public int Y { - get { - return m_Location.Y; - } - } + public int Y => m_Location.Y; - public int Z { - get { - return m_Location.Z; - } - } + public int Z => m_Location.Z; - public Map Map { - get { - return m_Map; - } - } + public Map Map => m_Map; public virtual void MoveToWorld(Point3D newLocation, Map map) { @@ -112,11 +88,7 @@ namespace Server m_Map = map; } - public bool Deleted { - get { - return m_Deleted; - } - } + public bool Deleted => m_Deleted; public void Delete() { diff --git a/Server/Insensitive.cs b/Server/Insensitive.cs index 543f02e3c..439c14225 100644 --- a/Server/Insensitive.cs +++ b/Server/Insensitive.cs @@ -26,10 +26,7 @@ namespace Server { private static IComparer m_Comparer = CaseInsensitiveComparer.Default; - public static IComparer Comparer - { - get{ return m_Comparer; } - } + public static IComparer Comparer => m_Comparer; public static int Compare( string a, string b ) { diff --git a/Server/Item.cs b/Server/Item.cs index 64294332c..75d55c541 100644 --- a/Server/Item.cs +++ b/Server/Item.cs @@ -1438,15 +1438,12 @@ namespace Server /// /// Has the item been deleted? /// - public bool Deleted{ get{ return GetFlag( ImplFlag.Deleted ); } } + public bool Deleted => GetFlag( ImplFlag.Deleted ); [CommandProperty( AccessLevel.GameMaster )] public LootType LootType { - get - { - return m_LootType; - } + get => m_LootType; set { if ( m_LootType != value ) @@ -1461,26 +1458,15 @@ namespace Server private static TimeSpan m_DDT = TimeSpan.FromHours( 1.0 ); - public static TimeSpan DefaultDecayTime{ get{ return m_DDT; } set{ m_DDT = value; } } - - [CommandProperty( AccessLevel.GameMaster )] - public virtual TimeSpan DecayTime - { - get - { - return m_DDT; - } + public static TimeSpan DefaultDecayTime{ get => m_DDT; + set => m_DDT = value; } [CommandProperty( AccessLevel.GameMaster )] - public virtual bool Decays - { - get - { - // TODO: Make item decay an option on the spawner - return (Movable && Visible/* && Spawner == null*/); - } - } + public virtual TimeSpan DecayTime => m_DDT; + + [CommandProperty( AccessLevel.GameMaster )] + public virtual bool Decays => (Movable && Visible/* && Spawner == null*/); public virtual bool OnDecay() { @@ -1494,14 +1480,8 @@ namespace Server public DateTime LastMoved { - get - { - return m_LastMovedTime; - } - set - { - m_LastMovedTime = value; - } + get => m_LastMovedTime; + set => m_LastMovedTime = value; } public virtual bool CanStackWith( Item dropped ) @@ -1597,8 +1577,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Stackable { - get{ return GetFlag( ImplFlag.Stackable ); } - set{ SetFlag( ImplFlag.Stackable, value ); } + get => GetFlag( ImplFlag.Stackable ); + set => SetFlag( ImplFlag.Stackable, value ); } private object _rpl = new object(); @@ -1807,7 +1787,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Visible { - get{ return GetFlag( ImplFlag.Visible ); } + get => GetFlag( ImplFlag.Visible ); set { if ( GetFlag( ImplFlag.Visible ) != value ) @@ -1840,7 +1820,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Movable { - get{ return GetFlag( ImplFlag.Movable ); } + get => GetFlag( ImplFlag.Movable ); set { if ( GetFlag( ImplFlag.Movable ) != value ) @@ -1852,7 +1832,7 @@ namespace Server } } - public virtual bool ForceShowProperties{ get{ return false; } } + public virtual bool ForceShowProperties => false; public virtual int GetPacketFlags() { @@ -1877,7 +1857,7 @@ namespace Server return true; } - public virtual bool HandlesOnMovement{ get{ return false; } } + public virtual bool HandlesOnMovement => false; public virtual void OnMovement( Mobile m, Point3D oldLocation ) { @@ -1903,10 +1883,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Map Map { - get - { - return m_Map; - } + get => m_Map; set { if ( m_Map != value ) @@ -1986,13 +1963,9 @@ namespace Server return ( (flags & toGet) != 0 ); } - int ISerializable.TypeReference { - get { return m_TypeRef; } - } + int ISerializable.TypeReference => m_TypeRef; - int ISerializable.SerialIdentity { - get { return m_Serial; } - } + int ISerializable.SerialIdentity => m_Serial; public virtual void Serialize( GenericWriter writer ) { @@ -2245,25 +2218,25 @@ namespace Server public static int LockedDownFlag { - get{ return m_LockedDownFlag; } - set{ m_LockedDownFlag = value; } + get => m_LockedDownFlag; + set => m_LockedDownFlag = value; } public static int SecureFlag { - get{ return m_SecureFlag; } - set{ m_SecureFlag = value; } + get => m_SecureFlag; + set => m_SecureFlag = value; } public bool IsLockedDown { - get{ return GetTempFlag( m_LockedDownFlag ); } + get => GetTempFlag( m_LockedDownFlag ); set{ SetTempFlag( m_LockedDownFlag, value ); InvalidateProperties(); } } public bool IsSecure { - get{ return GetTempFlag( m_SecureFlag ); } + get => GetTempFlag( m_SecureFlag ); set{ SetTempFlag( m_SecureFlag, value ); InvalidateProperties(); } } @@ -2730,7 +2703,7 @@ namespace Server return this.WorldPacket; } - public virtual bool IsVirtualItem{ get{ return false; } } + public virtual bool IsVirtualItem => false; public virtual int GetTotal( TotalType type ) { @@ -2768,22 +2741,13 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public int TotalGold - { - get { return GetTotal( TotalType.Gold ); } - } + public int TotalGold => GetTotal( TotalType.Gold ); [CommandProperty( AccessLevel.GameMaster )] - public int TotalItems - { - get { return GetTotal( TotalType.Items ); } - } + public int TotalItems => GetTotal( TotalType.Items ); [CommandProperty( AccessLevel.GameMaster )] - public int TotalWeight - { - get { return GetTotal( TotalType.Weight ); } - } + public int TotalWeight => GetTotal( TotalType.Weight ); public virtual double DefaultWeight { @@ -2836,29 +2800,14 @@ namespace Server } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int PileWeight - { - get - { - return (int)Math.Ceiling( this.Weight * this.Amount ); - } - } + public int PileWeight => (int)Math.Ceiling( this.Weight * this.Amount ); - public virtual int HuedItemID - { - get - { - return m_ItemID; - } - } + public virtual int HuedItemID => m_ItemID; [Hue, CommandProperty( AccessLevel.GameMaster )] public virtual int Hue { - get - { - return m_Hue; - } + get => m_Hue; set { if ( m_Hue != value ) @@ -2873,10 +2822,7 @@ namespace Server public const int QuestItemHue = 0x4EA; // Hmmmm... "for EA"? - public virtual bool Nontransferable - { - get { return QuestItem; } - } + public virtual bool Nontransferable => QuestItem; public virtual void HandleInvalidTransfer( Mobile from ) { @@ -2888,10 +2834,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public virtual Layer Layer { - get - { - return m_Layer; - } + get => m_Layer; set { if ( m_Layer != value ) @@ -3072,8 +3015,8 @@ namespace Server public bool NoMoveHS { - get { return m_NoMoveHS; } - set { m_NoMoveHS = value; } + get => m_NoMoveHS; + set => m_NoMoveHS = value; } public void ProcessDelta() @@ -3513,20 +3456,14 @@ namespace Server { } - public virtual int PhysicalResistance{ get{ return 0; } } - public virtual int FireResistance{ get{ return 0; } } - public virtual int ColdResistance{ get{ return 0; } } - public virtual int PoisonResistance{ get{ return 0; } } - public virtual int EnergyResistance{ get{ return 0; } } + public virtual int PhysicalResistance => 0; + public virtual int FireResistance => 0; + public virtual int ColdResistance => 0; + public virtual int PoisonResistance => 0; + public virtual int EnergyResistance => 0; [CommandProperty( AccessLevel.Counselor )] - public Serial Serial - { - get - { - return m_Serial; - } - } + public Serial Serial => m_Serial; #region Location Location Location! @@ -3537,10 +3474,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public virtual Point3D Location { - get - { - return m_Location; - } + get => m_Location; set { Point3D oldLocation = m_Location; @@ -3617,32 +3551,29 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int X { - get{ return m_Location.m_X; } - set{ Location = new Point3D( value, m_Location.m_Y, m_Location.m_Z ); } + get => m_Location.m_X; + set => Location = new Point3D( value, m_Location.m_Y, m_Location.m_Z ); } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int Y { - get{ return m_Location.m_Y; } - set{ Location = new Point3D( m_Location.m_X, value, m_Location.m_Z ); } + get => m_Location.m_Y; + set => Location = new Point3D( m_Location.m_X, value, m_Location.m_Z ); } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int Z { - get{ return m_Location.m_Z; } - set{ Location = new Point3D( m_Location.m_X, m_Location.m_Y, value ); } + get => m_Location.m_Z; + set => Location = new Point3D( m_Location.m_X, m_Location.m_Y, value ); } #endregion [CommandProperty( AccessLevel.GameMaster )] public virtual int ItemID { - get - { - return m_ItemID; - } + get => m_ItemID; set { if ( m_ItemID != value ) @@ -3662,10 +3593,7 @@ namespace Server } } - public virtual string DefaultName - { - get { return null; } - } + public virtual string DefaultName => null; [CommandProperty( AccessLevel.GameMaster )] public string Name @@ -3698,10 +3626,7 @@ namespace Server [CommandProperty(AccessLevel.GameMaster, AccessLevel.Developer)] public IEntity Parent { - get - { - return m_Parent; - } + get => m_Parent; set { if ( m_Parent == value ) @@ -3724,10 +3649,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public LightType Light { - get - { - return (LightType)m_Direction; - } + get => (LightType)m_Direction; set { if ( (LightType)m_Direction != value ) @@ -3743,10 +3665,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public Direction Direction { - get - { - return m_Direction; - } + get => m_Direction; set { if ( m_Direction != value ) @@ -3762,10 +3681,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Amount { - get - { - return m_Amount; - } + get => m_Amount; set { int oldValue = m_Amount; @@ -3798,7 +3714,7 @@ namespace Server { } - public virtual bool HandlesOnSpeech{ get{ return false; } } + public virtual bool HandlesOnSpeech => false; public virtual void OnSpeech( SpeechEventArgs e ) { @@ -4172,7 +4088,7 @@ namespace Server //return root == null ? m_Location : new Point3D( (IPoint3D) root ); } - public virtual bool BlocksFit{ get{ return false; } } + public virtual bool BlocksFit => false; public Point3D GetSurfaceTop() { @@ -4252,13 +4168,7 @@ namespace Server { } - public bool InSecureTrade - { - get - { - return ( GetSecureTradeCont() != null ); - } - } + public bool InSecureTrade => ( GetSecureTradeCont() != null ); public SecureTradeContainer GetSecureTradeCont() { @@ -4381,13 +4291,7 @@ namespace Server return false; } - public ItemData ItemData - { - get - { - return TileData.ItemTable[m_ItemID & TileData.MaxItemValue]; - } - } + public ItemData ItemData => TileData.ItemTable[m_ItemID & TileData.MaxItemValue]; public virtual void OnItemUsed( Mobile from, Item item ) { @@ -4437,8 +4341,8 @@ namespace Server return true; } - public virtual bool CanTarget{ get{ return true; } } - public virtual bool DisplayLootType{ get{ return true; } } + public virtual bool CanTarget => true; + public virtual bool DisplayLootType => true; public virtual void OnSingleClickContained( Mobile from, Item item ) { @@ -4484,8 +4388,8 @@ namespace Server public static bool ScissorCopyLootType { - get{ return m_ScissorCopyLootType; } - set{ m_ScissorCopyLootType = value; } + get => m_ScissorCopyLootType; + set => m_ScissorCopyLootType = value; } public virtual void ScissorHelper( Mobile from, Item newItem, int amountPerOldItem ) @@ -4554,7 +4458,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool QuestItem { - get { return GetFlag( ImplFlag.QuestItem ); } + get => GetFlag( ImplFlag.QuestItem ); set { SetFlag( ImplFlag.QuestItem, value ); @@ -4569,14 +4473,14 @@ namespace Server public bool Insured { - get{ return GetFlag( ImplFlag.Insured ); } + get => GetFlag( ImplFlag.Insured ); set{ SetFlag( ImplFlag.Insured, value ); InvalidateProperties(); } } public bool PaidInsurance { - get{ return GetFlag( ImplFlag.PaidInsurance ); } - set{ SetFlag( ImplFlag.PaidInsurance, value ); } + get => GetFlag( ImplFlag.PaidInsurance ); + set => SetFlag( ImplFlag.PaidInsurance, value ); } public Mobile BlessedFor diff --git a/Server/ItemBounds.cs b/Server/ItemBounds.cs index f5e69974a..692e8e681 100644 --- a/Server/ItemBounds.cs +++ b/Server/ItemBounds.cs @@ -27,13 +27,7 @@ namespace Server { private static Rectangle2D[] m_Bounds; - public static Rectangle2D[] Table - { - get - { - return m_Bounds; - } - } + public static Rectangle2D[] Table => m_Bounds; static ItemBounds() { diff --git a/Server/Items/BaseMulti.cs b/Server/Items/BaseMulti.cs index 0933e93dc..b16221657 100644 --- a/Server/Items/BaseMulti.cs +++ b/Server/Items/BaseMulti.cs @@ -36,9 +36,7 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public override int ItemID { - get { - return base.ItemID; - } + get => base.ItemID; set { if ( base.ItemID != value ) { Map facet = ( this.Parent == null ? this.Map : null ); @@ -88,10 +86,7 @@ namespace Server.Items } } - public virtual bool AllowsRelativeDrop - { - get { return false; } - } + public virtual bool AllowsRelativeDrop => false; public override int GetMaxUpdateRange() { @@ -103,13 +98,7 @@ namespace Server.Items return 22; } - public virtual MultiComponentList Components - { - get - { - return MultiData.GetComponents( ItemID ); - } - } + public virtual MultiComponentList Components => MultiData.GetComponents( ItemID ); public virtual bool Contains( Point2D p ) { diff --git a/Server/Items/Container.cs b/Server/Items/Container.cs index 6ac5f4f6e..c5ee10d2e 100644 --- a/Server/Items/Container.cs +++ b/Server/Items/Container.cs @@ -37,8 +37,8 @@ namespace Server.Items public static ContainerSnoopHandler SnoopHandler { - get{ return m_SnoopHandler; } - set{ m_SnoopHandler = value; } + get => m_SnoopHandler; + set => m_SnoopHandler = value; } private ContainerData m_ContainerData; @@ -64,13 +64,13 @@ namespace Server.Items return m_ContainerData; } - set{ m_ContainerData = value; } + set => m_ContainerData = value; } [CommandProperty( AccessLevel.GameMaster )] public override int ItemID { - get{ return base.ItemID; } + get => base.ItemID; set { int oldID = this.ItemID; @@ -85,21 +85,21 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public int GumpID { - get{ return ( m_GumpID == -1 ? DefaultGumpID : m_GumpID ); } - set{ m_GumpID = value; } + get => ( m_GumpID == -1 ? DefaultGumpID : m_GumpID ); + set => m_GumpID = value; } [CommandProperty( AccessLevel.GameMaster )] public int DropSound { - get{ return ( m_DropSound == -1 ? DefaultDropSound : m_DropSound ); } - set{ m_DropSound = value; } + get => ( m_DropSound == -1 ? DefaultDropSound : m_DropSound ); + set => m_DropSound = value; } [CommandProperty( AccessLevel.GameMaster )] public int MaxItems { - get{ return ( m_MaxItems == -1 ? DefaultMaxItems : m_MaxItems ); } + get => ( m_MaxItems == -1 ? DefaultMaxItems : m_MaxItems ); set{ m_MaxItems = value; InvalidateProperties(); } } @@ -120,8 +120,8 @@ namespace Server.Items [CommandProperty( AccessLevel.GameMaster )] public bool LiftOverride { - get{ return m_LiftOverride; } - set{ m_LiftOverride = value; } + get => m_LiftOverride; + set => m_LiftOverride = value; } public virtual void UpdateContainerData() @@ -129,19 +129,18 @@ namespace Server.Items this.ContainerData = ContainerData.GetData( this.ItemID ); } - public virtual Rectangle2D Bounds{ get{ return ContainerData.Bounds; } } - [CommandProperty( AccessLevel.GameMaster )] - public virtual int DefaultGumpID{ get{ return ContainerData.GumpID; } } - [CommandProperty( AccessLevel.GameMaster )] - public virtual int DefaultDropSound{ get{ return ContainerData.DropSound; } } + public virtual Rectangle2D Bounds => ContainerData.Bounds; - public virtual int DefaultMaxItems{ get{ return m_GlobalMaxItems; } } - public virtual int DefaultMaxWeight{ get{ return m_GlobalMaxWeight; } } + [CommandProperty( AccessLevel.GameMaster )] + public virtual int DefaultGumpID => ContainerData.GumpID; - public virtual bool IsDecoContainer - { - get{ return !Movable && !IsLockedDown && !IsSecure && Parent == null && !m_LiftOverride; } - } + [CommandProperty( AccessLevel.GameMaster )] + public virtual int DefaultDropSound => ContainerData.DropSound; + + public virtual int DefaultMaxItems => m_GlobalMaxItems; + public virtual int DefaultMaxWeight => m_GlobalMaxWeight; + + public virtual bool IsDecoContainer => !Movable && !IsLockedDown && !IsSecure && Parent == null && !m_LiftOverride; public virtual int GetDroppedSound( Item item ) { @@ -1377,8 +1376,12 @@ namespace Server.Items private static int m_GlobalMaxItems = 125; private static int m_GlobalMaxWeight = 400; - public static int GlobalMaxItems{ get{ return m_GlobalMaxItems; } set{ m_GlobalMaxItems = value; } } - public static int GlobalMaxWeight{ get{ return m_GlobalMaxWeight; } set{ m_GlobalMaxWeight = value; } } + public static int GlobalMaxItems{ get => m_GlobalMaxItems; + set => m_GlobalMaxItems = value; + } + public static int GlobalMaxWeight{ get => m_GlobalMaxWeight; + set => m_GlobalMaxWeight = value; + } public Container( int itemID ) : base( itemID ) { @@ -1644,7 +1647,7 @@ namespace Server.Items } } - public virtual bool DisplaysContent{ get{ return true; } } + public virtual bool DisplaysContent => true; public virtual bool CheckContentDisplay( Mobile from ) { @@ -1672,11 +1675,11 @@ namespace Server.Items public List Openers { - get{ return m_Openers; } - set{ m_Openers = value; } + get => m_Openers; + set => m_Openers = value; } - public virtual bool IsPublicContainer{ get{ return false; } } + public virtual bool IsPublicContainer => false; public override void OnDelete() { @@ -1872,8 +1875,8 @@ namespace Server.Items public static ContainerData Default { - get{ return m_Default; } - set{ m_Default = value; } + get => m_Default; + set => m_Default = value; } public static ContainerData GetData( int itemID ) @@ -1891,9 +1894,9 @@ namespace Server.Items private Rectangle2D m_Bounds; private int m_DropSound; - public int GumpID{ get{ return m_GumpID; } } - public Rectangle2D Bounds{ get{ return m_Bounds; } } - public int DropSound{ get{ return m_DropSound; } } + public int GumpID => m_GumpID; + public Rectangle2D Bounds => m_Bounds; + public int DropSound => m_DropSound; public ContainerData( int gumpID, Rectangle2D bounds, int dropSound ) { diff --git a/Server/Items/Containers.cs b/Server/Items/Containers.cs index c1157276f..b73bf543b 100644 --- a/Server/Items/Containers.cs +++ b/Server/Items/Containers.cs @@ -30,38 +30,17 @@ namespace Server.Items private Mobile m_Owner; private bool m_Open; - public override int DefaultMaxWeight - { - get - { - return 0; - } - } + public override int DefaultMaxWeight => 0; - public override bool IsVirtualItem - { - get { return true; } - } + public override bool IsVirtualItem => true; public BankBox( Serial serial ) : base( serial ) { } - public Mobile Owner - { - get - { - return m_Owner; - } - } + public Mobile Owner => m_Owner; - public bool Opened - { - get - { - return m_Open; - } - } + public bool Opened => m_Open; public void Open() { @@ -111,7 +90,9 @@ namespace Server.Items private static bool m_SendRemovePacket; - public static bool SendDeleteOnClose{ get{ return m_SendRemovePacket; } set{ m_SendRemovePacket = value; } } + public static bool SendDeleteOnClose{ get => m_SendRemovePacket; + set => m_SendRemovePacket = value; + } public void Close() { diff --git a/Server/Items/SecureTradeContainer.cs b/Server/Items/SecureTradeContainer.cs index d511d3d4b..e37f23b27 100644 --- a/Server/Items/SecureTradeContainer.cs +++ b/Server/Items/SecureTradeContainer.cs @@ -27,13 +27,7 @@ namespace Server.Items { private SecureTrade m_Trade; - public SecureTrade Trade - { - get - { - return m_Trade; - } - } + public SecureTrade Trade => m_Trade; public SecureTradeContainer( SecureTrade trade ) : base( 0x1E5E ) { diff --git a/Server/Items/VirtualCheck.cs b/Server/Items/VirtualCheck.cs index 1430ddfe0..b49e01c91 100644 --- a/Server/Items/VirtualCheck.cs +++ b/Server/Items/VirtualCheck.cs @@ -33,7 +33,7 @@ namespace Server [CommandProperty(AccessLevel.Administrator)] public int Plat { - get { return _Plat; } + get => _Plat; set { _Plat = value; @@ -46,7 +46,7 @@ namespace Server [CommandProperty(AccessLevel.Administrator)] public int Gold { - get { return _Gold; } + get => _Gold; set { _Gold = value; diff --git a/Server/Items/VirtualHair.cs b/Server/Items/VirtualHair.cs index bbaa81acb..89f509ca2 100644 --- a/Server/Items/VirtualHair.cs +++ b/Server/Items/VirtualHair.cs @@ -28,10 +28,14 @@ namespace Server private int m_Hue; [CommandProperty( AccessLevel.GameMaster )] - public int ItemID { get { return m_ItemID; } set { m_ItemID = value; } } + public int ItemID { get => m_ItemID; + set => m_ItemID = value; + } [CommandProperty( AccessLevel.GameMaster )] - public int Hue { get { return m_Hue; } set { m_Hue = value; } } + public int Hue { get => m_Hue; + set => m_Hue = value; + } protected BaseHairInfo( int itemid ) : this( itemid, 0 ) diff --git a/Server/KeywordList.cs b/Server/KeywordList.cs index 025b32347..3363538c4 100644 --- a/Server/KeywordList.cs +++ b/Server/KeywordList.cs @@ -31,13 +31,7 @@ namespace Server m_Count = 0; } - public int Count - { - get - { - return m_Count; - } - } + public int Count => m_Count; public bool Contains( int keyword ) { diff --git a/Server/Main.cs b/Server/Main.cs index 16c41186d..1056fd1e4 100644 --- a/Server/Main.cs +++ b/Server/Main.cs @@ -62,15 +62,15 @@ namespace Server public static MessagePump MessagePump { - get { return m_MessagePump; } - set { m_MessagePump = value; } + get => m_MessagePump; + set => m_MessagePump = value; } public static Slice Slice; public static bool Profiling { - get { return m_Profiling; } + get => m_Profiling; set { if ( m_Profiling == value ) @@ -96,16 +96,18 @@ namespace Server } } - public static bool Service { get { return m_Service; } } - public static bool Debug { get { return m_Debug; } } - internal static bool HaltOnWarning { get { return m_HaltOnWarning; } } - internal static bool VBdotNet { get { return m_VBdotNET; } } - public static List DataDirectories { get { return m_DataDirectories; } } - public static Assembly Assembly { get { return m_Assembly; } set { m_Assembly = value; } } - public static Version Version { get { return m_Assembly.GetName().Version; } } - public static Process Process { get { return m_Process; } } - public static Thread Thread { get { return m_Thread; } } - public static MultiTextWriter MultiConsoleOut { get { return m_MultiConOut; } } + public static bool Service => m_Service; + public static bool Debug => m_Debug; + internal static bool HaltOnWarning => m_HaltOnWarning; + internal static bool VBdotNet => m_VBdotNET; + public static List DataDirectories => m_DataDirectories; + public static Assembly Assembly { get => m_Assembly; + set => m_Assembly = value; + } + public static Version Version => m_Assembly.GetName().Version; + public static Process Process => m_Process; + public static Thread Thread => m_Thread; + public static MultiTextWriter MultiConsoleOut => m_MultiConOut; /* * DateTime.Now and DateTime.UtcNow are based on actual system clock time. @@ -125,9 +127,9 @@ namespace Server private static bool _UseHRT; - public static bool UsingHighResolutionTiming { get { return _UseHRT && _HighRes && !Unix; } } + public static bool UsingHighResolutionTiming => _UseHRT && _HighRes && !Unix; - public static long TickCount { get { return (long)Ticks; } } + public static long TickCount => (long)Ticks; public static double Ticks { @@ -147,12 +149,12 @@ namespace Server private static bool m_MultiProcessor; private static int m_ProcessorCount; - public static bool MultiProcessor { get { return m_MultiProcessor; } } - public static int ProcessorCount { get { return m_ProcessorCount; } } + public static bool MultiProcessor => m_MultiProcessor; + public static int ProcessorCount => m_ProcessorCount; private static bool m_Unix; - public static bool Unix { get { return m_Unix; } } + public static bool Unix => m_Unix; public static string FindDataFile( string path ) { @@ -184,66 +186,33 @@ namespace Server private static Expansion m_Expansion; public static Expansion Expansion { - get { return m_Expansion; } - set { m_Expansion = value; } + get => m_Expansion; + set => m_Expansion = value; } - public static bool T2A - { - get { return m_Expansion >= Expansion.T2A; } - } + public static bool T2A => m_Expansion >= Expansion.T2A; - public static bool UOR - { - get { return m_Expansion >= Expansion.UOR; } - } + public static bool UOR => m_Expansion >= Expansion.UOR; - public static bool UOTD - { - get { return m_Expansion >= Expansion.UOTD; } - } + public static bool UOTD => m_Expansion >= Expansion.UOTD; - public static bool LBR - { - get { return m_Expansion >= Expansion.LBR; } - } + public static bool LBR => m_Expansion >= Expansion.LBR; - public static bool AOS - { - get { return m_Expansion >= Expansion.AOS; } - } + public static bool AOS => m_Expansion >= Expansion.AOS; - public static bool SE - { - get { return m_Expansion >= Expansion.SE; } - } + public static bool SE => m_Expansion >= Expansion.SE; - public static bool ML - { - get { return m_Expansion >= Expansion.ML; } - } + public static bool ML => m_Expansion >= Expansion.ML; - public static bool SA - { - get { return m_Expansion >= Expansion.SA; } - } + public static bool SA => m_Expansion >= Expansion.SA; - public static bool HS - { - get { return m_Expansion >= Expansion.HS; } - } + public static bool HS => m_Expansion >= Expansion.HS; - public static bool TOL - { - get { return m_Expansion >= Expansion.TOL; } - } + public static bool TOL => m_Expansion >= Expansion.TOL; #endregion - public static string ExePath - { - get { return m_ExePath ?? (m_ExePath = Assembly.Location); } - } + public static string ExePath => m_ExePath ?? (m_ExePath = Assembly.Location); public static string BaseDirectory { @@ -345,14 +314,14 @@ namespace Server } private static bool m_Closing; - public static bool Closing { get { return m_Closing; } } + public static bool Closing => m_Closing; private static int m_CycleIndex = 1; private static readonly float[] m_CyclesPerSecond = new float[100]; - public static float CyclesPerSecond { get { return m_CyclesPerSecond[(m_CycleIndex - 1) % m_CyclesPerSecond.Length]; } } + public static float CyclesPerSecond => m_CyclesPerSecond[(m_CycleIndex - 1) % m_CyclesPerSecond.Length]; - public static float AverageCPS { get { return m_CyclesPerSecond.Take(m_CycleIndex).Average(); } } + public static float AverageCPS => m_CyclesPerSecond.Take(m_CycleIndex).Average(); public static void Kill() { @@ -594,22 +563,22 @@ namespace Server public static int GlobalUpdateRange { - get { return m_GlobalUpdateRange; } - set { m_GlobalUpdateRange = value; } + get => m_GlobalUpdateRange; + set => m_GlobalUpdateRange = value; } private static int m_GlobalMaxUpdateRange = 24; public static int GlobalMaxUpdateRange { - get { return m_GlobalMaxUpdateRange; } - set { m_GlobalMaxUpdateRange = value; } + get => m_GlobalMaxUpdateRange; + set => m_GlobalMaxUpdateRange = value; } private static int m_ItemCount, m_MobileCount; - public static int ScriptItems { get { return m_ItemCount; } } - public static int ScriptMobiles { get { return m_MobileCount; } } + public static int ScriptItems => m_ItemCount; + public static int ScriptMobiles => m_MobileCount; public static void VerifySerialization() { diff --git a/Server/Map.cs b/Server/Map.cs index 7d3161c75..b2bcd8933 100644 --- a/Server/Map.cs +++ b/Server/Map.cs @@ -315,7 +315,9 @@ namespace Server private Dictionary m_Regions; private Region m_DefaultRegion; - public int Season { get { return m_Season; } set { m_Season = value; } } + public int Season { get => m_Season; + set => m_Season = value; + } private string m_Name; private MapRules m_Rules; @@ -1171,22 +1173,13 @@ namespace Server return m_DefaultRegion; } - set - { - m_DefaultRegion = value; - } + set => m_DefaultRegion = value; } public MapRules Rules { - get - { - return m_Rules; - } - set - { - m_Rules = value; - } + get => m_Rules; + set => m_Rules = value; } public Sector InvalidSector => m_InvalidSector; @@ -1360,8 +1353,8 @@ namespace Server public static int MaxLOSDistance { - get { return m_MaxLOSDistance; } - set { m_MaxLOSDistance = value; } + get => m_MaxLOSDistance; + set => m_MaxLOSDistance = value; } public bool LineOfSight( Point3D org, Point3D dest ) @@ -1621,8 +1614,8 @@ namespace Server public static int[] InvalidLandTiles { - get { return m_InvalidLandTiles; } - set { m_InvalidLandTiles = value; } + get => m_InvalidLandTiles; + set => m_InvalidLandTiles = value; } public int CompareTo( Map other ) diff --git a/Server/Menus/ItemListMenu.cs b/Server/Menus/ItemListMenu.cs index 0e626cd28..9a0bdf8b9 100644 --- a/Server/Menus/ItemListMenu.cs +++ b/Server/Menus/ItemListMenu.cs @@ -28,29 +28,11 @@ namespace Server.Menus.ItemLists private int m_ItemID; private int m_Hue; - public string Name - { - get - { - return m_Name; - } - } + public string Name => m_Name; - public int ItemID - { - get - { - return m_ItemID; - } - } + public int ItemID => m_ItemID; - public int Hue - { - get - { - return m_Hue; - } - } + public int Hue => m_Hue; public ItemListEntry( string name, int itemID ) : this( name, itemID, 0 ) { @@ -72,40 +54,16 @@ namespace Server.Menus.ItemLists private int m_Serial; private static int m_NextSerial; - int IMenu.Serial - { - get - { - return m_Serial; - } - } + int IMenu.Serial => m_Serial; - int IMenu.EntryLength - { - get - { - return m_Entries.Length; - } - } + int IMenu.EntryLength => m_Entries.Length; - public string Question - { - get - { - return m_Question; - } - } + public string Question => m_Question; public ItemListEntry[] Entries { - get - { - return m_Entries; - } - set - { - m_Entries = value; - } + get => m_Entries; + set => m_Entries = value; } public ItemListMenu( string question, ItemListEntry[] entries ) diff --git a/Server/Menus/QuestionMenu.cs b/Server/Menus/QuestionMenu.cs index 4f343e9d4..ab9b2cb2e 100644 --- a/Server/Menus/QuestionMenu.cs +++ b/Server/Menus/QuestionMenu.cs @@ -30,41 +30,17 @@ namespace Server.Menus.Questions private int m_Serial; private static int m_NextSerial; - int IMenu.Serial - { - get - { - return m_Serial; - } - } + int IMenu.Serial => m_Serial; - int IMenu.EntryLength - { - get - { - return m_Answers.Length; - } - } + int IMenu.EntryLength => m_Answers.Length; public string Question { - get - { - return m_Question; - } - set - { - m_Question = value; - } + get => m_Question; + set => m_Question = value; } - public string[] Answers - { - get - { - return m_Answers; - } - } + public string[] Answers => m_Answers; public QuestionMenu( string question, string[] answers ) { diff --git a/Server/Mobile.cs b/Server/Mobile.cs index 6b1d14d41..b6aea8fa0 100644 --- a/Server/Mobile.cs +++ b/Server/Mobile.cs @@ -118,7 +118,7 @@ namespace Server public bool ObeyCap { - get { return m_ObeyCap; } + get => m_ObeyCap; set { m_ObeyCap = value; @@ -130,10 +130,7 @@ namespace Server public Mobile Owner { - get - { - return m_Owner; - } + get => m_Owner; set { if ( m_Owner != value ) @@ -155,10 +152,7 @@ namespace Server public SkillName Skill { - get - { - return m_Skill; - } + get => m_Skill; set { if ( m_Skill != value ) @@ -176,10 +170,7 @@ namespace Server public bool Relative { - get - { - return m_Relative; - } + get => m_Relative; set { if ( m_Relative != value ) @@ -194,10 +185,7 @@ namespace Server public bool Absolute { - get - { - return !m_Relative; - } + get => !m_Relative; set { if ( m_Relative == value ) @@ -212,10 +200,7 @@ namespace Server public double Value { - get - { - return m_Value; - } + get => m_Value; set { if ( m_Value != value ) @@ -239,13 +224,13 @@ namespace Server public Mobile Owner { - get { return m_Owner; } - set { m_Owner = value; } + get => m_Owner; + set => m_Owner = value; } public ResistanceType Type { - get { return m_Type; } + get => m_Type; set { if ( m_Type != value ) @@ -259,7 +244,7 @@ namespace Server public int Offset { - get { return m_Offset; } + get => m_Offset; set { if ( m_Offset != value ) @@ -286,9 +271,9 @@ namespace Server private TimeSpan m_Duration; private DateTime m_Added; - public StatType Type { get { return m_Type; } } - public string Name { get { return m_Name; } } - public int Offset { get { return m_Offset; } } + public StatType Type => m_Type; + public string Name => m_Name; + public int Offset => m_Offset; public bool HasElapsed() { @@ -317,18 +302,24 @@ namespace Server private DateTime m_LastDamage; private List m_Responsible; - public Mobile Damager { get { return m_Damager; } } - public int DamageGiven { get { return m_DamageGiven; } set { m_DamageGiven = value; } } - public DateTime LastDamage { get { return m_LastDamage; } set { m_LastDamage = value; } } - public bool HasExpired { get { return (DateTime.UtcNow > (m_LastDamage + m_ExpireDelay)); } } - public List Responsible { get { return m_Responsible; } set { m_Responsible = value; } } + public Mobile Damager => m_Damager; + public int DamageGiven { get => m_DamageGiven; + set => m_DamageGiven = value; + } + public DateTime LastDamage { get => m_LastDamage; + set => m_LastDamage = value; + } + public bool HasExpired => (DateTime.UtcNow > (m_LastDamage + m_ExpireDelay)); + public List Responsible { get => m_Responsible; + set => m_Responsible = value; + } private static TimeSpan m_ExpireDelay = TimeSpan.FromMinutes( 2.0 ); public static TimeSpan ExpireDelay { - get { return m_ExpireDelay; } - set { m_ExpireDelay = value; } + get => m_ExpireDelay; + set => m_ExpireDelay = value; } public DamageEntry( Mobile damager ) @@ -503,8 +494,8 @@ namespace Server public static bool DragEffects { - get { return m_DragEffects; } - set { m_DragEffects = value; } + get => m_DragEffects; + set => m_DragEffects = value; } #region Handlers @@ -514,14 +505,14 @@ namespace Server public static AllowBeneficialHandler AllowBeneficialHandler { - get { return m_AllowBeneficialHandler; } - set { m_AllowBeneficialHandler = value; } + get => m_AllowBeneficialHandler; + set => m_AllowBeneficialHandler = value; } public static AllowHarmfulHandler AllowHarmfulHandler { - get { return m_AllowHarmfulHandler; } - set { m_AllowHarmfulHandler = value; } + get => m_AllowHarmfulHandler; + set => m_AllowHarmfulHandler = value; } private static SkillCheckTargetHandler m_SkillCheckTargetHandler; @@ -531,34 +522,34 @@ namespace Server public static SkillCheckTargetHandler SkillCheckTargetHandler { - get { return m_SkillCheckTargetHandler; } - set { m_SkillCheckTargetHandler = value; } + get => m_SkillCheckTargetHandler; + set => m_SkillCheckTargetHandler = value; } public static SkillCheckLocationHandler SkillCheckLocationHandler { - get { return m_SkillCheckLocationHandler; } - set { m_SkillCheckLocationHandler = value; } + get => m_SkillCheckLocationHandler; + set => m_SkillCheckLocationHandler = value; } public static SkillCheckDirectTargetHandler SkillCheckDirectTargetHandler { - get { return m_SkillCheckDirectTargetHandler; } - set { m_SkillCheckDirectTargetHandler = value; } + get => m_SkillCheckDirectTargetHandler; + set => m_SkillCheckDirectTargetHandler = value; } public static SkillCheckDirectLocationHandler SkillCheckDirectLocationHandler { - get { return m_SkillCheckDirectLocationHandler; } - set { m_SkillCheckDirectLocationHandler = value; } + get => m_SkillCheckDirectLocationHandler; + set => m_SkillCheckDirectLocationHandler = value; } private static AOSStatusHandler m_AOSStatusHandler; public static AOSStatusHandler AOSStatusHandler { - get { return m_AOSStatusHandler; } - set { m_AOSStatusHandler = value; } + get => m_AOSStatusHandler; + set => m_AOSStatusHandler = value; } #endregion @@ -570,38 +561,38 @@ namespace Server public static RegenRateHandler HitsRegenRateHandler { - get { return m_HitsRegenRate; } - set { m_HitsRegenRate = value; } + get => m_HitsRegenRate; + set => m_HitsRegenRate = value; } public static TimeSpan DefaultHitsRate { - get { return m_DefaultHitsRate; } - set { m_DefaultHitsRate = value; } + get => m_DefaultHitsRate; + set => m_DefaultHitsRate = value; } public static RegenRateHandler StamRegenRateHandler { - get { return m_StamRegenRate; } - set { m_StamRegenRate = value; } + get => m_StamRegenRate; + set => m_StamRegenRate = value; } public static TimeSpan DefaultStamRate { - get { return m_DefaultStamRate; } - set { m_DefaultStamRate = value; } + get => m_DefaultStamRate; + set => m_DefaultStamRate = value; } public static RegenRateHandler ManaRegenRateHandler { - get { return m_ManaRegenRate; } - set { m_ManaRegenRate = value; } + get => m_ManaRegenRate; + set => m_ManaRegenRate = value; } public static TimeSpan DefaultManaRate { - get { return m_DefaultManaRate; } - set { m_DefaultManaRate = value; } + get => m_DefaultManaRate; + set => m_DefaultManaRate = value; } public static TimeSpan GetHitsRegenRate( Mobile m ) @@ -795,19 +786,19 @@ namespace Server { } - public virtual double RacialSkillBonus { get { return 0; } } + public virtual double RacialSkillBonus => 0; private List m_ResistMods; private int[] m_Resistances; - public int[] Resistances { get { return m_Resistances; } } + public int[] Resistances => m_Resistances; - public virtual int BasePhysicalResistance { get { return 0; } } - public virtual int BaseFireResistance { get { return 0; } } - public virtual int BaseColdResistance { get { return 0; } } - public virtual int BasePoisonResistance { get { return 0; } } - public virtual int BaseEnergyResistance { get { return 0; } } + public virtual int BasePhysicalResistance => 0; + public virtual int BaseFireResistance => 0; + public virtual int BaseColdResistance => 0; + public virtual int BasePoisonResistance => 0; + public virtual int BaseEnergyResistance => 0; public virtual void ComputeLightLevels( out int global, out int personal ) { @@ -827,34 +818,19 @@ namespace Server } [CommandProperty( AccessLevel.Counselor )] - public virtual int PhysicalResistance - { - get { return GetResistance( ResistanceType.Physical ); } - } + public virtual int PhysicalResistance => GetResistance( ResistanceType.Physical ); [CommandProperty( AccessLevel.Counselor )] - public virtual int FireResistance - { - get { return GetResistance( ResistanceType.Fire ); } - } + public virtual int FireResistance => GetResistance( ResistanceType.Fire ); [CommandProperty( AccessLevel.Counselor )] - public virtual int ColdResistance - { - get { return GetResistance( ResistanceType.Cold ); } - } + public virtual int ColdResistance => GetResistance( ResistanceType.Cold ); [CommandProperty( AccessLevel.Counselor )] - public virtual int PoisonResistance - { - get { return GetResistance( ResistanceType.Poison ); } - } + public virtual int PoisonResistance => GetResistance( ResistanceType.Poison ); [CommandProperty( AccessLevel.Counselor )] - public virtual int EnergyResistance - { - get { return GetResistance( ResistanceType.Energy ); } - } + public virtual int EnergyResistance => GetResistance( ResistanceType.Energy ); public virtual void UpdateResistances() { @@ -899,8 +875,8 @@ namespace Server public List ResistanceMods { - get { return m_ResistMods; } - set { m_ResistMods = value; } + get => m_ResistMods; + set => m_ResistMods = value; } public virtual void AddResistanceMod( ResistanceMod toAdd ) @@ -928,7 +904,9 @@ namespace Server private static int m_MaxPlayerResistance = 70; - public static int MaxPlayerResistance { get { return m_MaxPlayerResistance; } set { m_MaxPlayerResistance = value; } } + public static int MaxPlayerResistance { get => m_MaxPlayerResistance; + set => m_MaxPlayerResistance = value; + } public virtual void ComputeResistances() { @@ -1090,7 +1068,7 @@ namespace Server } } - public virtual bool NewGuildDisplay { get { return false; } } + public virtual bool NewGuildDisplay => false; public virtual void GetProperties( ObjectPropertyList list ) { @@ -1173,21 +1151,21 @@ namespace Server UpdateAggrExpire(); } - public List Stabled { get { return m_Stabled; } } + public List Stabled => m_Stabled; [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public VirtueInfo Virtues { get { return m_Virtues; } set { } } + public VirtueInfo Virtues { get => m_Virtues; + set { } } - public object Party { get { return m_Party; } set { m_Party = value; } } - public List SkillMods { get { return m_SkillMods; } } + public object Party { get => m_Party; + set => m_Party = value; + } + public List SkillMods => m_SkillMods; [CommandProperty( AccessLevel.GameMaster )] public int VirtualArmorMod { - get - { - return m_VirtualArmorMod; - } + get => m_VirtualArmorMod; set { if ( m_VirtualArmorMod != value ) @@ -1277,14 +1255,8 @@ namespace Server public bool Value { - get - { - return m_Value; - } - set - { - m_Value = value; - } + get => m_Value; + set => m_Value = value; } public WarmodeTimer( Mobile m, bool value ) @@ -1346,45 +1318,24 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int MeleeDamageAbsorb { - get - { - return m_MeleeDamageAbsorb; - } - set - { - m_MeleeDamageAbsorb = value; - } + get => m_MeleeDamageAbsorb; + set => m_MeleeDamageAbsorb = value; } [CommandProperty( AccessLevel.GameMaster )] public int MagicDamageAbsorb { - get - { - return m_MagicDamageAbsorb; - } - set - { - m_MagicDamageAbsorb = value; - } + get => m_MagicDamageAbsorb; + set => m_MagicDamageAbsorb = value; } [CommandProperty( AccessLevel.GameMaster )] - public int SkillsTotal - { - get - { - return m_Skills?.Total ?? 0; - } - } + public int SkillsTotal => m_Skills?.Total ?? 0; [CommandProperty( AccessLevel.GameMaster )] public int SkillsCap { - get - { - return m_Skills?.Cap ?? 0; - } + get => m_Skills?.Cap ?? 0; set { if ( m_Skills != null ) @@ -1427,26 +1378,14 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int BaseSoundID { - get - { - return m_BaseSoundID; - } - set - { - m_BaseSoundID = value; - } + get => m_BaseSoundID; + set => m_BaseSoundID = value; } public long NextCombatTime { - get - { - return m_NextCombatTime; - } - set - { - m_NextCombatTime = value; - } + get => m_NextCombatTime; + set => m_NextCombatTime = value; } public bool BeginAction( object toLock ) @@ -1485,23 +1424,14 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int NameHue { - get - { - return m_NameHue; - } - set - { - m_NameHue = value; - } + get => m_NameHue; + set => m_NameHue = value; } [CommandProperty( AccessLevel.GameMaster )] public int Hunger { - get - { - return m_Hunger; - } + get => m_Hunger; set { int oldValue = m_Hunger; @@ -1518,27 +1448,15 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Thirst { - get - { - return m_Thirst; - } - set - { - m_Thirst = value; - } + get => m_Thirst; + set => m_Thirst = value; } [CommandProperty( AccessLevel.GameMaster )] public int BAC { - get - { - return m_BAC; - } - set - { - m_BAC = value; - } + get => m_BAC; + set => m_BAC = value; } private long m_LastMoveTime; @@ -1549,14 +1467,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int AllowedStealthSteps { - get - { - return m_AllowedStealthSteps; - } - set - { - m_AllowedStealthSteps = value; - } + get => m_AllowedStealthSteps; + set => m_AllowedStealthSteps = value; } /* Logout: @@ -1587,10 +1499,7 @@ namespace Server public Item Holding { - get - { - return m_Holding; - } + get => m_Holding; set { if ( m_Holding != value ) @@ -1621,23 +1530,14 @@ namespace Server public long LastMoveTime { - get - { - return m_LastMoveTime; - } - set - { - m_LastMoveTime = value; - } + get => m_LastMoveTime; + set => m_LastMoveTime = value; } [CommandProperty( AccessLevel.GameMaster )] public virtual bool Paralyzed { - get - { - return m_Paralyzed; - } + get => m_Paralyzed; set { if ( m_Paralyzed != value ) @@ -1659,38 +1559,21 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool DisarmReady { - get - { - return m_DisarmReady; - } - set - { - m_DisarmReady = value; - //SendLocalizedMessage( value ? 1019013 : 1019014 ); - } + get => m_DisarmReady; + set => m_DisarmReady = value; } [CommandProperty( AccessLevel.GameMaster )] public bool StunReady { - get - { - return m_StunReady; - } - set - { - m_StunReady = value; - //SendLocalizedMessage( value ? 1019011 : 1019012 ); - } + get => m_StunReady; + set => m_StunReady = value; } [CommandProperty( AccessLevel.GameMaster )] public bool Frozen { - get - { - return m_Frozen; - } + get => m_Frozen; set { if ( m_Frozen != value ) @@ -1735,10 +1618,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public StatLockType StrLock { - get - { - return m_StrLock; - } + get => m_StrLock; set { if ( m_StrLock != value ) @@ -1756,10 +1636,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public StatLockType DexLock { - get - { - return m_DexLock; - } + get => m_DexLock; set { if ( m_DexLock != value ) @@ -1777,10 +1654,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public StatLockType IntLock { - get - { - return m_IntLock; - } + get => m_IntLock; set { if ( m_IntLock != value ) @@ -1799,34 +1673,22 @@ namespace Server public long NextActionTime { - get - { - return m_NextActionTime; - } - set - { - m_NextActionTime = value; - } + get => m_NextActionTime; + set => m_NextActionTime = value; } public long NextActionMessage { - get - { - return m_NextActionMessage; - } - set - { - m_NextActionMessage = value; - } + get => m_NextActionMessage; + set => m_NextActionMessage = value; } private static int m_ActionMessageDelay = 125; public static int ActionMessageDelay { - get { return m_ActionMessageDelay; } - set { m_ActionMessageDelay = value; } + get => m_ActionMessageDelay; + set => m_ActionMessageDelay = value; } public virtual void SendSkillMessage() @@ -1873,15 +1735,15 @@ namespace Server public static bool GlobalRegenThroughPoison { - get { return m_GlobalRegenThroughPoison; } - set { m_GlobalRegenThroughPoison = value; } + get => m_GlobalRegenThroughPoison; + set => m_GlobalRegenThroughPoison = value; } - public virtual bool RegenThroughPoison { get { return m_GlobalRegenThroughPoison; } } + public virtual bool RegenThroughPoison => m_GlobalRegenThroughPoison; - public virtual bool CanRegenHits { get { return this.Alive && (RegenThroughPoison || !this.Poisoned); } } - public virtual bool CanRegenStam { get { return this.Alive; } } - public virtual bool CanRegenMana { get { return this.Alive; } } + public virtual bool CanRegenHits => this.Alive && (RegenThroughPoison || !this.Poisoned); + public virtual bool CanRegenStam => this.Alive; + public virtual bool CanRegenMana => this.Alive; #region Timers @@ -2066,8 +1928,8 @@ namespace Server public static TimeSpan ExpireCriminalDelay { - get { return m_ExpireCriminalDelay; } - set { m_ExpireCriminalDelay = value; } + get => m_ExpireCriminalDelay; + set => m_ExpireCriminalDelay = value; } private class ExpireCriminalTimer : Timer @@ -2113,38 +1975,17 @@ namespace Server public long NextSkillTime { - get - { - return m_NextSkillTime; - } - set - { - m_NextSkillTime = value; - } + get => m_NextSkillTime; + set => m_NextSkillTime = value; } - public List Aggressors - { - get - { - return m_Aggressors; - } - } + public List Aggressors => m_Aggressors; - public List Aggressed - { - get - { - return m_Aggressed; - } - } + public List Aggressed => m_Aggressed; private int m_ChangingCombatant; - public bool ChangingCombatant - { - get { return (m_ChangingCombatant > 0); } - } + public bool ChangingCombatant => (m_ChangingCombatant > 0); public virtual void Attack( Mobile m ) { @@ -2164,10 +2005,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public virtual Mobile Combatant { - get - { - return m_Combatant; - } + get => m_Combatant; set { if ( m_Deleted ) @@ -2437,30 +2275,18 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public int TotalGold - { - get { return GetTotal( TotalType.Gold ); } - } + public int TotalGold => GetTotal( TotalType.Gold ); [CommandProperty( AccessLevel.GameMaster )] - public int TotalItems - { - get { return GetTotal( TotalType.Items ); } - } + public int TotalItems => GetTotal( TotalType.Items ); [CommandProperty( AccessLevel.GameMaster )] - public int TotalWeight - { - get { return GetTotal( TotalType.Weight ); } - } + public int TotalWeight => GetTotal( TotalType.Weight ); [CommandProperty( AccessLevel.GameMaster )] public int TithingPoints { - get - { - return m_TithingPoints; - } + get => m_TithingPoints; set { if ( m_TithingPoints != value ) @@ -2475,10 +2301,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Followers { - get - { - return m_Followers; - } + get => m_Followers; set { if ( m_Followers != value ) @@ -2493,10 +2316,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int FollowersMax { - get - { - return m_FollowersMax; - } + get => m_FollowersMax; set { if ( m_FollowersMax != value ) @@ -2595,14 +2415,8 @@ namespace Server public bool TargetLocked { - get - { - return m_TargetLocked; - } - set - { - m_TargetLocked = value; - } + get => m_TargetLocked; + set => m_TargetLocked = value; } private class SimpleTarget : Target @@ -2685,10 +2499,7 @@ namespace Server public Target Target { - get - { - return m_Target; - } + get => m_Target; set { Target oldTarget = m_Target; @@ -2720,10 +2531,7 @@ namespace Server public ContextMenu ContextMenu { - get - { - return m_ContextMenu; - } + get => m_ContextMenu; set { m_ContextMenu = value; @@ -2921,10 +2729,7 @@ namespace Server public Prompt Prompt { - get - { - return m_Prompt; - } + get => m_Prompt; set { Prompt oldPrompt = m_Prompt; @@ -2987,14 +2792,8 @@ namespace Server public bool Pushing { - get - { - return m_Pushing; - } - set - { - m_Pushing = value; - } + get => m_Pushing; + set => m_Pushing = value; } private static int m_WalkFoot = 400; @@ -3002,10 +2801,18 @@ namespace Server private static int m_WalkMount = 200; private static int m_RunMount = 100; - public static int WalkFoot { get { return m_WalkFoot; } set { m_WalkFoot = value; } } - public static int RunFoot { get { return m_RunFoot; } set { m_RunFoot = value; } } - public static int WalkMount { get { return m_WalkMount; } set { m_WalkMount = value; } } - public static int RunMount { get { return m_RunMount; } set { m_RunMount = value; } } + public static int WalkFoot { get => m_WalkFoot; + set => m_WalkFoot = value; + } + public static int RunFoot { get => m_RunFoot; + set => m_RunFoot = value; + } + public static int WalkMount { get => m_WalkMount; + set => m_WalkMount = value; + } + public static int RunMount { get => m_RunMount; + set => m_RunMount = value; + } private long m_EndQueue; @@ -3017,10 +2824,18 @@ namespace Server private static bool m_FwdUOTDOverride = false; private static int m_FwdMaxSteps = 4; - public static AccessLevel FwdAccessOverride { get { return m_FwdAccessOverride; } set { m_FwdAccessOverride = value; } } - public static bool FwdEnabled { get { return m_FwdEnabled; } set { m_FwdEnabled = value; } } - public static bool FwdUOTDOverride { get { return m_FwdUOTDOverride; } set { m_FwdUOTDOverride = value; } } - public static int FwdMaxSteps { get { return m_FwdMaxSteps; } set { m_FwdMaxSteps = value; } } + public static AccessLevel FwdAccessOverride { get => m_FwdAccessOverride; + set => m_FwdAccessOverride = value; + } + public static bool FwdEnabled { get => m_FwdEnabled; + set => m_FwdEnabled = value; + } + public static bool FwdUOTDOverride { get => m_FwdUOTDOverride; + set => m_FwdUOTDOverride = value; + } + public static int FwdMaxSteps { get => m_FwdMaxSteps; + set => m_FwdMaxSteps = value; + } public virtual void ClearFastwalkStack() { @@ -3345,7 +3160,7 @@ namespace Server return true; } - public virtual bool IsDeadBondedPet { get { return false; } } + public virtual bool IsDeadBondedPet => false; /// /// Overridable. Event invoked when a Mobile moves over this Mobile. @@ -3408,10 +3223,7 @@ namespace Server public ISpell Spell { - get - { - return m_Spell; - } + get => m_Spell; set { if ( m_Spell != null && value != null ) @@ -3424,14 +3236,8 @@ namespace Server [CommandProperty( AccessLevel.Administrator )] public bool AutoPageNotify { - get - { - return m_AutoPageNotify; - } - set - { - m_AutoPageNotify = value; - } + get => m_AutoPageNotify; + set => m_AutoPageNotify = value; } public virtual void CriminalAction( bool message ) @@ -3529,33 +3335,18 @@ namespace Server [CommandProperty( AccessLevel.GameMaster, AccessLevel.Owner )] public IAccount Account { - get - { - return m_Account; - } - set - { - m_Account = value; - } + get => m_Account; + set => m_Account = value; } private bool m_Deleted; - public bool Deleted - { - get - { - return m_Deleted; - } - } + public bool Deleted => m_Deleted; [CommandProperty( AccessLevel.GameMaster )] public int VirtualArmor { - get - { - return m_VirtualArmor; - } + get => m_VirtualArmor; set { if ( m_VirtualArmor != value ) @@ -3568,13 +3359,7 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public virtual double ArmorRating - { - get - { - return 0.0; - } - } + public virtual double ArmorRating => 0.0; public void DropHolding() { @@ -3655,13 +3440,7 @@ namespace Server /// Overridable. Returns true if the player is alive, false if otherwise. By default, this is computed by: !Deleted && (!Player || !Body.IsGhost) /// [CommandProperty( AccessLevel.Counselor )] - public virtual bool Alive - { - get - { - return !m_Deleted && (!m_Player || !m_Body.IsGhost); - } - } + public virtual bool Alive => !m_Deleted && (!m_Player || !m_Body.IsGhost); public virtual bool CheckSpellCast( ISpell spell ) { @@ -3743,8 +3522,8 @@ namespace Server public static CreateCorpseHandler CreateCorpseHandler { - get { return m_CreateCorpse; } - set { m_CreateCorpse = value; } + get => m_CreateCorpse; + set => m_CreateCorpse = value; } public virtual DeathMoveResult GetParentMoveResultFor( Item item ) @@ -3757,7 +3536,7 @@ namespace Server return item.OnInventoryDeath( this ); } - public virtual bool RetainPackLocsOnDeath { get { return Core.AOS; } } + public virtual bool RetainPackLocsOnDeath => Core.AOS; public virtual void Kill() { @@ -3923,14 +3702,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public Container Corpse { - get - { - return m_Corpse; - } - set - { - m_Corpse = value; - } + get => m_Corpse; + set => m_Corpse = value; } /// @@ -4051,15 +3824,21 @@ namespace Server private static char[] m_GhostChars = new char[2] { 'o', 'O' }; - public static char[] GhostChars { get { return m_GhostChars; } set { m_GhostChars = value; } } + public static char[] GhostChars { get => m_GhostChars; + set => m_GhostChars = value; + } private static bool m_NoSpeechLOS; - public static bool NoSpeechLOS { get { return m_NoSpeechLOS; } set { m_NoSpeechLOS = value; } } + public static bool NoSpeechLOS { get => m_NoSpeechLOS; + set => m_NoSpeechLOS = value; + } private static TimeSpan m_AutoManifestTimeout = TimeSpan.FromSeconds( 5.0 ); - public static TimeSpan AutoManifestTimeout { get { return m_AutoManifestTimeout; } set { m_AutoManifestTimeout = value; } } + public static TimeSpan AutoManifestTimeout { get => m_AutoManifestTimeout; + set => m_AutoManifestTimeout = value; + } private Timer m_AutoManifestTimer; @@ -4089,8 +3868,8 @@ namespace Server public static bool InsuranceEnabled { - get { return m_InsuranceEnabled; } - set { m_InsuranceEnabled = value; } + get => m_InsuranceEnabled; + set => m_InsuranceEnabled = value; } public virtual void Use( Item item ) @@ -4166,8 +3945,8 @@ namespace Server public static int ActionDelay { - get { return m_ActionDelay; } - set { m_ActionDelay = value; } + get => m_ActionDelay; + set => m_ActionDelay = value; } public virtual void Lift( Item item, int amount, out bool rejected, out LRReason reject ) @@ -4597,8 +4376,8 @@ namespace Server public IEntity RelativeTo { - get { return m_RelativeTo; } - set { m_RelativeTo = value; } + get => m_RelativeTo; + set => m_RelativeTo = value; } public LocationComparer(IEntity relativeTo) @@ -4836,16 +4615,13 @@ namespace Server public static VisibleDamageType VisibleDamageType { - get { return m_VisibleDamageType; } - set { m_VisibleDamageType = value; } + get => m_VisibleDamageType; + set => m_VisibleDamageType = value; } private List m_DamageEntries; - public List DamageEntries - { - get { return m_DamageEntries; } - } + public List DamageEntries => m_DamageEntries; public static Mobile GetDamagerFrom( DamageEntry de ) { @@ -5026,8 +4802,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public Mobile LastKiller { - get { return m_LastKiller; } - set { m_LastKiller = value; } + get => m_LastKiller; + set => m_LastKiller = value; } /// @@ -5216,11 +4992,15 @@ namespace Server public static bool m_DefaultShowVisibleDamage, m_DefaultCanSeeVisibleDamage; - public static bool DefaultShowVisibleDamage { get { return m_DefaultShowVisibleDamage; } set { m_DefaultShowVisibleDamage = value; } } - public static bool DefaultCanSeeVisibleDamage { get { return m_DefaultCanSeeVisibleDamage; } set { m_DefaultCanSeeVisibleDamage = value; } } + public static bool DefaultShowVisibleDamage { get => m_DefaultShowVisibleDamage; + set => m_DefaultShowVisibleDamage = value; + } + public static bool DefaultCanSeeVisibleDamage { get => m_DefaultCanSeeVisibleDamage; + set => m_DefaultCanSeeVisibleDamage = value; + } - public virtual bool ShowVisibleDamage { get { return m_DefaultShowVisibleDamage; } } - public virtual bool CanSeeVisibleDamage { get { return m_DefaultCanSeeVisibleDamage; } } + public virtual bool ShowVisibleDamage => m_DefaultShowVisibleDamage; + public virtual bool CanSeeVisibleDamage => m_DefaultCanSeeVisibleDamage; public void SendVisibleDamageSelective(Mobile from, int amount) { @@ -5312,14 +5092,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Squelched { - get - { - return m_Squelched; - } - set - { - m_Squelched = value; - } + get => m_Squelched; + set => m_Squelched = value; } public virtual void Deserialize( GenericReader reader ) @@ -5674,7 +5448,7 @@ namespace Server } } - public virtual bool ShouldCheckStatTimers { get { return true; } } + public virtual bool ShouldCheckStatTimers => true; public virtual void CheckStatTimers() { @@ -5742,23 +5516,11 @@ namespace Server private DateTime m_CreationTime; [CommandProperty( AccessLevel.GameMaster )] - public DateTime CreationTime - { - get - { - return m_CreationTime; - } - } + public DateTime CreationTime => m_CreationTime; - int ISerializable.TypeReference - { - get { return m_TypeRef; } - } + int ISerializable.TypeReference => m_TypeRef; - int ISerializable.SerialIdentity - { - get { return m_Serial; } - } + int ISerializable.SerialIdentity => m_Serial; public virtual void Serialize( GenericWriter writer ) { @@ -5885,10 +5647,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int LightLevel { - get - { - return m_LightLevel; - } + get => m_LightLevel; set { if ( m_LightLevel != value ) @@ -5906,36 +5665,21 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public string Profile { - get - { - return m_Profile; - } - set - { - m_Profile = value; - } + get => m_Profile; + set => m_Profile = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public bool ProfileLocked { - get - { - return m_ProfileLocked; - } - set - { - m_ProfileLocked = value; - } + get => m_ProfileLocked; + set => m_ProfileLocked = value; } [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] public bool Player { - get - { - return m_Player; - } + get => m_Player; set { m_Player = value; @@ -5953,10 +5697,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public string Title { - get - { - return m_Title; - } + get => m_Title; set { m_Title = value; @@ -6006,13 +5747,7 @@ namespace Server Map = Map.Internal; } - public List Items - { - get - { - return m_Items; - } - } + public List Items => m_Items; /// /// Overridable. Virtual event invoked when is added from the Mobile, such as when it is equipped. @@ -6058,7 +5793,7 @@ namespace Server { } - public virtual int MaxWeight { get { return int.MaxValue; } } + public virtual int MaxWeight => int.MaxValue; public void AddItem( Item item ) { @@ -6100,14 +5835,8 @@ namespace Server public static IWeapon DefaultWeapon { - get - { - return m_DefaultWeapon; - } - set - { - m_DefaultWeapon = value; - } + get => m_DefaultWeapon; + set => m_DefaultWeapon = value; } public void RemoveItem( Item item ) @@ -6269,10 +5998,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor )] public Skills Skills { - get - { - return m_Skills; - } + get => m_Skills; set { } @@ -6281,10 +6007,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.Administrator )] public AccessLevel AccessLevel { - get - { - return m_AccessLevel; - } + get => m_AccessLevel; set { AccessLevel oldValue = m_AccessLevel; @@ -6312,10 +6035,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Fame { - get - { - return m_Fame; - } + get => m_Fame; set { int oldValue = m_Fame; @@ -6339,10 +6059,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Karma { - get - { - return m_Karma; - } + get => m_Karma; set { int old = m_Karma; @@ -6493,10 +6210,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Blessed { - get - { - return m_Blessed; - } + get => m_Blessed; set { if ( m_Blessed != value ) @@ -6772,10 +6486,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Map Map { - get - { - return m_Map; - } + get => m_Map; set { if ( m_Deleted ) @@ -7081,7 +6792,7 @@ namespace Server /// /// Gets a list of all StatMod's currently active for the Mobile. /// - public List StatMods { get { return m_StatMods; } } + public List StatMods => m_StatMods; public bool RemoveStatMod( string name ) { @@ -7224,10 +6935,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int RawStr { - get - { - return m_Str; - } + get => m_Str; set { if ( value < 1 ) @@ -7296,10 +7004,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int RawDex { - get - { - return m_Dex; - } + get => m_Dex; set { if ( value < 1 ) @@ -7368,10 +7073,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int RawInt { - get - { - return m_Int; - } + get => m_Int; set { if ( value < 1 ) @@ -7448,10 +7150,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Hits { - get - { - return m_Hits; - } + get => m_Hits; set { if ( m_Deleted ) @@ -7503,13 +7202,7 @@ namespace Server /// Overridable. Gets the maximum hit point of the Mobile. By default, this returns: 50 + ( / 2) /// [CommandProperty( AccessLevel.GameMaster )] - public virtual int HitsMax - { - get - { - return 50 + (Str / 2); - } - } + public virtual int HitsMax => 50 + (Str / 2); /// /// Gets or sets the current stamina of the Mobile. This value ranges from 0 to , inclusive. @@ -7517,10 +7210,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Stam { - get - { - return m_Stam; - } + get => m_Stam; set { if ( m_Deleted ) @@ -7566,13 +7256,7 @@ namespace Server /// Overridable. Gets the maximum stamina of the Mobile. By default, this returns: /// [CommandProperty( AccessLevel.GameMaster )] - public virtual int StamMax - { - get - { - return Dex; - } - } + public virtual int StamMax => Dex; /// /// Gets or sets the current stamina of the Mobile. This value ranges from 0 to , inclusive. @@ -7580,10 +7264,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int Mana { - get - { - return m_Mana; - } + get => m_Mana; set { if ( m_Deleted ) @@ -7635,38 +7316,20 @@ namespace Server /// Overridable. Gets the maximum mana of the Mobile. By default, this returns: /// [CommandProperty( AccessLevel.GameMaster )] - public virtual int ManaMax - { - get - { - return Int; - } - } + public virtual int ManaMax => Int; #endregion - public virtual int Luck - { - get { return 0; } - } + public virtual int Luck => 0; - public virtual int HuedItemID - { - get - { - return (m_Female ? 0x2107 : 0x2106); - } - } + public virtual int HuedItemID => (m_Female ? 0x2107 : 0x2106); private int m_HueMod = -1; [Hue, CommandProperty( AccessLevel.GameMaster )] public int HueMod { - get - { - return m_HueMod; - } + get => m_HueMod; set { if ( m_HueMod != value ) @@ -7710,10 +7373,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public Direction Direction { - get - { - return m_Direction; - } + get => m_Direction; set { if ( m_Direction != value ) @@ -7788,10 +7448,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Female { - get - { - return m_Female; - } + get => m_Female; set { if ( m_Female != value ) @@ -7810,10 +7467,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Flying { - get - { - return m_Flying; - } + get => m_Flying; set { if ( m_Flying != value ) @@ -7831,10 +7485,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Warmode { - get - { - return m_Warmode; - } + get => m_Warmode; set { if ( m_Deleted ) @@ -7880,10 +7531,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Hidden { - get - { - return m_Hidden; - } + get => m_Hidden; set { if ( m_Hidden != value ) @@ -8109,10 +7757,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public string Language { - get - { - return m_Language; - } + get => m_Language; set { if ( m_Language != value ) @@ -8123,62 +7768,35 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int SpeechHue { - get - { - return m_SpeechHue; - } - set - { - m_SpeechHue = value; - } + get => m_SpeechHue; + set => m_SpeechHue = value; } [CommandProperty( AccessLevel.GameMaster )] public int EmoteHue { - get - { - return m_EmoteHue; - } - set - { - m_EmoteHue = value; - } + get => m_EmoteHue; + set => m_EmoteHue = value; } [CommandProperty( AccessLevel.GameMaster )] public int WhisperHue { - get - { - return m_WhisperHue; - } - set - { - m_WhisperHue = value; - } + get => m_WhisperHue; + set => m_WhisperHue = value; } [CommandProperty( AccessLevel.GameMaster )] public int YellHue { - get - { - return m_YellHue; - } - set - { - m_YellHue = value; - } + get => m_YellHue; + set => m_YellHue = value; } [CommandProperty( AccessLevel.GameMaster )] public string GuildTitle { - get - { - return m_GuildTitle; - } + get => m_GuildTitle; set { string old = m_GuildTitle; @@ -8204,10 +7822,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool DisplayGuildTitle { - get - { - return m_DisplayGuildTitle; - } + get => m_DisplayGuildTitle; set { m_DisplayGuildTitle = value; @@ -8218,14 +7833,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public Mobile GuildFealty { - get - { - return m_GuildFealty; - } - set - { - m_GuildFealty = value; - } + get => m_GuildFealty; + set => m_GuildFealty = value; } private string m_NameMod; @@ -8233,10 +7842,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public string NameMod { - get - { - return m_NameMod; - } + get => m_NameMod; set { if ( m_NameMod != value ) @@ -8253,10 +7859,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool YellowHealthbar { - get - { - return m_YellowHealthbar; - } + get => m_YellowHealthbar; set { m_YellowHealthbar = value; @@ -8267,8 +7870,8 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public string RawName { - get { return m_Name; } - set { Name = value; } + get => m_Name; + set => Name = value; } [CommandProperty( AccessLevel.GameMaster )] @@ -8301,40 +7904,22 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public DateTime LastStrGain { - get - { - return m_LastStrGain; - } - set - { - m_LastStrGain = value; - } + get => m_LastStrGain; + set => m_LastStrGain = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime LastIntGain { - get - { - return m_LastIntGain; - } - set - { - m_LastIntGain = value; - } + get => m_LastIntGain; + set => m_LastIntGain = value; } [CommandProperty( AccessLevel.GameMaster )] public DateTime LastDexGain { - get - { - return m_LastDexGain; - } - set - { - m_LastDexGain = value; - } + get => m_LastDexGain; + set => m_LastDexGain = value; } public DateTime LastStatGain @@ -8361,10 +7946,7 @@ namespace Server public BaseGuild Guild { - get - { - return m_Guild; - } + get => m_Guild; set { BaseGuild old = m_Guild; @@ -8390,18 +7972,12 @@ namespace Server #region Poison/Curing - public Timer PoisonTimer - { - get { return m_PoisonTimer; } - } + public Timer PoisonTimer => m_PoisonTimer; [CommandProperty( AccessLevel.GameMaster )] public Poison Poison { - get - { - return m_Poison; - } + get => m_Poison; set { /*if ( m_Poison != value && (m_Poison == null || value == null || m_Poison.Level < value.Level) ) @@ -8592,11 +8168,15 @@ namespace Server private ISpawner m_Spawner; - public ISpawner Spawner { get { return m_Spawner; } set { m_Spawner = value; } } + public ISpawner Spawner { get => m_Spawner; + set => m_Spawner = value; + } private Region m_WalkRegion; - public Region WalkRegion { get { return m_WalkRegion; } set { m_WalkRegion = value; } } + public Region WalkRegion { get => m_WalkRegion; + set => m_WalkRegion = value; + } public virtual void OnBeforeSpawn( Point3D location, Map m ) { @@ -8607,30 +8187,15 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public bool Poisoned - { - get - { - return (m_Poison != null); - } - } + public bool Poisoned => (m_Poison != null); [CommandProperty( AccessLevel.GameMaster )] - public bool IsBodyMod - { - get - { - return (m_BodyMod.BodyID != 0); - } - } + public bool IsBodyMod => (m_BodyMod.BodyID != 0); [CommandProperty( AccessLevel.GameMaster )] public Body BodyMod { - get - { - return m_BodyMod; - } + get => m_BodyMod; set { if ( m_BodyMod != value ) @@ -8694,62 +8259,32 @@ namespace Server [Body, CommandProperty( AccessLevel.GameMaster )] public int BodyValue { - get - { - return Body.BodyID; - } - set - { - Body = value; - } + get => Body.BodyID; + set => Body = value; } [CommandProperty( AccessLevel.Counselor )] - public Serial Serial - { - get - { - return m_Serial; - } - } + public Serial Serial => m_Serial; [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Point3D Location { - get - { - return m_Location; - } - set - { - SetLocation( value, true ); - } + get => m_Location; + set => SetLocation( value, true ); } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Point3D LogoutLocation { - get - { - return m_LogoutLocation; - } - set - { - m_LogoutLocation = value; - } + get => m_LogoutLocation; + set => m_LogoutLocation = value; } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public Map LogoutMap { - get - { - return m_LogoutMap; - } - set - { - m_LogoutMap = value; - } + get => m_LogoutMap; + set => m_LogoutMap = value; } public Region Region @@ -8873,7 +8408,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int SolidHueOverride { - get { return m_SolidHueOverride; } + get => m_SolidHueOverride; set { if ( m_SolidHueOverride == value ) return; m_SolidHueOverride = value; Delta( MobileDelta.Hue | MobileDelta.Body ); } } @@ -9335,7 +8870,7 @@ namespace Server } } - public virtual bool KeepsItemsOnDeath { get { return m_AccessLevel > AccessLevel.Player; } } + public virtual bool KeepsItemsOnDeath => m_AccessLevel > AccessLevel.Player; public Item FindItemOnLayer( Layer layer ) { @@ -9358,22 +8893,22 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int X { - get { return m_Location.m_X; } - set { Location = new Point3D( value, m_Location.m_Y, m_Location.m_Z ); } + get => m_Location.m_X; + set => Location = new Point3D( value, m_Location.m_Y, m_Location.m_Z ); } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int Y { - get { return m_Location.m_Y; } - set { Location = new Point3D( m_Location.m_X, value, m_Location.m_Z ); } + get => m_Location.m_Y; + set => Location = new Point3D( m_Location.m_X, value, m_Location.m_Z ); } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int Z { - get { return m_Location.m_Z; } - set { Location = new Point3D( m_Location.m_X, m_Location.m_Y, value ); } + get => m_Location.m_Z; + set => Location = new Point3D( m_Location.m_X, m_Location.m_Y, value ); } #region Effects & Particles @@ -9856,8 +9391,8 @@ namespace Server public bool NoMoveHS { - get { return m_NoMoveHS; } - set { m_NoMoveHS = value; } + get => m_NoMoveHS; + set => m_NoMoveHS = value; } #region GetDirectionTo[..] @@ -10302,10 +9837,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int Kills { - get - { - return m_Kills; - } + get => m_Kills; set { int oldValue = m_Kills; @@ -10335,10 +9867,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int ShortTermMurders { - get - { - return m_ShortTermMurders; - } + get => m_ShortTermMurders; set { if ( m_ShortTermMurders != value ) @@ -10354,10 +9883,7 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public bool Criminal { - get - { - return m_Criminal; - } + get => m_Criminal; set { if ( m_Criminal != value ) @@ -10751,7 +10277,9 @@ namespace Server private static bool m_DisableDismountInWarmode; - public static bool DisableDismountInWarmode { get { return m_DisableDismountInWarmode; } set { m_DisableDismountInWarmode = value; } } + public static bool DisableDismountInWarmode { get => m_DisableDismountInWarmode; + set => m_DisableDismountInWarmode = value; + } #region OnDoubleClick[..] @@ -10816,7 +10344,9 @@ namespace Server private static int m_BodyWeight = 14; - public static int BodyWeight { get { return m_BodyWeight; } set { m_BodyWeight = value; } } + public static int BodyWeight { get => m_BodyWeight; + set => m_BodyWeight = value; + } /// /// Overridable. Event invoked when wants to see this Mobile's stats. @@ -10870,22 +10400,13 @@ namespace Server } [CommandProperty( AccessLevel.GameMaster )] - public bool Mounted - { - get - { - return (Mount != null); - } - } + public bool Mounted => (Mount != null); private QuestArrow m_QuestArrow; public QuestArrow QuestArrow { - get - { - return m_QuestArrow; - } + get => m_QuestArrow; set { if ( m_QuestArrow != value ) @@ -10904,22 +10425,31 @@ namespace Server " (Order)" }; - public virtual bool CanTarget { get { return true; } } - public virtual bool ClickTitle { get { return true; } } + public virtual bool CanTarget => true; + public virtual bool ClickTitle => true; - public virtual bool PropertyTitle { get { return m_OldPropertyTitles ? ClickTitle : true; } } + public virtual bool PropertyTitle => m_OldPropertyTitles ? ClickTitle : true; private static bool m_DisableHiddenSelfClick = true; private static bool m_AsciiClickMessage = true; private static bool m_GuildClickMessage = true; private static bool m_OldPropertyTitles; - public static bool DisableHiddenSelfClick { get { return m_DisableHiddenSelfClick; } set { m_DisableHiddenSelfClick = value; } } - public static bool AsciiClickMessage { get { return m_AsciiClickMessage; } set { m_AsciiClickMessage = value; } } - public static bool GuildClickMessage { get { return m_GuildClickMessage; } set { m_GuildClickMessage = value; } } - public static bool OldPropertyTitles { get { return m_OldPropertyTitles; } set { m_OldPropertyTitles = value; } } + public static bool DisableHiddenSelfClick { get => m_DisableHiddenSelfClick; + set => m_DisableHiddenSelfClick = value; + } + public static bool AsciiClickMessage { get => m_AsciiClickMessage; + set => m_AsciiClickMessage = value; + } + public static bool GuildClickMessage { get => m_GuildClickMessage; + set => m_GuildClickMessage = value; + } + public static bool OldPropertyTitles { get => m_OldPropertyTitles; + set => m_OldPropertyTitles = value; + } - public virtual bool ShowFameTitle { get { return true; } }//(m_Player || m_Body.IsHuman) && m_Fame >= 10000; } + public virtual bool ShowFameTitle //(m_Player || m_Body.IsHuman) && m_Fame >= 10000; } + => true; /// /// Overridable. Event invoked when the Mobile is single clicked. @@ -11038,45 +10568,15 @@ namespace Server } #region Armor - public Item ShieldArmor - { - get - { - return FindItemOnLayer( Layer.TwoHanded ); - } - } + public Item ShieldArmor => FindItemOnLayer( Layer.TwoHanded ); - public Item NeckArmor - { - get - { - return FindItemOnLayer( Layer.Neck ); - } - } + public Item NeckArmor => FindItemOnLayer( Layer.Neck ); - public Item HandArmor - { - get - { - return FindItemOnLayer( Layer.Gloves ); - } - } + public Item HandArmor => FindItemOnLayer( Layer.Gloves ); - public Item HeadArmor - { - get - { - return FindItemOnLayer( Layer.Helm ); - } - } + public Item HeadArmor => FindItemOnLayer( Layer.Helm ); - public Item ArmsArmor - { - get - { - return FindItemOnLayer( Layer.Arms ); - } - } + public Item ArmsArmor => FindItemOnLayer( Layer.Arms ); public Item LegsArmor { @@ -11100,13 +10600,8 @@ namespace Server } } - public Item Talisman - { - get - { - return FindItemOnLayer( Layer.Talisman ); - } - } + public Item Talisman => FindItemOnLayer( Layer.Talisman ); + #endregion /// @@ -11115,10 +10610,7 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public int StatCap { - get - { - return m_StatCap; - } + get => m_StatCap; set { if ( m_StatCap != value ) @@ -11133,74 +10625,38 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public bool Meditating { - get - { - return m_Meditating; - } - set - { - m_Meditating = value; - } + get => m_Meditating; + set => m_Meditating = value; } [CommandProperty( AccessLevel.GameMaster )] public bool CanSwim { - get - { - return m_CanSwim; - } - set - { - m_CanSwim = value; - } + get => m_CanSwim; + set => m_CanSwim = value; } [CommandProperty( AccessLevel.GameMaster )] public bool CantWalk { - get - { - return m_CantWalk; - } - set - { - m_CantWalk = value; - } + get => m_CantWalk; + set => m_CantWalk = value; } [CommandProperty( AccessLevel.GameMaster )] public bool CanHearGhosts { - get - { - return m_CanHearGhosts || AccessLevel >= AccessLevel.Counselor; - } - set - { - m_CanHearGhosts = value; - } + get => m_CanHearGhosts || AccessLevel >= AccessLevel.Counselor; + set => m_CanHearGhosts = value; } [CommandProperty( AccessLevel.GameMaster )] - public int RawStatTotal - { - get - { - return RawStr + RawDex + RawInt; - } - } + public int RawStatTotal => RawStr + RawDex + RawInt; public long NextSpellTime { - get - { - return m_NextSpellTime; - } - set - { - m_NextSpellTime = value; - } + get => m_NextSpellTime; + set => m_NextSpellTime = value; } /// diff --git a/Server/Movement.cs b/Server/Movement.cs index 47ef3effc..effe68ecf 100644 --- a/Server/Movement.cs +++ b/Server/Movement.cs @@ -26,8 +26,8 @@ namespace Server.Movement public static IMovementImpl Impl { - get{ return m_Impl; } - set{ m_Impl = value; } + get => m_Impl; + set => m_Impl = value; } public static bool CheckMovement( Mobile m, Direction d, out int newZ ) diff --git a/Server/MultiData.cs b/Server/MultiData.cs index 8123d1f98..f8e6c711c 100644 --- a/Server/MultiData.cs +++ b/Server/MultiData.cs @@ -146,8 +146,8 @@ namespace Server public sealed class MultiComponentList { public static bool PostHSFormat { - get { return _PostHSFormat; } - set { _PostHSFormat = value; } + get => _PostHSFormat; + set => _PostHSFormat = value; } private static bool _PostHSFormat = false; @@ -159,16 +159,16 @@ namespace Server public static readonly MultiComponentList Empty = new MultiComponentList(); - public Point2D Min{ get{ return m_Min; } } - public Point2D Max{ get{ return m_Max; } } + public Point2D Min => m_Min; + public Point2D Max => m_Max; - public Point2D Center{ get{ return m_Center; } } + public Point2D Center => m_Center; - public int Width{ get{ return m_Width; } } - public int Height{ get{ return m_Height; } } + public int Width => m_Width; + public int Height => m_Height; - public StaticTile[][][] Tiles{ get{ return m_Tiles; } } - public MultiTileEntry[] List{ get{ return m_List; } } + public StaticTile[][][] Tiles => m_Tiles; + public MultiTileEntry[] List => m_List; public void Add( int itemID, int x, int y, int z ) { diff --git a/Server/Network/BufferPool.cs b/Server/Network/BufferPool.cs index 93f7433ff..7c9a91c07 100644 --- a/Server/Network/BufferPool.cs +++ b/Server/Network/BufferPool.cs @@ -26,7 +26,9 @@ namespace Server.Network { private static List m_Pools = new List(); - public static List Pools{ get{ return m_Pools; } set{ m_Pools = value; } } + public static List Pools{ get => m_Pools; + set => m_Pools = value; + } private string m_Name; diff --git a/Server/Network/ByteQueue.cs b/Server/Network/ByteQueue.cs index 095a57073..fb65f2b84 100644 --- a/Server/Network/ByteQueue.cs +++ b/Server/Network/ByteQueue.cs @@ -30,7 +30,7 @@ namespace Server.Network private byte[] m_Buffer; - public int Length{ get{ return m_Size; } } + public int Length => m_Size; public ByteQueue() { diff --git a/Server/Network/Compression.cs b/Server/Network/Compression.cs index a9e4bff89..90273d273 100644 --- a/Server/Network/Compression.cs +++ b/Server/Network/Compression.cs @@ -243,11 +243,7 @@ namespace Server.Network { public Compressor32() { } - public string Version { - get { - return SafeNativeMethods.zlibVersion(); - } - } + public string Version => SafeNativeMethods.zlibVersion(); public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) { return SafeNativeMethods.compress(dest, ref destLength, source, sourceLength); @@ -280,11 +276,7 @@ namespace Server.Network { public Compressor64() { } - public string Version { - get { - return SafeNativeMethods.zlibVersion(); - } - } + public string Version => SafeNativeMethods.zlibVersion(); public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) { return SafeNativeMethods.compress(dest, ref destLength, source, sourceLength); @@ -317,11 +309,7 @@ namespace Server.Network { public CompressorUnix32() { } - public string Version { - get { - return SafeNativeMethods.zlibVersion(); - } - } + public string Version => SafeNativeMethods.zlibVersion(); public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) { return SafeNativeMethods.compress(dest, ref destLength, source, sourceLength); @@ -354,11 +342,7 @@ namespace Server.Network { public CompressorUnix64() { } - public string Version { - get { - return SafeNativeMethods.zlibVersion(); - } - } + public string Version => SafeNativeMethods.zlibVersion(); public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) { ulong destLengthLong = (ulong)destLength; diff --git a/Server/Network/EncodedPacketHandler.cs b/Server/Network/EncodedPacketHandler.cs index c5504e588..ea7d08c34 100644 --- a/Server/Network/EncodedPacketHandler.cs +++ b/Server/Network/EncodedPacketHandler.cs @@ -35,28 +35,10 @@ namespace Server.Network m_OnReceive = onReceive; } - public int PacketID - { - get - { - return m_PacketID; - } - } + public int PacketID => m_PacketID; - public OnEncodedPacketReceive OnReceive - { - get - { - return m_OnReceive; - } - } + public OnEncodedPacketReceive OnReceive => m_OnReceive; - public bool Ingame - { - get - { - return m_Ingame; - } - } + public bool Ingame => m_Ingame; } } \ No newline at end of file diff --git a/Server/Network/EncodedReader.cs b/Server/Network/EncodedReader.cs index 6f6546e16..3eaa1694a 100644 --- a/Server/Network/EncodedReader.cs +++ b/Server/Network/EncodedReader.cs @@ -29,13 +29,7 @@ namespace Server.Network m_Reader = reader; } - public byte[] Buffer - { - get - { - return m_Reader.Buffer; - } - } + public byte[] Buffer => m_Reader.Buffer; public void Trace( NetState state ) { diff --git a/Server/Network/Listener.cs b/Server/Network/Listener.cs index 818d45feb..ce99f0cb5 100644 --- a/Server/Network/Listener.cs +++ b/Server/Network/Listener.cs @@ -46,8 +46,8 @@ namespace Server.Network private static IPEndPoint[] m_EndPoints; public static IPEndPoint[] EndPoints { - get { return m_EndPoints; } - set { m_EndPoints = value; } + get => m_EndPoints; + set => m_EndPoints = value; } public Listener( IPEndPoint ipep ) diff --git a/Server/Network/MessagePump.cs b/Server/Network/MessagePump.cs index b5fbdc138..64964fe4c 100644 --- a/Server/Network/MessagePump.cs +++ b/Server/Network/MessagePump.cs @@ -63,8 +63,8 @@ namespace Server.Network public Listener[] Listeners { - get{ return m_Listeners; } - set{ m_Listeners = value; } + get => m_Listeners; + set => m_Listeners = value; } public void AddListener( Listener l ) diff --git a/Server/Network/NetState.cs b/Server/Network/NetState.cs index c361addf8..ae2148733 100644 --- a/Server/Network/NetState.cs +++ b/Server/Network/NetState.cs @@ -73,26 +73,14 @@ namespace Server.Network { private DateTime m_ConnectedOn; - public DateTime ConnectedOn { - get { - return m_ConnectedOn; - } - } + public DateTime ConnectedOn => m_ConnectedOn; - public TimeSpan ConnectedFor { - get { - return ( DateTime.UtcNow - m_ConnectedOn ); - } - } + public TimeSpan ConnectedFor => ( DateTime.UtcNow - m_ConnectedOn ); internal int m_Seed; internal int m_AuthID; - public IPAddress Address { - get { - return m_Address; - } - } + public IPAddress Address => m_Address; private ClientFlags m_Flags; @@ -110,56 +98,34 @@ namespace Server.Network { private IPacketEncoder m_Encoder = null; public IPacketEncoder PacketEncoder { - get { - return m_Encoder; - } - set { - m_Encoder = value; - } + get => m_Encoder; + set => m_Encoder = value; } private static NetStateCreatedCallback m_CreatedCallback; public static NetStateCreatedCallback CreatedCallback { - get { - return m_CreatedCallback; - } - set { - m_CreatedCallback = value; - } + get => m_CreatedCallback; + set => m_CreatedCallback = value; } public bool SentFirstPacket { - get { - return m_SentFirstPacket; - } - set { - m_SentFirstPacket = value; - } + get => m_SentFirstPacket; + set => m_SentFirstPacket = value; } public bool BlockAllPackets { - get { - return m_BlockAllPackets; - } - set { - m_BlockAllPackets = value; - } + get => m_BlockAllPackets; + set => m_BlockAllPackets = value; } public ClientFlags Flags { - get { - return m_Flags; - } - set { - m_Flags = value; - } + get => m_Flags; + set => m_Flags = value; } public ClientVersion Version { - get { - return m_Version; - } + get => m_Version; set { m_Version = value; @@ -244,38 +210,26 @@ namespace Server.Network { Version704565 = Version70331 | NewSecureTrading } - public bool NewSpellbook { get { return ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0); } } - public bool DamagePacket { get { return ((_ProtocolChanges & ProtocolChanges.DamagePacket) != 0); } } - public bool Unpack { get { return ((_ProtocolChanges & ProtocolChanges.Unpack) != 0); } } - public bool BuffIcon { get { return ((_ProtocolChanges & ProtocolChanges.BuffIcon) != 0); } } - public bool NewHaven { get { return ((_ProtocolChanges & ProtocolChanges.NewHaven) != 0); } } - public bool ContainerGridLines { get { return ((_ProtocolChanges & ProtocolChanges.ContainerGridLines) != 0); } } - public bool ExtendedSupportedFeatures { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedSupportedFeatures) != 0); } } - public bool StygianAbyss { get { return ((_ProtocolChanges & ProtocolChanges.StygianAbyss) != 0); } } - public bool HighSeas { get { return ((_ProtocolChanges & ProtocolChanges.HighSeas) != 0); } } - public bool NewCharacterList { get { return ((_ProtocolChanges & ProtocolChanges.NewCharacterList) != 0); } } - public bool NewCharacterCreation { get { return ((_ProtocolChanges & ProtocolChanges.NewCharacterCreation) != 0); } } - public bool ExtendedStatus { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedStatus) != 0); } } - public bool NewMobileIncoming { get { return ((_ProtocolChanges & ProtocolChanges.NewMobileIncoming) != 0); } } - public bool NewSecureTrading { get { return ((_ProtocolChanges & ProtocolChanges.NewSecureTrading) != 0); } } + public bool NewSpellbook => ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0); + public bool DamagePacket => ((_ProtocolChanges & ProtocolChanges.DamagePacket) != 0); + public bool Unpack => ((_ProtocolChanges & ProtocolChanges.Unpack) != 0); + public bool BuffIcon => ((_ProtocolChanges & ProtocolChanges.BuffIcon) != 0); + public bool NewHaven => ((_ProtocolChanges & ProtocolChanges.NewHaven) != 0); + public bool ContainerGridLines => ((_ProtocolChanges & ProtocolChanges.ContainerGridLines) != 0); + public bool ExtendedSupportedFeatures => ((_ProtocolChanges & ProtocolChanges.ExtendedSupportedFeatures) != 0); + public bool StygianAbyss => ((_ProtocolChanges & ProtocolChanges.StygianAbyss) != 0); + public bool HighSeas => ((_ProtocolChanges & ProtocolChanges.HighSeas) != 0); + public bool NewCharacterList => ((_ProtocolChanges & ProtocolChanges.NewCharacterList) != 0); + public bool NewCharacterCreation => ((_ProtocolChanges & ProtocolChanges.NewCharacterCreation) != 0); + public bool ExtendedStatus => ((_ProtocolChanges & ProtocolChanges.ExtendedStatus) != 0); + public bool NewMobileIncoming => ((_ProtocolChanges & ProtocolChanges.NewMobileIncoming) != 0); + public bool NewSecureTrading => ((_ProtocolChanges & ProtocolChanges.NewSecureTrading) != 0); - public bool IsUOTDClient { - get { - return ( (m_Flags & ClientFlags.UOTD) != 0 || ( m_Version != null && m_Version.Type == ClientType.UOTD ) ); - } - } + public bool IsUOTDClient => ( (m_Flags & ClientFlags.UOTD) != 0 || ( m_Version != null && m_Version.Type == ClientType.UOTD ) ); - public bool IsSAClient { - get { - return ( m_Version != null && m_Version.Type == ClientType.SA ); - } - } + public bool IsSAClient => ( m_Version != null && m_Version.Type == ClientType.SA ); - public List Trades { - get { - return m_Trades; - } - } + public List Trades => m_Trades; public void ValidateAllTrades() { for ( int i = m_Trades.Count - 1; i >= 0; --i ) { @@ -342,68 +296,36 @@ namespace Server.Network { } public bool CompressionEnabled { - get { - return m_CompressionEnabled; - } - set { - m_CompressionEnabled = value; - } + get => m_CompressionEnabled; + set => m_CompressionEnabled = value; } public int Sequence { - get { - return m_Sequence; - } - set { - m_Sequence = value; - } + get => m_Sequence; + set => m_Sequence = value; } - public List Gumps { - get { - return m_Gumps; - } - } + public List Gumps => m_Gumps; - public List HuePickers { - get { - return m_HuePickers; - } - } + public List HuePickers => m_HuePickers; - public List Menus { - get { - return m_Menus; - } - } + public List Menus => m_Menus; private static int m_GumpCap = 512, m_HuePickerCap = 512, m_MenuCap = 512; public static int GumpCap { - get { - return m_GumpCap; - } - set { - m_GumpCap = value; - } + get => m_GumpCap; + set => m_GumpCap = value; } public static int HuePickerCap { - get { - return m_HuePickerCap; - } - set { - m_HuePickerCap = value; - } + get => m_HuePickerCap; + set => m_HuePickerCap = value; } public static int MenuCap { - get { - return m_MenuCap; - } - set { - m_MenuCap = value; - } + get => m_MenuCap; + set => m_MenuCap = value; } public void WriteConsole( string text ) { @@ -513,39 +435,23 @@ namespace Server.Network { } public CityInfo[] CityInfo { - get { - return m_CityInfo; - } - set { - m_CityInfo = value; - } + get => m_CityInfo; + set => m_CityInfo = value; } public Mobile Mobile { - get { - return m_Mobile; - } - set { - m_Mobile = value; - } + get => m_Mobile; + set => m_Mobile = value; } public ServerInfo[] ServerInfo { - get { - return m_ServerInfo; - } - set { - m_ServerInfo = value; - } + get => m_ServerInfo; + set => m_ServerInfo = value; } public IAccount Account { - get { - return m_Account; - } - set { - m_Account = value; - } + get => m_Account; + set => m_Account = value; } public override string ToString() { @@ -554,11 +460,7 @@ namespace Server.Network { private static List m_Instances = new List(); - public static List Instances { - get { - return m_Instances; - } - } + public static List Instances => m_Instances; private static BufferPool m_ReceiveBufferPool = new BufferPool( "Receive", 2048, 2048 ); @@ -1064,12 +966,8 @@ namespace Server.Network { private static int m_CoalesceSleep = -1; public static int CoalesceSleep { - get { - return m_CoalesceSleep; - } - set { - m_CoalesceSleep = value; - } + get => m_CoalesceSleep; + set => m_CoalesceSleep = value; } private long m_NextCheckActivity; @@ -1112,7 +1010,7 @@ namespace Server.Network { private bool m_Disposing; - public bool IsDisposing { get { return m_Disposing; } } + public bool IsDisposing => m_Disposing; public void Dispose() { Dispose( true ); @@ -1224,32 +1122,16 @@ namespace Server.Network { } } - public bool Running { - get { - return m_Running; - } - } + public bool Running => m_Running; public bool Seeded { - get { - return m_Seeded; - } - set { - m_Seeded = value; - } + get => m_Seeded; + set => m_Seeded = value; } - public Socket Socket { - get { - return m_Socket; - } - } + public Socket Socket => m_Socket; - public ByteQueue Buffer { - get { - return m_Buffer; - } - } + public ByteQueue Buffer => m_Buffer; public ExpansionInfo ExpansionInfo { get { @@ -1265,11 +1147,7 @@ namespace Server.Network { } } - public Expansion Expansion { - get { - return ( Expansion ) this.ExpansionInfo.ID; - } - } + public Expansion Expansion => ( Expansion ) this.ExpansionInfo.ID; public bool SupportsExpansion( ExpansionInfo info, bool checkCoreExpansion ) { if ( info == null || ( checkCoreExpansion && ( int ) Core.Expansion < info.ID ) ) diff --git a/Server/Network/PacketHandler.cs b/Server/Network/PacketHandler.cs index 39da1b783..0bb1001b5 100644 --- a/Server/Network/PacketHandler.cs +++ b/Server/Network/PacketHandler.cs @@ -39,42 +39,18 @@ namespace Server.Network m_OnReceive = onReceive; } - public int PacketID - { - get - { - return m_PacketID; - } - } + public int PacketID => m_PacketID; - public int Length - { - get - { - return m_Length; - } - } + public int Length => m_Length; - public OnPacketReceive OnReceive - { - get - { - return m_OnReceive; - } - } + public OnPacketReceive OnReceive => m_OnReceive; public ThrottlePacketCallback ThrottleCallback { - get{ return m_ThrottleCallback; } - set{ m_ThrottleCallback = value; } + get => m_ThrottleCallback; + set => m_ThrottleCallback = value; } - public bool Ingame - { - get - { - return m_Ingame; - } - } + public bool Ingame => m_Ingame; } } \ No newline at end of file diff --git a/Server/Network/PacketHandlers.cs b/Server/Network/PacketHandlers.cs index 4dbf1095c..b9ba0ac80 100644 --- a/Server/Network/PacketHandlers.cs +++ b/Server/Network/PacketHandlers.cs @@ -64,10 +64,7 @@ namespace Server.Network private static EncodedPacketHandler[] m_EncodedHandlersLow; private static Dictionary m_EncodedHandlersHigh; - public static PacketHandler[] Handlers - { - get{ return m_Handlers; } - } + public static PacketHandler[] Handlers => m_Handlers; static PacketHandlers() { @@ -1488,8 +1485,8 @@ namespace Server.Network public static bool SingleClickProps { - get{ return m_SingleClickProps; } - set{ m_SingleClickProps = value; } + get => m_SingleClickProps; + set => m_SingleClickProps = value; } public static void LookReq( NetState state, PacketReader pvSrc ) @@ -1590,7 +1587,9 @@ namespace Server.Network 128 }; - public static int[] ValidAnimations{ get{ return m_ValidAnimations; } set{ m_ValidAnimations = value; } } + public static int[] ValidAnimations{ get => m_ValidAnimations; + set => m_ValidAnimations = value; + } public static void Animate( NetState state, PacketReader pvSrc ) { @@ -2479,8 +2478,8 @@ namespace Server.Network public static bool ClientVerification { - get{ return m_ClientVerification; } - set{ m_ClientVerification = value; } + get => m_ClientVerification; + set => m_ClientVerification = value; } internal struct AuthIDPersistence { diff --git a/Server/Network/PacketReader.cs b/Server/Network/PacketReader.cs index 8acc8ffab..44bac05c2 100644 --- a/Server/Network/PacketReader.cs +++ b/Server/Network/PacketReader.cs @@ -37,21 +37,9 @@ namespace Server.Network m_Index = fixedSize ? 1 : 3; } - public byte[] Buffer - { - get - { - return m_Data; - } - } + public byte[] Buffer => m_Data; - public int Size - { - get - { - return m_Size; - } - } + public int Size => m_Size; public void Trace( NetState state ) { diff --git a/Server/Network/PacketWriter.cs b/Server/Network/PacketWriter.cs index a98e28eb8..39b2540c9 100644 --- a/Server/Network/PacketWriter.cs +++ b/Server/Network/PacketWriter.cs @@ -416,39 +416,21 @@ namespace Server.Network /// /// Gets the total stream length. /// - public long Length - { - get - { - return m_Stream.Length; - } - } + public long Length => m_Stream.Length; /// /// Gets or sets the current stream position. /// public long Position { - get - { - return m_Stream.Position; - } - set - { - m_Stream.Position = value; - } + get => m_Stream.Position; + set => m_Stream.Position = value; } /// /// The internal stream used by this PacketWriter instance. /// - public MemoryStream UnderlyingStream - { - get - { - return m_Stream; - } - } + public MemoryStream UnderlyingStream => m_Stream; /// /// Offsets the current position from an origin. diff --git a/Server/Network/Packets.cs b/Server/Network/Packets.cs index 9a83c5241..80acb4ca6 100644 --- a/Server/Network/Packets.cs +++ b/Server/Network/Packets.cs @@ -480,21 +480,9 @@ namespace Server.Network private int m_Number; private int m_Charges; - public int Number - { - get - { - return m_Number; - } - } + public int Number => m_Number; - public int Charges - { - get - { - return m_Charges; - } - } + public int Charges => m_Charges; public EquipInfoAttribute( int number ) : this( number, -1 ) { @@ -514,37 +502,13 @@ namespace Server.Network private bool m_Unidentified; private EquipInfoAttribute[] m_Attributes; - public int Number - { - get - { - return m_Number; - } - } + public int Number => m_Number; - public Mobile Crafter - { - get - { - return m_Crafter; - } - } + public Mobile Crafter => m_Crafter; - public bool Unidentified - { - get - { - return m_Unidentified; - } - } + public bool Unidentified => m_Unidentified; - public EquipInfoAttribute[] Attributes - { - get - { - return m_Attributes; - } - } + public EquipInfoAttribute[] Attributes => m_Attributes; public EquipmentInfo( int number, Mobile crafter, bool unidentified, EquipInfoAttribute[] attributes ) { @@ -2391,8 +2355,12 @@ namespace Server.Network { private int m_TextEntries, m_Switches; - public int TextEntries { get { return m_TextEntries; } set { m_TextEntries = value; } } - public int Switches { get { return m_Switches; } set { m_Switches = value; } } + public int TextEntries { get => m_TextEntries; + set => m_TextEntries = value; + } + public int Switches { get => m_Switches; + set => m_Switches = value; + } private Gump m_Gump; @@ -2543,8 +2511,12 @@ namespace Server.Network private int m_LayoutLength; - public int TextEntries{ get{ return m_TextEntries; } set{ m_TextEntries = value; } } - public int Switches{ get{ return m_Switches; } set{ m_Switches = value; } } + public int TextEntries{ get => m_TextEntries; + set => m_TextEntries = value; + } + public int Switches{ get => m_Switches; + set => m_Switches = value; + } public DisplayGumpFast( Gump g ) : base( 0xB0 ) { @@ -2831,7 +2803,9 @@ namespace Server.Network { private static FeatureFlags m_AdditionalFlags; - public static FeatureFlags Value{ get{ return m_AdditionalFlags; } set{ m_AdditionalFlags = value; } } + public static FeatureFlags Value{ get => m_AdditionalFlags; + set => m_AdditionalFlags = value; + } public static SupportedFeatures Instantiate( NetState ns ) { @@ -2870,14 +2844,14 @@ namespace Server.Network public static int Maximum { - get{ return m_Maximum; } - set{ m_Maximum = value; } + get => m_Maximum; + set => m_Maximum = value; } public static bool Enabled { - get{ return m_Enabled; } - set{ m_Enabled = value; } + get => m_Enabled; + set => m_Enabled = value; } public static void Write( PacketWriter stream, int cur, int max ) @@ -3917,92 +3891,50 @@ namespace Server.Network public string City { - get - { - return m_City; - } - set - { - m_City = value; - } + get => m_City; + set => m_City = value; } public string Building { - get - { - return m_Building; - } - set - { - m_Building = value; - } + get => m_Building; + set => m_Building = value; } public int Description { - get - { - return m_Description; - } - set - { - m_Description = value; - } + get => m_Description; + set => m_Description = value; } public int X { - get - { - return m_Location.X; - } - set - { - m_Location.X = value; - } + get => m_Location.X; + set => m_Location.X = value; } public int Y { - get - { - return m_Location.Y; - } - set - { - m_Location.Y = value; - } + get => m_Location.Y; + set => m_Location.Y = value; } public int Z { - get - { - return m_Location.Z; - } - set - { - m_Location.Z = value; - } + get => m_Location.Z; + set => m_Location.Z = value; } public Point3D Location { - get - { - return m_Location; - } - set - { - m_Location = value; - } + get => m_Location; + set => m_Location = value; } public Map Map { - get{ return m_Map; } - set{ m_Map = value; } + get => m_Map; + set => m_Map = value; } } @@ -4086,10 +4018,7 @@ namespace Server.Network { private static ThirdPartyFeature m_Disabled = 0; - public static ThirdPartyFeature DisabledFeatures - { - get { return m_Disabled; } - } + public static ThirdPartyFeature DisabledFeatures => m_Disabled; public static void Disable( ThirdPartyFeature feature ) { @@ -4206,8 +4135,8 @@ namespace Server.Network public static CharacterListFlags AdditionalFlags { - get{ return m_AdditionalFlags; } - set{ m_AdditionalFlags = value; } + get => m_AdditionalFlags; + set => m_AdditionalFlags = value; } } @@ -4368,50 +4297,26 @@ namespace Server.Network public string Name { - get - { - return m_Name; - } - set - { - m_Name = value; - } + get => m_Name; + set => m_Name = value; } public int FullPercent { - get - { - return m_FullPercent; - } - set - { - m_FullPercent = value; - } + get => m_FullPercent; + set => m_FullPercent = value; } public int TimeZone { - get - { - return m_TimeZone; - } - set - { - m_TimeZone = value; - } + get => m_TimeZone; + set => m_TimeZone = value; } public IPEndPoint Address { - get - { - return m_Address; - } - set - { - m_Address = value; - } + get => m_Address; + set => m_Address = value; } public ServerInfo( string name, int fullPercent, TimeZone tz, IPEndPoint address ) @@ -4517,10 +4422,7 @@ namespace Server.Network private int m_Length; private State m_State; - public int PacketID - { - get{ return m_PacketID; } - } + public int PacketID => m_PacketID; protected Packet( int packetID ) { @@ -4553,13 +4455,7 @@ namespace Server.Network } } - public PacketWriter UnderlyingStream - { - get - { - return m_Stream; - } - } + public PacketWriter UnderlyingStream => m_Stream; private const int CompressorBufferSize = 0x10000; private static BufferPool m_CompressorBuffers = new BufferPool("Compressor", 4, CompressorBufferSize); diff --git a/Server/Network/SendQueue.cs b/Server/Network/SendQueue.cs index 2d575849a..b67d725e8 100644 --- a/Server/Network/SendQueue.cs +++ b/Server/Network/SendQueue.cs @@ -46,29 +46,13 @@ namespace Server.Network { private byte[] _buffer; private int _length; - public byte[] Buffer { - get { - return _buffer; - } - } + public byte[] Buffer => _buffer; - public int Length { - get { - return _length; - } - } + public int Length => _length; - public int Available { - get { - return ( _buffer.Length - _length ); - } - } + public int Available => ( _buffer.Length - _length ); - public bool IsFull { - get { - return ( _length == _buffer.Length ); - } - } + public bool IsFull => ( _length == _buffer.Length ); private Gram() { } @@ -95,9 +79,7 @@ namespace Server.Network { private static BufferPool m_UnusedBuffers = new BufferPool( "Coalesced", 2048, m_CoalesceBufferSize ); public static int CoalesceBufferSize { - get { - return m_CoalesceBufferSize; - } + get => m_CoalesceBufferSize; set { if ( m_CoalesceBufferSize == value ) return; @@ -129,17 +111,9 @@ namespace Server.Network { private Gram _buffered; - public bool IsFlushReady { - get { - return ( _pending.Count == 0 && _buffered != null ); - } - } + public bool IsFlushReady => ( _pending.Count == 0 && _buffered != null ); - public bool IsEmpty { - get { - return ( _pending.Count == 0 && _buffered == null ); - } - } + public bool IsEmpty => ( _pending.Count == 0 && _buffered == null ); public SendQueue() { _pending = new Queue(); diff --git a/Server/Notoriety.cs b/Server/Notoriety.cs index a8b47a214..9c7a52f97 100644 --- a/Server/Notoriety.cs +++ b/Server/Notoriety.cs @@ -36,8 +36,8 @@ namespace Server public static NotorietyHandler Handler { - get{ return m_Handler; } - set{ m_Handler = value; } + get => m_Handler; + set => m_Handler = value; } private static int[] m_Hues = new int[] @@ -54,8 +54,8 @@ namespace Server public static int[] Hues { - get{ return m_Hues; } - set{ m_Hues = value; } + get => m_Hues; + set => m_Hues = value; } public static int GetHue( int noto ) diff --git a/Server/ObjectPropertyList.cs b/Server/ObjectPropertyList.cs index 55d6a0174..6aa1cee84 100644 --- a/Server/ObjectPropertyList.cs +++ b/Server/ObjectPropertyList.cs @@ -32,15 +32,21 @@ namespace Server private int m_Strings; private string m_HeaderArgs; - public IEntity Entity{ get{ return m_Entity; } } - public int Hash{ get{ return 0x40000000 + m_Hash; } } + public IEntity Entity => m_Entity; + public int Hash => 0x40000000 + m_Hash; - public int Header{ get{ return m_Header; } set{ m_Header = value; } } - public string HeaderArgs{ get{ return m_HeaderArgs; } set{ m_HeaderArgs = value; } } + public int Header{ get => m_Header; + set => m_Header = value; + } + public string HeaderArgs{ get => m_HeaderArgs; + set => m_HeaderArgs = value; + } private static bool m_Enabled = false; - public static bool Enabled{ get{ return m_Enabled; } set{ m_Enabled = value; } } + public static bool Enabled{ get => m_Enabled; + set => m_Enabled = value; + } public ObjectPropertyList( IEntity e ) : base( 0xD6 ) { diff --git a/Server/Party.cs b/Server/Party.cs index ff88773b2..6605324fd 100644 --- a/Server/Party.cs +++ b/Server/Party.cs @@ -24,7 +24,9 @@ namespace Server { private static PartyCommands m_Handler; - public static PartyCommands Handler{ get{ return m_Handler; } set{ m_Handler = value; } } + public static PartyCommands Handler{ get => m_Handler; + set => m_Handler = value; + } public abstract void OnAdd( Mobile from ); public abstract void OnRemove( Mobile from, Mobile target ); diff --git a/Server/Persistence/BinaryMemoryWriter.cs b/Server/Persistence/BinaryMemoryWriter.cs index 3076b37ba..061f02b4e 100644 --- a/Server/Persistence/BinaryMemoryWriter.cs +++ b/Server/Persistence/BinaryMemoryWriter.cs @@ -24,9 +24,7 @@ namespace Server { public sealed class BinaryMemoryWriter : BinaryFileWriter { private MemoryStream stream; - protected override int BufferSize { - get { return 512; } - } + protected override int BufferSize => 512; public BinaryMemoryWriter() : base( new MemoryStream( 512 ), true ) { diff --git a/Server/Persistence/FileOperations.cs b/Server/Persistence/FileOperations.cs index 03259d80c..a24d1f5e2 100644 --- a/Server/Persistence/FileOperations.cs +++ b/Server/Persistence/FileOperations.cs @@ -46,43 +46,23 @@ namespace Server { private static bool unbuffered = true; public static int BufferSize { - get { - return bufferSize; - } - set { - bufferSize = value; - } + get => bufferSize; + set => bufferSize = value; } public static int Concurrency { - get { - return concurrency; - } - set { - concurrency = value; - } + get => concurrency; + set => concurrency = value; } public static bool Unbuffered { - get { - return unbuffered; - } - set { - unbuffered = value; - } + get => unbuffered; + set => unbuffered = value; } - public static bool AreSynchronous { - get { - return ( concurrency < 1 ); - } - } + public static bool AreSynchronous => ( concurrency < 1 ); - public static bool AreAsynchronous { - get { - return ( concurrency > 0 ); - } - } + public static bool AreAsynchronous => ( concurrency > 0 ); public static FileStream OpenSequentialStream( string path, FileMode mode, FileAccess access, FileShare share ) { FileOptions options = FileOptions.SequentialScan; diff --git a/Server/Persistence/FileQueue.cs b/Server/Persistence/FileQueue.cs index e2315599f..4261123ce 100644 --- a/Server/Persistence/FileQueue.cs +++ b/Server/Persistence/FileQueue.cs @@ -35,23 +35,11 @@ namespace Server { private int offset; private int size; - public byte[] Buffer { - get { - return buffer; - } - } + public byte[] Buffer => buffer; - public int Offset { - get { - return 0; - } - } + public int Offset => 0; - public int Size { - get { - return size; - } - } + public int Size => size; public Chunk( FileQueue owner, int slot, byte[] buffer, int offset, int size ) { this.owner = owner; @@ -94,11 +82,7 @@ namespace Server { private long position; - public long Position { - get { - return position; - } - } + public long Position => position; public FileQueue( int concurrentWrites, FileCommitCallback callback ) { if ( concurrentWrites < 1 ) { diff --git a/Server/Persistence/QueuedMemoryWriter.cs b/Server/Persistence/QueuedMemoryWriter.cs index 6029b18d9..7eb1f3993 100644 --- a/Server/Persistence/QueuedMemoryWriter.cs +++ b/Server/Persistence/QueuedMemoryWriter.cs @@ -35,10 +35,7 @@ namespace Server private MemoryStream _memStream; private List _orderedIndexInfo = new List(); - protected override int BufferSize - { - get { return 512; } - } + protected override int BufferSize => 512; public QueuedMemoryWriter() : base(new MemoryStream(1024 * 1024), true) diff --git a/Server/Persistence/SequentialFileWriter.cs b/Server/Persistence/SequentialFileWriter.cs index c917cc538..25dbc106c 100644 --- a/Server/Persistence/SequentialFileWriter.cs +++ b/Server/Persistence/SequentialFileWriter.cs @@ -46,12 +46,8 @@ namespace Server { } public override long Position { - get { - return fileQueue.Position; - } - set { - throw new InvalidOperationException(); - } + get => fileQueue.Position; + set => throw new InvalidOperationException(); } private void FileCallback( FileQueue.Chunk chunk ) { diff --git a/Server/Persistence/StandardSaveStrategy.cs b/Server/Persistence/StandardSaveStrategy.cs index 6d291d546..c6176e31c 100644 --- a/Server/Persistence/StandardSaveStrategy.cs +++ b/Server/Persistence/StandardSaveStrategy.cs @@ -41,9 +41,11 @@ namespace Server { _decayQueue = new Queue(); } - protected bool PermitBackgroundWrite { get { return _permitBackgroundWrite; } set { _permitBackgroundWrite = value; } } + protected bool PermitBackgroundWrite { get => _permitBackgroundWrite; + set => _permitBackgroundWrite = value; + } - protected bool UseSequentialWriters { get { return (StandardSaveStrategy.SaveType == SaveOption.Normal || !_permitBackgroundWrite); } } + protected bool UseSequentialWriters => (StandardSaveStrategy.SaveType == SaveOption.Normal || !_permitBackgroundWrite); public override void Save(SaveMetrics metrics, bool permitBackgroundWrite) { diff --git a/Server/Point3DList.cs b/Server/Point3DList.cs index e8b62d20b..a9f4e8028 100644 --- a/Server/Point3DList.cs +++ b/Server/Point3DList.cs @@ -31,31 +31,16 @@ namespace Server m_Count = 0; } - public int Count - { - get - { - return m_Count; - } - } + public int Count => m_Count; public void Clear() { m_Count = 0; } - public Point3D Last - { - get{ return m_List[m_Count - 1]; } - } + public Point3D Last => m_List[m_Count - 1]; - public Point3D this[int index] - { - get - { - return m_List[index]; - } - } + public Point3D this[int index] => m_List[index]; public void Add( int x, int y, int z ) { diff --git a/Server/Poison.cs b/Server/Poison.cs index 12129cc3a..b44688955 100644 --- a/Server/Poison.cs +++ b/Server/Poison.cs @@ -56,21 +56,15 @@ namespace Server m_Poisons.Add( reg ); } - public static Poison Lesser { get { return GetPoison( "Lesser" ); } } - public static Poison Regular { get { return GetPoison( "Regular" ); } } - public static Poison Greater { get { return GetPoison( "Greater" ); } } - public static Poison Deadly { get { return GetPoison( "Deadly" ); } } - public static Poison Lethal { get { return GetPoison( "Lethal" ); } } + public static Poison Lesser => GetPoison( "Lesser" ); + public static Poison Regular => GetPoison( "Regular" ); + public static Poison Greater => GetPoison( "Greater" ); + public static Poison Deadly => GetPoison( "Deadly" ); + public static Poison Lethal => GetPoison( "Lethal" ); - public static List Poisons - { - get - { - return m_Poisons; - } - } + public static List Poisons => m_Poisons; - public static Poison Parse( string value ) + public static Poison Parse( string value ) { Poison p = null; diff --git a/Server/Prompt.cs b/Server/Prompt.cs index cb0b8e81c..51cf17d89 100644 --- a/Server/Prompt.cs +++ b/Server/Prompt.cs @@ -25,13 +25,7 @@ namespace Server.Prompts private int m_Serial; private static int m_Serials; - public int Serial - { - get - { - return m_Serial; - } - } + public int Serial => m_Serial; protected Prompt() { diff --git a/Server/QuestArrow.cs b/Server/QuestArrow.cs index 4cc4b0848..c8f47e069 100644 --- a/Server/QuestArrow.cs +++ b/Server/QuestArrow.cs @@ -28,29 +28,11 @@ namespace Server private Mobile m_Target; private bool m_Running; - public Mobile Mobile - { - get - { - return m_Mobile; - } - } + public Mobile Mobile => m_Mobile; - public Mobile Target - { - get - { - return m_Target; - } - } + public Mobile Target => m_Target; - public bool Running - { - get - { - return m_Running; - } - } + public bool Running => m_Running; public void Update() { diff --git a/Server/Race.cs b/Server/Race.cs index 58d237f80..8a35e4fde 100644 --- a/Server/Race.cs +++ b/Server/Race.cs @@ -26,19 +26,19 @@ namespace Server [Parsable] public abstract class Race { - public static Race DefaultRace { get { return m_Races[0]; } } + public static Race DefaultRace => m_Races[0]; private static Race[] m_Races = new Race[0x100]; - public static Race[] Races { get { return m_Races; } } + public static Race[] Races => m_Races; - public static Race Human { get { return m_Races[0]; } } - public static Race Elf { get { return m_Races[1]; } } - public static Race Gargoyle { get { return m_Races[2]; } } + public static Race Human => m_Races[0]; + public static Race Elf => m_Races[1]; + public static Race Gargoyle => m_Races[2]; private static List m_AllRaces = new List(); - public static List AllRaces { get { return m_AllRaces; } } + public static List AllRaces => m_AllRaces; private int m_RaceID, m_RaceIndex; @@ -105,13 +105,13 @@ namespace Server private Expansion m_RequiredExpansion; - public Expansion RequiredExpansion { get { return m_RequiredExpansion; } } + public Expansion RequiredExpansion => m_RequiredExpansion; - public int MaleBody { get { return m_MaleBody; } } - public int MaleGhostBody { get { return m_MaleGhostBody; } } + public int MaleBody => m_MaleBody; + public int MaleGhostBody => m_MaleGhostBody; - public int FemaleBody { get { return m_FemaleBody; } } - public int FemaleGhostBody { get { return m_FemaleGhostBody; } } + public int FemaleBody => m_FemaleBody; + public int FemaleGhostBody => m_FemaleGhostBody; protected Race( int raceID, int raceIndex, string name, string pluralName, int maleBody, int femaleBody, int maleGhostBody, int femaleGhostBody, Expansion requiredExpansion ) { @@ -167,44 +167,20 @@ namespace Server return (female ? m_FemaleGhostBody : m_MaleGhostBody); } - public int RaceID - { - get - { - return m_RaceID; - } - } + public int RaceID => m_RaceID; - public int RaceIndex - { - get - { - return m_RaceIndex; - } - } + public int RaceIndex => m_RaceIndex; public string Name { - get - { - return m_Name; - } - set - { - m_Name = value; - } + get => m_Name; + set => m_Name = value; } public string PluralName { - get - { - return m_PluralName; - } - set - { - m_PluralName = value; - } + get => m_PluralName; + set => m_PluralName = value; } } } diff --git a/Server/Region.cs b/Server/Region.cs index 396f424e7..952b26bbc 100644 --- a/Server/Region.cs +++ b/Server/Region.cs @@ -102,7 +102,7 @@ namespace Server { private static List m_Regions = new List(); - public static List Regions{ get{ return m_Regions; } } + public static List Regions => m_Regions; public static Region Find( Point3D p, Map map ) { @@ -124,13 +124,19 @@ namespace Server } private static Type m_DefaultRegionType = typeof( Region ); - public static Type DefaultRegionType{ get{ return m_DefaultRegionType; } set{ m_DefaultRegionType = value; } } + public static Type DefaultRegionType{ get => m_DefaultRegionType; + set => m_DefaultRegionType = value; + } private static TimeSpan m_StaffLogoutDelay = TimeSpan.Zero; private static TimeSpan m_DefaultLogoutDelay = TimeSpan.FromMinutes( 5.0 ); - public static TimeSpan StaffLogoutDelay{ get{ return m_StaffLogoutDelay; } set{ m_StaffLogoutDelay = value; } } - public static TimeSpan DefaultLogoutDelay{ get{ return m_DefaultLogoutDelay; } set{ m_DefaultLogoutDelay = value; } } + public static TimeSpan StaffLogoutDelay{ get => m_StaffLogoutDelay; + set => m_StaffLogoutDelay = value; + } + public static TimeSpan DefaultLogoutDelay{ get => m_DefaultLogoutDelay; + set => m_DefaultLogoutDelay = value; + } public static readonly int DefaultPriority = 50; @@ -169,22 +175,26 @@ namespace Server private Point3D m_GoLocation; private MusicName m_Music; - public string Name{ get{ return m_Name; } } - public Map Map{ get{ return m_Map; } } - public Region Parent{ get{ return m_Parent; } } - public List Children{ get{ return m_Children; } } - public Rectangle3D[] Area{ get{ return m_Area; } } - public Sector[] Sectors{ get{ return m_Sectors; } } - public bool Dynamic{ get{ return m_Dynamic; } } - public int Priority{ get{ return m_Priority; } } - public int ChildLevel{ get{ return m_ChildLevel; } } - public bool Registered{ get{ return m_Registered; } } + public string Name => m_Name; + public Map Map => m_Map; + public Region Parent => m_Parent; + public List Children => m_Children; + public Rectangle3D[] Area => m_Area; + public Sector[] Sectors => m_Sectors; + public bool Dynamic => m_Dynamic; + public int Priority => m_Priority; + public int ChildLevel => m_ChildLevel; + public bool Registered => m_Registered; - public Point3D GoLocation{ get{ return m_GoLocation; } set { m_GoLocation = value; } } - public MusicName Music{ get{ return m_Music; } set{ m_Music = value; } } + public Point3D GoLocation{ get => m_GoLocation; + set => m_GoLocation = value; + } + public MusicName Music{ get => m_Music; + set => m_Music = value; + } - public bool IsDefault{ get{ return m_Map.DefaultRegion == this; } } - public virtual MusicName DefaultMusic{ get{ return m_Parent != null ? m_Parent.Music : MusicName.Invalid; } } + public bool IsDefault => m_Map.DefaultRegion == this; + public virtual MusicName DefaultMusic => m_Parent != null ? m_Parent.Music : MusicName.Invalid; public Region( string name, Map map, int priority, params Rectangle2D[] area ) : this( name, map, priority, ConvertTo3D( area ) ) { diff --git a/Server/ScriptCompiler.cs b/Server/ScriptCompiler.cs index 57c7ed905..104f85b95 100644 --- a/Server/ScriptCompiler.cs +++ b/Server/ScriptCompiler.cs @@ -35,14 +35,8 @@ namespace Server public static Assembly[] Assemblies { - get - { - return m_Assemblies; - } - set - { - m_Assemblies = value; - } + get => m_Assemblies; + set => m_Assemblies = value; } private static List m_AdditionalReferences = new List(); @@ -728,9 +722,9 @@ namespace Server private Type[] m_Types; private TypeTable m_Names, m_FullNames; - public Type[] Types { get { return m_Types; } } - public TypeTable Names { get { return m_Names; } } - public TypeTable FullNames { get { return m_FullNames; } } + public Type[] Types => m_Types; + public TypeTable Names => m_Names; + public TypeTable FullNames => m_FullNames; public Type GetTypeByName( string name, bool ignoreCase ) { diff --git a/Server/Sector.cs b/Server/Sector.cs index 1e23a93a5..2d81f9ca2 100644 --- a/Server/Sector.cs +++ b/Server/Sector.cs @@ -28,8 +28,8 @@ namespace Server { private Region m_Region; private Rectangle3D m_Rect; - public Region Region { get { return m_Region; } } - public Rectangle3D Rect { get { return m_Rect; } } + public Region Region => m_Region; + public Rectangle3D Rect => m_Rect; public RegionRect( Region region, Rectangle3D rect ) { m_Region = region; @@ -289,28 +289,12 @@ namespace Server { } } - public bool Active { - get { - return ( m_Active && m_Owner != Map.Internal ); - } - } + public bool Active => ( m_Active && m_Owner != Map.Internal ); - public Map Owner { - get { - return m_Owner; - } - } + public Map Owner => m_Owner; - public int X { - get { - return m_X; - } - } + public int X => m_X; - public int Y { - get { - return m_Y; - } - } + public int Y => m_Y; } } diff --git a/Server/SecureTrade.cs b/Server/SecureTrade.cs index f4f66e4b4..a70d674f2 100644 --- a/Server/SecureTrade.cs +++ b/Server/SecureTrade.cs @@ -112,10 +112,10 @@ namespace Server } } - public SecureTradeInfo From { get { return m_From; } } - public SecureTradeInfo To { get { return m_To; } } + public SecureTradeInfo From => m_From; + public SecureTradeInfo To => m_To; - public bool Valid { get { return m_Valid; } } + public bool Valid => m_Valid; public void Cancel() { @@ -472,8 +472,12 @@ namespace Server public SecureTradeContainer Container { get; private set; } public VirtualCheck VirtualCheck { get; private set; } - public int Gold { get { return VirtualCheck.Gold; } set { VirtualCheck.Gold = value; } } - public int Plat { get { return VirtualCheck.Plat; } set { VirtualCheck.Plat = value; } } + public int Gold { get => VirtualCheck.Gold; + set => VirtualCheck.Gold = value; + } + public int Plat { get => VirtualCheck.Plat; + set => VirtualCheck.Plat = value; + } public bool Accepted { get; set; } diff --git a/Server/Serial.cs b/Server/Serial.cs index 10e180e94..fc5f0b573 100644 --- a/Server/Serial.cs +++ b/Server/Serial.cs @@ -29,8 +29,8 @@ namespace Server private static Serial m_LastMobile = Zero; private static Serial m_LastItem = 0x40000000; - public static Serial LastMobile { get { return m_LastMobile; } } - public static Serial LastItem { get { return m_LastItem; } } + public static Serial LastMobile => m_LastMobile; + public static Serial LastItem => m_LastItem; public static readonly Serial MinusOne = new Serial( -1 ); public static readonly Serial Zero = new Serial( 0 ); @@ -60,37 +60,13 @@ namespace Server m_Serial = serial; } - public int Value - { - get - { - return m_Serial; - } - } + public int Value => m_Serial; - public bool IsMobile - { - get - { - return ( m_Serial > 0 && m_Serial < 0x40000000 ); - } - } + public bool IsMobile => ( m_Serial > 0 && m_Serial < 0x40000000 ); - public bool IsItem - { - get - { - return ( m_Serial >= 0x40000000 && m_Serial <= 0x7FFFFFFF ); - } - } + public bool IsItem => ( m_Serial >= 0x40000000 && m_Serial <= 0x7FFFFFFF ); - public bool IsValid - { - get - { - return ( m_Serial > 0 ); - } - } + public bool IsValid => ( m_Serial > 0 ); public override int GetHashCode() { diff --git a/Server/Serialization.cs b/Server/Serialization.cs index 2bbd0e80d..f0edacb8c 100644 --- a/Server/Serialization.cs +++ b/Server/Serialization.cs @@ -196,13 +196,7 @@ namespace Server private bool PrefixStrings; private Stream m_File; - protected virtual int BufferSize - { - get - { - return 64 * 1024; - } - } + protected virtual int BufferSize => 64 * 1024; private byte[] m_Buffer; @@ -239,13 +233,7 @@ namespace Server private long m_Position; - public override long Position - { - get - { - return m_Position + m_Index; - } - } + public override long Position => m_Position + m_Index; public Stream UnderlyingStream { @@ -970,13 +958,7 @@ namespace Server m_File.Close(); } - public long Position - { - get - { - return m_File.BaseStream.Position; - } - } + public long Position => m_File.BaseStream.Position; public long Seek( long offset, SeekOrigin origin ) { @@ -1402,7 +1384,7 @@ namespace Server public sealed class AsyncWriter : GenericWriter { private static int m_ThreadCount = 0; - public static int ThreadCount { get { return m_ThreadCount; } } + public static int ThreadCount => m_ThreadCount; private int BufferSize; @@ -1500,10 +1482,7 @@ namespace Server public MemoryStream MemStream { - get - { - return m_Mem; - } + get => m_Mem; set { if ( m_Mem.Length > 0 ) @@ -1523,13 +1502,7 @@ namespace Server m_Closed = true; } - public override long Position - { - get - { - return m_CurPos; - } - } + public override long Position => m_CurPos; public override void Write( IPAddress value ) { diff --git a/Server/Skills.cs b/Server/Skills.cs index 2a2721012..b65715cb1 100644 --- a/Server/Skills.cs +++ b/Server/Skills.cs @@ -213,62 +213,23 @@ namespace Server } } - public Skills Owner - { - get - { - return m_Owner; - } - } + public Skills Owner => m_Owner; - public SkillName SkillName - { - get - { - return (SkillName)m_Info.SkillID; - } - } + public SkillName SkillName => (SkillName)m_Info.SkillID; - public int SkillID - { - get - { - return m_Info.SkillID; - } - } + public int SkillID => m_Info.SkillID; [CommandProperty( AccessLevel.Counselor )] - public string Name - { - get - { - return m_Info.Name; - } - } + public string Name => m_Info.Name; - public SkillInfo Info - { - get - { - return m_Info; - } - } + public SkillInfo Info => m_Info; [CommandProperty( AccessLevel.Counselor )] - public SkillLock Lock - { - get - { - return m_Lock; - } - } + public SkillLock Lock => m_Lock; public int BaseFixedPoint { - get - { - return m_Base; - } + get => m_Base; set { if ( value < 0 ) @@ -299,22 +260,13 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public double Base { - get - { - return ((double)m_Base / 10.0); - } - set - { - BaseFixedPoint = (int)(value * 10.0); - } + get => ((double)m_Base / 10.0); + set => BaseFixedPoint = (int)(value * 10.0); } public int CapFixedPoint { - get - { - return m_Cap; - } + get => m_Cap; set { if ( value < 0 ) @@ -336,25 +288,18 @@ namespace Server [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public double Cap { - get - { - return ((double)m_Cap / 10.0); - } - set - { - CapFixedPoint = (int)(value * 10.0); - } + get => ((double)m_Cap / 10.0); + set => CapFixedPoint = (int)(value * 10.0); } private static bool m_UseStatMods; - public static bool UseStatMods{ get{ return m_UseStatMods; } set{ m_UseStatMods = value; } } - - public int Fixed - { - get{ return (int)(Value * 10); } + public static bool UseStatMods{ get => m_UseStatMods; + set => m_UseStatMods = value; } + public int Fixed => (int)(Value * 10); + [CommandProperty( AccessLevel.Counselor )] public double Value { @@ -476,142 +421,70 @@ namespace Server public SkillUseCallback Callback { - get - { - return m_Callback; - } - set - { - m_Callback = value; - } + get => m_Callback; + set => m_Callback = value; } - public int SkillID - { - get - { - return m_SkillID; - } - } + public int SkillID => m_SkillID; public string Name { - get - { - return m_Name; - } - set - { - m_Name = value; - } + get => m_Name; + set => m_Name = value; } public string Title { - get - { - return m_Title; - } - set - { - m_Title = value; - } + get => m_Title; + set => m_Title = value; } public double StrScale { - get - { - return m_StrScale; - } - set - { - m_StrScale = value; - } + get => m_StrScale; + set => m_StrScale = value; } public double DexScale { - get - { - return m_DexScale; - } - set - { - m_DexScale = value; - } + get => m_DexScale; + set => m_DexScale = value; } public double IntScale { - get - { - return m_IntScale; - } - set - { - m_IntScale = value; - } + get => m_IntScale; + set => m_IntScale = value; } public double StatTotal { - get - { - return m_StatTotal; - } - set - { - m_StatTotal = value; - } + get => m_StatTotal; + set => m_StatTotal = value; } public double StrGain { - get - { - return m_StrGain; - } - set - { - m_StrGain = value; - } + get => m_StrGain; + set => m_StrGain = value; } public double DexGain { - get - { - return m_DexGain; - } - set - { - m_DexGain = value; - } + get => m_DexGain; + set => m_DexGain = value; } public double IntGain { - get - { - return m_IntGain; - } - set - { - m_IntGain = value; - } + get => m_IntGain; + set => m_IntGain = value; } public double GainFactor { - get - { - return m_GainFactor; - } - set - { - m_GainFactor = value; - } + get => m_GainFactor; + set => m_GainFactor = value; } private static SkillInfo[] m_Table = new SkillInfo[58] @@ -678,14 +551,8 @@ namespace Server public static SkillInfo[] Table { - get - { - return m_Table; - } - set - { - m_Table = value; - } + get => m_Table; + set => m_Table = value; } } @@ -699,208 +566,257 @@ namespace Server #region Skill Getters & Setters [CommandProperty( AccessLevel.Counselor )] - public Skill Alchemy{ get{ return this[SkillName.Alchemy]; } set{} } + public Skill Alchemy{ get => this[SkillName.Alchemy]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Anatomy{ get{ return this[SkillName.Anatomy]; } set{} } + public Skill Anatomy{ get => this[SkillName.Anatomy]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill AnimalLore{ get{ return this[SkillName.AnimalLore]; } set{} } + public Skill AnimalLore{ get => this[SkillName.AnimalLore]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill ItemID{ get{ return this[SkillName.ItemID]; } set{} } + public Skill ItemID{ get => this[SkillName.ItemID]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill ArmsLore{ get{ return this[SkillName.ArmsLore]; } set{} } + public Skill ArmsLore{ get => this[SkillName.ArmsLore]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Parry{ get{ return this[SkillName.Parry]; } set{} } + public Skill Parry{ get => this[SkillName.Parry]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Begging{ get{ return this[SkillName.Begging]; } set{} } + public Skill Begging{ get => this[SkillName.Begging]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Blacksmith{ get{ return this[SkillName.Blacksmith]; } set{} } + public Skill Blacksmith{ get => this[SkillName.Blacksmith]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Fletching{ get{ return this[SkillName.Fletching]; } set{} } + public Skill Fletching{ get => this[SkillName.Fletching]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Peacemaking{ get{ return this[SkillName.Peacemaking]; } set{} } + public Skill Peacemaking{ get => this[SkillName.Peacemaking]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Camping{ get{ return this[SkillName.Camping]; } set{} } + public Skill Camping{ get => this[SkillName.Camping]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Carpentry{ get{ return this[SkillName.Carpentry]; } set{} } + public Skill Carpentry{ get => this[SkillName.Carpentry]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Cartography{ get{ return this[SkillName.Cartography]; } set{} } + public Skill Cartography{ get => this[SkillName.Cartography]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Cooking{ get{ return this[SkillName.Cooking]; } set{} } + public Skill Cooking{ get => this[SkillName.Cooking]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill DetectHidden{ get{ return this[SkillName.DetectHidden]; } set{} } + public Skill DetectHidden{ get => this[SkillName.DetectHidden]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Discordance{ get{ return this[SkillName.Discordance]; } set{} } + public Skill Discordance{ get => this[SkillName.Discordance]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill EvalInt{ get{ return this[SkillName.EvalInt]; } set{} } + public Skill EvalInt{ get => this[SkillName.EvalInt]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Healing{ get{ return this[SkillName.Healing]; } set{} } + public Skill Healing{ get => this[SkillName.Healing]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Fishing{ get{ return this[SkillName.Fishing]; } set{} } + public Skill Fishing{ get => this[SkillName.Fishing]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Forensics{ get{ return this[SkillName.Forensics]; } set{} } + public Skill Forensics{ get => this[SkillName.Forensics]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Herding{ get{ return this[SkillName.Herding]; } set{} } + public Skill Herding{ get => this[SkillName.Herding]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Hiding{ get{ return this[SkillName.Hiding]; } set{} } + public Skill Hiding{ get => this[SkillName.Hiding]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Provocation{ get{ return this[SkillName.Provocation]; } set{} } + public Skill Provocation{ get => this[SkillName.Provocation]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Inscribe{ get{ return this[SkillName.Inscribe]; } set{} } + public Skill Inscribe{ get => this[SkillName.Inscribe]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Lockpicking{ get{ return this[SkillName.Lockpicking]; } set{} } + public Skill Lockpicking{ get => this[SkillName.Lockpicking]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Magery{ get{ return this[SkillName.Magery]; } set{} } + public Skill Magery{ get => this[SkillName.Magery]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill MagicResist{ get{ return this[SkillName.MagicResist]; } set{} } + public Skill MagicResist{ get => this[SkillName.MagicResist]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Tactics{ get{ return this[SkillName.Tactics]; } set{} } + public Skill Tactics{ get => this[SkillName.Tactics]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Snooping{ get{ return this[SkillName.Snooping]; } set{} } + public Skill Snooping{ get => this[SkillName.Snooping]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Musicianship{ get{ return this[SkillName.Musicianship]; } set{} } + public Skill Musicianship{ get => this[SkillName.Musicianship]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Poisoning{ get{ return this[SkillName.Poisoning]; } set{} } + public Skill Poisoning{ get => this[SkillName.Poisoning]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Archery{ get{ return this[SkillName.Archery]; } set{} } + public Skill Archery{ get => this[SkillName.Archery]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill SpiritSpeak{ get{ return this[SkillName.SpiritSpeak]; } set{} } + public Skill SpiritSpeak{ get => this[SkillName.SpiritSpeak]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Stealing{ get{ return this[SkillName.Stealing]; } set{} } + public Skill Stealing{ get => this[SkillName.Stealing]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Tailoring{ get{ return this[SkillName.Tailoring]; } set{} } + public Skill Tailoring{ get => this[SkillName.Tailoring]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill AnimalTaming{ get{ return this[SkillName.AnimalTaming]; } set{} } + public Skill AnimalTaming{ get => this[SkillName.AnimalTaming]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill TasteID{ get{ return this[SkillName.TasteID]; } set{} } + public Skill TasteID{ get => this[SkillName.TasteID]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Tinkering{ get{ return this[SkillName.Tinkering]; } set{} } + public Skill Tinkering{ get => this[SkillName.Tinkering]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Tracking{ get{ return this[SkillName.Tracking]; } set{} } + public Skill Tracking{ get => this[SkillName.Tracking]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Veterinary{ get{ return this[SkillName.Veterinary]; } set{} } + public Skill Veterinary{ get => this[SkillName.Veterinary]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Swords{ get{ return this[SkillName.Swords]; } set{} } + public Skill Swords{ get => this[SkillName.Swords]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Macing{ get{ return this[SkillName.Macing]; } set{} } + public Skill Macing{ get => this[SkillName.Macing]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Fencing{ get{ return this[SkillName.Fencing]; } set{} } + public Skill Fencing{ get => this[SkillName.Fencing]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Wrestling{ get{ return this[SkillName.Wrestling]; } set{} } + public Skill Wrestling{ get => this[SkillName.Wrestling]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Lumberjacking{ get{ return this[SkillName.Lumberjacking]; } set{} } + public Skill Lumberjacking{ get => this[SkillName.Lumberjacking]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Mining{ get{ return this[SkillName.Mining]; } set{} } + public Skill Mining{ get => this[SkillName.Mining]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Meditation{ get{ return this[SkillName.Meditation]; } set{} } + public Skill Meditation{ get => this[SkillName.Meditation]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Stealth{ get{ return this[SkillName.Stealth]; } set{} } + public Skill Stealth{ get => this[SkillName.Stealth]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill RemoveTrap{ get{ return this[SkillName.RemoveTrap]; } set{} } + public Skill RemoveTrap{ get => this[SkillName.RemoveTrap]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Necromancy{ get{ return this[SkillName.Necromancy]; } set{} } + public Skill Necromancy{ get => this[SkillName.Necromancy]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Focus{ get{ return this[SkillName.Focus]; } set{} } + public Skill Focus{ get => this[SkillName.Focus]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Chivalry{ get{ return this[SkillName.Chivalry]; } set{} } + public Skill Chivalry{ get => this[SkillName.Chivalry]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Bushido{ get{ return this[SkillName.Bushido]; } set{} } + public Skill Bushido{ get => this[SkillName.Bushido]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Ninjitsu{ get{ return this[SkillName.Ninjitsu]; } set{} } + public Skill Ninjitsu{ get => this[SkillName.Ninjitsu]; + set{} } [CommandProperty( AccessLevel.Counselor )] - public Skill Spellweaving { get { return this[SkillName.Spellweaving]; } set { } } + public Skill Spellweaving { get => this[SkillName.Spellweaving]; + set { } } [CommandProperty( AccessLevel.Counselor )] - public Skill Mysticism { get { return this[SkillName.Mysticism]; } set { } } + public Skill Mysticism { get => this[SkillName.Mysticism]; + set { } } [CommandProperty( AccessLevel.Counselor )] - public Skill Imbuing { get { return this[SkillName.Imbuing]; } set { } } + public Skill Imbuing { get => this[SkillName.Imbuing]; + set { } } [CommandProperty( AccessLevel.Counselor )] - public Skill Throwing { get { return this[SkillName.Throwing]; } set { } } + public Skill Throwing { get => this[SkillName.Throwing]; + set { } } #endregion [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] public int Cap { - get{ return m_Cap; } - set{ m_Cap = value; } + get => m_Cap; + set => m_Cap = value; } public int Total { - get{ return m_Total; } - set{ m_Total = value; } + get => m_Total; + set => m_Total = value; } - public Mobile Owner - { - get{ return m_Owner; } - } + public Mobile Owner => m_Owner; - public int Length - { - get{ return m_Skills.Length; } - } + public int Length => m_Skills.Length; - public Skill this[SkillName name] - { - get{ return this[(int)name]; } - } + public Skill this[SkillName name] => this[(int)name]; public Skill this[int skillID] { diff --git a/Server/Targeting/LandTarget.cs b/Server/Targeting/LandTarget.cs index 7c517c2d4..463795283 100644 --- a/Server/Targeting/LandTarget.cs +++ b/Server/Targeting/LandTarget.cs @@ -37,66 +37,24 @@ namespace Server.Targeting } [CommandProperty( AccessLevel.Counselor )] - public string Name - { - get - { - return TileData.LandTable[m_TileID].Name; - } - } + public string Name => TileData.LandTable[m_TileID].Name; [CommandProperty( AccessLevel.Counselor )] - public TileFlag Flags - { - get - { - return TileData.LandTable[m_TileID].Flags; - } - } + public TileFlag Flags => TileData.LandTable[m_TileID].Flags; [CommandProperty( AccessLevel.Counselor )] - public int TileID - { - get - { - return m_TileID; - } - } + public int TileID => m_TileID; [CommandProperty( AccessLevel.Counselor )] - public Point3D Location - { - get - { - return m_Location; - } - } + public Point3D Location => m_Location; [CommandProperty( AccessLevel.Counselor )] - public int X - { - get - { - return m_Location.X; - } - } + public int X => m_Location.X; [CommandProperty( AccessLevel.Counselor )] - public int Y - { - get - { - return m_Location.Y; - } - } + public int Y => m_Location.Y; [CommandProperty( AccessLevel.Counselor )] - public int Z - { - get - { - return m_Location.Z; - } - } + public int Z => m_Location.Z; } } \ No newline at end of file diff --git a/Server/Targeting/MultiTarget.cs b/Server/Targeting/MultiTarget.cs index 8dc339c96..b1fe2ef34 100644 --- a/Server/Targeting/MultiTarget.cs +++ b/Server/Targeting/MultiTarget.cs @@ -29,26 +29,14 @@ namespace Server.Targeting public int MultiID { - get - { - return m_MultiID; - } - set - { - m_MultiID = value; - } + get => m_MultiID; + set => m_MultiID = value; } public Point3D Offset { - get - { - return m_Offset; - } - set - { - m_Offset = value; - } + get => m_Offset; + set => m_Offset = value; } protected MultiTarget( int multiID, Point3D offset ) diff --git a/Server/Targeting/StaticTarget.cs b/Server/Targeting/StaticTarget.cs index cc468c6f8..3e414873f 100644 --- a/Server/Targeting/StaticTarget.cs +++ b/Server/Targeting/StaticTarget.cs @@ -33,66 +33,24 @@ namespace Server.Targeting } [CommandProperty( AccessLevel.Counselor )] - public Point3D Location - { - get - { - return m_Location; - } - } + public Point3D Location => m_Location; [CommandProperty( AccessLevel.Counselor )] - public string Name - { - get - { - return TileData.ItemTable[m_ItemID].Name; - } - } + public string Name => TileData.ItemTable[m_ItemID].Name; [CommandProperty( AccessLevel.Counselor )] - public TileFlag Flags - { - get - { - return TileData.ItemTable[m_ItemID].Flags; - } - } + public TileFlag Flags => TileData.ItemTable[m_ItemID].Flags; [CommandProperty( AccessLevel.Counselor )] - public int X - { - get - { - return m_Location.X; - } - } + public int X => m_Location.X; [CommandProperty( AccessLevel.Counselor )] - public int Y - { - get - { - return m_Location.Y; - } - } + public int Y => m_Location.Y; [CommandProperty( AccessLevel.Counselor )] - public int Z - { - get - { - return m_Location.Z; - } - } + public int Z => m_Location.Z; [CommandProperty( AccessLevel.Counselor )] - public int ItemID - { - get - { - return m_ItemID; - } - } + public int ItemID => m_ItemID; } } \ No newline at end of file diff --git a/Server/Targeting/Target.cs b/Server/Targeting/Target.cs index 280bb4d71..74b04ca47 100644 --- a/Server/Targeting/Target.cs +++ b/Server/Targeting/Target.cs @@ -31,8 +31,8 @@ namespace Server.Targeting public static bool TargetIDValidation { - get { return m_TargetIDValidation; } - set { m_TargetIDValidation = value; } + get => m_TargetIDValidation; + set => m_TargetIDValidation = value; } private int m_TargetID; @@ -44,7 +44,7 @@ namespace Server.Targeting private TargetFlags m_Flags; private DateTime m_TimeoutTime; - public DateTime TimeoutTime{ get{ return m_TimeoutTime; } } + public DateTime TimeoutTime => m_TimeoutTime; protected Target( int range, bool allowGround, TargetFlags flags ) { @@ -134,47 +134,23 @@ namespace Server.Targeting public bool CheckLOS { - get - { - return m_CheckLOS; - } - set - { - m_CheckLOS = value; - } + get => m_CheckLOS; + set => m_CheckLOS = value; } public bool DisallowMultis { - get - { - return m_DisallowMultis; - } - set - { - m_DisallowMultis = value; - } + get => m_DisallowMultis; + set => m_DisallowMultis = value; } public bool AllowNonlocal { - get - { - return m_AllowNonlocal; - } - set - { - m_AllowNonlocal = value; - } + get => m_AllowNonlocal; + set => m_AllowNonlocal = value; } - public int TargetID - { - get - { - return m_TargetID; - } - } + public int TargetID => m_TargetID; public virtual Packet GetPacketFor( NetState ns ) { @@ -350,38 +326,20 @@ namespace Server.Targeting public int Range { - get - { - return m_Range; - } - set - { - m_Range = value; - } + get => m_Range; + set => m_Range = value; } public bool AllowGround { - get - { - return m_AllowGround; - } - set - { - m_AllowGround = value; - } + get => m_AllowGround; + set => m_AllowGround = value; } public TargetFlags Flags { - get - { - return m_Flags; - } - set - { - m_Flags = value; - } + get => m_Flags; + set => m_Flags = value; } } } diff --git a/Server/TileData.cs b/Server/TileData.cs index 168a0012a..e249012c6 100644 --- a/Server/TileData.cs +++ b/Server/TileData.cs @@ -37,14 +37,14 @@ namespace Server public string Name { - get{ return m_Name; } - set{ m_Name = value; } + get => m_Name; + set => m_Name = value; } public TileFlag Flags { - get{ return m_Flags; } - set{ m_Flags = value; } + get => m_Flags; + set => m_Flags = value; } } @@ -71,19 +71,19 @@ namespace Server public string Name { - get{ return m_Name; } - set{ m_Name = value; } + get => m_Name; + set => m_Name = value; } public TileFlag Flags { - get{ return m_Flags; } - set{ m_Flags = value; } + get => m_Flags; + set => m_Flags = value; } public bool Bridge { - get{ return (m_Flags & TileFlag.Bridge) != 0; } + get => (m_Flags & TileFlag.Bridge) != 0; set { if ( value ) @@ -95,7 +95,7 @@ namespace Server public bool Impassable { - get{ return (m_Flags & TileFlag.Impassable) != 0; } + get => (m_Flags & TileFlag.Impassable) != 0; set { if ( value ) @@ -107,7 +107,7 @@ namespace Server public bool Surface { - get{ return (m_Flags & TileFlag.Surface) != 0; } + get => (m_Flags & TileFlag.Surface) != 0; set { if ( value ) @@ -119,32 +119,32 @@ namespace Server public int Weight { - get{ return m_Weight; } - set{ m_Weight = (byte)value; } + get => m_Weight; + set => m_Weight = (byte)value; } public int Quality { - get{ return m_Quality; } - set{ m_Quality = (byte)value; } + get => m_Quality; + set => m_Quality = (byte)value; } public int Quantity { - get{ return m_Quantity; } - set{ m_Quantity = (byte)value; } + get => m_Quantity; + set => m_Quantity = (byte)value; } public int Value { - get{ return m_Value; } - set{ m_Value = (byte)value; } + get => m_Value; + set => m_Value = (byte)value; } public int Height { - get{ return m_Height; } - set{ m_Height = (byte)value; } + get => m_Height; + set => m_Height = (byte)value; } public int CalcHeight @@ -202,21 +202,9 @@ namespace Server private static LandData[] m_LandData; private static ItemData[] m_ItemData; - public static LandData[] LandTable - { - get - { - return m_LandData; - } - } + public static LandData[] LandTable => m_LandData; - public static ItemData[] ItemTable - { - get - { - return m_ItemData; - } - } + public static ItemData[] ItemTable => m_ItemData; private static int m_MaxLandValue; private static int m_MaxItemValue; diff --git a/Server/TileList.cs b/Server/TileList.cs index de51d37f2..200e96fb5 100644 --- a/Server/TileList.cs +++ b/Server/TileList.cs @@ -31,13 +31,7 @@ namespace Server m_Count = 0; } - public int Count - { - get - { - return m_Count; - } - } + public int Count => m_Count; public void AddRange( StaticTile[] tiles ) { diff --git a/Server/TileMatrix.cs b/Server/TileMatrix.cs index 8f1c5718d..6917e9e0c 100644 --- a/Server/TileMatrix.cs +++ b/Server/TileMatrix.cs @@ -60,29 +60,11 @@ namespace Server } }*/ - public TileMatrixPatch Patch - { - get - { - return m_Patch; - } - } + public TileMatrixPatch Patch => m_Patch; - public int BlockWidth - { - get - { - return m_BlockWidth; - } - } + public int BlockWidth => m_BlockWidth; - public int BlockHeight - { - get - { - return m_BlockHeight; - } - } + public int BlockHeight => m_BlockHeight; /*public int Width { @@ -102,8 +84,8 @@ namespace Server public FileStream MapStream { - get{ return m_Map; } - set{ m_Map = value; } + get => m_Map; + set => m_Map = value; } /*public bool MapUOPPacked @@ -113,26 +95,23 @@ namespace Server public FileStream IndexStream { - get{ return m_Index; } - set{ m_Index = value; } + get => m_Index; + set => m_Index = value; } public FileStream DataStream { - get{ return m_Statics; } - set{ m_Statics = value; } + get => m_Statics; + set => m_Statics = value; } public BinaryReader IndexReader { - get{ return m_IndexReader; } - set{ m_IndexReader = value; } + get => m_IndexReader; + set => m_IndexReader = value; } - public bool Exists - { - get{ return ( m_Map != null && m_Index != null && m_Statics != null ); } - } + public bool Exists => ( m_Map != null && m_Index != null && m_Statics != null ); private static List m_Instances = new List(); private List m_FileShare = new List(); @@ -219,13 +198,7 @@ namespace Server m_Patch = new TileMatrixPatch( this, mapID ); } - public StaticTile[][][] EmptyStaticBlock - { - get - { - return m_EmptyStaticBlock; - } - } + public StaticTile[][][] EmptyStaticBlock => m_EmptyStaticBlock; [MethodImpl(MethodImplOptions.Synchronized)] public void SetStaticBlock( int x, int y, StaticTile[][][] value ) @@ -560,27 +533,17 @@ namespace Server internal short m_ID; internal sbyte m_Z; - public int ID - { - get { return m_ID; } - } + public int ID => m_ID; public int Z { - get { return m_Z; } - set { m_Z = (sbyte)value; } + get => m_Z; + set => m_Z = (sbyte)value; } - public int Height - { - get { return 0; } + public int Height => 0; - } - - public bool Ignored - { - get { return ( m_ID == 2 || m_ID == 0x1DB || ( m_ID >= 0x1AE && m_ID <= 0x1B5 ) ); } - } + public bool Ignored => ( m_ID == 2 || m_ID == 0x1DB || ( m_ID >= 0x1AE && m_ID <= 0x1B5 ) ); public LandTile( short id, sbyte z ) { @@ -604,39 +567,33 @@ namespace Server internal sbyte m_Z; internal short m_Hue; - public int ID - { - get { return m_ID; } - } + public int ID => m_ID; public int X { - get { return m_X; } - set { m_X = (byte)value; } + get => m_X; + set => m_X = (byte)value; } public int Y { - get { return m_Y; } - set { m_Y = (byte)value; } + get => m_Y; + set => m_Y = (byte)value; } public int Z { - get { return m_Z; } - set { m_Z = (sbyte)value; } + get => m_Z; + set => m_Z = (sbyte)value; } public int Hue { - get { return m_Hue; } - set { m_Hue = (short)value; } + get => m_Hue; + set => m_Hue = (short)value; } - public int Height - { - get { return TileData.ItemTable[m_ID & TileData.MaxItemValue].Height; } - } + public int Height => TileData.ItemTable[m_ID & TileData.MaxItemValue].Height; public StaticTile( ushort id, sbyte z ) { @@ -713,10 +670,7 @@ namespace Server private int m_Version; private UOPEntry[] m_Entries; - public int Version - { - get { return m_Version; } - } + public int Version => m_Version; public UOPIndex( FileStream stream ) { diff --git a/Server/TileMatrixPatch.cs b/Server/TileMatrixPatch.cs index 207f842ca..af048f92d 100644 --- a/Server/TileMatrixPatch.cs +++ b/Server/TileMatrixPatch.cs @@ -31,14 +31,8 @@ namespace Server public static bool Enabled { - get - { - return m_Enabled; - } - set - { - m_Enabled = value; - } + get => m_Enabled; + set => m_Enabled = value; } public int LandBlocks diff --git a/Server/Timer.cs b/Server/Timer.cs index 9b8267018..a7f0bbc61 100644 --- a/Server/Timer.cs +++ b/Server/Timer.cs @@ -68,10 +68,7 @@ namespace Server public TimerPriority Priority { - get - { - return m_Priority; - } + get => m_Priority; set { if ( !m_PrioritySet ) @@ -87,27 +84,23 @@ namespace Server } } - public DateTime Next - { - // Obnoxious - get { return DateTime.UtcNow + TimeSpan.FromMilliseconds(m_Next-Core.TickCount); } - } + public DateTime Next => DateTime.UtcNow + TimeSpan.FromMilliseconds(m_Next-Core.TickCount); public TimeSpan Delay { - get { return TimeSpan.FromMilliseconds(m_Delay); } - set { m_Delay = (long)value.TotalMilliseconds; } + get => TimeSpan.FromMilliseconds(m_Delay); + set => m_Delay = (long)value.TotalMilliseconds; } public TimeSpan Interval { - get { return TimeSpan.FromMilliseconds(m_Interval); } - set { m_Interval = (long)value.TotalMilliseconds; } + get => TimeSpan.FromMilliseconds(m_Interval); + set => m_Interval = (long)value.TotalMilliseconds; } public bool Running { - get { return m_Running; } + get => m_Running; set { if ( value ) { Start(); @@ -365,7 +358,9 @@ namespace Server private static Queue m_Queue = new Queue(); private static int m_BreakCount = 20000; - public static int BreakCount{ get{ return m_BreakCount; } set{ m_BreakCount = value; } } + public static int BreakCount{ get => m_BreakCount; + set => m_BreakCount = value; + } private static int m_QueueCountAtSlice; @@ -407,10 +402,7 @@ namespace Server { } - public virtual bool DefRegCreation - { - get{ return true; } - } + public virtual bool DefRegCreation => true; public void RegCreation() { @@ -565,7 +557,7 @@ namespace Server { private TimerCallback m_Callback; - public TimerCallback Callback{ get{ return m_Callback; } } + public TimerCallback Callback => m_Callback; public override bool DefRegCreation => false; @@ -592,7 +584,7 @@ namespace Server private TimerStateCallback m_Callback; private object m_State; - public TimerStateCallback Callback{ get{ return m_Callback; } } + public TimerStateCallback Callback => m_Callback; public override bool DefRegCreation => false; @@ -621,7 +613,7 @@ namespace Server private TimerStateCallback m_Callback; private T m_State; - public TimerStateCallback Callback { get { return m_Callback; } } + public TimerStateCallback Callback => m_Callback; public override bool DefRegCreation => false; diff --git a/Server/VirtueInfo.cs b/Server/VirtueInfo.cs index 4553b12b0..4e624b43d 100644 --- a/Server/VirtueInfo.cs +++ b/Server/VirtueInfo.cs @@ -25,13 +25,7 @@ namespace Server { private int[] m_Values; - public int[] Values - { - get - { - return m_Values; - } - } + public int[] Values => m_Values; public int GetValue( int index ) { @@ -55,28 +49,44 @@ namespace Server } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Humility{ get{ return GetValue( 0 ); } set{ SetValue( 0, value ); } } + public int Humility{ get => GetValue( 0 ); + set => SetValue( 0, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Sacrifice{ get{ return GetValue( 1 ); } set{ SetValue( 1, value ); } } + public int Sacrifice{ get => GetValue( 1 ); + set => SetValue( 1, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Compassion{ get{ return GetValue( 2 ); } set{ SetValue( 2, value ); } } + public int Compassion{ get => GetValue( 2 ); + set => SetValue( 2, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Spirituality{ get{ return GetValue( 3 ); } set{ SetValue( 3, value ); } } + public int Spirituality{ get => GetValue( 3 ); + set => SetValue( 3, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Valor{ get{ return GetValue( 4 ); } set{ SetValue( 4, value ); } } + public int Valor{ get => GetValue( 4 ); + set => SetValue( 4, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Honor{ get{ return GetValue( 5 ); } set{ SetValue( 5, value ); } } + public int Honor{ get => GetValue( 5 ); + set => SetValue( 5, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Justice{ get{ return GetValue( 6 ); } set{ SetValue( 6, value ); } } + public int Justice{ get => GetValue( 6 ); + set => SetValue( 6, value ); + } [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )] - public int Honesty{ get{ return GetValue( 7 ); } set{ SetValue( 7, value ); } } + public int Honesty{ get => GetValue( 7 ); + set => SetValue( 7, value ); + } public VirtueInfo() { diff --git a/Server/World.cs b/Server/World.cs index 75dd79d41..84bede52b 100644 --- a/Server/World.cs +++ b/Server/World.cs @@ -41,9 +41,9 @@ namespace Server { private static Queue _addQueue, _deleteQueue; - public static bool Saving { get { return m_Saving; } } - public static bool Loaded { get { return m_Loaded; } } - public static bool Loading { get { return m_Loading; } } + public static bool Saving => m_Saving; + public static bool Loaded => m_Loaded; + public static bool Loading => m_Loading; public readonly static string MobileIndexPath = Path.Combine( "Saves/Mobiles/", "Mobiles.idx" ); public readonly static string MobileTypesPath = Path.Combine( "Saves/Mobiles/", "Mobiles.tdb" ); @@ -125,35 +125,15 @@ namespace Server { private long m_Position; private int m_Length; - public BaseGuild Guild { - get { - return m_Guild; - } - } + public BaseGuild Guild => m_Guild; - public Serial Serial { - get { - return m_Guild == null ? 0 : m_Guild.Id; - } - } + public Serial Serial => m_Guild == null ? 0 : m_Guild.Id; - public int TypeID { - get { - return 0; - } - } + public int TypeID => 0; - public long Position { - get { - return m_Position; - } - } + public long Position => m_Position; - public int Length { - get { - return m_Length; - } - } + public int Length => m_Length; public GuildEntry( BaseGuild g, long pos, int length ) { m_Guild = g; @@ -169,41 +149,17 @@ namespace Server { private long m_Position; private int m_Length; - public Item Item { - get { - return m_Item; - } - } + public Item Item => m_Item; - public Serial Serial { - get { - return m_Item == null ? Serial.MinusOne : m_Item.Serial; - } - } + public Serial Serial => m_Item == null ? Serial.MinusOne : m_Item.Serial; - public int TypeID { - get { - return m_TypeID; - } - } + public int TypeID => m_TypeID; - public string TypeName { - get { - return m_TypeName; - } - } + public string TypeName => m_TypeName; - public long Position { - get { - return m_Position; - } - } + public long Position => m_Position; - public int Length { - get { - return m_Length; - } - } + public int Length => m_Length; public ItemEntry( Item item, int typeID, string typeName, long pos, int length ) { m_Item = item; @@ -221,41 +177,17 @@ namespace Server { private long m_Position; private int m_Length; - public Mobile Mobile { - get { - return m_Mobile; - } - } + public Mobile Mobile => m_Mobile; - public Serial Serial { - get { - return m_Mobile == null ? Serial.MinusOne : m_Mobile.Serial; - } - } + public Serial Serial => m_Mobile == null ? Serial.MinusOne : m_Mobile.Serial; - public int TypeID { - get { - return m_TypeID; - } - } + public int TypeID => m_TypeID; - public string TypeName { - get { - return m_TypeName; - } - } + public string TypeName => m_TypeName; - public long Position { - get { - return m_Position; - } - } + public long Position => m_Position; - public int Length { - get { - return m_Length; - } - } + public int Length => m_Length; public MobileEntry( Mobile mobile, int typeID, string typeName, long pos, int length ) { m_Mobile = mobile;