From 42012538bc0e09281afb6b0c2bd4dcab8e1acc24 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sat, 25 Feb 2023 00:54:12 -0800 Subject: [PATCH] fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) --- Projects/Server/Commands.cs | 1 - Projects/Server/Events/SpeechEvent.cs | 1 - .../Server/Text/TextDefinitionExtensions.cs | 1 - Projects/Server/Utilities/Utility.cs | 1 - .../Bulk Orders/Books/BulkOrderBook.cs | 1 - .../UOContent/Engines/ConPVP/DuelContext.cs | 1 - .../Engines/ConPVP/Games/BombingRun.cs | 1 - .../Engines/ConPVP/Games/KingOfTheHill.cs | 1 - .../UOContent/Engines/ConPVP/Participant.cs | 1 - .../UOContent/Engines/ConPVP/Tournament.cs | 1 - .../Engines/ConPVP/TournamentBracketItem.cs | 2 - .../Engines/ConPVP/TournamentRegistrar.cs | 1 - .../Engines/ConPVP/TournamentSignupItem.cs | 1 - .../Doom/LeverPuzzle/LeverPuzzleItems.cs | 1 - .../UOContent/Engines/Ethics/Core/Power.cs | 2 - .../Engines/Ethics/Evil/Powers/Blight.cs | 1 - .../Ethics/Evil/Powers/SummonFamiliar.cs | 1 - .../Engines/Ethics/Evil/Powers/UnholyItem.cs | 1 - .../Engines/Ethics/Evil/Powers/UnholySense.cs | 1 - .../Ethics/Evil/Powers/UnholyShield.cs | 2 - .../Engines/Ethics/Evil/Powers/UnholySteed.cs | 1 - .../Engines/Ethics/Hero/Powers/Bless.cs | 1 - .../Engines/Ethics/Hero/Powers/HolyItem.cs | 1 - .../Engines/Ethics/Hero/Powers/HolySense.cs | 1 - .../Engines/Ethics/Hero/Powers/HolyShield.cs | 2 - .../Engines/Ethics/Hero/Powers/HolySteed.cs | 1 - .../Ethics/Hero/Powers/SummonFamiliar.cs | 1 - .../Engines/Factions/Core/Keywords.cs | 1 - .../Engines/Factions/Items/FactionStone.cs | 1 - .../Engines/Factions/Items/JoinStone.cs | 1 - .../Power Faction Items/GemOfEmpowerment.cs | 1 - .../Power Faction Items/PowerFactionItem.cs | 1 - .../Power Faction Items/UrnOfAscension.cs | 1 - .../Mobiles/Guards/BaseFactionGuard.cs | 1 - .../Factions/Mobiles/Guards/GuardAI.cs | 23 +- .../Mobiles/Vendors/FactionHorseVendor.cs | 1 - .../Engines/Harvest/Lumberjacking.cs | 1 - .../UOContent/Engines/Khaldun/RaiseSwitch.cs | 1 - .../ML Quests/Items/BedlamTeleporter.cs | 1 - .../ML Quests/Items/PrismaticCrystal.cs | 1 - .../Engines/ML Quests/Items/QuestGiverItem.cs | 1 - .../Engines/ML Quests/MLQuestSystem.cs | 1 - .../ML Quests/Mobiles/BoonCollector.cs | 1 - .../Engines/Plants/MiscItems/GreenThorns.cs | 1 - .../Engines/Plants/MiscItems/OrangePetals.cs | 1 - .../UOContent/Engines/Plants/PlantBowl.cs | 1 - .../Quests/Collector/Items/PaintedImage.cs | 1 - .../Mobiles/HiddenFigure.cs | 1 - .../Quests/Regions/CancelQuestRegion.cs | 2 - .../Regions/QuestCompleteObjectiveRegion.cs | 2 - .../Quests/Regions/QuestNoEntryRegion.cs | 2 - .../Quests/Regions/QuestOfferRegion.cs | 2 - .../The Summoning/Items/BellOfTheDead.cs | 1 - .../Quests/Uzeraan Turmoil/Objectives.cs | 1 - .../Witch Apprentice/Mobiles/Blackheart.cs | 1 - .../UOContent/Engines/Virtues/Sacrifice.cs | 1 - .../Items/Addons/ArcheryButteAddon.cs | 1 - Projects/UOContent/Items/Addons/DartBoard.cs | 1 - .../Items/Addons/FlourMillEastAddon.cs | 1 - .../Items/Addons/FlourMillSouthAddon.cs | 1 - .../UOContent/Items/Addons/SolenAntHole.cs | 1 - .../Items/Armor/BaseArmor.Migrations.cs | 6 +- .../Items/Clothing/BaseClothing.Migrations.cs | 6 +- .../Items/Construction/Doors/BaseDoor.cs | 1 - .../UOContent/Items/Containers/Container.cs | 1 - .../TrappableContainer.ExecuteTrap.cs | 1 - .../SEDecorationArtifacts.cs | 1 - .../UOContent/Items/Deeds/BarkeepContract.cs | 1 - .../Items/Deeds/DragonBardingDeed.cs | 3 +- .../UOContent/Items/Farming/FarmableCrop.cs | 1 - Projects/UOContent/Items/Food/Beverage.cs | 1 - Projects/UOContent/Items/Games/Dices.cs | 1 - Projects/UOContent/Items/Misc/Bola.cs | 1 - .../Items/Misc/CommunicationCrystals.cs | 1 - .../UOContent/Items/Misc/DeceitBrazier.cs | 1 - Projects/UOContent/Items/Misc/Firebomb.cs | 1 - Projects/UOContent/Items/Misc/Guillotine.cs | 1 - Projects/UOContent/Items/Misc/Moonstone.cs | 1 - Projects/UOContent/Items/Misc/OilCloth.cs | 1 - Projects/UOContent/Items/Misc/PowerCrystal.cs | 1 - Projects/UOContent/Items/Misc/TrashBarrel.cs | 1 - Projects/UOContent/Items/Misc/TrashChest.cs | 1 - Projects/UOContent/Items/Misc/WarningItem.cs | 1 - .../UOContent/Items/Quivers/BaseQuiver.cs | 2 +- .../Items/Resources/Fishing/MagicFish.cs | 1 - .../UOContent/Items/Shields/BaseShield.cs | 1 - .../Items/Skill Items/Camping/Kindling.cs | 1 - .../Carpenter Items/TaxidermyKit.cs | 4 +- .../Items/Skill Items/Fishing/FishingPole.cs | 1 - .../Fishing/Misc/MessageInABottle.cs | 1 - .../Items/Skill Items/Fishing/Misc/Sextant.cs | 1 - .../Skill Items/Magical/Misc/PotionKeg.cs | 1 - .../Items/Skill Items/Magical/Runebook.cs | 2 +- .../Items/Skill Items/Magical/Spellbook.cs | 2 +- .../Items/Skill Items/Misc/Bandage.cs | 1006 ++++++++--------- .../Items/Skill Items/Misc/FireHorn.cs | 402 ++++--- .../Items/Skill Items/Misc/RecipeScroll.cs | 149 +-- .../Items/Skill Items/Misc/RepairDeed.cs | 421 +++---- .../AwesomeDisturbingPortrait.cs | 1 - .../CreepyPortrait.cs | 1 - .../DisturbingPortrait.cs | 1 - .../MountedPixieBlue.cs | 2 - .../MountedPixieGreen.cs | 2 - .../MountedPixieLime.cs | 2 - .../MountedPixieOrange.cs | 2 - .../MountedPixieWhite.cs | 2 - .../UnsettlingPortrait.cs | 1 - .../Items/Special/Gifts/RoseOfTrinsic.cs | 1 - .../Items/Special/Gifts/TapestryOfSosaria.cs | 1 - .../Special/Heritage Items/FruitTrees.cs | 1 - .../Special/Heritage Items/Guillotine.cs | 1 - .../Special/Heritage Items/IronMaiden.cs | 1 - .../Items/Special/Heritage Items/WallTorch.cs | 2 - .../Special/Mutation Core/PlagueBeastBlood.cs | 1 - .../Mutation Core/PlagueBeastInnard.cs | 1 - .../Mutation Core/PlagueBeastMutationCore.cs | 1 - .../Mutation Core/PlagueBeastOrgans.cs | 1 - .../Special/Mutation Core/PlagueBeastVein.cs | 1 - .../UOContent/Items/Special/RewardCake.cs | 2 - .../Solen Items/PowderOfTranslocation.cs | 1 - .../Special/Veteran Rewards/FlamingHead.cs | 1 - .../Special/Veteran Rewards/MiningCart.cs | 1 - .../Special/Veteran Rewards/TreeStump.cs | 1 - Projects/UOContent/Items/Traps/GasTrap.cs | 1 - Projects/UOContent/Items/Traps/SawTrap.cs | 1 - Projects/UOContent/Items/Traps/SpikeTrap.cs | 1 - .../Items/Weapons/Abilities/BleedAttack.cs | 1 - .../UOContent/Items/Weapons/Axes/BaseAxe.cs | 1 - .../UOContent/Items/Weapons/BaseWeapon.cs | 2 +- .../Items/Weapons/Staves/ShepherdsCrook.cs | 1 - .../Migrations/Server.Items.Bandage.v0.json | 4 + .../Migrations/Server.Items.FireHorn.v0.json | 4 + .../Server.Items.RecipeScroll.v0.json | 14 + .../Server.Items.RepairDeed.v1.json | 27 + Projects/UOContent/Misc/AttackMessage.cs | 1 - Projects/UOContent/Misc/Poison.cs | 1 - .../Mobiles/Abilities/ColossalBlow.cs | 4 +- .../Mobiles/Abilities/DestroyEquipment.cs | 1 - .../UOContent/Mobiles/Animals/Misc/Sheep.cs | 1 - .../Mobiles/Animals/Mounts/BaseMount.cs | 1 - .../Mobiles/Animals/Mounts/FireSteed.cs | 1 - .../UOContent/Mobiles/Animals/Mounts/Hiryu.cs | 1 - .../UOContent/Mobiles/Animals/Mounts/Kirin.cs | 1 - .../Mobiles/Animals/Mounts/LesserHiryu.cs | 1 - .../Mobiles/Animals/Mounts/Unicorn.cs | 1 - .../Mobiles/Monsters/Ants/BlackSolenQueen.cs | 2 - .../Monsters/Ants/BlackSolenWarrior.cs | 1 - .../Mobiles/Monsters/Ants/RedSolenQueen.cs | 1 - .../Mobiles/Monsters/Ants/RedSolenWarrior.cs | 1 - .../Mobiles/Monsters/Ants/SolenHelper.cs | 1 - .../Monsters/LBR/Meers/EnragedCreatures.cs | 1 - .../Mobiles/Monsters/LBR/Meers/MeerMage.cs | 1 - .../Monsters/ML/Misc/Magic/GreaterDragon.cs | 1 - .../Monsters/Misc/Melee/PlagueBeast.cs | 1 - .../Monsters/Misc/Melee/PlagueBeastLord.cs | 1 - .../Mobiles/Monsters/SE/RuneBeetle.cs | 1 - .../UOContent/Mobiles/Vendors/NPC/Scribe.cs | 1 - Projects/UOContent/Multis/Boats/BaseBoat.cs | 1 - .../UOContent/Multis/Boats/BaseBoatDeed.cs | 1 - Projects/UOContent/Multis/Boats/Plank.cs | 1 - Projects/UOContent/Multis/Boats/TillerMan.cs | 1 - Projects/UOContent/Regions/GuardedRegion.cs | 1 - Projects/UOContent/Skills/Anatomy.cs | 1 - Projects/UOContent/Skills/AnimalTaming.cs | 1 - Projects/UOContent/Skills/ArmsLore.cs | 1 - Projects/UOContent/Skills/Begging.cs | 1 - Projects/UOContent/Skills/EvalInt.cs | 1 - Projects/UOContent/Skills/Hiding.cs | 1 - Projects/UOContent/Skills/RemoveTrap.cs | 1 - Projects/UOContent/Skills/SpiritSpeak.cs | 1 - Projects/UOContent/Spells/Base/Spell.cs | 1 - .../UOContent/Spells/Chivalry/CloseWounds.cs | 1 - .../UOContent/Spells/Chivalry/PaladinSpell.cs | 1 - Projects/UOContent/Spells/First/Heal.cs | 1 - .../UOContent/Spells/Fourth/GreaterHeal.cs | 1 - Projects/UOContent/Spells/Third/MagicLock.cs | 1 - Projects/UOContent/Spells/Third/Unlock.cs | 1 - 177 files changed, 994 insertions(+), 1262 deletions(-) create mode 100644 Projects/UOContent/Migrations/Server.Items.Bandage.v0.json create mode 100644 Projects/UOContent/Migrations/Server.Items.FireHorn.v0.json create mode 100644 Projects/UOContent/Migrations/Server.Items.RecipeScroll.v0.json create mode 100644 Projects/UOContent/Migrations/Server.Items.RepairDeed.v1.json diff --git a/Projects/Server/Commands.cs b/Projects/Server/Commands.cs index 8a7afa2d3..6808ea716 100644 --- a/Projects/Server/Commands.cs +++ b/Projects/Server/Commands.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Server.Network; namespace Server; diff --git a/Projects/Server/Events/SpeechEvent.cs b/Projects/Server/Events/SpeechEvent.cs index 43833244f..a4a1d5c6c 100644 --- a/Projects/Server/Events/SpeechEvent.cs +++ b/Projects/Server/Events/SpeechEvent.cs @@ -15,7 +15,6 @@ using System; using System.Runtime.CompilerServices; -using Server.Network; namespace Server; diff --git a/Projects/Server/Text/TextDefinitionExtensions.cs b/Projects/Server/Text/TextDefinitionExtensions.cs index 7ceb037c5..4ff8b7dba 100644 --- a/Projects/Server/Text/TextDefinitionExtensions.cs +++ b/Projects/Server/Text/TextDefinitionExtensions.cs @@ -14,7 +14,6 @@ *************************************************************************/ using Server.Gumps; -using Server.Network; namespace Server; diff --git a/Projects/Server/Utilities/Utility.cs b/Projects/Server/Utilities/Utility.cs index 2a533e850..cad20de82 100644 --- a/Projects/Server/Utilities/Utility.cs +++ b/Projects/Server/Utilities/Utility.cs @@ -6,7 +6,6 @@ using System.IO; using System.Net; using System.Net.Sockets; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Text; using System.Xml; using Microsoft.Toolkit.HighPerformance; diff --git a/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs b/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs index 9766a698a..0f662d55c 100644 --- a/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs +++ b/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs @@ -4,7 +4,6 @@ using Server.Gumps; using Server.Items; using Server.Mobiles; using Server.Multis; -using Server.Network; using Server.Prompts; namespace Server.Engines.BulkOrders diff --git a/Projects/UOContent/Engines/ConPVP/DuelContext.cs b/Projects/UOContent/Engines/ConPVP/DuelContext.cs index e34955199..d538c061a 100644 --- a/Projects/UOContent/Engines/ConPVP/DuelContext.cs +++ b/Projects/UOContent/Engines/ConPVP/DuelContext.cs @@ -6,7 +6,6 @@ using Server.Factions; using Server.Gumps; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Regions; using Server.Spells; using Server.Spells.Bushido; diff --git a/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs b/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs index 9ddcca7c4..f0cdb93dd 100644 --- a/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs +++ b/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs @@ -4,7 +4,6 @@ using System.Text; using Server.Gumps; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.Engines.ConPVP diff --git a/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs b/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs index b74c4279f..5f9372d9b 100644 --- a/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs +++ b/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs @@ -4,7 +4,6 @@ using System.Text; using Server.Gumps; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.ConPVP { diff --git a/Projects/UOContent/Engines/ConPVP/Participant.cs b/Projects/UOContent/Engines/ConPVP/Participant.cs index cff808f60..26d68a569 100644 --- a/Projects/UOContent/Engines/ConPVP/Participant.cs +++ b/Projects/UOContent/Engines/ConPVP/Participant.cs @@ -1,7 +1,6 @@ using System; using System.Text; using Server.Mobiles; -using Server.Network; namespace Server.Engines.ConPVP { diff --git a/Projects/UOContent/Engines/ConPVP/Tournament.cs b/Projects/UOContent/Engines/ConPVP/Tournament.cs index 6cc1b9374..e2cea6352 100644 --- a/Projects/UOContent/Engines/ConPVP/Tournament.cs +++ b/Projects/UOContent/Engines/ConPVP/Tournament.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Text; using Server.Factions; using Server.Items; -using Server.Network; using Server.Regions; namespace Server.Engines.ConPVP diff --git a/Projects/UOContent/Engines/ConPVP/TournamentBracketItem.cs b/Projects/UOContent/Engines/ConPVP/TournamentBracketItem.cs index 34aef4313..bcc3bb037 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentBracketItem.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentBracketItem.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Engines.ConPVP { public class TournamentBracketItem : Item diff --git a/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs b/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs index c2e20b6dd..c128e6ff2 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentRegistrar.cs @@ -1,7 +1,6 @@ using System; using Server.Factions; using Server.Mobiles; -using Server.Network; namespace Server.Engines.ConPVP { diff --git a/Projects/UOContent/Engines/ConPVP/TournamentSignupItem.cs b/Projects/UOContent/Engines/ConPVP/TournamentSignupItem.cs index 680e0f1ab..2e086545a 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentSignupItem.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentSignupItem.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using Server.Factions; using Server.Mobiles; -using Server.Network; namespace Server.Engines.ConPVP { diff --git a/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs b/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs index b6545d5b9..fa6445359 100644 --- a/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs +++ b/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; using Server.Spells; namespace Server.Engines.Doom diff --git a/Projects/UOContent/Engines/Ethics/Core/Power.cs b/Projects/UOContent/Engines/Ethics/Core/Power.cs index afc4cc13b..2c695c4bc 100644 --- a/Projects/UOContent/Engines/Ethics/Core/Power.cs +++ b/Projects/UOContent/Engines/Ethics/Core/Power.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Ethics { public abstract class Power diff --git a/Projects/UOContent/Engines/Ethics/Evil/Powers/Blight.cs b/Projects/UOContent/Engines/Ethics/Evil/Powers/Blight.cs index 0dddf0575..b8b17670e 100644 --- a/Projects/UOContent/Engines/Ethics/Evil/Powers/Blight.cs +++ b/Projects/UOContent/Engines/Ethics/Evil/Powers/Blight.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; using Server.Spells; using Server.Targeting; diff --git a/Projects/UOContent/Engines/Ethics/Evil/Powers/SummonFamiliar.cs b/Projects/UOContent/Engines/Ethics/Evil/Powers/SummonFamiliar.cs index 7737d48eb..aa6f3ee25 100644 --- a/Projects/UOContent/Engines/Ethics/Evil/Powers/SummonFamiliar.cs +++ b/Projects/UOContent/Engines/Ethics/Evil/Powers/SummonFamiliar.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; namespace Server.Ethics.Evil { diff --git a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyItem.cs b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyItem.cs index a46e3cbb0..246d9586d 100644 --- a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyItem.cs +++ b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyItem.cs @@ -1,5 +1,4 @@ using Server.Items; -using Server.Network; using Server.Targeting; namespace Server.Ethics.Evil diff --git a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySense.cs b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySense.cs index 51b451ded..5629a45b5 100644 --- a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySense.cs +++ b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySense.cs @@ -1,6 +1,5 @@ using System; using Server.Buffers; -using Server.Network; namespace Server.Ethics.Evil { diff --git a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyShield.cs b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyShield.cs index 42186b10e..7aec50d7d 100644 --- a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyShield.cs +++ b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholyShield.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Ethics.Evil { public sealed class UnholyShield : Power diff --git a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySteed.cs b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySteed.cs index 121cdb081..fda8a44dc 100644 --- a/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySteed.cs +++ b/Projects/UOContent/Engines/Ethics/Evil/Powers/UnholySteed.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; namespace Server.Ethics.Evil { diff --git a/Projects/UOContent/Engines/Ethics/Hero/Powers/Bless.cs b/Projects/UOContent/Engines/Ethics/Hero/Powers/Bless.cs index f0c23cb73..848a053d4 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Powers/Bless.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Powers/Bless.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; using Server.Spells; using Server.Targeting; diff --git a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyItem.cs b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyItem.cs index e927651ef..908d505fb 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyItem.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyItem.cs @@ -1,5 +1,4 @@ using Server.Items; -using Server.Network; using Server.Targeting; namespace Server.Ethics.Hero diff --git a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySense.cs b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySense.cs index 12123d7e9..ed4240af8 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySense.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySense.cs @@ -1,6 +1,5 @@ using System; using Server.Buffers; -using Server.Network; namespace Server.Ethics.Hero { diff --git a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyShield.cs b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyShield.cs index c313a36ce..1095b4e92 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyShield.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolyShield.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Ethics.Hero { public sealed class HolyShield : Power diff --git a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySteed.cs b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySteed.cs index a4b43b3fd..3dbd96e0c 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySteed.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Powers/HolySteed.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; namespace Server.Ethics.Hero { diff --git a/Projects/UOContent/Engines/Ethics/Hero/Powers/SummonFamiliar.cs b/Projects/UOContent/Engines/Ethics/Hero/Powers/SummonFamiliar.cs index 14dc918ae..c63c59c35 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Powers/SummonFamiliar.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Powers/SummonFamiliar.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; namespace Server.Ethics.Hero { diff --git a/Projects/UOContent/Engines/Factions/Core/Keywords.cs b/Projects/UOContent/Engines/Factions/Core/Keywords.cs index 00aaa18c9..3064e7432 100644 --- a/Projects/UOContent/Engines/Factions/Core/Keywords.cs +++ b/Projects/UOContent/Engines/Factions/Core/Keywords.cs @@ -1,5 +1,4 @@ using Server.Mobiles; -using Server.Network; namespace Server.Factions { diff --git a/Projects/UOContent/Engines/Factions/Items/FactionStone.cs b/Projects/UOContent/Engines/Factions/Items/FactionStone.cs index d3f54e86b..87dd49651 100644 --- a/Projects/UOContent/Engines/Factions/Items/FactionStone.cs +++ b/Projects/UOContent/Engines/Factions/Items/FactionStone.cs @@ -1,5 +1,4 @@ using Server.Mobiles; -using Server.Network; namespace Server.Factions { diff --git a/Projects/UOContent/Engines/Factions/Items/JoinStone.cs b/Projects/UOContent/Engines/Factions/Items/JoinStone.cs index 48ead9fc3..c98626ea6 100644 --- a/Projects/UOContent/Engines/Factions/Items/JoinStone.cs +++ b/Projects/UOContent/Engines/Factions/Items/JoinStone.cs @@ -1,5 +1,4 @@ using Server.Mobiles; -using Server.Network; namespace Server.Factions { diff --git a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs index fb07d6b26..7435412c8 100644 --- a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs +++ b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/GemOfEmpowerment.cs @@ -1,5 +1,4 @@ using Server.Factions; -using Server.Network; namespace Server { diff --git a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs index 8262e07c2..911601b34 100644 --- a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs +++ b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/PowerFactionItem.cs @@ -2,7 +2,6 @@ using System; using System.IO; using Server.Factions; using Server.Mobiles; -using Server.Network; using Server.Utilities; namespace Server diff --git a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs index 2cd563541..ad670089a 100644 --- a/Projects/UOContent/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs +++ b/Projects/UOContent/Engines/Factions/Items/Power Faction Items/UrnOfAscension.cs @@ -1,7 +1,6 @@ using Server.Factions; using Server.Gumps; using Server.Multis; -using Server.Network; namespace Server { diff --git a/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs b/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs index 0d0517d4d..42463ba6e 100644 --- a/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs +++ b/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs @@ -2,7 +2,6 @@ using System; using Server.Factions.AI; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Factions { diff --git a/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs b/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs index 833b56681..6170f2929 100644 --- a/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs +++ b/Projects/UOContent/Engines/Factions/Mobiles/Guards/GuardAI.cs @@ -106,7 +106,7 @@ namespace Server.Factions private const int ManaReserve = 30; private readonly BaseFactionGuard m_Guard; - private BandageContext m_Bandage; + private BandageContext _bandage; private DateTime m_BandageStart; private SpellCombo m_Combo; @@ -123,21 +123,21 @@ namespace Server.Factions { get { - if (m_Bandage != null && m_Bandage.Timer == null) + if (_bandage != null && !_bandage.Running) { - m_Bandage = null; + _bandage = null; } - if (m_Bandage == null) + if (_bandage == null) { return TimeSpan.MaxValue; } - var ts = m_BandageStart + m_Bandage.Timer.Delay - Core.Now; + var ts = m_BandageStart + _bandage.Delay - Core.Now; if (ts < TimeSpan.FromSeconds(-1.0)) { - m_Bandage = null; + _bandage = null; return TimeSpan.MaxValue; } @@ -174,16 +174,15 @@ namespace Server.Factions public bool StartBandage() { - m_Bandage = null; + _bandage = null; - if (m_Guard.Backpack?.FindItemByType() == null) + if (m_Guard.Backpack?.FindItemByType() != null) { - return false; + _bandage = BandageContext.BeginHeal(m_Guard, m_Guard); + m_BandageStart = Core.Now; } - m_Bandage = BandageContext.BeginHeal(m_Guard, m_Guard); - m_BandageStart = Core.Now; - return m_Bandage != null; + return _bandage != null; } public bool UseItemByType(Type type) diff --git a/Projects/UOContent/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs b/Projects/UOContent/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs index 0d1dc6b89..d028da169 100644 --- a/Projects/UOContent/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs +++ b/Projects/UOContent/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Factions { diff --git a/Projects/UOContent/Engines/Harvest/Lumberjacking.cs b/Projects/UOContent/Engines/Harvest/Lumberjacking.cs index 3e046f494..9a8966a54 100644 --- a/Projects/UOContent/Engines/Harvest/Lumberjacking.cs +++ b/Projects/UOContent/Engines/Harvest/Lumberjacking.cs @@ -1,6 +1,5 @@ using System; using Server.Items; -using Server.Network; using Server.Targeting; namespace Server.Engines.Harvest diff --git a/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs b/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs index cb7af17c8..7815fee84 100644 --- a/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs +++ b/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Engines/ML Quests/Items/BedlamTeleporter.cs b/Projects/UOContent/Engines/ML Quests/Items/BedlamTeleporter.cs index 2f436baad..c7c4ad935 100644 --- a/Projects/UOContent/Engines/ML Quests/Items/BedlamTeleporter.cs +++ b/Projects/UOContent/Engines/ML Quests/Items/BedlamTeleporter.cs @@ -1,5 +1,4 @@ using Server.Mobiles; -using Server.Network; namespace Server.Engines.MLQuests.Items { diff --git a/Projects/UOContent/Engines/ML Quests/Items/PrismaticCrystal.cs b/Projects/UOContent/Engines/ML Quests/Items/PrismaticCrystal.cs index 430506447..0be9c6f29 100644 --- a/Projects/UOContent/Engines/ML Quests/Items/PrismaticCrystal.cs +++ b/Projects/UOContent/Engines/ML Quests/Items/PrismaticCrystal.cs @@ -1,7 +1,6 @@ using Server.Engines.MLQuests; using Server.Engines.MLQuests.Definitions; using Server.Mobiles; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Engines/ML Quests/Items/QuestGiverItem.cs b/Projects/UOContent/Engines/ML Quests/Items/QuestGiverItem.cs index 652de737e..9a20d77c0 100644 --- a/Projects/UOContent/Engines/ML Quests/Items/QuestGiverItem.cs +++ b/Projects/UOContent/Engines/ML Quests/Items/QuestGiverItem.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.MLQuests.Items { diff --git a/Projects/UOContent/Engines/ML Quests/MLQuestSystem.cs b/Projects/UOContent/Engines/ML Quests/MLQuestSystem.cs index af81e3b70..b65f6cb6c 100644 --- a/Projects/UOContent/Engines/ML Quests/MLQuestSystem.cs +++ b/Projects/UOContent/Engines/ML Quests/MLQuestSystem.cs @@ -8,7 +8,6 @@ using Server.Engines.MLQuests.Objectives; using Server.Gumps; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Utilities; namespace Server.Engines.MLQuests diff --git a/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs b/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs index 0d5d65f01..71292d9cc 100644 --- a/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs +++ b/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs @@ -4,7 +4,6 @@ using Server.Engines.MLQuests.Definitions; using Server.Engines.MLQuests.Gumps; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.MLQuests.Mobiles { diff --git a/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs b/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs index 6f1a42bc9..07dfb5649 100644 --- a/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs +++ b/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; using Server.Targeting; using Server.Utilities; diff --git a/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs b/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs index 1e33465da..853670de3 100644 --- a/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs +++ b/Projects/UOContent/Engines/Plants/MiscItems/OrangePetals.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Engines/Plants/PlantBowl.cs b/Projects/UOContent/Engines/Plants/PlantBowl.cs index 35633a4c2..ac783de0c 100644 --- a/Projects/UOContent/Engines/Plants/PlantBowl.cs +++ b/Projects/UOContent/Engines/Plants/PlantBowl.cs @@ -1,5 +1,4 @@ using Server.Items; -using Server.Network; using Server.Targeting; namespace Server.Engines.Plants diff --git a/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs b/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs index e1180f01c..9e3bb4d5d 100644 --- a/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs +++ b/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs @@ -1,5 +1,4 @@ using Server.Gumps; -using Server.Network; namespace Server.Engines.Quests.Collector { diff --git a/Projects/UOContent/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs b/Projects/UOContent/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs index ae582b41d..079adfcce 100644 --- a/Projects/UOContent/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs +++ b/Projects/UOContent/Engines/Quests/Emino's Undertaking/Mobiles/HiddenFigure.cs @@ -1,6 +1,5 @@ using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.Quests.Ninja { diff --git a/Projects/UOContent/Engines/Quests/Regions/CancelQuestRegion.cs b/Projects/UOContent/Engines/Quests/Regions/CancelQuestRegion.cs index dbb7638b6..4772df0ce 100644 --- a/Projects/UOContent/Engines/Quests/Regions/CancelQuestRegion.cs +++ b/Projects/UOContent/Engines/Quests/Regions/CancelQuestRegion.cs @@ -1,6 +1,4 @@ using System; -using System.Xml; -using Server; using Server.Regions; using Server.Mobiles; diff --git a/Projects/UOContent/Engines/Quests/Regions/QuestCompleteObjectiveRegion.cs b/Projects/UOContent/Engines/Quests/Regions/QuestCompleteObjectiveRegion.cs index 08468e5c3..f90f14779 100644 --- a/Projects/UOContent/Engines/Quests/Regions/QuestCompleteObjectiveRegion.cs +++ b/Projects/UOContent/Engines/Quests/Regions/QuestCompleteObjectiveRegion.cs @@ -1,6 +1,4 @@ using System; -using System.Xml; -using Server; using Server.Regions; using Server.Mobiles; diff --git a/Projects/UOContent/Engines/Quests/Regions/QuestNoEntryRegion.cs b/Projects/UOContent/Engines/Quests/Regions/QuestNoEntryRegion.cs index b5b7c9d2d..967c5092f 100644 --- a/Projects/UOContent/Engines/Quests/Regions/QuestNoEntryRegion.cs +++ b/Projects/UOContent/Engines/Quests/Regions/QuestNoEntryRegion.cs @@ -1,6 +1,4 @@ using System; -using System.Xml; -using Server; using Server.Regions; using Server.Mobiles; diff --git a/Projects/UOContent/Engines/Quests/Regions/QuestOfferRegion.cs b/Projects/UOContent/Engines/Quests/Regions/QuestOfferRegion.cs index 73398f1e1..069379c58 100644 --- a/Projects/UOContent/Engines/Quests/Regions/QuestOfferRegion.cs +++ b/Projects/UOContent/Engines/Quests/Regions/QuestOfferRegion.cs @@ -1,6 +1,4 @@ using System; -using System.Xml; -using Server; using Server.Logging; using Server.Regions; using Server.Mobiles; diff --git a/Projects/UOContent/Engines/Quests/The Summoning/Items/BellOfTheDead.cs b/Projects/UOContent/Engines/Quests/The Summoning/Items/BellOfTheDead.cs index c2f638961..161f3a44f 100644 --- a/Projects/UOContent/Engines/Quests/The Summoning/Items/BellOfTheDead.cs +++ b/Projects/UOContent/Engines/Quests/The Summoning/Items/BellOfTheDead.cs @@ -1,7 +1,6 @@ using System; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.Quests.Doom { diff --git a/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Objectives.cs b/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Objectives.cs index 1de4f00ab..67caf3f17 100644 --- a/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Objectives.cs +++ b/Projects/UOContent/Engines/Quests/Uzeraan Turmoil/Objectives.cs @@ -1,7 +1,6 @@ using Server.Engines.Help; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.Quests.Haven { diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/Mobiles/Blackheart.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/Mobiles/Blackheart.cs index 87a0dd007..7a29f6350 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/Mobiles/Blackheart.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/Mobiles/Blackheart.cs @@ -1,7 +1,6 @@ using System; using Server.Items; using Server.Mobiles; -using Server.Network; namespace Server.Engines.Quests.Hag { diff --git a/Projects/UOContent/Engines/Virtues/Sacrifice.cs b/Projects/UOContent/Engines/Virtues/Sacrifice.cs index 500970016..ec1ac8327 100644 --- a/Projects/UOContent/Engines/Virtues/Sacrifice.cs +++ b/Projects/UOContent/Engines/Virtues/Sacrifice.cs @@ -2,7 +2,6 @@ using System; using System.Runtime.CompilerServices; using Server.Gumps; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server diff --git a/Projects/UOContent/Items/Addons/ArcheryButteAddon.cs b/Projects/UOContent/Items/Addons/ArcheryButteAddon.cs index bfce42cb2..ff8215fcd 100644 --- a/Projects/UOContent/Items/Addons/ArcheryButteAddon.cs +++ b/Projects/UOContent/Items/Addons/ArcheryButteAddon.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using ModernUO.Serialization; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Addons/DartBoard.cs b/Projects/UOContent/Items/Addons/DartBoard.cs index 71f973ae6..73c532091 100644 --- a/Projects/UOContent/Items/Addons/DartBoard.cs +++ b/Projects/UOContent/Items/Addons/DartBoard.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Addons/FlourMillEastAddon.cs b/Projects/UOContent/Items/Addons/FlourMillEastAddon.cs index bf2dda6e7..f84c959cf 100644 --- a/Projects/UOContent/Items/Addons/FlourMillEastAddon.cs +++ b/Projects/UOContent/Items/Addons/FlourMillEastAddon.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Addons/FlourMillSouthAddon.cs b/Projects/UOContent/Items/Addons/FlourMillSouthAddon.cs index 0695fe143..cbd0e2cc3 100644 --- a/Projects/UOContent/Items/Addons/FlourMillSouthAddon.cs +++ b/Projects/UOContent/Items/Addons/FlourMillSouthAddon.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Addons/SolenAntHole.cs b/Projects/UOContent/Items/Addons/SolenAntHole.cs index 9cd1a469f..623161bb2 100644 --- a/Projects/UOContent/Items/Addons/SolenAntHole.cs +++ b/Projects/UOContent/Items/Addons/SolenAntHole.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using ModernUO.Serialization; using Server.Mobiles; -using Server.Network; using Server.Spells; namespace Server.Items diff --git a/Projects/UOContent/Items/Armor/BaseArmor.Migrations.cs b/Projects/UOContent/Items/Armor/BaseArmor.Migrations.cs index 528bf6704..3135850a9 100644 --- a/Projects/UOContent/Items/Armor/BaseArmor.Migrations.cs +++ b/Projects/UOContent/Items/Armor/BaseArmor.Migrations.cs @@ -16,8 +16,7 @@ public partial class BaseArmor _identified = content.Identified; _maxHitPoints = content.MaxHitPoints ?? 0; _hitPoints = content.HitPoints ?? 0; - var crafter = content.Crafter; - Timer.StartTimer(() => _crafter = crafter?.RawName); + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, content.Crafter); _quality = content.Quality ?? ArmorQuality.Regular; _durability = content.Durability ?? ArmorDurabilityLevel.Regular; _resource = content.RawResource ?? DefaultResource; @@ -91,8 +90,7 @@ public partial class BaseArmor if (GetSaveFlag(flags, OldSaveFlag.Crafter)) { - var crafter = reader.ReadEntity(); - Timer.StartTimer(() => _crafter = crafter?.RawName); + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, reader.ReadEntity()); } if (GetSaveFlag(flags, OldSaveFlag.Quality)) diff --git a/Projects/UOContent/Items/Clothing/BaseClothing.Migrations.cs b/Projects/UOContent/Items/Clothing/BaseClothing.Migrations.cs index da962c73f..e267cd1aa 100644 --- a/Projects/UOContent/Items/Clothing/BaseClothing.Migrations.cs +++ b/Projects/UOContent/Items/Clothing/BaseClothing.Migrations.cs @@ -11,8 +11,7 @@ public partial class BaseClothing _resistances = content.Resistances ?? ResistancesDefaultValue(); _maxHitPoints = content.MaxHitPoints ?? 0; _playerConstructed = content.PlayerConstructed; - var crafter = content.Crafter; - Timer.StartTimer(() => _crafter = crafter?.RawName); + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, content.Crafter); _quality = content.Quality ?? ClothingQuality.Regular; _strReq = content.StrRequirement ?? -1; } @@ -71,8 +70,7 @@ public partial class BaseClothing if (GetSaveFlag(flags, OldSaveFlag.Crafter)) { - var crafter = reader.ReadEntity(); - Timer.StartTimer(() => _crafter = crafter?.RawName); + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, reader.ReadEntity()); } if (GetSaveFlag(flags, OldSaveFlag.Quality)) diff --git a/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs b/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs index bd44f0a7f..d00574aa6 100644 --- a/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs +++ b/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Server.Network; using Server.Targeting; namespace Server.Items diff --git a/Projects/UOContent/Items/Containers/Container.cs b/Projects/UOContent/Items/Containers/Container.cs index c3112705b..25db2ec11 100644 --- a/Projects/UOContent/Items/Containers/Container.cs +++ b/Projects/UOContent/Items/Containers/Container.cs @@ -3,7 +3,6 @@ using ModernUO.Serialization; using Server.ContextMenus; using Server.Mobiles; using Server.Multis; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Containers/TrappableContainer.ExecuteTrap.cs b/Projects/UOContent/Items/Containers/TrappableContainer.ExecuteTrap.cs index b4fef21d9..f79c084b8 100644 --- a/Projects/UOContent/Items/Containers/TrappableContainer.ExecuteTrap.cs +++ b/Projects/UOContent/Items/Containers/TrappableContainer.ExecuteTrap.cs @@ -1,6 +1,5 @@ using System; using System.Runtime.CompilerServices; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Decoration Artifacts/SEDecorationArtifacts.cs b/Projects/UOContent/Items/Decoration Artifacts/SEDecorationArtifacts.cs index a637e282f..70908c34b 100644 --- a/Projects/UOContent/Items/Decoration Artifacts/SEDecorationArtifacts.cs +++ b/Projects/UOContent/Items/Decoration Artifacts/SEDecorationArtifacts.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Deeds/BarkeepContract.cs b/Projects/UOContent/Items/Deeds/BarkeepContract.cs index c3f94ee22..2ac3b0499 100644 --- a/Projects/UOContent/Items/Deeds/BarkeepContract.cs +++ b/Projects/UOContent/Items/Deeds/BarkeepContract.cs @@ -1,7 +1,6 @@ using ModernUO.Serialization; using Server.Mobiles; using Server.Multis; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Deeds/DragonBardingDeed.cs b/Projects/UOContent/Items/Deeds/DragonBardingDeed.cs index 3ccc1b2f7..a7ac745dc 100644 --- a/Projects/UOContent/Items/Deeds/DragonBardingDeed.cs +++ b/Projects/UOContent/Items/Deeds/DragonBardingDeed.cs @@ -124,8 +124,7 @@ public partial class DragonBardingDeed : Item, ICraftable private void Deserialize(IGenericReader reader, int version) { _exceptional = reader.ReadBool(); - var crafter = reader.ReadEntity(); - Timer.StartTimer(() => _craftedBy = crafter?.RawName); + Timer.DelayCall((item, crafter) => item._craftedBy = crafter?.RawName, this, reader.ReadEntity()); if (version < 1) { diff --git a/Projects/UOContent/Items/Farming/FarmableCrop.cs b/Projects/UOContent/Items/Farming/FarmableCrop.cs index 5f0bfa56e..db07588cd 100644 --- a/Projects/UOContent/Items/Farming/FarmableCrop.cs +++ b/Projects/UOContent/Items/Farming/FarmableCrop.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Food/Beverage.cs b/Projects/UOContent/Items/Food/Beverage.cs index 1b8bef4f6..6ec9af655 100644 --- a/Projects/UOContent/Items/Food/Beverage.cs +++ b/Projects/UOContent/Items/Food/Beverage.cs @@ -7,7 +7,6 @@ using Server.Engines.Quests.Hag; using Server.Engines.Quests.Matriarch; using Server.Mobiles; using Server.Multis; -using Server.Network; using Server.Targeting; namespace Server.Items; diff --git a/Projects/UOContent/Items/Games/Dices.cs b/Projects/UOContent/Items/Games/Dices.cs index 0cd9cf22e..37346703d 100644 --- a/Projects/UOContent/Items/Games/Dices.cs +++ b/Projects/UOContent/Items/Games/Dices.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/Bola.cs b/Projects/UOContent/Items/Misc/Bola.cs index 0207921d8..716a8e613 100644 --- a/Projects/UOContent/Items/Misc/Bola.cs +++ b/Projects/UOContent/Items/Misc/Bola.cs @@ -1,7 +1,6 @@ using System; using ModernUO.Serialization; using Server.Mobiles; -using Server.Network; using Server.Spells.Ninjitsu; using Server.Targeting; diff --git a/Projects/UOContent/Items/Misc/CommunicationCrystals.cs b/Projects/UOContent/Items/Misc/CommunicationCrystals.cs index 0271fcacb..165de0160 100644 --- a/Projects/UOContent/Items/Misc/CommunicationCrystals.cs +++ b/Projects/UOContent/Items/Misc/CommunicationCrystals.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using ModernUO.Serialization; -using Server.Network; using Server.Targeting; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/DeceitBrazier.cs b/Projects/UOContent/Items/Misc/DeceitBrazier.cs index d16d6f85d..a0ef2ce7a 100644 --- a/Projects/UOContent/Items/Misc/DeceitBrazier.cs +++ b/Projects/UOContent/Items/Misc/DeceitBrazier.cs @@ -1,7 +1,6 @@ using System; using ModernUO.Serialization; using Server.Mobiles; -using Server.Network; using Server.Utilities; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/Firebomb.cs b/Projects/UOContent/Items/Misc/Firebomb.cs index 0f60a742f..ce500e982 100644 --- a/Projects/UOContent/Items/Misc/Firebomb.cs +++ b/Projects/UOContent/Items/Misc/Firebomb.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using ModernUO.Serialization; using Server.Collections; -using Server.Network; using Server.Spells; using Server.Spells.Fourth; using Server.Targeting; diff --git a/Projects/UOContent/Items/Misc/Guillotine.cs b/Projects/UOContent/Items/Misc/Guillotine.cs index 2e87f9e52..c54b95136 100644 --- a/Projects/UOContent/Items/Misc/Guillotine.cs +++ b/Projects/UOContent/Items/Misc/Guillotine.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; using Server.Spells; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/Moonstone.cs b/Projects/UOContent/Items/Misc/Moonstone.cs index 8c7d25a48..0a9a90903 100644 --- a/Projects/UOContent/Items/Misc/Moonstone.cs +++ b/Projects/UOContent/Items/Misc/Moonstone.cs @@ -2,7 +2,6 @@ using System; using ModernUO.Serialization; using Server.Factions; using Server.Mobiles; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/OilCloth.cs b/Projects/UOContent/Items/Misc/OilCloth.cs index 9d2ebba31..eeeaed4d3 100644 --- a/Projects/UOContent/Items/Misc/OilCloth.cs +++ b/Projects/UOContent/Items/Misc/OilCloth.cs @@ -1,7 +1,6 @@ using System; using ModernUO.Serialization; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/PowerCrystal.cs b/Projects/UOContent/Items/Misc/PowerCrystal.cs index cdd046cc6..7d43ed5af 100644 --- a/Projects/UOContent/Items/Misc/PowerCrystal.cs +++ b/Projects/UOContent/Items/Misc/PowerCrystal.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/TrashBarrel.cs b/Projects/UOContent/Items/Misc/TrashBarrel.cs index 96bd221ac..4189032c4 100644 --- a/Projects/UOContent/Items/Misc/TrashBarrel.cs +++ b/Projects/UOContent/Items/Misc/TrashBarrel.cs @@ -1,7 +1,6 @@ using System; using ModernUO.Serialization; using Server.Multis; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/TrashChest.cs b/Projects/UOContent/Items/Misc/TrashChest.cs index fa3fec8a1..9bef1183e 100644 --- a/Projects/UOContent/Items/Misc/TrashChest.cs +++ b/Projects/UOContent/Items/Misc/TrashChest.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Misc/WarningItem.cs b/Projects/UOContent/Items/Misc/WarningItem.cs index de957f244..5194a0926 100644 --- a/Projects/UOContent/Items/Misc/WarningItem.cs +++ b/Projects/UOContent/Items/Misc/WarningItem.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Quivers/BaseQuiver.cs b/Projects/UOContent/Items/Quivers/BaseQuiver.cs index 7a80daea6..96f52ae97 100644 --- a/Projects/UOContent/Items/Quivers/BaseQuiver.cs +++ b/Projects/UOContent/Items/Quivers/BaseQuiver.cs @@ -443,7 +443,7 @@ public partial class BaseQuiver : Container, ICraftable, IAosItem if ((flags & 0x10) != 0) { - _crafter = reader.ReadEntity()?.RawName; + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, reader.ReadEntity()); } if ((flags & 0x20) != 0) diff --git a/Projects/UOContent/Items/Resources/Fishing/MagicFish.cs b/Projects/UOContent/Items/Resources/Fishing/MagicFish.cs index d9d53eb64..e4dea06dc 100644 --- a/Projects/UOContent/Items/Resources/Fishing/MagicFish.cs +++ b/Projects/UOContent/Items/Resources/Fishing/MagicFish.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; using Server.Spells; namespace Server.Items; diff --git a/Projects/UOContent/Items/Shields/BaseShield.cs b/Projects/UOContent/Items/Shields/BaseShield.cs index 0e287f6f9..1f9a229ce 100644 --- a/Projects/UOContent/Items/Shields/BaseShield.cs +++ b/Projects/UOContent/Items/Shields/BaseShield.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs b/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs index 62e1908ce..348cdbb6d 100644 --- a/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs +++ b/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using ModernUO.Serialization; -using Server.Network; using Server.Regions; namespace Server.Items; diff --git a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs index 47ea59937..c33cf6980 100644 --- a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs +++ b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs @@ -227,7 +227,7 @@ public partial class TrophyAddon : Item, IAddon private void Deserialize(IGenericReader reader, int version) { - _hunter = reader.ReadEntity()?.RawName; + Timer.DelayCall((item, crafter) => item._hunter = crafter?.RawName, this, reader.ReadEntity()); _animalWeight = reader.ReadInt(); _westId = reader.ReadInt(); _northId = reader.ReadInt(); @@ -355,7 +355,7 @@ public partial class TrophyDeed : Item private void Deserialize(IGenericReader reader, int version) { - _hunter = reader.ReadEntity()?.RawName; + Timer.DelayCall((item, crafter) => item._hunter = crafter?.RawName, this, reader.ReadEntity()); _animalWeight = reader.ReadInt(); _westId = reader.ReadInt(); _northId = reader.ReadInt(); diff --git a/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs b/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs index 8523d1135..1db953b47 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using ModernUO.Serialization; using Server.ContextMenus; using Server.Engines.Harvest; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs index 24ab427af..f176ec98c 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs @@ -1,6 +1,5 @@ using System; using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/Sextant.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/Sextant.cs index 546809721..a9a7d4060 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/Sextant.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/Sextant.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Skill Items/Magical/Misc/PotionKeg.cs b/Projects/UOContent/Items/Skill Items/Magical/Misc/PotionKeg.cs index fdd45e79a..f9f15116f 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Misc/PotionKeg.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Misc/PotionKeg.cs @@ -1,7 +1,6 @@ using System; using System.Runtime.CompilerServices; using ModernUO.Serialization; -using Server.Network; namespace Server.Items; diff --git a/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs b/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs index c1e98265a..018eb560a 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Runebook.cs @@ -122,7 +122,7 @@ public partial class Runebook : Item, ISecurable, ICraftable base.Deserialize(reader); _quality = (BookQuality)reader.ReadByte(); - _crafter = reader.ReadEntity()?.RawName; + Timer.DelayCall(crafter => _crafter = crafter?.RawName, reader.ReadEntity()); _level = (SecureLevel)reader.ReadInt(); var count = reader.ReadInt(); diff --git a/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs b/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs index 7e712018d..dc91575a0 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs @@ -831,7 +831,7 @@ public partial class Spellbook : Item, ICraftable, ISlayer, IAosItem { _quality = (BookQuality)reader.ReadByte(); _engravedText = reader.ReadString(); - _crafter = reader.ReadEntity()?.RawName; + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, reader.ReadEntity()); _slayer = (SlayerName)reader.ReadInt(); _slayer2 = (SlayerName)reader.ReadInt(); diff --git a/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs b/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs index aaab0407f..c4cb40af1 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs @@ -1,577 +1,549 @@ using System; using System.Collections.Generic; +using ModernUO.Serialization; using Server.Engines.ConPVP; using Server.Factions; using Server.Gumps; using Server.Mobiles; using Server.Targeting; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0, false)] +public partial class Bandage : Item, IDyable { - public class Bandage : Item, IDyable + public static int Range = Core.AOS ? 2 : 1; + + [Constructible] + public Bandage(int amount = 1) : base(0xE21) { - public static int Range = Core.AOS ? 2 : 1; + Stackable = true; + Amount = amount; + } - [Constructible] - public Bandage(int amount = 1) : base(0xE21) + public override double DefaultWeight => 0.1; + + public virtual bool Dye(Mobile from, DyeTub sender) + { + if (Deleted) { - Stackable = true; - Amount = amount; + return false; } - public Bandage(Serial serial) : base(serial) + Hue = sender.DyedHue; + + return true; + } + + public static void Initialize() + { + EventSink.BandageTargetRequest += EventSink_BandageTargetRequest; + } + + public override void OnDoubleClick(Mobile from) + { + if (from.InRange(GetWorldLocation(), Range)) { - } - - public override double DefaultWeight => 0.1; - - public virtual bool Dye(Mobile from, DyeTub sender) - { - if (Deleted) - { - return false; - } - - Hue = sender.DyedHue; - - return true; - } - - public static void Initialize() - { - EventSink.BandageTargetRequest += EventSink_BandageTargetRequest; - } - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - - public override void OnDoubleClick(Mobile from) - { - if (from.InRange(GetWorldLocation(), Range)) - { - from.RevealingAction(); - - from.SendLocalizedMessage(500948); // Who will you use the bandages on? - - from.Target = new InternalTarget(this); - } - else - { - from.SendLocalizedMessage(500295); // You are too far away to do that. - } - } - - private static void EventSink_BandageTargetRequest(Mobile from, Item item, Mobile target) - { - if (item is not Bandage b || b.Deleted) - { - return; - } - - if (!from.InRange(b.GetWorldLocation(), Range)) - { - from.SendLocalizedMessage(500295); // You are too far away to do that. - return; - } - - if (from.Target != null) - { - Target.Cancel(from); - from.Target = null; - } - from.RevealingAction(); + from.SendLocalizedMessage(500948); // Who will you use the bandages on? - new InternalTarget(b).Invoke(from, target); + from.Target = new InternalTarget(this); } - - private class InternalTarget : Target + else { - private readonly Bandage m_Bandage; - - public InternalTarget(Bandage bandage) : base(Bandage.Range, false, TargetFlags.Beneficial) => - m_Bandage = bandage; - - protected override void OnTarget(Mobile from, object targeted) - { - if (m_Bandage.Deleted) - { - return; - } - - if (targeted is Mobile mobile) - { - if (from.InRange(m_Bandage.GetWorldLocation(), Bandage.Range)) - { - if (!(BandageContext.BeginHeal(from, mobile) == null || DuelContext.IsFreeConsume(from))) - { - m_Bandage.Consume(); - } - } - else - { - from.SendLocalizedMessage(500295); // You are too far away to do that. - } - } - else if (targeted is PlagueBeastInnard innard) - { - if (innard.OnBandage(from)) - { - m_Bandage.Consume(); - } - } - else - { - from.SendLocalizedMessage(500970); // Bandages can not be used on that. - } - } - - protected override void OnNonlocalTarget(Mobile from, object targeted) - { - if (targeted is PlagueBeastInnard innard) - { - if (innard.OnBandage(from)) - { - m_Bandage.Consume(); - } - } - else - { - base.OnNonlocalTarget(from, targeted); - } - } + from.SendLocalizedMessage(500295); // You are too far away to do that. } } - public class BandageContext + private static void EventSink_BandageTargetRequest(Mobile from, Item item, Mobile target) { - private static readonly Dictionary m_Table = new(); - - public BandageContext(Mobile healer, Mobile patient, TimeSpan delay) + if (item is not Bandage b || b.Deleted) { - Healer = healer; - Patient = patient; - - Timer = new InternalTimer(this, delay); - Timer.Start(); + return; } - public Mobile Healer { get; } - - public Mobile Patient { get; } - - public int Slips { get; set; } - - public Timer Timer { get; private set; } - - public void Slip() + if (!from.InRange(b.GetWorldLocation(), Range)) { - Healer.SendLocalizedMessage(500961); // Your fingers slip! - ++Slips; + from.SendLocalizedMessage(500295); // You are too far away to do that. + return; } - public void StopHeal() + if (from.Target != null) { - m_Table.Remove(Healer); - Timer?.Stop(); - Timer = null; + Target.Cancel(from); + from.Target = null; } - public static BandageContext GetContext(Mobile healer) - { - m_Table.TryGetValue(healer, out var bc); - return bc; - } + from.RevealingAction(); + from.SendLocalizedMessage(500948); // Who will you use the bandages on? - public static SkillName GetPrimarySkill(Mobile m) + new InternalTarget(b).Invoke(from, target); + } + + private class InternalTarget : Target + { + private readonly Bandage _bandage; + + public InternalTarget(Bandage bandage) : base(Bandage.Range, false, TargetFlags.Beneficial) => + _bandage = bandage; + + protected override void OnTarget(Mobile from, object targeted) { - if (!m.Player && (m.Body.IsMonster || m.Body.IsAnimal)) + if (_bandage.Deleted) { - return SkillName.Veterinary; + return; } - return SkillName.Healing; - } - - public static SkillName GetSecondarySkill(Mobile m) - { - if (!m.Player && (m.Body.IsMonster || m.Body.IsAnimal)) + if (targeted is Mobile mobile) { - return SkillName.AnimalLore; - } - - return SkillName.Anatomy; - } - - public void EndHeal() - { - StopHeal(); - - int healerNumber, patientNumber; - var playSound = true; - var checkSkills = false; - - var primarySkill = GetPrimarySkill(Patient); - var secondarySkill = GetSecondarySkill(Patient); - - var petPatient = Patient as BaseCreature; - - if (!Healer.Alive) - { - healerNumber = 500962; // You were unable to finish your work before you died. - patientNumber = -1; - playSound = false; - } - else if (!Healer.InRange(Patient, Bandage.Range)) - { - healerNumber = 500963; // You did not stay close enough to heal your target. - patientNumber = -1; - playSound = false; - } - else if (!Patient.Alive || petPatient?.IsDeadPet == true) - { - var healing = Healer.Skills[primarySkill].Value; - var anatomy = Healer.Skills[secondarySkill].Value; - var chance = (healing - 68.0) / 50.0 - Slips * 0.02; - - if ((checkSkills = healing >= 80.0 && anatomy >= 80.0) && chance > Utility.RandomDouble() - || Core.SE && petPatient is FactionWarHorse && petPatient.ControlMaster == Healer - ) // TODO: Dbl check doesn't check for faction of the horse here? + if (from.InRange(_bandage.GetWorldLocation(), Bandage.Range)) { - if (Patient.Map?.CanFit(Patient.Location, 16, false, false) != true) + if (!(BandageContext.BeginHeal(from, mobile) == null || DuelContext.IsFreeConsume(from))) { - healerNumber = 501042; // Target can not be resurrected at that location. - patientNumber = 502391; // Thou can not be resurrected there! - } - else if (Patient.Region?.IsPartOf("Khaldun") == true) - { - healerNumber = - 1010395; // The veil of death in this area is too strong and resists thy efforts to restore life. - patientNumber = -1; - } - else - { - healerNumber = 500965; // You are able to resurrect your patient. - patientNumber = -1; - - Patient.PlaySound(0x214); - Patient.FixedEffect(0x376A, 10, 16); - - if (petPatient?.IsDeadPet == true) - { - var master = petPatient.ControlMaster; - - if (master != null && Healer == master) - { - petPatient.ResurrectPet(); - - for (var i = 0; i < petPatient.Skills.Length; ++i) - { - petPatient.Skills[i].Base -= 0.1; - } - } - else if (master?.InRange(petPatient, 3) == true) - { - healerNumber = 503255; // You are able to resurrect the creature. - - master.CloseGump(); - master.SendGump(new PetResurrectGump(Healer, petPatient)); - } - else - { - var found = false; - - var friends = petPatient.Friends; - - for (var i = 0; i < friends?.Count; ++i) - { - var friend = friends[i]; - - if (friend.InRange(petPatient, 3)) - { - healerNumber = 503255; // You are able to resurrect the creature. - - friend.CloseGump(); - friend.SendGump(new PetResurrectGump(Healer, petPatient)); - - found = true; - break; - } - } - - if (!found) - { - healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection. - } - } - } - else - { - Patient.CloseGump(); - Patient.SendGump(new ResurrectGump(Patient, Healer)); - } + _bandage.Consume(); } } else { - if (petPatient?.IsDeadPet == true) - { - healerNumber = 503256; // You fail to resurrect the creature. - } - else - { - healerNumber = 500966; // You are unable to resurrect your patient. - } - - patientNumber = -1; + from.SendLocalizedMessage(500295); // You are too far away to do that. } + + return; } - else if (Patient.Poisoned) + + if (targeted is PlagueBeastInnard innard) { - Healer.SendLocalizedMessage(500969); // You finish applying the bandages. - - var healing = Healer.Skills[primarySkill].Value; - var anatomy = Healer.Skills[secondarySkill].Value; - var chance = (healing - 30.0) / 50.0 - Patient.Poison.Level * 0.1 - Slips * 0.02; - - if ((checkSkills = healing >= 60.0 && anatomy >= 60.0) && chance > Utility.RandomDouble()) + if (innard.OnBandage(from)) { - if (Patient.CurePoison(Healer)) - { - healerNumber = Healer == Patient ? -1 : 1010058; // You have cured the target of all poisons. - patientNumber = 1010059; // You have been cured of all poisons. - } - else - { - healerNumber = -1; - patientNumber = -1; - } + _bandage.Consume(); } - else - { - healerNumber = 1010060; // You have failed to cure your target! - patientNumber = -1; - } - } - else if (BleedAttack.IsBleeding(Patient)) - { - healerNumber = 1060088; // You bind the wound and stop the bleeding - patientNumber = 1060167; // The bleeding wounds have healed, you are no longer bleeding! - BleedAttack.EndBleed(Patient, false); + return; } - else if (MortalStrike.IsWounded(Patient)) + + from.SendLocalizedMessage(500970); // Bandages can not be used on that. + } + + protected override void OnNonlocalTarget(Mobile from, object targeted) + { + if (targeted is PlagueBeastInnard innard) { - healerNumber = Healer == Patient ? 1005000 : 1010398; - patientNumber = -1; - playSound = false; - } - else if (Patient.Hits == Patient.HitsMax) - { - healerNumber = 500967; // You heal what little damage your patient had. - patientNumber = -1; + if (innard.OnBandage(from)) + { + _bandage.Consume(); + } } else { - checkSkills = true; - patientNumber = -1; - - var healing = Healer.Skills[primarySkill].Value; - var anatomy = Healer.Skills[secondarySkill].Value; - var chance = (healing + 10.0) / 100.0 - Slips * 0.02; - - if (chance > Utility.RandomDouble()) - { - healerNumber = 500969; // You finish applying the bandages. - - double min, max; - - if (Core.AOS) - { - min = anatomy / 8.0 + healing / 5.0 + 4.0; - max = anatomy / 6.0 + healing / 2.5 + 4.0; - } - else - { - min = anatomy / 5.0 + healing / 5.0 + 3.0; - max = anatomy / 5.0 + healing / 2.0 + 10.0; - } - - var toHeal = min + Utility.RandomDouble() * (max - min); - - if (Patient.Body.IsMonster || Patient.Body.IsAnimal) - { - toHeal += Patient.HitsMax / 100.0; - } - - if (Core.AOS) - { - toHeal -= toHeal * Slips * 0.35; // TODO: Verify algorithm - } - else - { - toHeal -= Slips * 4; - } - - if (toHeal < 1) - { - toHeal = 1; - healerNumber = 500968; // You apply the bandages, but they barely help. - } - - Patient.Heal((int)toHeal, Healer, false); - } - else - { - healerNumber = 500968; // You apply the bandages, but they barely help. - playSound = false; - } - } - - if (healerNumber != -1) - { - Healer.SendLocalizedMessage(healerNumber); - } - - if (patientNumber != -1) - { - Patient.SendLocalizedMessage(patientNumber); - } - - if (playSound) - { - Patient.PlaySound(0x57); - } - - if (checkSkills) - { - Healer.CheckSkill(secondarySkill, 0.0, 120.0); - Healer.CheckSkill(primarySkill, 0.0, 120.0); - } - } - - public static BandageContext BeginHeal(Mobile healer, Mobile patient) - { - var creature = patient as BaseCreature; - - if (patient is Golem) - { - healer.SendLocalizedMessage(500970); // Bandages cannot be used on that. - } - else if (creature?.IsAnimatedDead == true) - { - healer.SendLocalizedMessage(500951); // You cannot heal that. - } - else if (!patient.Poisoned && patient.Hits == patient.HitsMax && !BleedAttack.IsBleeding(patient) && - creature?.IsDeadPet != true) - { - healer.SendLocalizedMessage(500955); // That being is not damaged! - } - else if (!patient.Alive && patient.Map?.CanFit(patient.Location, 16, false, false) != true) - { - healer.SendLocalizedMessage(501042); // Target cannot be resurrected at that location. - } - else if (healer.CanBeBeneficial(patient, true, true)) - { - healer.DoBeneficial(patient); - - var onSelf = healer == patient; - var dex = healer.Dex; - - double seconds; - var resDelay = patient.Alive ? 0.0 : 5.0; - - if (onSelf) - { - if (Core.AOS) - { - seconds = 5.0 + 0.5 * ((double)(120 - dex) / 10); // TODO: Verify algorithm - } - else - { - seconds = 9.4 + 0.6 * ((double)(120 - dex) / 10); - } - } - else - { - if (Core.AOS && GetPrimarySkill(patient) == SkillName.Veterinary) - { - seconds = 2.0; - } - else if (Core.AOS) - { - if (dex < 204) - { - seconds = 3.2 - Math.Sin((double)dex / 130) * 2.5 + resDelay; - } - else - { - seconds = 0.7 + resDelay; - } - } - else - { - if (dex >= 100) - { - seconds = 3.0 + resDelay; - } - else if (dex >= 40) - { - seconds = 4.0 + resDelay; - } - else - { - seconds = 5.0 + resDelay; - } - } - } - - var context = GetContext(healer); - - context?.StopHeal(); - seconds *= 1000; - - context = new BandageContext(healer, patient, TimeSpan.FromMilliseconds(seconds)); - - m_Table[healer] = context; - - if (!onSelf) - { - patient.SendLocalizedMessage(1008078, false, healer.Name); // : Attempting to heal you. - } - - healer.SendLocalizedMessage(500956); // You begin applying the bandages. - return context; - } - - return null; - } - - private class InternalTimer : Timer - { - private readonly BandageContext m_Context; - - public InternalTimer(BandageContext context, TimeSpan delay) : base(delay) - { - m_Context = context; - } - - protected override void OnTick() - { - m_Context.EndHeal(); + base.OnNonlocalTarget(from, targeted); } } } } + +public class BandageContext : Timer +{ + private static readonly Dictionary _table = new(); + + public BandageContext(Mobile healer, Mobile patient, TimeSpan delay) : base(delay) + { + Healer = healer; + Patient = patient; + } + + public Mobile Healer { get; } + + public Mobile Patient { get; } + + public int Slips { get; set; } + + public void Slip() + { + Healer.SendLocalizedMessage(500961); // Your fingers slip! + ++Slips; + } + + public void StopHeal() + { + _table.Remove(Healer); + Stop(); + } + + public static BandageContext GetContext(Mobile healer) + { + _table.TryGetValue(healer, out var bc); + return bc; + } + + public static SkillName GetPrimarySkill(Mobile m) + { + if (!m.Player && (m.Body.IsMonster || m.Body.IsAnimal)) + { + return SkillName.Veterinary; + } + + return SkillName.Healing; + } + + public static SkillName GetSecondarySkill(Mobile m) + { + if (!m.Player && (m.Body.IsMonster || m.Body.IsAnimal)) + { + return SkillName.AnimalLore; + } + + return SkillName.Anatomy; + } + + protected override void OnTick() + { + StopHeal(); + + int healerNumber; + int patientNumber; + var playSound = true; + bool checkSkills; + + var primarySkill = GetPrimarySkill(Patient); + var secondarySkill = GetSecondarySkill(Patient); + + var petPatient = Patient as BaseCreature; + + if (!Healer.Alive) + { + Healer.SendLocalizedMessage(500962); // You were unable to finish your work before you died. + return; + } + + if (!Healer.InRange(Patient, Bandage.Range)) + { + Healer.SendLocalizedMessage(500963); // You did not stay close enough to heal your target. + return; + } + + if (!Patient.Alive || petPatient?.IsDeadPet == true) + { + if (Patient.Map?.CanFit(Patient.Location, 16, false, false) != true) + { + Healer.SendLocalizedMessage(501042); // Target can not be resurrected at that location. + Patient.SendLocalizedMessage(502391); // Thou can not be resurrected there! + return; + } + + if (Patient.Region?.IsPartOf("Khaldun") == true) + { + // The veil of death in this area is too strong and resists thy efforts to restore life. + Healer.SendLocalizedMessage(1010395); + return; + } + + var healing = Healer.Skills[primarySkill].Value; + var anatomy = Healer.Skills[secondarySkill].Value; + var chance = (healing - 68.0) / 50.0 - Slips * 0.02; + checkSkills = healing >= 80.0 && anatomy >= 80.0; + + // TODO: Dbl check doesn't check for faction of the horse here? + if (!(checkSkills && chance > Utility.RandomDouble()) + && (!Core.SE || petPatient is not FactionWarHorse || petPatient.ControlMaster != Healer)) + { + if (petPatient?.IsDeadPet == true) + { + Healer.SendLocalizedMessage(503256); // You fail to resurrect the creature. + } + else + { + Healer.SendLocalizedMessage(500966); // You are unable to resurrect your patient. + } + + return; + } + + healerNumber = 500965; // You are able to resurrect your patient. + patientNumber = -1; + + Patient.PlaySound(0x214); + Patient.FixedEffect(0x376A, 10, 16); + + if (petPatient?.IsDeadPet == true) + { + var master = petPatient.ControlMaster; + + if (master != null && Healer == master) + { + petPatient.ResurrectPet(); + + for (var i = 0; i < petPatient.Skills.Length; ++i) + { + petPatient.Skills[i].Base -= 0.1; + } + } + else if (master?.InRange(petPatient, 3) == true) + { + healerNumber = 503255; // You are able to resurrect the creature. + + master.CloseGump(); + master.SendGump(new PetResurrectGump(Healer, petPatient)); + } + else + { + var found = false; + + var friends = petPatient.Friends; + + for (var i = 0; i < friends?.Count; ++i) + { + var friend = friends[i]; + + if (friend.InRange(petPatient, 3)) + { + healerNumber = 503255; // You are able to resurrect the creature. + + friend.CloseGump(); + friend.SendGump(new PetResurrectGump(Healer, petPatient)); + + found = true; + break; + } + } + + if (!found) + { + healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection. + } + } + } + else + { + Patient.CloseGump(); + Patient.SendGump(new ResurrectGump(Patient, Healer)); + } + } + else if (Patient.Poisoned) + { + Healer.SendLocalizedMessage(500969); // You finish applying the bandages. + + var healing = Healer.Skills[primarySkill].Value; + var anatomy = Healer.Skills[secondarySkill].Value; + var chance = (healing - 30.0) / 50.0 - Patient.Poison.Level * 0.1 - Slips * 0.02; + checkSkills = healing >= 60.0 && anatomy >= 60.0; + + if (!(checkSkills && chance > Utility.RandomDouble())) + { + Healer.SendLocalizedMessage(1010060); // You have failed to cure your target! + return; + } + + if (Patient.CurePoison(Healer)) + { + healerNumber = Healer == Patient ? -1 : 1010058; // You have cured the target of all poisons. + patientNumber = 1010059; // You have been cured of all poisons. + } + else + { + healerNumber = -1; + patientNumber = -1; + } + } + else + { + if (BleedAttack.IsBleeding(Patient)) + { + Healer.SendLocalizedMessage(1060088); // You bind the wound and stop the bleeding + Patient.SendLocalizedMessage(1060167); // The bleeding wounds have healed, you are no longer bleeding! + + BleedAttack.EndBleed(Patient, false); + return; + } + + if (MortalStrike.IsWounded(Patient)) + { + if (Healer == Patient) + { + Healer.SendLocalizedMessage(1005000); // You cannot heal yourself in your current state. + } + else + { + Healer.SendLocalizedMessage(1010398); // You cannot heal that target in their current state. + } + + return; + } + + if (Patient.Hits == Patient.HitsMax) + { + Healer.SendLocalizedMessage(1010395); // You heal what little damage your patient had. + return; + } + + checkSkills = true; + patientNumber = -1; + + var healing = Healer.Skills[primarySkill].Value; + var anatomy = Healer.Skills[secondarySkill].Value; + var chance = (healing + 10.0) / 100.0 - Slips * 0.02; + + if (chance > Utility.RandomDouble()) + { + healerNumber = 500969; // You finish applying the bandages. + + double min, max; + + if (Core.AOS) + { + min = anatomy / 8.0 + healing / 5.0 + 4.0; + max = anatomy / 6.0 + healing / 2.5 + 4.0; + } + else + { + min = anatomy / 5.0 + healing / 5.0 + 3.0; + max = anatomy / 5.0 + healing / 2.0 + 10.0; + } + + var toHeal = min + Utility.RandomDouble() * (max - min); + + if (Patient.Body.IsMonster || Patient.Body.IsAnimal) + { + toHeal += Patient.HitsMax / 100.0; + } + + if (Core.AOS) + { + toHeal -= toHeal * Slips * 0.35; // TODO: Verify algorithm + } + else + { + toHeal -= Slips * 4; + } + + if (toHeal < 1) + { + toHeal = 1; + healerNumber = 500968; // You apply the bandages, but they barely help. + } + + Patient.Heal((int)toHeal, Healer, false); + } + else + { + healerNumber = 500968; // You apply the bandages, but they barely help. + playSound = false; + } + } + + if (healerNumber != -1) + { + Healer.SendLocalizedMessage(healerNumber); + } + + if (patientNumber != -1) + { + Patient.SendLocalizedMessage(patientNumber); + } + + if (playSound) + { + Patient.PlaySound(0x57); + } + + if (checkSkills) + { + Healer.CheckSkill(secondarySkill, 0.0, 120.0); + Healer.CheckSkill(primarySkill, 0.0, 120.0); + } + } + + public static BandageContext BeginHeal(Mobile healer, Mobile patient) + { + var creature = patient as BaseCreature; + + if (patient is Golem) + { + healer.SendLocalizedMessage(500970); // Bandages cannot be used on that. + } + else if (creature?.IsAnimatedDead == true) + { + healer.SendLocalizedMessage(500951); // You cannot heal that. + } + else if (!patient.Poisoned && patient.Hits == patient.HitsMax && !BleedAttack.IsBleeding(patient) && + creature?.IsDeadPet != true) + { + healer.SendLocalizedMessage(500955); // That being is not damaged! + } + else if (!patient.Alive && patient.Map?.CanFit(patient.Location, 16, false, false) != true) + { + healer.SendLocalizedMessage(501042); // Target cannot be resurrected at that location. + } + else if (healer.CanBeBeneficial(patient, true, true)) + { + healer.DoBeneficial(patient); + + var onSelf = healer == patient; + var dex = healer.Dex; + + double seconds; + var resDelay = patient.Alive ? 0.0 : 5.0; + + if (onSelf) + { + if (Core.AOS) + { + seconds = 5.0 + 0.5 * ((double)(120 - dex) / 10); // TODO: Verify algorithm + } + else + { + seconds = 9.4 + 0.6 * ((double)(120 - dex) / 10); + } + } + else + { + if (Core.AOS && GetPrimarySkill(patient) == SkillName.Veterinary) + { + seconds = 2.0; + } + else if (Core.AOS) + { + if (dex < 204) + { + seconds = 3.2 - Math.Sin((double)dex / 130) * 2.5 + resDelay; + } + else + { + seconds = 0.7 + resDelay; + } + } + else if (dex >= 100) + { + seconds = 3.0 + resDelay; + } + else if (dex >= 40) + { + seconds = 4.0 + resDelay; + } + else + { + seconds = 5.0 + resDelay; + } + } + + var context = GetContext(healer); + + context?.StopHeal(); + seconds *= 1000; + + context = new BandageContext(healer, patient, TimeSpan.FromMilliseconds(seconds)); + _table[healer] = context; + context.Start(); + + if (!onSelf) + { + patient.SendLocalizedMessage(1008078, false, healer.Name); // : Attempting to heal you. + } + + healer.SendLocalizedMessage(500956); // You begin applying the bandages. + return context; + } + + return null; + } +} diff --git a/Projects/UOContent/Items/Skill Items/Misc/FireHorn.cs b/Projects/UOContent/Items/Skill Items/Misc/FireHorn.cs index edd2eeb4d..87eeea454 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/FireHorn.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/FireHorn.cs @@ -1,245 +1,227 @@ using System; +using ModernUO.Serialization; using Server.Collections; -using Server.Network; using Server.Spells; using Server.Targeting; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0)] +public partial class FireHorn : Item { - public class FireHorn : Item + [Constructible] + public FireHorn() : base(0xFC7) { - [Constructible] - public FireHorn() : base(0xFC7) + Hue = 0x466; + Weight = 1.0; + } + + public override int LabelNumber => 1060456; // fire horn + + private bool CheckUse(Mobile from) + { + if (!IsAccessibleTo(from)) { - Hue = 0x466; - Weight = 1.0; + return false; } - public FireHorn(Serial serial) : base(serial) + if (from.Map != Map || !from.InRange(GetWorldLocation(), 2)) { + from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. + return false; } - public override int LabelNumber => 1060456; // fire horn - - private bool CheckUse(Mobile from) + if (!from.CanBeginAction()) { - if (!IsAccessibleTo(from)) - { - return false; - } - - if (from.Map != Map || !from.InRange(GetWorldLocation(), 2)) - { - from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. - return false; - } - - if (!from.CanBeginAction()) - { - from.SendLocalizedMessage(1049615); // You must take a moment to catch your breath. - return false; - } - - if (from.Backpack?.GetAmount(typeof(SulfurousAsh)) >= (Core.AOS ? 4 : 15)) - { - return true; - } + from.SendLocalizedMessage(1049615); // You must take a moment to catch your breath. + return false; + } + if (from.Backpack?.GetAmount(typeof(SulfurousAsh)) < (Core.AOS ? 4 : 15)) + { from.SendLocalizedMessage(1049617); // You do not have enough sulfurous ash. return false; } - public override void OnDoubleClick(Mobile from) + return true; + } + + public override void OnDoubleClick(Mobile from) + { + if (CheckUse(from)) { - if (CheckUse(from)) + from.SendLocalizedMessage(1049620); // Select an area to incinerate. + from.Target = new InternalTarget(this); + } + } + + public void Use(Mobile from, Point3D loc) + { + if (!CheckUse(from)) + { + return; + } + + from.BeginAction(); + Timer.StartTimer(Core.AOS ? TimeSpan.FromSeconds(6.0) : TimeSpan.FromSeconds(12.0), + () => { - from.SendLocalizedMessage(1049620); // Select an area to incinerate. - from.Target = new InternalTarget(this); + from.EndAction(); + from.SendLocalizedMessage(1049621); // You catch your breath. + } + ); + + var music = from.Skills.Musicianship.Fixed; + + var sucChance = 500 + (music - 775) * 2; + var dSucChance = sucChance / 1000.0; + + if (!from.CheckSkill(SkillName.Musicianship, dSucChance)) + { + from.SendLocalizedMessage(1049618); // The horn emits a pathetic squeak. + from.PlaySound(0x18A); + return; + } + + var sulfAsh = Core.AOS ? 4 : 15; + from.Backpack.ConsumeUpTo(typeof(SulfurousAsh), sulfAsh); + + from.PlaySound(0x15F); + Effects.SendMovingEffect( + from, + loc, + 0x36D4, + 5, + 0, + false, + true + ); + + var playerVsPlayer = false; + var eable = from.Map.GetMobilesInRange(loc, 2); + + using var targets = PooledRefQueue.Create(); + foreach (var m in eable) + { + if (from != m && SpellHelper.ValidIndirectTarget(from, m) && from.CanBeHarmful(m, false) && + (!Core.AOS || from.InLOS(m))) + { + targets.Enqueue(m); + + if (m.Player) + { + playerVsPlayer = true; + } } } - public void Use(Mobile from, Point3D loc) + eable.Free(); + + if (targets.Count > 0) { - if (!CheckUse(from)) + var prov = from.Skills.Provocation.Fixed; + var disc = from.Skills.Discordance.Fixed; + var peace = from.Skills.Peacemaking.Fixed; + + int minDamage, maxDamage; + + if (Core.AOS) + { + var musicScaled = music + Math.Max(0, music - 900) * 2; + var provScaled = prov + Math.Max(0, prov - 900) * 2; + var discScaled = disc + Math.Max(0, disc - 900) * 2; + var peaceScaled = peace + Math.Max(0, peace - 900) * 2; + + var weightAvg = (musicScaled + provScaled * 3 + discScaled * 3 + peaceScaled) / 80; + + int avgDamage; + if (playerVsPlayer) + { + avgDamage = weightAvg / 3; + } + else + { + avgDamage = weightAvg / 2; + } + + minDamage = avgDamage * 9 / 10; + maxDamage = avgDamage * 10 / 9; + } + else + { + var total = prov + disc / 5 + peace / 5; + + if (playerVsPlayer) + { + total /= 3; + } + + maxDamage = total * 2 / 30; + minDamage = maxDamage * 7 / 10; + } + + double damage = Utility.RandomMinMax(minDamage, maxDamage); + + if (Core.AOS && targets.Count > 1) + { + damage = damage * 2 / targets.Count; + } + else if (!Core.AOS) + { + damage /= targets.Count; + } + + while (targets.Count > 0) + { + var m = targets.Dequeue(); + + var toDeal = damage; + + if (!Core.AOS && m.CheckSkill(SkillName.MagicResist, 0.0, 120.0)) + { + toDeal *= 0.5; + m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy. + } + + from.DoHarmful(m); + SpellHelper.Damage(TimeSpan.Zero, m, from, toDeal, 0, 100, 0, 0, 0); + + Effects.SendTargetEffect(m, 0x3709, 10, 30); + } + } + + var breakChance = Core.AOS ? 0.01 : 0.16; + if (Utility.RandomDouble() < breakChance) + { + from.SendLocalizedMessage(1049619); // The fire horn crumbles in your hands. + Delete(); + } + } + + private class InternalTarget : Target + { + private readonly FireHorn m_Horn; + + public InternalTarget(FireHorn horn) : base(Core.AOS ? 3 : 2, true, TargetFlags.Harmful) => m_Horn = horn; + + protected override void OnTarget(Mobile from, object targeted) + { + if (m_Horn.Deleted) { return; } - from.BeginAction(); - Timer.StartTimer(Core.AOS ? TimeSpan.FromSeconds(6.0) : TimeSpan.FromSeconds(12.0), - () => - { - from.EndAction(); - from.SendLocalizedMessage(1049621); // You catch your breath. - } - ); - - var music = from.Skills.Musicianship.Fixed; - - var sucChance = 500 + (music - 775) * 2; - var dSucChance = sucChance / 1000.0; - - if (!from.CheckSkill(SkillName.Musicianship, dSucChance)) + Point3D loc; + if (targeted is Item item) { - from.SendLocalizedMessage(1049618); // The horn emits a pathetic squeak. - from.PlaySound(0x18A); - return; + loc = item.GetWorldLocation(); + } + else + { + loc = new Point3D(targeted as IPoint3D); } - var sulfAsh = Core.AOS ? 4 : 15; - from.Backpack.ConsumeUpTo(typeof(SulfurousAsh), sulfAsh); - - from.PlaySound(0x15F); - Effects.SendMovingEffect( - from, - loc, - 0x36D4, - 5, - 0, - false, - true - ); - - var playerVsPlayer = false; - var eable = from.Map.GetMobilesInRange(loc, 2); - - using var targets = PooledRefQueue.Create(); - foreach (var m in eable) - { - if (from != m && SpellHelper.ValidIndirectTarget(from, m) && from.CanBeHarmful(m, false) && - (!Core.AOS || from.InLOS(m))) - { - targets.Enqueue(m); - - if (m.Player) - { - playerVsPlayer = true; - } - } - } - - eable.Free(); - - if (targets.Count > 0) - { - var prov = from.Skills.Provocation.Fixed; - var disc = from.Skills.Discordance.Fixed; - var peace = from.Skills.Peacemaking.Fixed; - - int minDamage, maxDamage; - - if (Core.AOS) - { - var musicScaled = music + Math.Max(0, music - 900) * 2; - var provScaled = prov + Math.Max(0, prov - 900) * 2; - var discScaled = disc + Math.Max(0, disc - 900) * 2; - var peaceScaled = peace + Math.Max(0, peace - 900) * 2; - - var weightAvg = (musicScaled + provScaled * 3 + discScaled * 3 + peaceScaled) / 80; - - int avgDamage; - if (playerVsPlayer) - { - avgDamage = weightAvg / 3; - } - else - { - avgDamage = weightAvg / 2; - } - - minDamage = avgDamage * 9 / 10; - maxDamage = avgDamage * 10 / 9; - } - else - { - var total = prov + disc / 5 + peace / 5; - - if (playerVsPlayer) - { - total /= 3; - } - - maxDamage = total * 2 / 30; - minDamage = maxDamage * 7 / 10; - } - - double damage = Utility.RandomMinMax(minDamage, maxDamage); - - if (Core.AOS && targets.Count > 1) - { - damage = damage * 2 / targets.Count; - } - else if (!Core.AOS) - { - damage /= targets.Count; - } - - while (targets.Count > 0) - { - var m = targets.Dequeue(); - - var toDeal = damage; - - if (!Core.AOS && m.CheckSkill(SkillName.MagicResist, 0.0, 120.0)) - { - toDeal *= 0.5; - m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy. - } - - from.DoHarmful(m); - SpellHelper.Damage(TimeSpan.Zero, m, from, toDeal, 0, 100, 0, 0, 0); - - Effects.SendTargetEffect(m, 0x3709, 10, 30); - } - } - - var breakChance = Core.AOS ? 0.01 : 0.16; - if (Utility.RandomDouble() < breakChance) - { - from.SendLocalizedMessage(1049619); // The fire horn crumbles in your hands. - Delete(); - } - } - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.WriteEncodedInt(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadEncodedInt(); - } - - private class InternalTarget : Target - { - private readonly FireHorn m_Horn; - - public InternalTarget(FireHorn horn) : base(Core.AOS ? 3 : 2, true, TargetFlags.Harmful) => m_Horn = horn; - - protected override void OnTarget(Mobile from, object targeted) - { - if (m_Horn.Deleted) - { - return; - } - - Point3D loc; - if (targeted is Item item) - { - loc = item.GetWorldLocation(); - } - else - { - loc = new Point3D(targeted as IPoint3D); - } - - m_Horn.Use(from, loc); - } + m_Horn.Use(from, loc); } } } diff --git a/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs b/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs index 9f7d08298..7f8ce4fe1 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs @@ -1,124 +1,85 @@ +using ModernUO.Serialization; using Server.Engines.Craft; using Server.Mobiles; -using Server.Network; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0, false)] +public partial class RecipeScroll : Item { - public class RecipeScroll : Item + [InvalidateProperties] + [SerializableField(0)] + [SerializedCommandProperty(AccessLevel.GameMaster)] + private int _recipeID; + + public RecipeScroll(Recipe r) : this(r.ID) { - private int m_RecipeID; + } - public RecipeScroll(Recipe r) : this(r.ID) + [Constructible] + public RecipeScroll(int recipeID) : base(0x2831) => _recipeID = recipeID; + + public override int LabelNumber => 1074560; // recipe scroll + + public Recipe Recipe + { + get { + Recipe.Recipes.TryGetValue(_recipeID, out var recipe); + return recipe; } + } - [Constructible] - public RecipeScroll(int recipeID) : base(0x2831) => m_RecipeID = recipeID; + public override void GetProperties(IPropertyList list) + { + base.GetProperties(list); - public RecipeScroll(Serial serial) - : base(serial) + var r = Recipe; + + if (r != null) { - } - - public override int LabelNumber => 1074560; // recipe scroll - - [CommandProperty(AccessLevel.GameMaster)] - public int RecipeID - { - get => m_RecipeID; - set + if (r.TextDefinition.Number > 0) { - m_RecipeID = value; - InvalidateProperties(); + list.Add(1049644, r.TextDefinition.Number); // [~1_stuff~] + } + else + { + list.Add(1049644, r.TextDefinition.String); // [~1_stuff~] } } + } - public Recipe Recipe + public override void OnDoubleClick(Mobile from) + { + if (!from.InRange(GetWorldLocation(), 2)) { - get - { - Recipe.Recipes.TryGetValue(m_RecipeID, out var recipe); - return recipe; - } + from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. + return; } - public override void GetProperties(IPropertyList list) + var r = Recipe; + + if (r != null && from is PlayerMobile pm) { - base.GetProperties(list); - - var r = Recipe; - - if (r != null) + if (!pm.HasRecipe(r)) { - if (r.TextDefinition.Number > 0) + var chance = r.CraftItem.GetSuccessChance(pm, null, r.CraftSystem, false, out var allRequiredSkills); + + if (allRequiredSkills && chance >= 0.0) { - list.Add(1049644, r.TextDefinition.Number); // [~1_stuff~] + // You have learned a new recipe: ~1_RECIPE~ + pm.SendLocalizedMessage(1073451, r.TextDefinition.ToString()); + pm.AcquireRecipe(r); + Delete(); } else { - list.Add(1049644, r.TextDefinition.String); // [~1_stuff~] + pm.SendLocalizedMessage(1044153); // You don't have the required skills to attempt this item. } } - } - - public override void OnDoubleClick(Mobile from) - { - if (!from.InRange(GetWorldLocation(), 2)) + else { - from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. - return; - } - - var r = Recipe; - - if (r != null && from is PlayerMobile pm) - { - if (!pm.HasRecipe(r)) - { - var chance = r.CraftItem.GetSuccessChance(pm, null, r.CraftSystem, false, out var allRequiredSkills); - - if (allRequiredSkills && chance >= 0.0) - { - // You have learned a new recipe: ~1_RECIPE~ - pm.SendLocalizedMessage(1073451, r.TextDefinition.ToString()); - pm.AcquireRecipe(r); - Delete(); - } - else - { - pm.SendLocalizedMessage(1044153); // You don't have the required skills to attempt this item. - } - } - else - { - pm.SendLocalizedMessage(1073427); // You already know this recipe. - } - } - } - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - - writer.Write(m_RecipeID); - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - - switch (version) - { - case 0: - { - m_RecipeID = reader.ReadInt(); - - break; - } + pm.SendLocalizedMessage(1073427); // You already know this recipe. } } } diff --git a/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs b/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs index 8b569c313..dbb8df68c 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/RepairDeed.cs @@ -1,276 +1,227 @@ using System; +using ModernUO.Serialization; using Server.Engines.Craft; using Server.Factions; using Server.Mobiles; using Server.Regions; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(1, false)] +public partial class RepairDeed : Item { - public class RepairDeed : Item + public enum RepairSkillType { - public enum RepairSkillType + Smithing, + Tailoring, + Tinkering, + Carpentry, + Fletching + } + + [InvalidateProperties] + [SerializableField(0)] + [SerializedCommandProperty(AccessLevel.GameMaster)] + private RepairSkillType _skill; + + [InvalidateProperties] + [SerializableField(2)] + [SerializedCommandProperty(AccessLevel.GameMaster)] + private string _crafter; + + [Constructible] + public RepairDeed(RepairSkillType skill, double level, bool normalizeLevel) : this( + skill, + level, + null, + normalizeLevel + ) + { + } + + [Constructible] + public RepairDeed( + RepairSkillType skill = RepairSkillType.Smithing, double level = 100.0, + Mobile crafter = null, bool normalizeLevel = true + ) : base(0x14F0) + { + if (normalizeLevel) { - Smithing, - Tailoring, - Tinkering, - Carpentry, - Fletching + SkillLevel = (int)(level / 10) * 10; + } + else + { + SkillLevel = level; } - private Mobile m_Crafter; + _skill = skill; + _crafter = crafter?.RawName; + Hue = 0x1BC; + LootType = LootType.Blessed; + } - private RepairSkillType m_Skill; - private double m_SkillLevel; + public override bool DisplayLootType => false; - [Constructible] - public RepairDeed(RepairSkillType skill, double level, bool normalizeLevel) : this( - skill, - level, - null, - normalizeLevel - ) + [CommandProperty(AccessLevel.GameMaster)] + [SerializableProperty(1)] + public double SkillLevel + { + get => _skillLevel; + set { + _skillLevel = Math.Clamp(value, 0, 120.0); + InvalidateProperties(); + this.MarkDirty(); + } + } + + public override void AddNameProperty(IPropertyList list) + { + // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~. + list.Add(1061133, $"{GetSkillTitle(_skillLevel)}\t{RepairSkillInfo.GetInfo(_skill).Name}"); + } + + public override void GetProperties(IPropertyList list) + { + base.GetProperties(list); + + if (_crafter != null) + { + list.Add(1050043, _crafter); // crafted by ~1_NAME~ + } + } + + public override void OnSingleClick(Mobile from) + { + if (Deleted || !from.CanSee(this)) + { + return; } - [Constructible] - public RepairDeed( - RepairSkillType skill = RepairSkillType.Smithing, double level = 100.0, - Mobile crafter = null, bool normalizeLevel = true - ) : base(0x14F0) + // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~. + LabelTo(from, 1061133, $"{GetSkillTitle(_skillLevel)}\t{RepairSkillInfo.GetInfo(_skill).Name}"); + + if (_crafter != null) { - if (normalizeLevel) + LabelTo(from, 1050043, _crafter); // crafted by ~1_NAME~ + } + } + + private static TextDefinition GetSkillTitle(double skillLevel) + { + var skill = (int)(skillLevel / 10); + + if (skill >= 11) + { + return 1062008 + skill - 11; + } + + if (skill >= 5) + { + return 1061123 + skill - 5; + } + + return skill switch + { + 4 => "a Novice", + 3 => "a Neophyte", + _ => "a Newbie" + }; + } + + public static RepairSkillType GetTypeFor(CraftSystem s) + { + for (var i = 0; i < RepairSkillInfo.Table.Length; i++) + { + if (RepairSkillInfo.Table[i].System == s) { - SkillLevel = (int)(level / 10) * 10; - } - else - { - SkillLevel = level; - } - - m_Skill = skill; - m_Crafter = crafter; - Hue = 0x1BC; - LootType = LootType.Blessed; - } - - public RepairDeed(Serial serial) : base(serial) - { - } - - public override bool DisplayLootType => false; - - [CommandProperty(AccessLevel.GameMaster)] - public RepairSkillType RepairSkill - { - get => m_Skill; - set - { - m_Skill = value; - InvalidateProperties(); + return (RepairSkillType)i; } } - [CommandProperty(AccessLevel.GameMaster)] - public double SkillLevel + return RepairSkillType.Smithing; + } + + public override void OnDoubleClick(Mobile from) + { + if (Check(from)) { - get => m_SkillLevel; - set - { - m_SkillLevel = Math.Clamp(value, 0, 120.0); - InvalidateProperties(); - } + Repair.Do(from, RepairSkillInfo.GetInfo(_skill).System, this); } + } - [CommandProperty(AccessLevel.GameMaster)] - public Mobile Crafter + public bool Check(Mobile from) + { + if (!IsChildOf(from.Backpack)) { - get => m_Crafter; - set - { - m_Crafter = value; - InvalidateProperties(); - } - } - - public override void AddNameProperty(IPropertyList list) - { - list.Add( - 1061133, - $"{GetSkillTitle(m_SkillLevel)}\t{RepairSkillInfo.GetInfo(m_Skill).Name}" - ); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~. - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - if (m_Crafter != null) - { - list.Add(1050043, m_Crafter.Name); // crafted by ~1_NAME~ - } - - // On OSI it says it's exceptional. Intentional difference. - } - - public override void OnSingleClick(Mobile from) - { - if (Deleted || !from.CanSee(this)) - { - return; - } - - LabelTo( - from, - 1061133, - $"{GetSkillTitle(m_SkillLevel)}\t{RepairSkillInfo.GetInfo(m_Skill).Name}" - ); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~. - - if (m_Crafter != null) - { - LabelTo(from, 1050043, m_Crafter.Name); // crafted by ~1_NAME~ - } - } - - private static TextDefinition GetSkillTitle(double skillLevel) - { - var skill = (int)(skillLevel / 10); - - if (skill >= 11) - { - return 1062008 + skill - 11; - } - - if (skill >= 5) - { - return 1061123 + skill - 5; - } - - return skill switch - { - 4 => "a Novice", - 3 => "a Neophyte", - _ => "a Newbie" - }; - } - - public static RepairSkillType GetTypeFor(CraftSystem s) - { - for (var i = 0; i < RepairSkillInfo.Table.Length; i++) - { - if (RepairSkillInfo.Table[i].System == s) - { - return (RepairSkillType)i; - } - } - - return RepairSkillType.Smithing; - } - - public override void OnDoubleClick(Mobile from) - { - if (Check(from)) - { - Repair.Do(from, RepairSkillInfo.GetInfo(m_Skill).System, this); - } - } - - public bool Check(Mobile from) - { - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1047012); // The contract must be in your backpack to use it. - } - else if (!VerifyRegion(from)) - { - RepairSkillInfo.GetInfo(m_Skill).NotNearbyMessage.SendMessageTo(from); - } - else - { - return true; - } - + from.SendLocalizedMessage(1047012); // The contract must be in your backpack to use it. return false; } - public bool VerifyRegion(Mobile m) => m.Region.IsPartOf() && - Faction.IsNearType(m, RepairSkillInfo.GetInfo(m_Skill).NearbyTypes, 6); - - public override void Serialize(IGenericWriter writer) + if (!VerifyRegion(from)) { - base.Serialize(writer); - - writer.Write(0); // version - - writer.Write((int)m_Skill); - writer.Write(m_SkillLevel); - writer.Write(m_Crafter); + RepairSkillInfo.GetInfo(_skill).NotNearbyMessage.SendMessageTo(from); + return false; } - public override void Deserialize(IGenericReader reader) + return true; + } + + public bool VerifyRegion(Mobile m) => m.Region.IsPartOf() && + Faction.IsNearType(m, RepairSkillInfo.GetInfo(_skill).NearbyTypes, 6); + + private void Deserialize(IGenericReader reader, int version) + { + _skill = (RepairSkillType)reader.ReadInt(); + _skillLevel = reader.ReadDouble(); + Timer.DelayCall((item, crafter) => item._crafter = crafter?.RawName, this, reader.ReadEntity()); + } + + private class RepairSkillInfo + { + public RepairSkillInfo( + CraftSystem system, Type[] nearbyTypes, TextDefinition notNearbyMessage, + TextDefinition name + ) { - base.Deserialize(reader); - - var version = reader.ReadInt(); - - switch (version) - { - case 0: - { - m_Skill = (RepairSkillType)reader.ReadInt(); - m_SkillLevel = reader.ReadDouble(); - m_Crafter = reader.ReadEntity(); - - break; - } - } + System = system; + NearbyTypes = nearbyTypes; + NotNearbyMessage = notNearbyMessage; + Name = name; } - private class RepairSkillInfo + public RepairSkillInfo(CraftSystem system, Type nearbyType, TextDefinition notNearbyMessage, TextDefinition name) + : this(system, new[] { nearbyType }, notNearbyMessage, name) { - public RepairSkillInfo( - CraftSystem system, Type[] nearbyTypes, TextDefinition notNearbyMessage, - TextDefinition name - ) + } + + public TextDefinition NotNearbyMessage { get; } + + public TextDefinition Name { get; } + + public CraftSystem System { get; } + + public Type[] NearbyTypes { get; } + + public static RepairSkillInfo[] Table { get; } = + { + new(DefBlacksmithy.CraftSystem, typeof(Blacksmith), 1047013, 1023015), + new(DefTailoring.CraftSystem, typeof(Tailor), 1061132, 1022981), + new(DefTinkering.CraftSystem, typeof(Tinker), 1061166, 1022983), + new(DefCarpentry.CraftSystem, typeof(Carpenter), 1061135, 1060774), + new(DefBowFletching.CraftSystem, typeof(Bowyer), 1061134, 1023005) + }; + + public static RepairSkillInfo GetInfo(RepairSkillType type) + { + var v = (int)type; + + if (v < 0 || v >= Table.Length) { - System = system; - NearbyTypes = nearbyTypes; - NotNearbyMessage = notNearbyMessage; - Name = name; + v = 0; } - public RepairSkillInfo(CraftSystem system, Type nearbyType, TextDefinition notNearbyMessage, TextDefinition name) - : this(system, new[] { nearbyType }, notNearbyMessage, name) - { - } - - public TextDefinition NotNearbyMessage { get; } - - public TextDefinition Name { get; } - - public CraftSystem System { get; } - - public Type[] NearbyTypes { get; } - - public static RepairSkillInfo[] Table { get; } = - { - new(DefBlacksmithy.CraftSystem, typeof(Blacksmith), 1047013, 1023015), - new(DefTailoring.CraftSystem, typeof(Tailor), 1061132, 1022981), - new(DefTinkering.CraftSystem, typeof(Tinker), 1061166, 1022983), - new(DefCarpentry.CraftSystem, typeof(Carpenter), 1061135, 1060774), - new(DefBowFletching.CraftSystem, typeof(Bowyer), 1061134, 1023005) - }; - - public static RepairSkillInfo GetInfo(RepairSkillType type) - { - var v = (int)type; - - if (v < 0 || v >= Table.Length) - { - v = 0; - } - - return Table[v]; - } + return Table[v]; } } } diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs index 4d311bd72..2dba48f6f 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/CreepyPortrait.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/CreepyPortrait.cs index 294e8dd00..7aaea6414 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/CreepyPortrait.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/CreepyPortrait.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/DisturbingPortrait.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/DisturbingPortrait.cs index a300366c4..6d1e006f3 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/DisturbingPortrait.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/DisturbingPortrait.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieBlue.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieBlue.cs index a0471566c..e0823578d 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieBlue.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieBlue.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { [Flippable(0x2A75, 0x2A76)] diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieGreen.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieGreen.cs index 0421348b1..b522de779 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieGreen.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieGreen.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { [Flippable(0x2A71, 0x2A72)] diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieLime.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieLime.cs index 4263cd3db..ccb3039a5 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieLime.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieLime.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { [Flippable(0x2A77, 0x2A78)] diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieOrange.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieOrange.cs index e4c135522..eaff4651c 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieOrange.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieOrange.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { [Flippable(0x2A73, 0x2A74)] diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieWhite.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieWhite.cs index 6d15eeb94..febd7eb43 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieWhite.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/MountedPixieWhite.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { [Flippable(0x2A79, 0x2A7A)] diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/UnsettlingPortrait.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/UnsettlingPortrait.cs index be797ef0b..143a1979c 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/UnsettlingPortrait.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/UnsettlingPortrait.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs b/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs index 4d73c97a9..05b35a267 100644 --- a/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs +++ b/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using Server.ContextMenus; using Server.Gumps; using Server.Multis; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs b/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs index 9718693ac..d4f1b16bb 100644 --- a/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs +++ b/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Server.ContextMenus; using Server.Gumps; using Server.Multis; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Heritage Items/FruitTrees.cs b/Projects/UOContent/Items/Special/Heritage Items/FruitTrees.cs index 0ef623565..0af7d0727 100644 --- a/Projects/UOContent/Items/Special/Heritage Items/FruitTrees.cs +++ b/Projects/UOContent/Items/Special/Heritage Items/FruitTrees.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Heritage Items/Guillotine.cs b/Projects/UOContent/Items/Special/Heritage Items/Guillotine.cs index 914ecba4a..31bc0eeeb 100644 --- a/Projects/UOContent/Items/Special/Heritage Items/Guillotine.cs +++ b/Projects/UOContent/Items/Special/Heritage Items/Guillotine.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; using Server.Spells; namespace Server.Items diff --git a/Projects/UOContent/Items/Special/Heritage Items/IronMaiden.cs b/Projects/UOContent/Items/Special/Heritage Items/IronMaiden.cs index 258ef6c45..0f702e874 100644 --- a/Projects/UOContent/Items/Special/Heritage Items/IronMaiden.cs +++ b/Projects/UOContent/Items/Special/Heritage Items/IronMaiden.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; using Server.Spells; namespace Server.Items diff --git a/Projects/UOContent/Items/Special/Heritage Items/WallTorch.cs b/Projects/UOContent/Items/Special/Heritage Items/WallTorch.cs index 27fd61809..8864f4922 100644 --- a/Projects/UOContent/Items/Special/Heritage Items/WallTorch.cs +++ b/Projects/UOContent/Items/Special/Heritage Items/WallTorch.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { [Flippable(0x3D98, 0x3D94)] diff --git a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastBlood.cs b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastBlood.cs index bece494b2..384b5c36f 100644 --- a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastBlood.cs +++ b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastBlood.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastInnard.cs b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastInnard.cs index 55dedab31..9e855cc75 100644 --- a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastInnard.cs +++ b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastInnard.cs @@ -1,5 +1,4 @@ using Server.Mobiles; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastMutationCore.cs b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastMutationCore.cs index 66683f9d8..90b84c463 100644 --- a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastMutationCore.cs +++ b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastMutationCore.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastOrgans.cs b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastOrgans.cs index df540cfbf..736aa35b1 100644 --- a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastOrgans.cs +++ b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastOrgans.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastVein.cs b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastVein.cs index f70ab310c..d3ec4a693 100644 --- a/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastVein.cs +++ b/Projects/UOContent/Items/Special/Mutation Core/PlagueBeastVein.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/RewardCake.cs b/Projects/UOContent/Items/Special/RewardCake.cs index af77b591c..0b6f9a689 100644 --- a/Projects/UOContent/Items/Special/RewardCake.cs +++ b/Projects/UOContent/Items/Special/RewardCake.cs @@ -1,5 +1,3 @@ -using Server.Network; - namespace Server.Items { public class RewardCake : Item diff --git a/Projects/UOContent/Items/Special/Solen Items/PowderOfTranslocation.cs b/Projects/UOContent/Items/Special/Solen Items/PowderOfTranslocation.cs index 4d0ef2ac4..6a73c4b02 100644 --- a/Projects/UOContent/Items/Special/Solen Items/PowderOfTranslocation.cs +++ b/Projects/UOContent/Items/Special/Solen Items/PowderOfTranslocation.cs @@ -1,4 +1,3 @@ -using Server.Network; using Server.Targeting; namespace Server.Items diff --git a/Projects/UOContent/Items/Special/Veteran Rewards/FlamingHead.cs b/Projects/UOContent/Items/Special/Veteran Rewards/FlamingHead.cs index fdc58513b..599cd15ce 100644 --- a/Projects/UOContent/Items/Special/Veteran Rewards/FlamingHead.cs +++ b/Projects/UOContent/Items/Special/Veteran Rewards/FlamingHead.cs @@ -1,7 +1,6 @@ using Server.Engines.VeteranRewards; using Server.Gumps; using Server.Multis; -using Server.Network; using Server.Targeting; namespace Server.Items diff --git a/Projects/UOContent/Items/Special/Veteran Rewards/MiningCart.cs b/Projects/UOContent/Items/Special/Veteran Rewards/MiningCart.cs index 116d7f54e..64a77840e 100644 --- a/Projects/UOContent/Items/Special/Veteran Rewards/MiningCart.cs +++ b/Projects/UOContent/Items/Special/Veteran Rewards/MiningCart.cs @@ -2,7 +2,6 @@ using System; using Server.Engines.VeteranRewards; using Server.Gumps; using Server.Multis; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Special/Veteran Rewards/TreeStump.cs b/Projects/UOContent/Items/Special/Veteran Rewards/TreeStump.cs index 01bef3ce5..432f9e040 100644 --- a/Projects/UOContent/Items/Special/Veteran Rewards/TreeStump.cs +++ b/Projects/UOContent/Items/Special/Veteran Rewards/TreeStump.cs @@ -2,7 +2,6 @@ using System; using Server.Engines.VeteranRewards; using Server.Gumps; using Server.Multis; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Traps/GasTrap.cs b/Projects/UOContent/Items/Traps/GasTrap.cs index 656a38617..04591abf6 100644 --- a/Projects/UOContent/Items/Traps/GasTrap.cs +++ b/Projects/UOContent/Items/Traps/GasTrap.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Traps/SawTrap.cs b/Projects/UOContent/Items/Traps/SawTrap.cs index f6f16bc25..5cf4c9e8c 100644 --- a/Projects/UOContent/Items/Traps/SawTrap.cs +++ b/Projects/UOContent/Items/Traps/SawTrap.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; using Server.Spells; namespace Server.Items diff --git a/Projects/UOContent/Items/Traps/SpikeTrap.cs b/Projects/UOContent/Items/Traps/SpikeTrap.cs index d8405f373..9a0ec4b8a 100644 --- a/Projects/UOContent/Items/Traps/SpikeTrap.cs +++ b/Projects/UOContent/Items/Traps/SpikeTrap.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; using Server.Spells; namespace Server.Items diff --git a/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs b/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs index b29666bfb..0cc6f25c4 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using Server.Mobiles; -using Server.Network; using Server.Spells; using Server.Spells.Necromancy; diff --git a/Projects/UOContent/Items/Weapons/Axes/BaseAxe.cs b/Projects/UOContent/Items/Weapons/Axes/BaseAxe.cs index ef004d641..77cce8193 100644 --- a/Projects/UOContent/Items/Weapons/Axes/BaseAxe.cs +++ b/Projects/UOContent/Items/Weapons/Axes/BaseAxe.cs @@ -4,7 +4,6 @@ using ModernUO.Serialization; using Server.ContextMenus; using Server.Engines.ConPVP; using Server.Engines.Harvest; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Items/Weapons/BaseWeapon.cs b/Projects/UOContent/Items/Weapons/BaseWeapon.cs index 6a19f683e..ffa2f1b4f 100644 --- a/Projects/UOContent/Items/Weapons/BaseWeapon.cs +++ b/Projects/UOContent/Items/Weapons/BaseWeapon.cs @@ -3276,7 +3276,7 @@ namespace Server.Items return; } - from.NetState?.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs); + from.NetState.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs); } public virtual int GetHitAttackSound(Mobile attacker, Mobile defender) diff --git a/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs b/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs index 7166d1b49..a13491f47 100644 --- a/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs +++ b/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs @@ -2,7 +2,6 @@ using System; using ModernUO.Serialization; using Server.Engines.CannedEvil; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.Items diff --git a/Projects/UOContent/Migrations/Server.Items.Bandage.v0.json b/Projects/UOContent/Migrations/Server.Items.Bandage.v0.json new file mode 100644 index 000000000..b76427c56 --- /dev/null +++ b/Projects/UOContent/Migrations/Server.Items.Bandage.v0.json @@ -0,0 +1,4 @@ +{ + "version": 0, + "type": "Server.Items.Bandage" +} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.FireHorn.v0.json b/Projects/UOContent/Migrations/Server.Items.FireHorn.v0.json new file mode 100644 index 000000000..4c85a23c4 --- /dev/null +++ b/Projects/UOContent/Migrations/Server.Items.FireHorn.v0.json @@ -0,0 +1,4 @@ +{ + "version": 0, + "type": "Server.Items.FireHorn" +} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.RecipeScroll.v0.json b/Projects/UOContent/Migrations/Server.Items.RecipeScroll.v0.json new file mode 100644 index 000000000..b0295220e --- /dev/null +++ b/Projects/UOContent/Migrations/Server.Items.RecipeScroll.v0.json @@ -0,0 +1,14 @@ +{ + "version": 0, + "type": "Server.Items.RecipeScroll", + "properties": [ + { + "name": "RecipeID", + "type": "int", + "rule": "PrimitiveTypeMigrationRule", + "ruleArguments": [ + "" + ] + } + ] +} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.RepairDeed.v1.json b/Projects/UOContent/Migrations/Server.Items.RepairDeed.v1.json new file mode 100644 index 000000000..c28ab01b8 --- /dev/null +++ b/Projects/UOContent/Migrations/Server.Items.RepairDeed.v1.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "type": "Server.Items.RepairDeed", + "properties": [ + { + "name": "Skill", + "type": "Server.Items.RepairDeed.RepairSkillType", + "rule": "EnumMigrationRule" + }, + { + "name": "SkillLevel", + "type": "double", + "rule": "PrimitiveTypeMigrationRule", + "ruleArguments": [ + "" + ] + }, + { + "name": "Crafter", + "type": "string", + "rule": "PrimitiveTypeMigrationRule", + "ruleArguments": [ + "" + ] + } + ] +} \ No newline at end of file diff --git a/Projects/UOContent/Misc/AttackMessage.cs b/Projects/UOContent/Misc/AttackMessage.cs index c743a3ce2..04d4697d1 100644 --- a/Projects/UOContent/Misc/AttackMessage.cs +++ b/Projects/UOContent/Misc/AttackMessage.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Misc { diff --git a/Projects/UOContent/Misc/Poison.cs b/Projects/UOContent/Misc/Poison.cs index 1e322db22..7434ee2c8 100644 --- a/Projects/UOContent/Misc/Poison.cs +++ b/Projects/UOContent/Misc/Poison.cs @@ -1,7 +1,6 @@ using System; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Spells; using Server.Spells.Necromancy; using Server.Spells.Ninjitsu; diff --git a/Projects/UOContent/Mobiles/Abilities/ColossalBlow.cs b/Projects/UOContent/Mobiles/Abilities/ColossalBlow.cs index 6a331e015..cb71d2c02 100644 --- a/Projects/UOContent/Mobiles/Abilities/ColossalBlow.cs +++ b/Projects/UOContent/Mobiles/Abilities/ColossalBlow.cs @@ -1,6 +1,4 @@ -using Server.Network; - -namespace Server.Mobiles; +namespace Server.Mobiles; public class ColossalBlow : StunAttack { diff --git a/Projects/UOContent/Mobiles/Abilities/DestroyEquipment.cs b/Projects/UOContent/Mobiles/Abilities/DestroyEquipment.cs index 4c270efbb..c74698d7c 100644 --- a/Projects/UOContent/Mobiles/Abilities/DestroyEquipment.cs +++ b/Projects/UOContent/Mobiles/Abilities/DestroyEquipment.cs @@ -1,6 +1,5 @@ using Server.Collections; using Server.Items; -using Server.Network; namespace Server.Mobiles; diff --git a/Projects/UOContent/Mobiles/Animals/Misc/Sheep.cs b/Projects/UOContent/Mobiles/Animals/Misc/Sheep.cs index 5dd737fb1..81abc5793 100644 --- a/Projects/UOContent/Mobiles/Animals/Misc/Sheep.cs +++ b/Projects/UOContent/Mobiles/Animals/Misc/Sheep.cs @@ -1,7 +1,6 @@ using ModernUO.Serialization; using System; using Server.Items; -using Server.Network; using System.Runtime.CompilerServices; namespace Server.Mobiles diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs b/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs index 678534824..aa0edf8e8 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs @@ -2,7 +2,6 @@ using ModernUO.Serialization; using System; using Server.Items; using Server.Multis; -using Server.Network; using Server.Targeting; namespace Server.Mobiles diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs b/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs index 6933b4bbc..3dec206aa 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using System; using Server.Items; namespace Server.Mobiles diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs index 7c0449631..a443a4bb7 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using System; using Server.Engines.Plants; using Server.Items; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs index d7fda6e6d..69b705c86 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs @@ -1,7 +1,6 @@ using ModernUO.Serialization; using System; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs b/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs index 05147b330..8791836c7 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using System; using Server.Engines.Plants; using Server.Items; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs index bc0155841..bd8f64ba6 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs @@ -1,7 +1,6 @@ using ModernUO.Serialization; using System; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenQueen.cs b/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenQueen.cs index 450cebfdb..cb8c937ba 100644 --- a/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenQueen.cs +++ b/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenQueen.cs @@ -1,7 +1,5 @@ using ModernUO.Serialization; -using Org.BouncyCastle.Security; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenWarrior.cs b/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenWarrior.cs index 9f733bb3d..2d597f04c 100644 --- a/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenWarrior.cs +++ b/Projects/UOContent/Mobiles/Monsters/Ants/BlackSolenWarrior.cs @@ -1,6 +1,5 @@ using ModernUO.Serialization; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenQueen.cs b/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenQueen.cs index 99a2b9cf4..89a856235 100644 --- a/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenQueen.cs +++ b/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenQueen.cs @@ -1,6 +1,5 @@ using ModernUO.Serialization; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenWarrior.cs b/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenWarrior.cs index acc57c46e..42e1b0e09 100644 --- a/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenWarrior.cs +++ b/Projects/UOContent/Mobiles/Monsters/Ants/RedSolenWarrior.cs @@ -1,6 +1,5 @@ using ModernUO.Serialization; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Ants/SolenHelper.cs b/Projects/UOContent/Mobiles/Monsters/Ants/SolenHelper.cs index de5e1c155..ad97905dd 100644 --- a/Projects/UOContent/Mobiles/Monsters/Ants/SolenHelper.cs +++ b/Projects/UOContent/Mobiles/Monsters/Ants/SolenHelper.cs @@ -1,5 +1,4 @@ using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs b/Projects/UOContent/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs index f8ed47644..91367a5f0 100644 --- a/Projects/UOContent/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs +++ b/Projects/UOContent/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/LBR/Meers/MeerMage.cs b/Projects/UOContent/Mobiles/Monsters/LBR/Meers/MeerMage.cs index e12c2431c..9e721b111 100644 --- a/Projects/UOContent/Mobiles/Monsters/LBR/Meers/MeerMage.cs +++ b/Projects/UOContent/Mobiles/Monsters/LBR/Meers/MeerMage.cs @@ -2,7 +2,6 @@ using ModernUO.Serialization; using System; using System.Collections.Generic; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Misc/Magic/GreaterDragon.cs b/Projects/UOContent/Mobiles/Monsters/ML/Misc/Magic/GreaterDragon.cs index cbd1bee72..397e42e44 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Misc/Magic/GreaterDragon.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Misc/Magic/GreaterDragon.cs @@ -1,6 +1,5 @@ using ModernUO.Serialization; using Server.Items; -using Server.SkillHandlers; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs index 2f40bccad..68f5aeba9 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs @@ -2,7 +2,6 @@ using ModernUO.Serialization; using System; using Server.Engines.Plants; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs index 24b9f87d6..bbcef613e 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs @@ -1,7 +1,6 @@ using ModernUO.Serialization; using System; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs b/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs index c56c6ec14..754ca2aa1 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs @@ -1,5 +1,4 @@ using ModernUO.Serialization; -using System; using Server.Engines.Plants; using Server.Items; diff --git a/Projects/UOContent/Mobiles/Vendors/NPC/Scribe.cs b/Projects/UOContent/Mobiles/Vendors/NPC/Scribe.cs index c6693f34f..0c072141c 100644 --- a/Projects/UOContent/Mobiles/Vendors/NPC/Scribe.cs +++ b/Projects/UOContent/Mobiles/Vendors/NPC/Scribe.cs @@ -2,7 +2,6 @@ using ModernUO.Serialization; using System; using System.Collections.Generic; using Server.Items; -using Server.Network; namespace Server.Mobiles { diff --git a/Projects/UOContent/Multis/Boats/BaseBoat.cs b/Projects/UOContent/Multis/Boats/BaseBoat.cs index 59c936fac..a34fbc1f7 100644 --- a/Projects/UOContent/Multis/Boats/BaseBoat.cs +++ b/Projects/UOContent/Multis/Boats/BaseBoat.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Runtime.CompilerServices; using Server.Items; using Server.Multis.Boats; -using Server.Network; namespace Server.Multis { diff --git a/Projects/UOContent/Multis/Boats/BaseBoatDeed.cs b/Projects/UOContent/Multis/Boats/BaseBoatDeed.cs index 3c00b4b6e..229bf1d47 100644 --- a/Projects/UOContent/Multis/Boats/BaseBoatDeed.cs +++ b/Projects/UOContent/Multis/Boats/BaseBoatDeed.cs @@ -1,5 +1,4 @@ using Server.Engines.CannedEvil; -using Server.Network; using Server.Regions; using Server.Targeting; diff --git a/Projects/UOContent/Multis/Boats/Plank.cs b/Projects/UOContent/Multis/Boats/Plank.cs index 7c838fab4..1529a7ac0 100644 --- a/Projects/UOContent/Multis/Boats/Plank.cs +++ b/Projects/UOContent/Multis/Boats/Plank.cs @@ -1,7 +1,6 @@ using System; using Server.Factions; using Server.Multis; -using Server.Network; using Server.Spells; namespace Server.Items diff --git a/Projects/UOContent/Multis/Boats/TillerMan.cs b/Projects/UOContent/Multis/Boats/TillerMan.cs index cef485f9c..82f6c1b1c 100644 --- a/Projects/UOContent/Multis/Boats/TillerMan.cs +++ b/Projects/UOContent/Multis/Boats/TillerMan.cs @@ -1,5 +1,4 @@ using Server.Multis; -using Server.Network; namespace Server.Items { diff --git a/Projects/UOContent/Regions/GuardedRegion.cs b/Projects/UOContent/Regions/GuardedRegion.cs index 4990321f3..e173b86dd 100644 --- a/Projects/UOContent/Regions/GuardedRegion.cs +++ b/Projects/UOContent/Regions/GuardedRegion.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Server.Logging; using Server.Mobiles; using Server.Utilities; diff --git a/Projects/UOContent/Skills/Anatomy.cs b/Projects/UOContent/Skills/Anatomy.cs index 7d2721c59..490808652 100644 --- a/Projects/UOContent/Skills/Anatomy.cs +++ b/Projects/UOContent/Skills/Anatomy.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.SkillHandlers diff --git a/Projects/UOContent/Skills/AnimalTaming.cs b/Projects/UOContent/Skills/AnimalTaming.cs index 59eaf9232..674062459 100644 --- a/Projects/UOContent/Skills/AnimalTaming.cs +++ b/Projects/UOContent/Skills/AnimalTaming.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using Server.Factions; using Server.Mobiles; -using Server.Network; using Server.Spells; using Server.Spells.Necromancy; using Server.Spells.Spellweaving; diff --git a/Projects/UOContent/Skills/ArmsLore.cs b/Projects/UOContent/Skills/ArmsLore.cs index a01d9ea18..1bd26ae66 100644 --- a/Projects/UOContent/Skills/ArmsLore.cs +++ b/Projects/UOContent/Skills/ArmsLore.cs @@ -1,7 +1,6 @@ using System; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.SkillHandlers diff --git a/Projects/UOContent/Skills/Begging.cs b/Projects/UOContent/Skills/Begging.cs index 21014ab4c..e67d20404 100644 --- a/Projects/UOContent/Skills/Begging.cs +++ b/Projects/UOContent/Skills/Begging.cs @@ -1,7 +1,6 @@ using System; using Server.Items; using Server.Misc; -using Server.Network; using Server.Targeting; namespace Server.SkillHandlers diff --git a/Projects/UOContent/Skills/EvalInt.cs b/Projects/UOContent/Skills/EvalInt.cs index 0c3ac639d..58c848479 100644 --- a/Projects/UOContent/Skills/EvalInt.cs +++ b/Projects/UOContent/Skills/EvalInt.cs @@ -1,6 +1,5 @@ using System; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.SkillHandlers diff --git a/Projects/UOContent/Skills/Hiding.cs b/Projects/UOContent/Skills/Hiding.cs index 650f81031..bb1fab7ef 100644 --- a/Projects/UOContent/Skills/Hiding.cs +++ b/Projects/UOContent/Skills/Hiding.cs @@ -1,6 +1,5 @@ using System; using Server.Multis; -using Server.Network; using Server.Spells.Sixth; using Server.Targeting; diff --git a/Projects/UOContent/Skills/RemoveTrap.cs b/Projects/UOContent/Skills/RemoveTrap.cs index 1aeeb5293..3a80f9e40 100644 --- a/Projects/UOContent/Skills/RemoveTrap.cs +++ b/Projects/UOContent/Skills/RemoveTrap.cs @@ -1,7 +1,6 @@ using System; using Server.Factions; using Server.Items; -using Server.Network; using Server.Targeting; namespace Server.SkillHandlers diff --git a/Projects/UOContent/Skills/SpiritSpeak.cs b/Projects/UOContent/Skills/SpiritSpeak.cs index 42a5eac60..e4881d94d 100644 --- a/Projects/UOContent/Skills/SpiritSpeak.cs +++ b/Projects/UOContent/Skills/SpiritSpeak.cs @@ -1,6 +1,5 @@ using System; using Server.Items; -using Server.Network; using Server.Spells; namespace Server.SkillHandlers diff --git a/Projects/UOContent/Spells/Base/Spell.cs b/Projects/UOContent/Spells/Base/Spell.cs index 2bb2dd45f..a0d1eb990 100644 --- a/Projects/UOContent/Spells/Base/Spell.cs +++ b/Projects/UOContent/Spells/Base/Spell.cs @@ -4,7 +4,6 @@ using Server.Engines.ConPVP; using Server.Items; using Server.Misc; using Server.Mobiles; -using Server.Network; using Server.Spells.Bushido; using Server.Spells.Necromancy; using Server.Spells.Ninjitsu; diff --git a/Projects/UOContent/Spells/Chivalry/CloseWounds.cs b/Projects/UOContent/Spells/Chivalry/CloseWounds.cs index 650891d0c..0316d8db6 100644 --- a/Projects/UOContent/Spells/Chivalry/CloseWounds.cs +++ b/Projects/UOContent/Spells/Chivalry/CloseWounds.cs @@ -2,7 +2,6 @@ using System; using Server.Engines.ConPVP; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.Spells.Chivalry diff --git a/Projects/UOContent/Spells/Chivalry/PaladinSpell.cs b/Projects/UOContent/Spells/Chivalry/PaladinSpell.cs index 65d768ad3..04a2204a6 100644 --- a/Projects/UOContent/Spells/Chivalry/PaladinSpell.cs +++ b/Projects/UOContent/Spells/Chivalry/PaladinSpell.cs @@ -1,5 +1,4 @@ using System; -using Server.Network; namespace Server.Spells.Chivalry { diff --git a/Projects/UOContent/Spells/First/Heal.cs b/Projects/UOContent/Spells/First/Heal.cs index 1379759c5..293f2df7d 100644 --- a/Projects/UOContent/Spells/First/Heal.cs +++ b/Projects/UOContent/Spells/First/Heal.cs @@ -1,7 +1,6 @@ using Server.Engines.ConPVP; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.Spells.First diff --git a/Projects/UOContent/Spells/Fourth/GreaterHeal.cs b/Projects/UOContent/Spells/Fourth/GreaterHeal.cs index 4c02942f4..a7e969347 100644 --- a/Projects/UOContent/Spells/Fourth/GreaterHeal.cs +++ b/Projects/UOContent/Spells/Fourth/GreaterHeal.cs @@ -1,7 +1,6 @@ using Server.Engines.ConPVP; using Server.Items; using Server.Mobiles; -using Server.Network; using Server.Targeting; namespace Server.Spells.Fourth diff --git a/Projects/UOContent/Spells/Third/MagicLock.cs b/Projects/UOContent/Spells/Third/MagicLock.cs index 2f8e23c59..5202d3136 100644 --- a/Projects/UOContent/Spells/Third/MagicLock.cs +++ b/Projects/UOContent/Spells/Third/MagicLock.cs @@ -1,6 +1,5 @@ using Server.Items; using Server.Multis; -using Server.Network; namespace Server.Spells.Third { diff --git a/Projects/UOContent/Spells/Third/Unlock.cs b/Projects/UOContent/Spells/Third/Unlock.cs index 445b23e23..eebe822a6 100644 --- a/Projects/UOContent/Spells/Third/Unlock.cs +++ b/Projects/UOContent/Spells/Third/Unlock.cs @@ -1,6 +1,5 @@ using Server.Items; using Server.Multis; -using Server.Network; namespace Server.Spells.Third {