diff --git a/Projects/UOContent/Items/Armor/DaemonBone/DaemonArms.cs b/Projects/UOContent/Items/Armor/DaemonBone/DaemonArms.cs index 8c22af849..1133c8410 100644 --- a/Projects/UOContent/Items/Armor/DaemonBone/DaemonArms.cs +++ b/Projects/UOContent/Items/Armor/DaemonBone/DaemonArms.cs @@ -1,39 +1,39 @@ using ModernUO.Serialization; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0, false)] +[Flippable(0x144e, 0x1453)] +public partial class DaemonArms : BaseArmor { - [SerializationGenerator(0, false)] - [Flippable(0x144e, 0x1453)] - public partial class DaemonArms : BaseArmor + [Constructible] + public DaemonArms() : base(0x144E) { - [Constructible] - public DaemonArms() : base(0x144E) - { - Weight = 2.0; - Hue = 0x648; + Hue = 0x648; - ArmorAttributes.SelfRepair = 1; - } - - public override int BasePhysicalResistance => 6; - public override int BaseFireResistance => 6; - public override int BaseColdResistance => 7; - public override int BasePoisonResistance => 5; - public override int BaseEnergyResistance => 7; - - public override int InitMinHits => 255; - public override int InitMaxHits => 255; - - public override int AosStrReq => 55; - public override int OldStrReq => 40; - - public override int OldDexBonus => -2; - - public override int ArmorBase => 46; - - public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; - public override CraftResource DefaultResource => CraftResource.RegularLeather; - - public override int LabelNumber => 1041371; // daemon bone arms + ArmorAttributes.SelfRepair = 1; } + + public override double DefaultWeight => 2.0; + + public override int BasePhysicalResistance => 6; + public override int BaseFireResistance => 6; + public override int BaseColdResistance => 7; + public override int BasePoisonResistance => 5; + public override int BaseEnergyResistance => 7; + + public override int InitMinHits => 255; + public override int InitMaxHits => 255; + + public override int AosStrReq => 55; + public override int OldStrReq => 40; + + public override int OldDexBonus => -2; + + public override int ArmorBase => 46; + + public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; + public override CraftResource DefaultResource => CraftResource.RegularLeather; + + public override int LabelNumber => 1041371; // daemon bone arms } diff --git a/Projects/UOContent/Items/Armor/DaemonBone/DaemonChest.cs b/Projects/UOContent/Items/Armor/DaemonBone/DaemonChest.cs index e2a0ec586..bff469f7a 100644 --- a/Projects/UOContent/Items/Armor/DaemonBone/DaemonChest.cs +++ b/Projects/UOContent/Items/Armor/DaemonBone/DaemonChest.cs @@ -1,39 +1,39 @@ using ModernUO.Serialization; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0, false)] +[Flippable(0x144f, 0x1454)] +public partial class DaemonChest : BaseArmor { - [SerializationGenerator(0, false)] - [Flippable(0x144f, 0x1454)] - public partial class DaemonChest : BaseArmor + [Constructible] + public DaemonChest() : base(0x144F) { - [Constructible] - public DaemonChest() : base(0x144F) - { - Weight = 6.0; - Hue = 0x648; + Hue = 0x648; - ArmorAttributes.SelfRepair = 1; - } - - public override int BasePhysicalResistance => 6; - public override int BaseFireResistance => 6; - public override int BaseColdResistance => 7; - public override int BasePoisonResistance => 5; - public override int BaseEnergyResistance => 7; - - public override int InitMinHits => 255; - public override int InitMaxHits => 255; - - public override int AosStrReq => 60; - public override int OldStrReq => 40; - - public override int OldDexBonus => -6; - - public override int ArmorBase => 46; - - public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; - public override CraftResource DefaultResource => CraftResource.RegularLeather; - - public override int LabelNumber => 1041372; // daemon bone armor + ArmorAttributes.SelfRepair = 1; } + + public override double DefaultWeight => 6.0; + + public override int BasePhysicalResistance => 6; + public override int BaseFireResistance => 6; + public override int BaseColdResistance => 7; + public override int BasePoisonResistance => 5; + public override int BaseEnergyResistance => 7; + + public override int InitMinHits => 255; + public override int InitMaxHits => 255; + + public override int AosStrReq => 60; + public override int OldStrReq => 40; + + public override int OldDexBonus => -6; + + public override int ArmorBase => 46; + + public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; + public override CraftResource DefaultResource => CraftResource.RegularLeather; + + public override int LabelNumber => 1041372; // daemon bone armor } diff --git a/Projects/UOContent/Items/Armor/DaemonBone/DaemonGloves.cs b/Projects/UOContent/Items/Armor/DaemonBone/DaemonGloves.cs index e7d0793cd..2791feba6 100644 --- a/Projects/UOContent/Items/Armor/DaemonBone/DaemonGloves.cs +++ b/Projects/UOContent/Items/Armor/DaemonBone/DaemonGloves.cs @@ -1,39 +1,39 @@ using ModernUO.Serialization; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0, false)] +[Flippable(0x1450, 0x1455)] +public partial class DaemonGloves : BaseArmor { - [SerializationGenerator(0, false)] - [Flippable(0x1450, 0x1455)] - public partial class DaemonGloves : BaseArmor + [Constructible] + public DaemonGloves() : base(0x1450) { - [Constructible] - public DaemonGloves() : base(0x1450) - { - Weight = 2.0; - Hue = 0x648; + Hue = 0x648; - ArmorAttributes.SelfRepair = 1; - } - - public override int BasePhysicalResistance => 6; - public override int BaseFireResistance => 6; - public override int BaseColdResistance => 7; - public override int BasePoisonResistance => 5; - public override int BaseEnergyResistance => 7; - - public override int InitMinHits => 255; - public override int InitMaxHits => 255; - - public override int AosStrReq => 55; - public override int OldStrReq => 40; - - public override int OldDexBonus => -1; - - public override int ArmorBase => 46; - - public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; - public override CraftResource DefaultResource => CraftResource.RegularLeather; - - public override int LabelNumber => 1041373; // daemon bone gloves + ArmorAttributes.SelfRepair = 1; } + + public override double DefaultWeight => 2.0; + + public override int BasePhysicalResistance => 6; + public override int BaseFireResistance => 6; + public override int BaseColdResistance => 7; + public override int BasePoisonResistance => 5; + public override int BaseEnergyResistance => 7; + + public override int InitMinHits => 255; + public override int InitMaxHits => 255; + + public override int AosStrReq => 55; + public override int OldStrReq => 40; + + public override int OldDexBonus => -1; + + public override int ArmorBase => 46; + + public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; + public override CraftResource DefaultResource => CraftResource.RegularLeather; + + public override int LabelNumber => 1041373; // daemon bone gloves } diff --git a/Projects/UOContent/Items/Armor/DaemonBone/DaemonLegs.cs b/Projects/UOContent/Items/Armor/DaemonBone/DaemonLegs.cs index f07aeeae6..2fee9b456 100644 --- a/Projects/UOContent/Items/Armor/DaemonBone/DaemonLegs.cs +++ b/Projects/UOContent/Items/Armor/DaemonBone/DaemonLegs.cs @@ -1,39 +1,39 @@ using ModernUO.Serialization; -namespace Server.Items +namespace Server.Items; + +[SerializationGenerator(0, false)] +[Flippable(0x1452, 0x1457)] +public partial class DaemonLegs : BaseArmor { - [SerializationGenerator(0, false)] - [Flippable(0x1452, 0x1457)] - public partial class DaemonLegs : BaseArmor + [Constructible] + public DaemonLegs() : base(0x1452) { - [Constructible] - public DaemonLegs() : base(0x1452) - { - Weight = 3.0; - Hue = 0x648; + Hue = 0x648; - ArmorAttributes.SelfRepair = 1; - } - - public override int BasePhysicalResistance => 6; - public override int BaseFireResistance => 6; - public override int BaseColdResistance => 7; - public override int BasePoisonResistance => 5; - public override int BaseEnergyResistance => 7; - - public override int InitMinHits => 255; - public override int InitMaxHits => 255; - - public override int AosStrReq => 55; - public override int OldStrReq => 40; - - public override int OldDexBonus => -4; - - public override int ArmorBase => 46; - - public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; - public override CraftResource DefaultResource => CraftResource.RegularLeather; - - public override int LabelNumber => 1041375; // daemon bone leggings + ArmorAttributes.SelfRepair = 1; } + + public override double DefaultWeight => 3.0; + + public override int BasePhysicalResistance => 6; + public override int BaseFireResistance => 6; + public override int BaseColdResistance => 7; + public override int BasePoisonResistance => 5; + public override int BaseEnergyResistance => 7; + + public override int InitMinHits => 255; + public override int InitMaxHits => 255; + + public override int AosStrReq => 55; + public override int OldStrReq => 40; + + public override int OldDexBonus => -4; + + public override int ArmorBase => 46; + + public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone; + public override CraftResource DefaultResource => CraftResource.RegularLeather; + + public override int LabelNumber => 1041375; // daemon bone leggings } diff --git a/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs b/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs index 583f22713..4b0fb791f 100644 --- a/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs +++ b/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs @@ -6,11 +6,9 @@ namespace Server.Items public partial class ElvenGlasses : BaseArmor { [Constructible] - public ElvenGlasses() : base(0x2FB8) - { - Weight = 2; - _weaponAttributes = new AosWeaponAttributes(this); - } + public ElvenGlasses() : base(0x2FB8) => _weaponAttributes = new AosWeaponAttributes(this); + + public override double DefaultWeight => 2.0; public override int LabelNumber => 1032216; // elven glasses diff --git a/Projects/UOContent/Items/Armor/Helmets/DaemonHelm.cs b/Projects/UOContent/Items/Armor/Helmets/DaemonHelm.cs index 80f2de0b5..9ae3a8753 100644 --- a/Projects/UOContent/Items/Armor/Helmets/DaemonHelm.cs +++ b/Projects/UOContent/Items/Armor/Helmets/DaemonHelm.cs @@ -10,11 +10,12 @@ namespace Server.Items public DaemonHelm() : base(0x1451) { Hue = 0x648; - Weight = 3.0; ArmorAttributes.SelfRepair = 1; } + public override double DefaultWeight => 3.0; + public override int BasePhysicalResistance => 6; public override int BaseFireResistance => 6; public override int BaseColdResistance => 7; diff --git a/Projects/UOContent/Items/Armor/Ranger/RangerArms.cs b/Projects/UOContent/Items/Armor/Ranger/RangerArms.cs index 6eb5864db..1987140ec 100644 --- a/Projects/UOContent/Items/Armor/Ranger/RangerArms.cs +++ b/Projects/UOContent/Items/Armor/Ranger/RangerArms.cs @@ -9,10 +9,11 @@ namespace Server.Items [Constructible] public RangerArms() : base(0x13DC) { - Weight = 4.0; Hue = 0x59C; } + public override double DefaultWeight => 4.0; + public override int BasePhysicalResistance => 2; public override int BaseFireResistance => 4; public override int BaseColdResistance => 3; diff --git a/Projects/UOContent/Items/Armor/Ranger/RangerChest.cs b/Projects/UOContent/Items/Armor/Ranger/RangerChest.cs index e2a6054f5..d345767ef 100644 --- a/Projects/UOContent/Items/Armor/Ranger/RangerChest.cs +++ b/Projects/UOContent/Items/Armor/Ranger/RangerChest.cs @@ -9,10 +9,11 @@ namespace Server.Items [Constructible] public RangerChest() : base(0x13DB) { - Weight = 8.0; Hue = 0x59C; } + public override double DefaultWeight => 8.0; + public override int BasePhysicalResistance => 2; public override int BaseFireResistance => 4; public override int BaseColdResistance => 3; diff --git a/Projects/UOContent/Items/Armor/Ranger/RangerGloves.cs b/Projects/UOContent/Items/Armor/Ranger/RangerGloves.cs index b51b766e6..be4573cbc 100644 --- a/Projects/UOContent/Items/Armor/Ranger/RangerGloves.cs +++ b/Projects/UOContent/Items/Armor/Ranger/RangerGloves.cs @@ -9,10 +9,11 @@ namespace Server.Items [Constructible] public RangerGloves() : base(0x13D5) { - Weight = 1.0; Hue = 0x59C; } + public override double DefaultWeight => 1.0; + public override int BasePhysicalResistance => 2; public override int BaseFireResistance => 4; public override int BaseColdResistance => 3; diff --git a/Projects/UOContent/Items/Armor/Ranger/RangerGorget.cs b/Projects/UOContent/Items/Armor/Ranger/RangerGorget.cs index e9a4a6949..b6cb4c0c5 100644 --- a/Projects/UOContent/Items/Armor/Ranger/RangerGorget.cs +++ b/Projects/UOContent/Items/Armor/Ranger/RangerGorget.cs @@ -8,10 +8,11 @@ namespace Server.Items [Constructible] public RangerGorget() : base(0x13D6) { - Weight = 1.0; Hue = 0x59C; } + public override double DefaultWeight => 1.0; + public override int BasePhysicalResistance => 2; public override int BaseFireResistance => 4; public override int BaseColdResistance => 3; diff --git a/Projects/UOContent/Items/Armor/Ranger/RangerLegs.cs b/Projects/UOContent/Items/Armor/Ranger/RangerLegs.cs index 7fae0424a..4a728332b 100644 --- a/Projects/UOContent/Items/Armor/Ranger/RangerLegs.cs +++ b/Projects/UOContent/Items/Armor/Ranger/RangerLegs.cs @@ -9,10 +9,11 @@ namespace Server.Items [Constructible] public RangerLegs() : base(0x13DA) { - Weight = 3.0; Hue = 0x59C; } + public override double DefaultWeight => 3.0; + public override int BasePhysicalResistance => 2; public override int BaseFireResistance => 4; public override int BaseColdResistance => 3; diff --git a/Projects/UOContent/Items/Body Parts/BonePile.cs b/Projects/UOContent/Items/Body Parts/BonePile.cs index 04fcadcda..9b65e61d7 100644 --- a/Projects/UOContent/Items/Body Parts/BonePile.cs +++ b/Projects/UOContent/Items/Body Parts/BonePile.cs @@ -7,11 +7,9 @@ namespace Server.Items public partial class BonePile : Item, IScissorable { [Constructible] - public BonePile() : base(0x1B09 + Utility.Random(8)) - { - Stackable = false; - Weight = 10.0; - } + public BonePile() : base(0x1B09 + Utility.Random(8)) => Stackable = false; + + public override double DefaultWeight => 10.0; public bool Scissor(Mobile from, Scissors scissors) { diff --git a/Projects/UOContent/Items/Body Parts/RibCage.cs b/Projects/UOContent/Items/Body Parts/RibCage.cs index 0b02dfce0..ecfac5be3 100644 --- a/Projects/UOContent/Items/Body Parts/RibCage.cs +++ b/Projects/UOContent/Items/Body Parts/RibCage.cs @@ -7,11 +7,9 @@ namespace Server.Items public partial class RibCage : Item, IScissorable { [Constructible] - public RibCage() : base(0x1B17 + Utility.Random(2)) - { - Stackable = false; - Weight = 5.0; - } + public RibCage() : base(0x1B17 + Utility.Random(2)) => Stackable = false; + + public override double DefaultWeight => 5.0; public bool Scissor(Mobile from, Scissors scissors) { diff --git a/Projects/UOContent/Items/Clothing/Cloaks.cs b/Projects/UOContent/Items/Clothing/Cloaks.cs index caa255c72..67f572d9d 100644 --- a/Projects/UOContent/Items/Clothing/Cloaks.cs +++ b/Projects/UOContent/Items/Clothing/Cloaks.cs @@ -128,12 +128,12 @@ namespace Server.Items [Constructible] public RewardCloak(int hue = 0, int labelNumber = 0) : base(0x1515, hue) { - Weight = 5.0; LootType = LootType.Blessed; - _number = labelNumber; } + public override double DefaultWeight => 5.0; + public override int LabelNumber => _number > 0 ? _number : base.LabelNumber; public override int BasePhysicalResistance => 3; diff --git a/Projects/UOContent/Items/Clothing/OuterTorso.cs b/Projects/UOContent/Items/Clothing/OuterTorso.cs index 9b4924b23..4fda45bb5 100644 --- a/Projects/UOContent/Items/Clothing/OuterTorso.cs +++ b/Projects/UOContent/Items/Clothing/OuterTorso.cs @@ -165,12 +165,12 @@ namespace Server.Items [Constructible] public RewardRobe(int hue = 0, int labelNumber = 0) : base(0x1F03, hue) { - Weight = 3.0; LootType = LootType.Blessed; - _number = labelNumber; } + public override double DefaultWeight => 3.0; + public override int LabelNumber => _number > 0 ? _number : base.LabelNumber; public override int BasePhysicalResistance => 3; @@ -247,12 +247,12 @@ namespace Server.Items [Constructible] public RewardDress(int hue = 0, int labelNumber = 0) : base(0x1F01, hue) { - Weight = 2.0; LootType = LootType.Blessed; - _number = labelNumber; } + public override double DefaultWeight => 2.0; + public override int LabelNumber => _number > 0 ? _number : base.LabelNumber; public override int BasePhysicalResistance => 3; @@ -418,11 +418,9 @@ namespace Server.Items public partial class MonkRobe : BaseOuterTorso { [Constructible] - public MonkRobe(int hue = 0x21E) : base(0x2687, hue) - { - Weight = 1.0; - StrRequirement = 0; - } + public MonkRobe(int hue = 0x21E) : base(0x2687, hue) => StrRequirement = 0; + + public override double DefaultWeight => 1.0; public override int LabelNumber => 1076584; // A monk's robe public override bool CanBeBlessed => false; diff --git a/Projects/UOContent/Items/Clothing/Shirts.cs b/Projects/UOContent/Items/Clothing/Shirts.cs index 9ebe7a73f..bd174067e 100644 --- a/Projects/UOContent/Items/Clothing/Shirts.cs +++ b/Projects/UOContent/Items/Clothing/Shirts.cs @@ -39,11 +39,9 @@ namespace Server.Items public partial class ClothNinjaJacket : BaseShirt { [Constructible] - public ClothNinjaJacket(int hue = 0) : base(0x2794, hue) - { - Weight = 5.0; - Layer = Layer.InnerTorso; - } + public ClothNinjaJacket(int hue = 0) : base(0x2794, hue) => Layer = Layer.InnerTorso; + + public override double DefaultWeight => 5.0; } [SerializationGenerator(0)] diff --git a/Projects/UOContent/Items/Construction/Misc/Vines.cs b/Projects/UOContent/Items/Construction/Misc/Vines.cs index 2c6a20e28..a00fee548 100644 --- a/Projects/UOContent/Items/Construction/Misc/Vines.cs +++ b/Projects/UOContent/Items/Construction/Misc/Vines.cs @@ -1,3 +1,4 @@ +using System; using ModernUO.Serialization; namespace Server.Items; @@ -11,16 +12,11 @@ public partial class Vines : Item } [Constructible] - public Vines(int v) : base(0xCEB) + public Vines(int v) : base(0xCEB + Math.Clamp(v, 0, 7)) { - if (v is < 0 or > 7) - { - v = 0; - } - - ItemID += v; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override bool ForceShowProperties => ObjectPropertyList.Enabled; } diff --git a/Projects/UOContent/Items/Containers/Container.cs b/Projects/UOContent/Items/Containers/Container.cs index 2822d8b64..e4dd27669 100644 --- a/Projects/UOContent/Items/Containers/Container.cs +++ b/Projects/UOContent/Items/Containers/Container.cs @@ -168,9 +168,10 @@ public partial class CreatureBackpack : Backpack // Used on BaseCreature Name = name; Layer = Layer.Backpack; Hue = 5; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override void AddNameProperty(IPropertyList list) { if (Name != null) @@ -213,11 +214,9 @@ public partial class CreatureBackpack : Backpack // Used on BaseCreature public partial class StrongBackpack : Backpack // Used on Pack animals { [Constructible] - public StrongBackpack() - { - Layer = Layer.Backpack; - Weight = 13.0; - } + public StrongBackpack() => Layer = Layer.Backpack; + + public override double DefaultWeight => 13.0; public override int DefaultMaxWeight => 1600; @@ -233,11 +232,9 @@ public partial class StrongBackpack : Backpack // Used on Pack animals public partial class Backpack : BaseContainer, IDyable { [Constructible] - public Backpack() : base(0xE75) - { - Layer = Layer.Backpack; - Weight = 3.0; - } + public Backpack() : base(0xE75) => Layer = Layer.Backpack; + + public override double DefaultWeight => 3.0; public override int DefaultMaxWeight { diff --git a/Projects/UOContent/Items/Containers/SalvageBag.cs b/Projects/UOContent/Items/Containers/SalvageBag.cs index 173a4d2e6..9e2b79a72 100644 --- a/Projects/UOContent/Items/Containers/SalvageBag.cs +++ b/Projects/UOContent/Items/Containers/SalvageBag.cs @@ -19,11 +19,12 @@ public partial class SalvageBag : Bag [Constructible] public SalvageBag(int hue) { - Weight = 2.0; Hue = hue; m_Failure = false; } + public override double DefaultWeight => 2.0; + public override int LabelNumber => 1079931; // Salvage Bag public override void GetContextMenuEntries(Mobile from, ref PooledRefList list) diff --git a/Projects/UOContent/Items/Deeds/BarkeepContract.cs b/Projects/UOContent/Items/Deeds/BarkeepContract.cs index 3db975f11..b5bd7b4ab 100644 --- a/Projects/UOContent/Items/Deeds/BarkeepContract.cs +++ b/Projects/UOContent/Items/Deeds/BarkeepContract.cs @@ -10,10 +10,11 @@ public partial class BarkeepContract : Item [Constructible] public BarkeepContract() : base(0x14F0) { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override string DefaultName => "a barkeep contract"; public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Deeds/ClothingBlessDeed.cs b/Projects/UOContent/Items/Deeds/ClothingBlessDeed.cs index 816a0cc0c..20f8f9fc6 100644 --- a/Projects/UOContent/Items/Deeds/ClothingBlessDeed.cs +++ b/Projects/UOContent/Items/Deeds/ClothingBlessDeed.cs @@ -58,10 +58,11 @@ public partial class ClothingBlessDeed : Item // Create the item class which is [Constructible] public ClothingBlessDeed() : base(0x14F0) { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override string DefaultName => "a clothing bless deed"; public override bool DisplayLootType => false; diff --git a/Projects/UOContent/Items/Deeds/CommodityDeed.cs b/Projects/UOContent/Items/Deeds/CommodityDeed.cs index d073bf90b..163ea68cf 100644 --- a/Projects/UOContent/Items/Deeds/CommodityDeed.cs +++ b/Projects/UOContent/Items/Deeds/CommodityDeed.cs @@ -19,7 +19,6 @@ public partial class CommodityDeed : Item [Constructible] public CommodityDeed(Item commodity = null) : base(0x14F0) { - Weight = 1.0; Hue = 0x47; Commodity = commodity; @@ -27,6 +26,8 @@ public partial class CommodityDeed : Item LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => Commodity == null ? 1047016 : 1047017; public bool SetCommodity(Item item) diff --git a/Projects/UOContent/Items/Deeds/HairRestylingDeed.cs b/Projects/UOContent/Items/Deeds/HairRestylingDeed.cs index d9256bf8a..460f337cc 100644 --- a/Projects/UOContent/Items/Deeds/HairRestylingDeed.cs +++ b/Projects/UOContent/Items/Deeds/HairRestylingDeed.cs @@ -11,10 +11,11 @@ public partial class HairRestylingDeed : Item [Constructible] public HairRestylingDeed() : base(0x14F0) { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1041061; // a coupon for a free hair restyling public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Deeds/HolidayTreeDeed.cs b/Projects/UOContent/Items/Deeds/HolidayTreeDeed.cs index dcb8585e1..2a8a6fa63 100644 --- a/Projects/UOContent/Items/Deeds/HolidayTreeDeed.cs +++ b/Projects/UOContent/Items/Deeds/HolidayTreeDeed.cs @@ -13,10 +13,11 @@ public partial class HolidayTreeDeed : Item public HolidayTreeDeed() : base(0x14F0) { Hue = 0x488; - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1041116; // a deed for a holiday tree public bool ValidatePlacement(Mobile from, Point3D loc) diff --git a/Projects/UOContent/Items/Deeds/NewPlayerTicket.cs b/Projects/UOContent/Items/Deeds/NewPlayerTicket.cs index ed988dd30..14f7abb4c 100644 --- a/Projects/UOContent/Items/Deeds/NewPlayerTicket.cs +++ b/Projects/UOContent/Items/Deeds/NewPlayerTicket.cs @@ -15,10 +15,11 @@ public partial class NewPlayerTicket : Item [Constructible] public NewPlayerTicket() : base(0x14EF) { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1062094; // a young player ticket public override bool DisplayLootType => false; diff --git a/Projects/UOContent/Items/Deeds/VendorRentalContract.cs b/Projects/UOContent/Items/Deeds/VendorRentalContract.cs index f2f7898c8..d97d1f26a 100644 --- a/Projects/UOContent/Items/Deeds/VendorRentalContract.cs +++ b/Projects/UOContent/Items/Deeds/VendorRentalContract.cs @@ -31,13 +31,13 @@ public partial class VendorRentalContract : Item [Constructible] public VendorRentalContract() : base(0x14F0) { - Weight = 1.0; Hue = 0x672; - _duration = VendorRentalDuration.Instances[0]; Price = 1500; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1062332; // a vendor rental contract public VendorRentalDuration Duration diff --git a/Projects/UOContent/Items/Food/Asian.cs b/Projects/UOContent/Items/Food/Asian.cs index 2b9a66101..282f35c03 100644 --- a/Projects/UOContent/Items/Food/Asian.cs +++ b/Projects/UOContent/Items/Food/Asian.cs @@ -20,9 +20,10 @@ public partial class WasabiClumps : Food public WasabiClumps() : base(0x24EB) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -34,7 +35,6 @@ public partial class EmptyBentoBox : Item } public override double DefaultWeight => 5.0; - } [SerializationGenerator(0, false)] @@ -44,20 +44,10 @@ public partial class BentoBox : Food public BentoBox() : base(0x2836) { Stackable = false; - Weight = 5.0; FillFactor = 2; } - public override bool Eat(Mobile from) - { - if (!base.Eat(from)) - { - return false; - } - - from.AddToBackpack(new EmptyBentoBox()); - return true; - } + public override double DefaultWeight => 5.0; } [SerializationGenerator(0, false)] @@ -67,9 +57,10 @@ public partial class SushiRolls : Food public SushiRolls() : base(0x283E) { Stackable = false; - Weight = 3.0; FillFactor = 2; } + + public override double DefaultWeight => 3.0; } [SerializationGenerator(0, false)] @@ -79,9 +70,10 @@ public partial class SushiPlatter : Food public SushiPlatter() : base(0x2840) { Stackable = Core.ML; - Weight = 3.0; FillFactor = 2; } + + public override double DefaultWeight => 3.0; } [SerializationGenerator(0, false)] @@ -102,9 +94,10 @@ public partial class GreenTea : Food public GreenTea() : base(0x284C) { Stackable = false; - Weight = 4.0; FillFactor = 2; } + + public override double DefaultWeight => 4.0; } [SerializationGenerator(0, false)] @@ -114,9 +107,10 @@ public partial class MisoSoup : Food public MisoSoup() : base(0x284D) { Stackable = false; - Weight = 4.0; FillFactor = 2; } + + public override double DefaultWeight => 4.0; } [SerializationGenerator(0, false)] @@ -126,9 +120,10 @@ public partial class WhiteMisoSoup : Food public WhiteMisoSoup() : base(0x284E) { Stackable = false; - Weight = 4.0; FillFactor = 2; } + + public override double DefaultWeight => 4.0; } [SerializationGenerator(0, false)] @@ -138,9 +133,10 @@ public partial class RedMisoSoup : Food public RedMisoSoup() : base(0x284F) { Stackable = false; - Weight = 4.0; FillFactor = 2; } + + public override double DefaultWeight => 4.0; } [SerializationGenerator(0, false)] @@ -150,7 +146,8 @@ public partial class AwaseMisoSoup : Food public AwaseMisoSoup() : base(0x2850) { Stackable = false; - Weight = 4.0; FillFactor = 2; } + + public override double DefaultWeight => 4.0; } diff --git a/Projects/UOContent/Items/Food/Bowls.cs b/Projects/UOContent/Items/Food/Bowls.cs index e26c4b72b..08b7bb11f 100644 --- a/Projects/UOContent/Items/Food/Bowls.cs +++ b/Projects/UOContent/Items/Food/Bowls.cs @@ -31,10 +31,11 @@ public partial class WoodenBowlOfCarrots : Food public WoodenBowlOfCarrots() : base(0x15F9) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -54,10 +55,11 @@ public partial class WoodenBowlOfCorn : Food public WoodenBowlOfCorn() : base(0x15FA) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -77,10 +79,11 @@ public partial class WoodenBowlOfLettuce : Food public WoodenBowlOfLettuce() : base(0x15FB) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -100,10 +103,11 @@ public partial class WoodenBowlOfPeas : Food public WoodenBowlOfPeas() : base(0x15FC) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -123,10 +127,11 @@ public partial class PewterBowlOfCarrots : Food public PewterBowlOfCarrots() : base(0x15FE) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -146,10 +151,11 @@ public partial class PewterBowlOfCorn : Food public PewterBowlOfCorn() : base(0x15FF) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -169,10 +175,11 @@ public partial class PewterBowlOfLettuce : Food public PewterBowlOfLettuce() : base(0x1600) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -192,10 +199,11 @@ public partial class PewterBowlOfPeas : Food public PewterBowlOfPeas() : base(0x1601) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -215,10 +223,11 @@ public partial class PewterBowlOfPotatos : Food public PewterBowlOfPotatos() : base(0x1602) { Stackable = false; - Weight = 1.0; FillFactor = 2; } + public override double DefaultWeight => 1.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -262,10 +271,11 @@ public partial class WoodenBowlOfStew : Food public WoodenBowlOfStew() : base(0x1604) { Stackable = false; - Weight = 2.0; FillFactor = 2; } + public override double DefaultWeight => 2.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -285,10 +295,11 @@ public partial class WoodenBowlOfTomatoSoup : Food public WoodenBowlOfTomatoSoup() : base(0x1606) { Stackable = false; - Weight = 2.0; FillFactor = 2; } + public override double DefaultWeight => 2.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) diff --git a/Projects/UOContent/Items/Food/CookableFood.cs b/Projects/UOContent/Items/Food/CookableFood.cs index 7b2dbad62..e9597fd03 100644 --- a/Projects/UOContent/Items/Food/CookableFood.cs +++ b/Projects/UOContent/Items/Food/CookableFood.cs @@ -76,11 +76,12 @@ public partial class RawRibs : CookableFood [Constructible] public RawRibs(int amount = 1) : base(0x9F1, 10) { - Weight = 1.0; Stackable = true; Amount = amount; } + public override double DefaultWeight => 1.0; + public override Food Cook() => new Ribs(); } @@ -103,10 +104,11 @@ public partial class RawChickenLeg : CookableFood [Constructible] public RawChickenLeg() : base(0x1607, 10) { - Weight = 1.0; Stackable = true; } + public override double DefaultWeight => 1.0; + public override Food Cook() => new ChickenLeg(); } @@ -116,11 +118,12 @@ public partial class RawBird : CookableFood [Constructible] public RawBird(int amount = 1) : base(0x9B9, 10) { - Weight = 1.0; Stackable = true; Amount = amount; } + public override double DefaultWeight => 1.0; + public override Food Cook() => new CookedBird(); } @@ -251,11 +254,12 @@ public partial class Eggs : CookableFood [Constructible] public Eggs(int amount = 1) : base(0x9B5, 15) { - Weight = 1.0; Stackable = true; Amount = amount; } + public override double DefaultWeight => 1.0; + public override Food Cook() => new FriedEggs(); } @@ -265,12 +269,11 @@ public partial class BrightlyColoredEggs : CookableFood [Constructible] public BrightlyColoredEggs() : base(0x9B5, 15) { - Weight = 0.5; Hue = 3 + Utility.Random(20) * 5; } + public override double DefaultWeight => 0.5; public override string DefaultName => "brightly colored eggs"; - public override Food Cook() => new FriedEggs(); } @@ -280,12 +283,11 @@ public partial class EasterEggs : CookableFood [Constructible] public EasterEggs() : base(0x9B5, 15) { - Weight = 0.5; Hue = 3 + Utility.Random(20) * 5; } + public override double DefaultWeight => 0.5; public override int LabelNumber => 1016105; // Easter Eggs - public override Food Cook() => new FriedEggs(); } diff --git a/Projects/UOContent/Items/Food/Cooking.cs b/Projects/UOContent/Items/Food/Cooking.cs index d45db3b94..6cff16d72 100644 --- a/Projects/UOContent/Items/Food/Cooking.cs +++ b/Projects/UOContent/Items/Food/Cooking.cs @@ -11,8 +11,9 @@ public partial class Dough : Item public Dough() : base(0x103d) { Stackable = Core.ML; - Weight = 1.0; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -22,10 +23,10 @@ public partial class SweetDough : Item public SweetDough() : base(0x103d) { Stackable = Core.ML; - Weight = 1.0; Hue = 150; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041340; // sweet dough } @@ -35,9 +36,10 @@ public partial class JarHoney : Item [Constructible] public JarHoney() : base(0x9ec) { - Weight = 1.0; Stackable = true; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -69,10 +71,11 @@ public partial class SackFlour : Item, IHasQuantity [Constructible] public SackFlour() : base(0x1039) { - Weight = 5.0; _quantity = 20; } + public override double DefaultWeight => 5.0; + [SerializableProperty(0)] [CommandProperty(AccessLevel.GameMaster)] public int Quantity @@ -121,11 +124,12 @@ public partial class WheatSheaf : Item [Constructible] public WheatSheaf(int amount = 1) : base(7869) { - Weight = 1.0; Stackable = true; Amount = amount; } + public override double DefaultWeight => 1.0; + public override void OnDoubleClick(Mobile from) { if (Movable) diff --git a/Projects/UOContent/Items/Food/Food.cs b/Projects/UOContent/Items/Food/Food.cs index 130b137d9..9824adc3f 100644 --- a/Projects/UOContent/Items/Food/Food.cs +++ b/Projects/UOContent/Items/Food/Food.cs @@ -133,9 +133,10 @@ public partial class BreadLoaf : Food [Constructible] public BreadLoaf(int amount = 1) : base(0x103B, amount) { - Weight = 1.0; FillFactor = 3; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -144,9 +145,10 @@ public partial class Bacon : Food [Constructible] public Bacon(int amount = 1) : base(0x979, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -155,9 +157,10 @@ public partial class SlabOfBacon : Food [Constructible] public SlabOfBacon(int amount = 1) : base(0x976, amount) { - Weight = 1.0; FillFactor = 3; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -202,9 +205,10 @@ public partial class FrenchBread : Food [Constructible] public FrenchBread(int amount = 1) : base(0x98C, amount) { - Weight = 2.0; FillFactor = 3; } + + public override double DefaultWeight => 2.0; } [SerializationGenerator(0, false)] @@ -213,9 +217,10 @@ public partial class FriedEggs : Food [Constructible] public FriedEggs(int amount = 1) : base(0x9B6, amount) { - Weight = 1.0; FillFactor = 4; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -224,9 +229,10 @@ public partial class CookedBird : Food [Constructible] public CookedBird(int amount = 1) : base(0x9B7, amount) { - Weight = 1.0; FillFactor = 5; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -235,9 +241,10 @@ public partial class RoastPig : Food [Constructible] public RoastPig(int amount = 1) : base(0x9BB, amount) { - Weight = 45.0; FillFactor = 20; } + + public override double DefaultWeight => 45.0; } [SerializationGenerator(0, false)] @@ -246,9 +253,10 @@ public partial class Sausage : Food [Constructible] public Sausage(int amount = 1) : base(0x9C0, amount) { - Weight = 1.0; FillFactor = 4; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -257,9 +265,10 @@ public partial class Ham : Food [Constructible] public Ham(int amount = 1) : base(0x9C9, amount) { - Weight = 1.0; FillFactor = 5; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -269,9 +278,10 @@ public partial class Cake : Food public Cake() : base(0x9E9) { Stackable = false; - Weight = 1.0; FillFactor = 10; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -280,9 +290,10 @@ public partial class Ribs : Food [Constructible] public Ribs(int amount = 1) : base(0x9F2, amount) { - Weight = 1.0; FillFactor = 5; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -292,9 +303,10 @@ public partial class Cookies : Food public Cookies() : base(0x160b) { Stackable = Core.ML; - Weight = 1.0; FillFactor = 4; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -304,9 +316,10 @@ public partial class Muffins : Food public Muffins() : base(0x9eb) { Stackable = false; - Weight = 1.0; FillFactor = 4; } + + public override double DefaultWeight => 1.0; } [TypeAlias("Server.Items.Pizza")] @@ -317,10 +330,10 @@ public partial class CheesePizza : Food public CheesePizza() : base(0x1040) { Stackable = false; - Weight = 1.0; FillFactor = 6; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1044516; // cheese pizza } @@ -331,10 +344,10 @@ public partial class SausagePizza : Food public SausagePizza() : base(0x1040) { Stackable = false; - Weight = 1.0; FillFactor = 6; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1044517; // sausage pizza } @@ -345,10 +358,10 @@ public partial class FruitPie : Food public FruitPie() : base(0x1041) { Stackable = false; - Weight = 1.0; FillFactor = 5; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041346; // baked fruit pie } @@ -359,10 +372,10 @@ public partial class MeatPie : Food public MeatPie() : base(0x1041) { Stackable = false; - Weight = 1.0; FillFactor = 5; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041347; // baked meat pie } @@ -373,10 +386,10 @@ public partial class PumpkinPie : Food public PumpkinPie() : base(0x1041) { Stackable = false; - Weight = 1.0; FillFactor = 5; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041348; // baked pumpkin pie } @@ -387,10 +400,10 @@ public partial class ApplePie : Food public ApplePie() : base(0x1041) { Stackable = false; - Weight = 1.0; FillFactor = 5; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041343; // baked apple pie } @@ -401,10 +414,10 @@ public partial class PeachCobbler : Food public PeachCobbler() : base(0x1041) { Stackable = false; - Weight = 1.0; FillFactor = 5; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041344; // baked peach cobbler } @@ -415,10 +428,10 @@ public partial class Quiche : Food public Quiche() : base(0x1041) { Stackable = Core.ML; - Weight = 1.0; FillFactor = 5; } + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041345; // baked quiche } @@ -428,9 +441,10 @@ public partial class LambLeg : Food [Constructible] public LambLeg(int amount = 1) : base(0x160a, amount) { - Weight = 2.0; FillFactor = 5; } + + public override double DefaultWeight => 2.0; } [SerializationGenerator(0, false)] @@ -439,9 +453,10 @@ public partial class ChickenLeg : Food [Constructible] public ChickenLeg(int amount = 1) : base(0x1608, amount) { - Weight = 1.0; FillFactor = 4; } + + public override double DefaultWeight => 1.0; } [Flippable(0xC74, 0xC75)] @@ -451,9 +466,10 @@ public partial class HoneydewMelon : Food [Constructible] public HoneydewMelon(int amount = 1) : base(0xC74, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [Flippable(0xC64, 0xC65)] @@ -463,9 +479,10 @@ public partial class YellowGourd : Food [Constructible] public YellowGourd(int amount = 1) : base(0xC64, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [Flippable(0xC66, 0xC67)] @@ -475,9 +492,10 @@ public partial class GreenGourd : Food [Constructible] public GreenGourd(int amount = 1) : base(0xC66, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [Flippable(0xC7F, 0xC81)] @@ -487,9 +505,10 @@ public partial class EarOfCorn : Food [Constructible] public EarOfCorn(int amount = 1) : base(0xC81, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -498,9 +517,10 @@ public partial class Turnip : Food [Constructible] public Turnip(int amount = 1) : base(0xD3A, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] diff --git a/Projects/UOContent/Items/Food/Fruits.cs b/Projects/UOContent/Items/Food/Fruits.cs index 9971f1d62..2a5ea409d 100644 --- a/Projects/UOContent/Items/Food/Fruits.cs +++ b/Projects/UOContent/Items/Food/Fruits.cs @@ -8,11 +8,12 @@ public partial class FruitBasket : Food [Constructible] public FruitBasket() : base(0x993) { - Weight = 2.0; FillFactor = 5; Stackable = false; } + public override double DefaultWeight => 2.0; + public override bool Eat(Mobile from) { if (!base.Eat(from)) @@ -32,9 +33,10 @@ public partial class Banana : Food [Constructible] public Banana(int amount = 1) : base(0x171f, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [Flippable(0x1721, 0x1722)] @@ -44,9 +46,10 @@ public partial class Bananas : Food [Constructible] public Bananas(int amount = 1) : base(0x1721, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -55,9 +58,10 @@ public partial class SplitCoconut : Food [Constructible] public SplitCoconut(int amount = 1) : base(0x1725, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -66,9 +70,10 @@ public partial class Lemon : Food [Constructible] public Lemon(int amount = 1) : base(0x1728, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -77,9 +82,10 @@ public partial class Lemons : Food [Constructible] public Lemons(int amount = 1) : base(0x1729, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -88,9 +94,10 @@ public partial class Lime : Food [Constructible] public Lime(int amount = 1) : base(0x172a, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -99,9 +106,10 @@ public partial class Limes : Food [Constructible] public Limes(int amount = 1) : base(0x172B, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -110,9 +118,10 @@ public partial class Coconut : Food [Constructible] public Coconut(int amount = 1) : base(0x1726, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -121,9 +130,10 @@ public partial class OpenCoconut : Food [Constructible] public OpenCoconut(int amount = 1) : base(0x1723, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -132,9 +142,10 @@ public partial class Dates : Food [Constructible] public Dates(int amount = 1) : base(0x1727, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -143,9 +154,10 @@ public partial class Grapes : Food [Constructible] public Grapes(int amount = 1) : base(0x9D1, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -154,9 +166,10 @@ public partial class Peach : Food [Constructible] public Peach(int amount = 1) : base(0x9D2, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -165,9 +178,10 @@ public partial class Pear : Food [Constructible] public Pear(int amount = 1) : base(0x994, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -176,9 +190,10 @@ public partial class Apple : Food [Constructible] public Apple(int amount = 1) : base(0x9D0, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -187,9 +202,10 @@ public partial class Watermelon : Food [Constructible] public Watermelon(int amount = 1) : base(0xC5C, amount) { - Weight = 5.0; FillFactor = 5; } + + public override double DefaultWeight => 5.0; } [SerializationGenerator(0, false)] @@ -198,9 +214,10 @@ public partial class SmallWatermelon : Food [Constructible] public SmallWatermelon(int amount = 1) : base(0xC5D, amount) { - Weight = 5.0; FillFactor = 5; } + + public override double DefaultWeight => 5.0; } [Flippable(0xc72, 0xc73)] @@ -210,9 +227,10 @@ public partial class Squash : Food [Constructible] public Squash(int amount = 1) : base(0xc72, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } [Flippable(0xc79, 0xc7a)] @@ -222,7 +240,8 @@ public partial class Cantaloupe : Food [Constructible] public Cantaloupe(int amount = 1) : base(0xc79, amount) { - Weight = 1.0; FillFactor = 1; } + + public override double DefaultWeight => 1.0; } diff --git a/Projects/UOContent/Items/Games/BaseBoard.cs b/Projects/UOContent/Items/Games/BaseBoard.cs index 123f700dc..d18cbc60d 100644 --- a/Projects/UOContent/Items/Games/BaseBoard.cs +++ b/Projects/UOContent/Items/Games/BaseBoard.cs @@ -19,10 +19,10 @@ public abstract partial class BaseBoard : Container, ISecurable public BaseBoard(int itemID) : base(itemID) { CreatePieces(); - - Weight = 5.0; } + public override double DefaultWeight => 5.0; + public override bool DisplaysContent => false; // Do not display (x items, y stones) public override bool IsDecoContainer => false; diff --git a/Projects/UOContent/Items/Games/Mahjong/MahjongGame.cs b/Projects/UOContent/Items/Games/Mahjong/MahjongGame.cs index a4be5c613..de7e663b7 100644 --- a/Projects/UOContent/Items/Games/Mahjong/MahjongGame.cs +++ b/Projects/UOContent/Items/Games/Mahjong/MahjongGame.cs @@ -43,8 +43,6 @@ public partial class MahjongGame : Item, ISecurable [Constructible] public MahjongGame() : base(0xFAA) { - Weight = 5.0; - BuildWalls(); _dealerIndicator = new MahjongDealerIndicator(this, new Point2D(300, 300), MahjongPieceDirection.Up, MahjongWind.North); @@ -55,6 +53,8 @@ public partial class MahjongGame : Item, ISecurable _level = SecureLevel.CoOwners; } + public override double DefaultWeight => 5.0; + [CommandProperty(AccessLevel.GameMaster)] [SerializableProperty(6)] public bool ShowScores diff --git a/Projects/UOContent/Items/Guilds/GuildTeleporter.cs b/Projects/UOContent/Items/Guilds/GuildTeleporter.cs index dc471b0ad..44103e998 100644 --- a/Projects/UOContent/Items/Guilds/GuildTeleporter.cs +++ b/Projects/UOContent/Items/Guilds/GuildTeleporter.cs @@ -13,11 +13,12 @@ public partial class GuildTeleporter : Item [Constructible] public GuildTeleporter(Item stone = null) : base(0x1869) { - Weight = 1.0; LootType = LootType.Blessed; _stone = stone; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1041054; // guildstone teleporter public override bool DisplayLootType => false; diff --git a/Projects/UOContent/Items/Guilds/Guildstone.cs b/Projects/UOContent/Items/Guilds/Guildstone.cs index 6c0603984..3faaeb192 100644 --- a/Projects/UOContent/Items/Guilds/Guildstone.cs +++ b/Projects/UOContent/Items/Guilds/Guildstone.cs @@ -228,10 +228,10 @@ public partial class GuildstoneDeed : Item _guild = g; _guildName = guildName; _guildAbbrev = abbrev; - - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1041233; // deed to a guildstone public override void GetProperties(IPropertyList list) diff --git a/Projects/UOContent/Items/Lights/Brazier.cs b/Projects/UOContent/Items/Lights/Brazier.cs index 56f834c3b..dd0080a29 100644 --- a/Projects/UOContent/Items/Lights/Brazier.cs +++ b/Projects/UOContent/Items/Lights/Brazier.cs @@ -13,8 +13,9 @@ public partial class Brazier : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = true; Light = LightType.Circle225; - Weight = 20.0; } + public override double DefaultWeight => 20.0; + public override int LitItemID => 0xE31; } diff --git a/Projects/UOContent/Items/Lights/BrazierTall.cs b/Projects/UOContent/Items/Lights/BrazierTall.cs index c23945c50..17f444fc4 100644 --- a/Projects/UOContent/Items/Lights/BrazierTall.cs +++ b/Projects/UOContent/Items/Lights/BrazierTall.cs @@ -13,8 +13,9 @@ public partial class BrazierTall : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = true; Light = LightType.Circle300; - Weight = 25.0; } + public override double DefaultWeight => 25.0; + public override int LitItemID => 0x19AA; } diff --git a/Projects/UOContent/Items/Lights/Candelabra.cs b/Projects/UOContent/Items/Lights/Candelabra.cs index 1558417bd..c2d2c80aa 100644 --- a/Projects/UOContent/Items/Lights/Candelabra.cs +++ b/Projects/UOContent/Items/Lights/Candelabra.cs @@ -16,9 +16,10 @@ public partial class Candelabra : BaseLight, IShipwreckedItem Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle225; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override int LitItemID => 0xB1D; public override int UnlitItemID => 0xA27; diff --git a/Projects/UOContent/Items/Lights/CandelabraStand.cs b/Projects/UOContent/Items/Lights/CandelabraStand.cs index 00e49e521..b546947eb 100644 --- a/Projects/UOContent/Items/Lights/CandelabraStand.cs +++ b/Projects/UOContent/Items/Lights/CandelabraStand.cs @@ -12,9 +12,9 @@ public partial class CandelabraStand : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle225; - Weight = 20.0; } + public override double DefaultWeight => 20.0; public override int LitItemID => 0xB26; public override int UnlitItemID => 0xA29; } diff --git a/Projects/UOContent/Items/Lights/Candle.cs b/Projects/UOContent/Items/Lights/Candle.cs index f0d5bd42e..283bccb03 100644 --- a/Projects/UOContent/Items/Lights/Candle.cs +++ b/Projects/UOContent/Items/Lights/Candle.cs @@ -14,9 +14,9 @@ public partial class Candle : BaseEquipableLight Stackable = true; Light = LightType.Circle150; - Weight = 1.0; } + public override double DefaultWeight => 1.0; public override int LitItemID => 0xA0F; public override int UnlitItemID => 0xA28; } diff --git a/Projects/UOContent/Items/Lights/CandleLarge.cs b/Projects/UOContent/Items/Lights/CandleLarge.cs index 12dfdf188..7981e6e4c 100644 --- a/Projects/UOContent/Items/Lights/CandleLarge.cs +++ b/Projects/UOContent/Items/Lights/CandleLarge.cs @@ -10,12 +10,11 @@ public partial class CandleLarge : BaseLight public CandleLarge() : base(0xA26) { Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero; - Burning = false; Light = LightType.Circle150; - Weight = 2.0; } + public override double DefaultWeight => 2.0; public override int LitItemID => 0xB1A; public override int UnlitItemID => 0xA26; } diff --git a/Projects/UOContent/Items/Lights/CandleLong.cs b/Projects/UOContent/Items/Lights/CandleLong.cs index 39daca623..4548f95d0 100644 --- a/Projects/UOContent/Items/Lights/CandleLong.cs +++ b/Projects/UOContent/Items/Lights/CandleLong.cs @@ -10,12 +10,12 @@ public partial class CandleLong : BaseLight public CandleLong() : base(0x1433) { Duration = Burnout ? TimeSpan.FromMinutes(30) : TimeSpan.Zero; - Burning = false; Light = LightType.Circle150; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override int LitItemID => 0x1430; public override int UnlitItemID => 0x1433; } diff --git a/Projects/UOContent/Items/Lights/CandleShort.cs b/Projects/UOContent/Items/Lights/CandleShort.cs index 942478f35..4ad2758f2 100644 --- a/Projects/UOContent/Items/Lights/CandleShort.cs +++ b/Projects/UOContent/Items/Lights/CandleShort.cs @@ -10,12 +10,12 @@ public partial class CandleShort : BaseLight public CandleShort() : base(0x142F) { Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero; - Burning = false; Light = LightType.Circle150; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override int LitItemID => 0x142C; public override int UnlitItemID => 0x142F; } diff --git a/Projects/UOContent/Items/Lights/CandleSkull.cs b/Projects/UOContent/Items/Lights/CandleSkull.cs index 8cd3a9f21..7236f4fbc 100644 --- a/Projects/UOContent/Items/Lights/CandleSkull.cs +++ b/Projects/UOContent/Items/Lights/CandleSkull.cs @@ -13,9 +13,10 @@ public partial class CandleSkull : BaseLight Burning = false; Light = LightType.Circle150; - Weight = 5.0; } + public override double DefaultWeight => 5.0; + public override int LitItemID => ItemID is 0x1583 or 0x1854 ? 0x1854 : 0x1858; public override int UnlitItemID => ItemID is 0x1853 or 0x1584 ? 0x1853 : 0x1857; diff --git a/Projects/UOContent/Items/Lights/HangingLantern.cs b/Projects/UOContent/Items/Lights/HangingLantern.cs index 1ae33dcf9..942635a02 100644 --- a/Projects/UOContent/Items/Lights/HangingLantern.cs +++ b/Projects/UOContent/Items/Lights/HangingLantern.cs @@ -13,9 +13,9 @@ public partial class HangingLantern : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle300; - Weight = 40.0; } + public override double DefaultWeight => 40.0; public override int LitItemID => 0xA1A; public override int UnlitItemID => 0xA1D; } diff --git a/Projects/UOContent/Items/Lights/HeatingStand.cs b/Projects/UOContent/Items/Lights/HeatingStand.cs index 1b1abe044..ec9f6359c 100644 --- a/Projects/UOContent/Items/Lights/HeatingStand.cs +++ b/Projects/UOContent/Items/Lights/HeatingStand.cs @@ -10,12 +10,12 @@ public partial class HeatingStand : BaseLight public HeatingStand() : base(0x1849) { Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero; - Burning = false; Light = LightType.Empty; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override int LitItemID => 0x184A; public override int UnlitItemID => 0x1849; diff --git a/Projects/UOContent/Items/Lights/LampPost1.cs b/Projects/UOContent/Items/Lights/LampPost1.cs index 985e6e7b1..3f6884618 100644 --- a/Projects/UOContent/Items/Lights/LampPost1.cs +++ b/Projects/UOContent/Items/Lights/LampPost1.cs @@ -13,9 +13,9 @@ public partial class LampPost1 : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle300; - Weight = 40.0; } + public override double DefaultWeight => 40.0; public override int LitItemID => 0xB20; public override int UnlitItemID => 0xB21; } diff --git a/Projects/UOContent/Items/Lights/LampPost2.cs b/Projects/UOContent/Items/Lights/LampPost2.cs index f36bdf4db..d0f630fe4 100644 --- a/Projects/UOContent/Items/Lights/LampPost2.cs +++ b/Projects/UOContent/Items/Lights/LampPost2.cs @@ -13,9 +13,9 @@ public partial class LampPost2 : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle300; - Weight = 40.0; } + public override double DefaultWeight => 40.0; public override int LitItemID => 0xB22; public override int UnlitItemID => 0xB23; } diff --git a/Projects/UOContent/Items/Lights/LampPost3.cs b/Projects/UOContent/Items/Lights/LampPost3.cs index c9cb237a0..24ffa44a5 100644 --- a/Projects/UOContent/Items/Lights/LampPost3.cs +++ b/Projects/UOContent/Items/Lights/LampPost3.cs @@ -13,9 +13,9 @@ public partial class LampPost3 : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle300; - Weight = 40.0; } + public override double DefaultWeight => 40.0; public override int LitItemID => 0xB24; public override int UnlitItemID => 0xB25; } diff --git a/Projects/UOContent/Items/Lights/Lantern.cs b/Projects/UOContent/Items/Lights/Lantern.cs index b7cddd0cc..366728e95 100644 --- a/Projects/UOContent/Items/Lights/Lantern.cs +++ b/Projects/UOContent/Items/Lights/Lantern.cs @@ -15,9 +15,10 @@ public partial class Lantern : BaseEquipableLight Burning = false; Light = LightType.Circle300; - Weight = 2.0; } + public override double DefaultWeight => 2.0; + public override int LitItemID => ItemID is 0xA15 or 0xA17 ? ItemID : 0xA22; public override int UnlitItemID => ItemID == 0xA18 ? ItemID : 0xA25; diff --git a/Projects/UOContent/Items/Lights/PaperLantern.cs b/Projects/UOContent/Items/Lights/PaperLantern.cs index 681bf7705..fde95fb3e 100644 --- a/Projects/UOContent/Items/Lights/PaperLantern.cs +++ b/Projects/UOContent/Items/Lights/PaperLantern.cs @@ -14,9 +14,9 @@ public partial class PaperLantern : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle150; - Weight = 3.0; } + public override double DefaultWeight => 3.0; public override int LitItemID => 0x24BD; public override int UnlitItemID => 0x24BE; } diff --git a/Projects/UOContent/Items/Lights/RedHangingLantern.cs b/Projects/UOContent/Items/Lights/RedHangingLantern.cs index 3643c2e12..173a2e082 100644 --- a/Projects/UOContent/Items/Lights/RedHangingLantern.cs +++ b/Projects/UOContent/Items/Lights/RedHangingLantern.cs @@ -14,9 +14,10 @@ public partial class RedHangingLantern : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle300; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override int LitItemID => ItemID == 0x24C2 ? 0x24C1 : 0x24C3; public override int UnlitItemID => ItemID == 0x24C1 ? 0x24C2 : 0x24C4; diff --git a/Projects/UOContent/Items/Lights/RoundPaperLantern.cs b/Projects/UOContent/Items/Lights/RoundPaperLantern.cs index 3b028a0d3..d1bd3ae1e 100644 --- a/Projects/UOContent/Items/Lights/RoundPaperLantern.cs +++ b/Projects/UOContent/Items/Lights/RoundPaperLantern.cs @@ -14,9 +14,10 @@ public partial class RoundPaperLantern : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle150; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override int LitItemID => 0x24C9; public override int UnlitItemID => 0x24CA; } diff --git a/Projects/UOContent/Items/Lights/ShojiLantern.cs b/Projects/UOContent/Items/Lights/ShojiLantern.cs index 56aa5d81e..f1482eff8 100644 --- a/Projects/UOContent/Items/Lights/ShojiLantern.cs +++ b/Projects/UOContent/Items/Lights/ShojiLantern.cs @@ -14,9 +14,9 @@ public partial class ShojiLantern : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle150; - Weight = 3.0; } + public override double DefaultWeight => 3.0; public override int LitItemID => 0x24BB; public override int UnlitItemID => 0x24BC; } diff --git a/Projects/UOContent/Items/Lights/Torch.cs b/Projects/UOContent/Items/Lights/Torch.cs index 75c5f0967..a2f527070 100644 --- a/Projects/UOContent/Items/Lights/Torch.cs +++ b/Projects/UOContent/Items/Lights/Torch.cs @@ -15,9 +15,10 @@ public partial class Torch : BaseEquipableLight Stackable = true; Light = LightType.Circle300; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override int LitItemID => 0xA12; public override int UnlitItemID => 0xF6B; diff --git a/Projects/UOContent/Items/Lights/WallSconce.cs b/Projects/UOContent/Items/Lights/WallSconce.cs index 3268efcaa..bf1c2576b 100644 --- a/Projects/UOContent/Items/Lights/WallSconce.cs +++ b/Projects/UOContent/Items/Lights/WallSconce.cs @@ -14,9 +14,10 @@ public partial class WallSconce : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.WestBig; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override int LitItemID => ItemID == 0x9FB ? 0x9FD : 0xA02; public override int UnlitItemID => ItemID == 0x9FD ? 0x9FB : 0xA00; diff --git a/Projects/UOContent/Items/Lights/WallTorch.cs b/Projects/UOContent/Items/Lights/WallTorch.cs index 968b0bbae..9ed6944ec 100644 --- a/Projects/UOContent/Items/Lights/WallTorch.cs +++ b/Projects/UOContent/Items/Lights/WallTorch.cs @@ -14,9 +14,10 @@ public partial class WallTorch : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.WestBig; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override int LitItemID => ItemID == 0xA05 ? 0xA07 : 0xA0C; public override int UnlitItemID => ItemID == 0xA07 ? 0xA05 : 0xA0A; diff --git a/Projects/UOContent/Items/Lights/WhiteHangingLantern.cs b/Projects/UOContent/Items/Lights/WhiteHangingLantern.cs index 7d62bde96..20837465e 100644 --- a/Projects/UOContent/Items/Lights/WhiteHangingLantern.cs +++ b/Projects/UOContent/Items/Lights/WhiteHangingLantern.cs @@ -14,9 +14,10 @@ public partial class WhiteHangingLantern : BaseLight Duration = TimeSpan.Zero; // Never burnt out Burning = false; Light = LightType.Circle300; - Weight = 3.0; } + public override double DefaultWeight => 3.0; + public override int LitItemID => ItemID == 0x24C6 ? 0x24C5 : 0x24C7; public override int UnlitItemID => ItemID == 0x24C5 ? 0x24C6 : 0x24C8; diff --git a/Projects/UOContent/Items/Maps/MapItem.cs b/Projects/UOContent/Items/Maps/MapItem.cs index b9ee21e53..0467d8220 100644 --- a/Projects/UOContent/Items/Maps/MapItem.cs +++ b/Projects/UOContent/Items/Maps/MapItem.cs @@ -42,13 +42,14 @@ public partial class MapItem : Item, ICraftable [Constructible] public MapItem(Map facet = null) : base(0x14EC) { - Weight = 1.0; _width = 200; _height = 200; _facet = facet; _pins = new List(); } + public override double DefaultWeight => 1.0; + public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue diff --git a/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEclipse.cs b/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEclipse.cs index 29caacff8..b2d48ed0f 100644 --- a/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEclipse.cs +++ b/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEclipse.cs @@ -9,12 +9,12 @@ public partial class RobeOfTheEclipse : BaseOuterTorso [Constructible] public RobeOfTheEclipse() : base(0x1F03, 0x486) { - Weight = 3.0; - Attributes.Luck = 95; // TODO: Supports arcane? } + public override double DefaultWeight => 3.0; + public override int LabelNumber => 1075082; // Robe of the Eclipse } diff --git a/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEquinox.cs b/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEquinox.cs index 3bfc6a283..54b4c4fe7 100644 --- a/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEquinox.cs +++ b/Projects/UOContent/Items/Minor Artifacts/ML/RobeOfTheEquinox.cs @@ -9,13 +9,13 @@ public partial class RobeOfTheEquinox : BaseOuterTorso [Constructible] public RobeOfTheEquinox() : base(0x1F04, 0xD6) { - Weight = 3.0; - Attributes.Luck = 95; // TODO: Supports arcane? // TODO: Elves Only } + public override double DefaultWeight => 3.0; + public override int LabelNumber => 1075042; // Robe of the Equinox } diff --git a/Projects/UOContent/Items/Misc/ArcaneGem.cs b/Projects/UOContent/Items/Misc/ArcaneGem.cs index ea474d086..4150deb87 100644 --- a/Projects/UOContent/Items/Misc/ArcaneGem.cs +++ b/Projects/UOContent/Items/Misc/ArcaneGem.cs @@ -13,9 +13,10 @@ public partial class ArcaneGem : Item public ArcaneGem() : base(0x1EA7) { Stackable = Core.ML; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + public override string DefaultName => "arcane gem"; public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Misc/BankCheck.cs b/Projects/UOContent/Items/Misc/BankCheck.cs index 4408d9f4f..1f42e6383 100644 --- a/Projects/UOContent/Items/Misc/BankCheck.cs +++ b/Projects/UOContent/Items/Misc/BankCheck.cs @@ -20,13 +20,14 @@ public partial class BankCheck : Item [Constructible] public BankCheck(int worth) : base(0x14F0) { - Weight = 1.0; Hue = 0x34; LootType = LootType.Blessed; _worth = worth; } + public override double DefaultWeight => 1.0; + public override bool DisplayLootType => Core.AOS; public override int LabelNumber => 1041361; // A bank check diff --git a/Projects/UOContent/Items/Misc/Beeswax.cs b/Projects/UOContent/Items/Misc/Beeswax.cs index 81349d043..46354510a 100644 --- a/Projects/UOContent/Items/Misc/Beeswax.cs +++ b/Projects/UOContent/Items/Misc/Beeswax.cs @@ -8,8 +8,9 @@ public partial class Beeswax : Item [Constructible] public Beeswax(int amount = 1) : base(0x1422) { - Weight = 1.0; Stackable = true; Amount = amount; } + + public override double DefaultWeight => 1.0; } diff --git a/Projects/UOContent/Items/Misc/Bola.cs b/Projects/UOContent/Items/Misc/Bola.cs index 716a8e613..a2943c108 100644 --- a/Projects/UOContent/Items/Misc/Bola.cs +++ b/Projects/UOContent/Items/Misc/Bola.cs @@ -12,11 +12,12 @@ public partial class Bola : Item [Constructible] public Bola(int amount = 1) : base(0x26AC) { - Weight = 4.0; Stackable = true; Amount = amount; } + public override double DefaultWeight => 4.0; + public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) diff --git a/Projects/UOContent/Items/Misc/BolaBall.cs b/Projects/UOContent/Items/Misc/BolaBall.cs index b372b3abf..b4737a2cb 100644 --- a/Projects/UOContent/Items/Misc/BolaBall.cs +++ b/Projects/UOContent/Items/Misc/BolaBall.cs @@ -8,9 +8,10 @@ public partial class BolaBall : Item [Constructible] public BolaBall(int amount = 1) : base(0xE73) { - Weight = 4.0; Stackable = true; Amount = amount; Hue = 0x8AC; } + + public override double DefaultWeight => 4.0; } diff --git a/Projects/UOContent/Items/Misc/ClockworkAssembly.cs b/Projects/UOContent/Items/Misc/ClockworkAssembly.cs index 7348b6469..9c72aa240 100644 --- a/Projects/UOContent/Items/Misc/ClockworkAssembly.cs +++ b/Projects/UOContent/Items/Misc/ClockworkAssembly.cs @@ -34,10 +34,11 @@ public partial class ClockworkAssembly : Item [Constructible] public ClockworkAssembly() : base(0x1EA8) { - Weight = 5.0; Hue = 1102; } + public override double DefaultWeight => 5.0; + public override int LabelNumber => 1073426; // Clockwork Assembly public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Misc/InteriorDecorator.cs b/Projects/UOContent/Items/Misc/InteriorDecorator.cs index 9c197685e..6af30b95f 100644 --- a/Projects/UOContent/Items/Misc/InteriorDecorator.cs +++ b/Projects/UOContent/Items/Misc/InteriorDecorator.cs @@ -22,10 +22,11 @@ public partial class InteriorDecorator : Item [Constructible] public InteriorDecorator() : base(0xFC1) { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + [CommandProperty(AccessLevel.GameMaster)] public DecorateCommand Command { diff --git a/Projects/UOContent/Items/Misc/Key.cs b/Projects/UOContent/Items/Misc/Key.cs index 4e16c55c1..931ccecba 100644 --- a/Projects/UOContent/Items/Misc/Key.cs +++ b/Projects/UOContent/Items/Misc/Key.cs @@ -47,13 +47,13 @@ public partial class Key : Item public Key(KeyType type, uint val = 0, Item link = null) : base((int)type) { - Weight = 1.0; - _maxRange = 3; _keyValue = val; _link = link; } + public override double DefaultWeight => 1.0; + public static uint RandomValue() => (uint)(0xFFFFFFFE * Utility.RandomDouble()) + 1; public static void RemoveKeys(Mobile m, uint keyValue) diff --git a/Projects/UOContent/Items/Misc/KeyRing.cs b/Projects/UOContent/Items/Misc/KeyRing.cs index 2a3c39759..bae7d8d77 100644 --- a/Projects/UOContent/Items/Misc/KeyRing.cs +++ b/Projects/UOContent/Items/Misc/KeyRing.cs @@ -15,10 +15,11 @@ public partial class KeyRing : Item [Constructible] public KeyRing() : base(0x1011) { - Weight = 1.0; // They seem to have no weight on OSI ?! _keys = new List(); } + public override double DefaultWeight => 1.0; + public override bool OnDragDrop(Mobile from, Item dropped) { if (!IsChildOf(from.Backpack)) diff --git a/Projects/UOContent/Items/Misc/Labyrinth/MinotaurArtifact.cs b/Projects/UOContent/Items/Misc/Labyrinth/MinotaurArtifact.cs index 07b6824cf..f807a7d61 100644 --- a/Projects/UOContent/Items/Misc/Labyrinth/MinotaurArtifact.cs +++ b/Projects/UOContent/Items/Misc/Labyrinth/MinotaurArtifact.cs @@ -8,15 +8,10 @@ public partial class MinotaurArtifact : Item [Constructible] public MinotaurArtifact() : base(Utility.RandomList(0xB46, 0xB48, 0x9ED)) { - if (ItemID == 0x9ED) - { - Weight = 30; - } - LootType = LootType.Blessed; Hue = 0x100; } public override int LabelNumber => 1074826; // Minotaur Artifact - public override double DefaultWeight => 5.0; + public override double DefaultWeight => ItemID == 0x9ED ? 30.0 : 5.0; } diff --git a/Projects/UOContent/Items/Misc/Moonstone.cs b/Projects/UOContent/Items/Misc/Moonstone.cs index 0a9a90903..4d08947c8 100644 --- a/Projects/UOContent/Items/Misc/Moonstone.cs +++ b/Projects/UOContent/Items/Misc/Moonstone.cs @@ -20,11 +20,9 @@ public partial class Moonstone : Item private MoonstoneType _type; [Constructible] - public Moonstone(MoonstoneType type) : base(0xF8B) - { - Weight = 1.0; - _type = type; - } + public Moonstone(MoonstoneType type) : base(0xF8B) => _type = type; + + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041490 + (int)_type; diff --git a/Projects/UOContent/Items/Misc/PromotionalToken.cs b/Projects/UOContent/Items/Misc/PromotionalToken.cs index 90547b8e0..ac572a7da 100644 --- a/Projects/UOContent/Items/Misc/PromotionalToken.cs +++ b/Projects/UOContent/Items/Misc/PromotionalToken.cs @@ -11,9 +11,10 @@ public abstract partial class PromotionalToken : Item { LootType = LootType.Blessed; Light = LightType.Circle300; - Weight = 5.0; } + public override double DefaultWeight => 5.0; + public abstract TextDefinition ItemName { get; } public abstract TextDefinition ItemReceiveMessage { get; } public abstract TextDefinition ItemGumpName { get; } diff --git a/Projects/UOContent/Items/Misc/Rares.cs b/Projects/UOContent/Items/Misc/Rares.cs index bd9cf00c9..699006a7c 100644 --- a/Projects/UOContent/Items/Misc/Rares.cs +++ b/Projects/UOContent/Items/Misc/Rares.cs @@ -9,9 +9,10 @@ public partial class Rope : Item public Rope(int amount = 1) : base(0x14F8) { Stackable = true; - Weight = 1.0; Amount = amount; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -21,9 +22,10 @@ public partial class IronWire : Item public IronWire(int amount = 1) : base(0x1876) { Stackable = true; - Weight = 5.0; Amount = amount; } + + public override double DefaultWeight => 5.0; } [SerializationGenerator(0, false)] @@ -33,9 +35,10 @@ public partial class SilverWire : Item public SilverWire(int amount = 1) : base(0x1877) { Stackable = true; - Weight = 5.0; Amount = amount; } + + public override double DefaultWeight => 5.0; } [SerializationGenerator(0, false)] @@ -45,9 +48,10 @@ public partial class GoldWire : Item public GoldWire(int amount = 1) : base(0x1878) { Stackable = true; - Weight = 5.0; Amount = amount; } + + public override double DefaultWeight => 5.0; } [SerializationGenerator(0, false)] @@ -57,9 +61,10 @@ public partial class CopperWire : Item public CopperWire(int amount = 1) : base(0x1879) { Stackable = true; - Weight = 5.0; Amount = amount; } + + public override double DefaultWeight => 5.0; } [SerializationGenerator(0, false)] @@ -69,9 +74,10 @@ public partial class WhiteDriedFlowers : Item public WhiteDriedFlowers(int amount = 1) : base(0xC3C) { Stackable = true; - Weight = 1.0; Amount = amount; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -81,9 +87,10 @@ public partial class GreenDriedFlowers : Item public GreenDriedFlowers(int amount = 1) : base(0xC3E) { Stackable = true; - Weight = 1.0; Amount = amount; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -93,9 +100,10 @@ public partial class DriedOnions : Item public DriedOnions(int amount = 1) : base(0xC40) { Stackable = true; - Weight = 1.0; Amount = amount; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -105,9 +113,10 @@ public partial class DriedHerbs : Item public DriedHerbs(int amount = 1) : base(0xC42) { Stackable = true; - Weight = 1.0; Amount = amount; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] diff --git a/Projects/UOContent/Items/Misc/SpecialBeardDye.cs b/Projects/UOContent/Items/Misc/SpecialBeardDye.cs index ee402923f..7687a2870 100644 --- a/Projects/UOContent/Items/Misc/SpecialBeardDye.cs +++ b/Projects/UOContent/Items/Misc/SpecialBeardDye.cs @@ -9,11 +9,9 @@ namespace Server.Items; public partial class SpecialBeardDye : Item { [Constructible] - public SpecialBeardDye() : base(0xE26) - { - Weight = 1.0; - LootType = LootType.Newbied; - } + public SpecialBeardDye() : base(0xE26) => LootType = LootType.Newbied; + + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041087; // Special Beard Dye diff --git a/Projects/UOContent/Items/Misc/SpecialHairDye.cs b/Projects/UOContent/Items/Misc/SpecialHairDye.cs index 09a8289b6..cd1131111 100644 --- a/Projects/UOContent/Items/Misc/SpecialHairDye.cs +++ b/Projects/UOContent/Items/Misc/SpecialHairDye.cs @@ -9,11 +9,9 @@ namespace Server.Items; public partial class SpecialHairDye : Item { [Constructible] - public SpecialHairDye() : base(0xE26) - { - Weight = 1.0; - LootType = LootType.Newbied; - } + public SpecialHairDye() : base(0xE26) => LootType = LootType.Newbied; + + public override double DefaultWeight => 1.0; public override int LabelNumber => 1074402; diff --git a/Projects/UOContent/Items/Misc/TribalBerry.cs b/Projects/UOContent/Items/Misc/TribalBerry.cs index 4d6f1eb8a..313bff659 100644 --- a/Projects/UOContent/Items/Misc/TribalBerry.cs +++ b/Projects/UOContent/Items/Misc/TribalBerry.cs @@ -8,11 +8,12 @@ public partial class TribalBerry : Item [Constructible] public TribalBerry(int amount = 1) : base(0x9D0) { - Weight = 1.0; Stackable = true; Amount = amount; Hue = 6; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1040001; // tribal berry } diff --git a/Projects/UOContent/Items/Misc/TribalPaint.cs b/Projects/UOContent/Items/Misc/TribalPaint.cs index 8bad846bb..be4ef1ef0 100644 --- a/Projects/UOContent/Items/Misc/TribalPaint.cs +++ b/Projects/UOContent/Items/Misc/TribalPaint.cs @@ -16,10 +16,11 @@ public partial class TribalPaint : Item public TribalPaint() : base(0x9EC) { Hue = 2101; - Weight = 2.0; Stackable = Core.ML; } + public override double DefaultWeight => 2.0; + public override int LabelNumber => 1040000; // savage kin paint public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Quivers/BaseQuiver.cs b/Projects/UOContent/Items/Quivers/BaseQuiver.cs index dfdc6c5f8..e392ffdcb 100644 --- a/Projects/UOContent/Items/Quivers/BaseQuiver.cs +++ b/Projects/UOContent/Items/Quivers/BaseQuiver.cs @@ -73,7 +73,6 @@ public partial class BaseQuiver : Container, ICraftable, IAosItem public BaseQuiver(int itemID = 0x2FB7) : base(itemID) { - Weight = 2.0; Capacity = 500; Layer = Layer.Cloak; diff --git a/Projects/UOContent/Items/Resources/Fishing/Fish.cs b/Projects/UOContent/Items/Resources/Fishing/Fish.cs index 49f93eedd..d7e8e4498 100644 --- a/Projects/UOContent/Items/Resources/Fishing/Fish.cs +++ b/Projects/UOContent/Items/Resources/Fishing/Fish.cs @@ -9,12 +9,13 @@ public partial class Fish : Item, ICarvable public Fish(int amount = 1) : base(Utility.Random(0x09CC, 4)) { Stackable = true; - Weight = 1.0; Amount = amount; } + public override double DefaultWeight => 1.0; + public void Carve(Mobile from, Item item) { ScissorHelper(from, new RawFishSteak(), 4); } -} \ No newline at end of file +} diff --git a/Projects/UOContent/Items/Resources/Tailor/BoltOfCloth.cs b/Projects/UOContent/Items/Resources/Tailor/BoltOfCloth.cs index 6d3638145..685996cba 100644 --- a/Projects/UOContent/Items/Resources/Tailor/BoltOfCloth.cs +++ b/Projects/UOContent/Items/Resources/Tailor/BoltOfCloth.cs @@ -11,10 +11,11 @@ public partial class BoltOfCloth : Item, IScissorable, IDyable, ICommodity public BoltOfCloth(int amount = 1) : base(0xF95) { Stackable = true; - Weight = 5.0; Amount = amount; } + public override double DefaultWeight => 5.0; + int ICommodity.DescriptionNumber => LabelNumber; bool ICommodity.IsDeedable => true; @@ -48,4 +49,4 @@ public partial class BoltOfCloth : Item, IScissorable, IDyable, ICommodity var amount = (Amount * 50).ToString(); from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x3B2, 3, number, "", amount); } -} \ No newline at end of file +} diff --git a/Projects/UOContent/Items/Resources/Tailor/Bone.cs b/Projects/UOContent/Items/Resources/Tailor/Bone.cs index 590b71a37..b2cb47788 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Bone.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Bone.cs @@ -10,9 +10,10 @@ public partial class Bone : Item, ICommodity { Stackable = true; Amount = amount; - Weight = 1.0; } + public override double DefaultWeight => 1.0; + int ICommodity.DescriptionNumber => LabelNumber; bool ICommodity.IsDeedable => true; -} \ No newline at end of file +} diff --git a/Projects/UOContent/Items/Resources/Tailor/Cotton.cs b/Projects/UOContent/Items/Resources/Tailor/Cotton.cs index ea6d9da29..9d8ce0ef6 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Cotton.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Cotton.cs @@ -10,10 +10,11 @@ public partial class Cotton : Item, IDyable public Cotton(int amount = 1) : base(0xDF9) { Stackable = true; - Weight = 4.0; Amount = amount; } + public override double DefaultWeight => 4.0; + public bool Dye(Mobile from, DyeTub sender) { if (Deleted) diff --git a/Projects/UOContent/Items/Resources/Tailor/Hides.cs b/Projects/UOContent/Items/Resources/Tailor/Hides.cs index f9a6014c9..df6423fb2 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Hides.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Hides.cs @@ -8,13 +8,13 @@ public abstract partial class BaseHides : Item, ICommodity public BaseHides(CraftResource resource, int amount = 1) : base(0x1079) { Stackable = true; - Weight = 5.0; Amount = amount; Hue = CraftResources.GetHue(resource); - _resource = resource; } + public override double DefaultWeight => 5.0; + [SerializableProperty(0)] [CommandProperty(AccessLevel.GameMaster)] public CraftResource Resource diff --git a/Projects/UOContent/Items/Resources/Tailor/Leathers.cs b/Projects/UOContent/Items/Resources/Tailor/Leathers.cs index 86d1861ec..173e2dae0 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Leathers.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Leathers.cs @@ -8,13 +8,13 @@ public abstract partial class BaseLeather : Item, ICommodity public BaseLeather(CraftResource resource, int amount = 1) : base(0x1081) { Stackable = true; - Weight = 1.0; Amount = amount; Hue = CraftResources.GetHue(resource); - _resource = resource; } + public override double DefaultWeight => 1.0; + [SerializableProperty(0)] [CommandProperty(AccessLevel.GameMaster)] public CraftResource Resource diff --git a/Projects/UOContent/Items/Resources/Tailor/Wool.cs b/Projects/UOContent/Items/Resources/Tailor/Wool.cs index 5320cbd8d..2ef0ddbf7 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Wool.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Wool.cs @@ -10,10 +10,11 @@ public partial class Wool : Item, IDyable public Wool(int amount = 1) : base(0xDF8) { Stackable = true; - Weight = 4.0; Amount = amount; } + public override double DefaultWeight => 4.0; + public bool Dye(Mobile from, DyeTub sender) { if (Deleted) @@ -99,10 +100,11 @@ public partial class TaintedWool : Wool public TaintedWool(int amount = 1) : base(0x101F) { Stackable = true; - Weight = 4.0; Amount = amount; } + public override double DefaultWeight => 4.0; + public override void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { from.AddToBackpack(new DarkYarn diff --git a/Projects/UOContent/Items/Resources/Tailor/YarnsAndThreads.cs b/Projects/UOContent/Items/Resources/Tailor/YarnsAndThreads.cs index abce822ec..ea5265b6d 100644 --- a/Projects/UOContent/Items/Resources/Tailor/YarnsAndThreads.cs +++ b/Projects/UOContent/Items/Resources/Tailor/YarnsAndThreads.cs @@ -9,10 +9,11 @@ public abstract partial class BaseClothMaterial : Item, IDyable public BaseClothMaterial(int itemID, int amount = 1) : base(itemID) { Stackable = true; - Weight = 1.0; Amount = amount; } + public override double DefaultWeight => 1.0; + public bool Dye(Mobile from, DyeTub sender) { if (Deleted) diff --git a/Projects/UOContent/Items/Shields/ChaosShield.cs b/Projects/UOContent/Items/Shields/ChaosShield.cs index dd7707c95..7878dc25b 100644 --- a/Projects/UOContent/Items/Shields/ChaosShield.cs +++ b/Projects/UOContent/Items/Shields/ChaosShield.cs @@ -13,10 +13,10 @@ public partial class ChaosShield : BaseShield { LootType = LootType.Newbied; } - - Weight = 5.0; } + public override double DefaultWeight => 4.0; + public override int BasePhysicalResistance => 1; public override int BaseFireResistance => 0; public override int BaseColdResistance => 0; diff --git a/Projects/UOContent/Items/Shields/OrderShield.cs b/Projects/UOContent/Items/Shields/OrderShield.cs index 04ba88909..a85a5e6a0 100644 --- a/Projects/UOContent/Items/Shields/OrderShield.cs +++ b/Projects/UOContent/Items/Shields/OrderShield.cs @@ -13,10 +13,10 @@ public partial class OrderShield : BaseShield { LootType = LootType.Newbied; } - - Weight = 7.0; } + public override double DefaultWeight => 7.0; + public override int BasePhysicalResistance => 1; public override int BaseFireResistance => 0; public override int BaseColdResistance => 0; diff --git a/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs b/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs index 348cdbb6d..aef7d0acf 100644 --- a/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs +++ b/Projects/UOContent/Items/Skill Items/Camping/Kindling.cs @@ -11,10 +11,11 @@ public partial class Kindling : Item public Kindling(int amount = 1) : base(0xDE1) { Stackable = true; - Weight = 5.0; Amount = amount; } + public override double DefaultWeight => 5.0; + public override void OnDoubleClick(Mobile from) { if (!VerifyMove(from)) diff --git a/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs b/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs index 3cecb25d2..3914f28ff 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/FishingPole.cs @@ -9,11 +9,9 @@ namespace Server.Items; public partial class FishingPole : Item { [Constructible] - public FishingPole() : base(0x0DC0) - { - Layer = Layer.TwoHanded; - Weight = 8.0; - } + public FishingPole() : base(0x0DC0) => Layer = Layer.TwoHanded; + + public override double DefaultWeight => 8.0; public override void OnDoubleClick(Mobile from) { diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs index 8f5603a5c..5d6062099 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs @@ -17,11 +17,12 @@ public partial class MessageInABottle : Item [Constructible] public MessageInABottle(Map map, int level) : base(0x099F) { - Weight = 1.0; TargetMap = map ?? Map.Trammel; _level = level; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1041080; // a message in a bottle [SerializableProperty(0)] diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs index 0ae8f7956..e5e97ab3e 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/SOS.cs @@ -77,8 +77,6 @@ public partial class SOS : Item [Constructible] public SOS(Map map, int level) : base(0x14EE) { - Weight = 1.0; - _level = level; MessageIndex = Utility.Random(MessageEntries.Length); TargetMap = map ?? Map.Trammel; @@ -87,6 +85,8 @@ public partial class SOS : Item UpdateHue(); } + public override double DefaultWeight => 1.0; + public override int LabelNumber { get diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs index d812f761a..c4f7945ac 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs @@ -1,3 +1,4 @@ +using System; using ModernUO.Serialization; namespace Server.Items; @@ -12,16 +13,10 @@ public partial class ShipwreckedItem : Item, IDyable, IShipwreckedItem { public ShipwreckedItem(int itemID) : base(itemID) { - var weight = ItemData.Weight; - - if (weight >= 255) - { - weight = 1; - } - - Weight = weight; } + public override double DefaultWeight => ItemData.Weight >= 255 ? 1.0 : ItemData.Weight; + public bool Dye(Mobile from, DyeTub sender) { if (Deleted) diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs index 98530468e..7017af81f 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/SpecialFishingNet.cs @@ -44,11 +44,9 @@ public partial class SpecialFishingNet : Item private bool _inUse; [Constructible] - public SpecialFishingNet() : base(0x0DCA) - { - Weight = 1.0; - Hue = Utility.RandomDouble() < 0.01 ? _hues.RandomElement() : 0x8A0; - } + public SpecialFishingNet() : base(0x0DCA) => Hue = Utility.RandomDouble() < 0.01 ? _hues.RandomElement() : 0x8A0; + + public override double DefaultWeight => 1.0; public override int LabelNumber => 1041079; // a special fishing net diff --git a/Projects/UOContent/Items/Skill Items/Harvest Tools/GargoylesPickaxe.cs b/Projects/UOContent/Items/Skill Items/Harvest Tools/GargoylesPickaxe.cs index 52335a4d1..1cf680952 100644 --- a/Projects/UOContent/Items/Skill Items/Harvest Tools/GargoylesPickaxe.cs +++ b/Projects/UOContent/Items/Skill Items/Harvest Tools/GargoylesPickaxe.cs @@ -14,11 +14,12 @@ public partial class GargoylesPickaxe : BaseAxe, IUsesRemaining [Constructible] public GargoylesPickaxe(int uses) : base(0xE85 + Utility.Random(2)) { - Weight = 11.0; UsesRemaining = uses; ShowUsesRemaining = true; } + public override double DefaultWeight => 11.0; + public override int LabelNumber => 1041281; // a gargoyle's pickaxe public override HarvestSystem HarvestSystem => Mining.System; diff --git a/Projects/UOContent/Items/Skill Items/Harvest Tools/ProspectorsTool.cs b/Projects/UOContent/Items/Skill Items/Harvest Tools/ProspectorsTool.cs index c2372223b..a5c770206 100644 --- a/Projects/UOContent/Items/Skill Items/Harvest Tools/ProspectorsTool.cs +++ b/Projects/UOContent/Items/Skill Items/Harvest Tools/ProspectorsTool.cs @@ -14,11 +14,9 @@ public partial class ProspectorsTool : BaseBashing, IUsesRemaining private int _usesRemaining; [Constructible] - public ProspectorsTool() : base(0xFB4) - { - Weight = 9.0; - UsesRemaining = 50; - } + public ProspectorsTool() : base(0xFB4) => UsesRemaining = 50; + + public override double DefaultWeight => 9.0; public override int LabelNumber => 1049065; // prospector's tool diff --git a/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyPickaxe.cs b/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyPickaxe.cs index 7b8424940..d3d42ef41 100644 --- a/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyPickaxe.cs +++ b/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyPickaxe.cs @@ -9,12 +9,13 @@ public partial class SturdyPickaxe : BaseAxe, IUsesRemaining [Constructible] public SturdyPickaxe(int uses = 180) : base(0xE86) { - Weight = 11.0; Hue = 0x973; UsesRemaining = uses; ShowUsesRemaining = true; } + public override double DefaultWeight => 11.0; + public override int LabelNumber => 1045126; // sturdy pickaxe public override HarvestSystem HarvestSystem => Mining.System; diff --git a/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyShovel.cs b/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyShovel.cs index 94c149ea9..acf576f22 100644 --- a/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyShovel.cs +++ b/Projects/UOContent/Items/Skill Items/Harvest Tools/SturdyShovel.cs @@ -7,12 +7,9 @@ namespace Server.Items; public partial class SturdyShovel : BaseHarvestTool { [Constructible] - public SturdyShovel(int uses = 180) : base(0xF39, uses) - { - Weight = 5.0; - Hue = 0x973; - } + public SturdyShovel(int uses = 180) : base(0xF39, uses) => Hue = 0x973; + public override double DefaultWeight => 5.0; public override int LabelNumber => 1045125; // sturdy shovel public override HarvestSystem HarvestSystem => Mining.System; } diff --git a/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs b/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs index 9a04138bf..11549a025 100644 --- a/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs +++ b/Projects/UOContent/Items/Special/Gifts/TapestryOfSosaria.cs @@ -18,10 +18,11 @@ public partial class TapestryOfSosaria : Item, ISecurable [Constructible] public TapestryOfSosaria() : base(0x234E) { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1062917; // The Tapestry of Sosaria public override void GetContextMenuEntries(Mobile from, ref PooledRefList list) diff --git a/Projects/UOContent/Items/Special/Holiday/GingerBreadHouseDeed.cs b/Projects/UOContent/Items/Special/Holiday/GingerBreadHouseDeed.cs index 2121800fd..4150d8d16 100644 --- a/Projects/UOContent/Items/Special/Holiday/GingerBreadHouseDeed.cs +++ b/Projects/UOContent/Items/Special/Holiday/GingerBreadHouseDeed.cs @@ -24,10 +24,11 @@ public partial class GingerBreadHouseDeed : BaseAddonDeed [Constructible] public GingerBreadHouseDeed() { - Weight = 1.0; LootType = LootType.Blessed; } + public override double DefaultWeight => 1.0; + public override int LabelNumber => 1077394; // a Gingerbread House Deed public override BaseAddon Addon => new GingerBreadHouseAddon(); } diff --git a/Projects/UOContent/Items/Special/Holiday/Poinsettias.cs b/Projects/UOContent/Items/Special/Holiday/Poinsettias.cs index 013814d79..756b0a297 100644 --- a/Projects/UOContent/Items/Special/Holiday/Poinsettias.cs +++ b/Projects/UOContent/Items/Special/Holiday/Poinsettias.cs @@ -8,9 +8,10 @@ public partial class RedPoinsettia : Item [Constructible] public RedPoinsettia() : base(0x2330) { - Weight = 1.0; LootType = LootType.Blessed; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -19,7 +20,8 @@ public partial class WhitePoinsettia : Item [Constructible] public WhitePoinsettia() : base(0x2331) { - Weight = 1.0; LootType = LootType.Blessed; } + + public override double DefaultWeight => 1.0; } diff --git a/Projects/UOContent/Items/Special/Holiday/Snowflakes.cs b/Projects/UOContent/Items/Special/Holiday/Snowflakes.cs index e08fcdf7e..f6f897b40 100644 --- a/Projects/UOContent/Items/Special/Holiday/Snowflakes.cs +++ b/Projects/UOContent/Items/Special/Holiday/Snowflakes.cs @@ -8,9 +8,10 @@ public partial class BlueSnowflake : Item [Constructible] public BlueSnowflake() : base(0x232E) { - Weight = 1.0; LootType = LootType.Blessed; } + + public override double DefaultWeight => 1.0; } [SerializationGenerator(0, false)] @@ -19,7 +20,8 @@ public partial class WhiteSnowflake : Item [Constructible] public WhiteSnowflake() : base(0x232F) { - Weight = 1.0; LootType = LootType.Blessed; } + + public override double DefaultWeight => 1.0; }