fix: Optimizes items to use default weights. (Part 1) (#2240)
This commit is contained in:
parent
c2e44a58f6
commit
2eba2868a6
126 changed files with 1184 additions and 380 deletions
|
|
@ -14,11 +14,9 @@ namespace Server.Engines.BulkOrders
|
|||
_material = material;
|
||||
}
|
||||
|
||||
public BaseBOD() : base(Core.AOS ? 0x2258 : 0x14EF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public BaseBOD() : base(Core.AOS ? 0x2258 : 0x14EF) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public abstract bool Complete { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ public partial class BulkOrderBook : Item, ISecurable
|
|||
[Constructible]
|
||||
public BulkOrderBook() : base(0x2259)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
_entries = [];
|
||||
|
|
@ -49,6 +48,8 @@ public partial class BulkOrderBook : Item, ISecurable
|
|||
_level = SecureLevel.CoOwners;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnAfterDuped(Item newItem)
|
||||
{
|
||||
if (newItem is not BulkOrderBook book)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ public abstract class BaseFactionTrapDeed : Item, ICraftable
|
|||
|
||||
public BaseFactionTrapDeed(int itemID = 0x14F0) : base(itemID)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
|
|
@ -18,6 +17,8 @@ public abstract class BaseFactionTrapDeed : Item, ICraftable
|
|||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public abstract Type TrapType { get; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
|
|
@ -117,4 +118,4 @@ public abstract class BaseFactionTrapDeed : Item, ICraftable
|
|||
|
||||
m_Faction = Faction.ReadReference(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ public partial class FertileDirt : Item
|
|||
public FertileDirt(int amount = 1) : base(0xF81)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,12 @@ public partial class GreenThorns : Item
|
|||
public GreenThorns(int amount = 1) : base(0xF42)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Hue = 0x42;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1060837; // green thorns
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,11 @@ public partial class PlantBowl : Item
|
|||
};
|
||||
|
||||
[Constructible]
|
||||
public PlantBowl() : base(0x15FD) => Weight = 1.0;
|
||||
public PlantBowl() : base(0x15FD)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1060834; // a plant bowl
|
||||
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ public partial class PlantItem : Item, ISecurable
|
|||
[Constructible]
|
||||
public PlantItem(bool fertileDirt = false) : base(0x1602)
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
_plantStatus = PlantStatus.BowlOfDirt;
|
||||
_plantSystem = new PlantSystem(this)
|
||||
{
|
||||
|
|
@ -69,6 +67,8 @@ public partial class PlantItem : Item, ISecurable
|
|||
Plants.Add(this);
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public ObjectPropertyList OldClientPropertyList
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ public partial class Seed : Item
|
|||
[Constructible]
|
||||
public Seed(PlantType plantType, PlantHue plantHue, bool showType = false) : base(0xDCF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Stackable = Core.SA;
|
||||
|
||||
_plantType = plantType;
|
||||
|
|
@ -34,6 +33,8 @@ public partial class Seed : Item
|
|||
Hue = PlantHueInfo.GetInfo(plantHue).Hue;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[SerializableProperty(1)]
|
||||
public PlantHue PlantHue
|
||||
|
|
|
|||
|
|
@ -8,11 +8,9 @@ namespace Server.Engines.Quests.Collector;
|
|||
public partial class EnchantedPaints : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public EnchantedPaints() : base(0xFC1)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public EnchantedPaints() : base(0xFC1) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not CollectorQuest;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ public partial class PaintedImage : Item
|
|||
[Constructible]
|
||||
public PaintedImage(ImageType image) : base(0xFF3)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8FD;
|
||||
|
||||
_image = image;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(_image);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,11 @@ public partial class EnchantedSextant : Item
|
|||
};
|
||||
|
||||
[Constructible]
|
||||
public EnchantedSextant() : base(0x1058) => Weight = 2.0;
|
||||
public EnchantedSextant() : base(0x1058)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 2.0;
|
||||
|
||||
public override int LabelNumber => 1046226; // an enchanted sextant
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,11 @@ public partial class HornOfRetreat : Item
|
|||
public HornOfRetreat() : base(0xFC4)
|
||||
{
|
||||
Hue = 0x482;
|
||||
Weight = 1.0;
|
||||
_charges = 10;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1049117; // Horn of Retreat
|
||||
|
||||
public virtual bool ValidateUse(Mobile from) => true;
|
||||
|
|
|
|||
|
|
@ -12,11 +12,9 @@ public partial class KronusScroll : QuestItem
|
|||
private static readonly Map m_WellOfTearsMap = Map.Malas;
|
||||
|
||||
[Constructible]
|
||||
public KronusScroll() : base(0x227A)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x44E;
|
||||
}
|
||||
public KronusScroll() : base(0x227A) => Hue = 0x44E;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1060149; // Calling of Kronus
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ namespace Server.Engines.Quests.Necro;
|
|||
public partial class ScrollOfAbraxus : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public ScrollOfAbraxus() : base(0x227B) => Weight = 1.0;
|
||||
public ScrollOfAbraxus() : base(0x227B)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1028827; // Scroll of Abraxus
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ namespace Server.Engines.Quests.Ninja;
|
|||
public partial class EminosKatana : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public EminosKatana() : base(0x13FF) => Weight = 1.0;
|
||||
public EminosKatana() : base(0x13FF)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1063214; // Daimyo Emino's Katana
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ namespace Server.Engines.Quests.Ninja;
|
|||
public partial class NoteForZoel : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public NoteForZoel() : base(0x14EF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x6B9;
|
||||
}
|
||||
public NoteForZoel() : base(0x14EF) => Hue = 0x6B9;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1063186; // A Note for Zoel
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ namespace Server.Engines.Quests.Samurai;
|
|||
public partial class HaochisKatana : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisKatana() : base(0x13FF) => Weight = 1.0;
|
||||
public HaochisKatana() : base(0x13FF)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1063165; // Daimyo Haochi's Katana
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,11 @@ public partial class GoldenSkull : Item
|
|||
[Constructible]
|
||||
public GoldenSkull() : base(Utility.Random(0x1AE2, 3))
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8A5;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1061619; // a golden skull
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@ public partial class GrandGrimoire : Item
|
|||
[Constructible]
|
||||
public GrandGrimoire() : base(0xEFA)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x835;
|
||||
Layer = Layer.OneHanded;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1060801; // The Grand Grimoire
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ namespace Server.Engines.Quests.Haven;
|
|||
public partial class QuestDaemonBlood : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestDaemonBlood() : base(0xF7D) => Weight = 1.0;
|
||||
public QuestDaemonBlood() : base(0xF7D)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not UzeraanTurmoilQuest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ namespace Server.Engines.Quests.Haven;
|
|||
public partial class QuestDaemonBone : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestDaemonBone() : base(0xF80) => Weight = 1.0;
|
||||
public QuestDaemonBone() : base(0xF80)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not UzeraanTurmoilQuest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ namespace Server.Engines.Quests.Haven;
|
|||
public partial class QuestFertileDirt : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestFertileDirt() : base(0xF81) => Weight = 1.0;
|
||||
public QuestFertileDirt() : base(0xF81)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not UzeraanTurmoilQuest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,9 @@ namespace Server.Engines.Quests.Haven;
|
|||
[SerializationGenerator(0, false)]
|
||||
public partial class SchmendrickScrollOfPower : QuestItem
|
||||
{
|
||||
public SchmendrickScrollOfPower() : base(0xE34)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x34D;
|
||||
}
|
||||
public SchmendrickScrollOfPower() : base(0xE34) => Hue = 0x34D;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1049118; // a scroll with ancient markings
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ namespace Server.Items;
|
|||
public partial class Cauldron : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Cauldron() : base(0x9ED) => Weight = 1.0;
|
||||
public Cauldron() : base(0x9ED)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override string DefaultName => "a cauldron";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,13 @@ public partial class HangoverCure : Item
|
|||
[Constructible]
|
||||
public HangoverCure() : base(0xE2B)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x2D;
|
||||
|
||||
_uses = 20;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1055060; // Grizelda's Extra Strength Hangover Cure
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ namespace Server.Engines.Quests.Hag;
|
|||
public partial class MoonfireBrew : Item
|
||||
{
|
||||
[Constructible]
|
||||
public MoonfireBrew() : base(0xF04) => Weight = 1.0;
|
||||
public MoonfireBrew() : base(0xF04)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1055065; // a bottle of magical moonfire brew
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,13 +72,11 @@ public abstract partial class BasePigmentsOfTokuno : Item, IUsesRemaining
|
|||
|
||||
public BasePigmentsOfTokuno() : base(0xEFF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
_usesRemaining = 1;
|
||||
}
|
||||
|
||||
public BasePigmentsOfTokuno(int uses) : base(0xEFF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
_usesRemaining = uses;
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +84,8 @@ public abstract partial class BasePigmentsOfTokuno : Item, IUsesRemaining
|
|||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1070933; // Pigments of Tokuno
|
||||
|
||||
protected TextDefinition Label
|
||||
|
|
|
|||
|
|
@ -330,11 +330,7 @@ public partial class PigmentsOfTokuno : BasePigmentsOfTokuno
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public PigmentsOfTokuno(PigmentType type, int uses) : base(uses)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Type = type;
|
||||
}
|
||||
public PigmentsOfTokuno(PigmentType type, int uses) : base(uses) => Type = type;
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
|
|
|
|||
|
|
@ -354,11 +354,9 @@ public partial class AncientUrn : Item
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public AncientUrn(string urnName) : base(0x241D)
|
||||
{
|
||||
_urnName = urnName;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public AncientUrn(string urnName) : base(0x241D) => _urnName = urnName;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public static string[] Names { get; } =
|
||||
{
|
||||
|
|
@ -432,12 +430,9 @@ public partial class HonorableSwords : Item
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public HonorableSwords(string swordsName) : base(0x2853)
|
||||
{
|
||||
_swordsName = swordsName;
|
||||
public HonorableSwords(string swordsName) : base(0x2853) => _swordsName = swordsName;
|
||||
|
||||
Weight = 5.0;
|
||||
}
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override int LabelNumber => 1071015; // Honorable Swords
|
||||
|
||||
|
|
@ -620,11 +615,7 @@ public partial class LesserPigmentsOfTokuno : BasePigmentsOfTokuno
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public LesserPigmentsOfTokuno(LesserPigmentType type) : base(1)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Type = type;
|
||||
}
|
||||
public LesserPigmentsOfTokuno(LesserPigmentType type) : base(1) => Type = type;
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
|
|
|
|||
|
|
@ -419,9 +419,10 @@ public partial class CharacterStatueDeed : Item, IRewardItem
|
|||
}
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ public partial class CharacterStatueMaker : Item, IRewardItem
|
|||
InvalidateHue();
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override int LabelNumber => 1076173; // Character Statue Maker
|
||||
|
||||
[SerializableProperty(1)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue