fix: Optimizes items to use default weights. (Part 4) (#2243)
This commit is contained in:
parent
40ba85d7b8
commit
fa0b67ec29
109 changed files with 250 additions and 391 deletions
|
|
@ -118,8 +118,6 @@ public partial class DawnsMusicBox : Item, ISecurable
|
|||
[Constructible]
|
||||
public DawnsMusicBox() : base(0x2AF9)
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
var shuffledTracks = GetTracks(DawnsMusicRarity.Common);
|
||||
shuffledTracks.Shuffle();
|
||||
|
||||
|
|
@ -132,6 +130,8 @@ public partial class DawnsMusicBox : Item, ISecurable
|
|||
];
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1075198; // Dawn's Music Box
|
||||
|
||||
public override void OnAfterDuped(Item newItem)
|
||||
|
|
|
|||
|
|
@ -17,11 +17,9 @@ public partial class DawnsMusicGear : Item
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public DawnsMusicGear(MusicName music) : base(0x1053)
|
||||
{
|
||||
_music = music;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public DawnsMusicGear(MusicName music) : base(0x1053) => _music = music;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public static DawnsMusicGear RandomCommon => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common));
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ public partial class DupresShield : BaseShield
|
|||
public DupresShield() : base(0x2B01)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 6.0;
|
||||
|
||||
Attributes.BonusHits = 5;
|
||||
Attributes.RegenHits = 1;
|
||||
|
|
@ -17,6 +16,8 @@ public partial class DupresShield : BaseShield
|
|||
SkillBonuses.SetValues(0, SkillName.Parry, 5);
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 6.0;
|
||||
|
||||
public override int LabelNumber => 1075196; // Dupre's Shield
|
||||
|
||||
public override int BasePhysicalResistance => 1;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ public partial class QuiverOfInfinity : BaseQuiver
|
|||
public QuiverOfInfinity() : base(0x2B02)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 8.0;
|
||||
|
||||
WeightReduction = 30;
|
||||
LowerAmmoCost = 20;
|
||||
|
|
@ -17,5 +16,7 @@ public partial class QuiverOfInfinity : BaseQuiver
|
|||
Attributes.DefendChance = 5;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 8.0;
|
||||
|
||||
public override int LabelNumber => 1075201; // Quiver of Infinity
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@ public partial class BaseFormTalisman : Item
|
|||
{
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Talisman;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public virtual TalismanForm Form => TalismanForm.Squirrel;
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ namespace Server.Items;
|
|||
public partial class HoodedShroudOfShadows : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public HoodedShroudOfShadows(int hue = 0x455) : base(0x2684, hue)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 3.0;
|
||||
}
|
||||
public HoodedShroudOfShadows(int hue = 0x455) : base(0x2684, hue) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 3.0;
|
||||
|
||||
public override bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,11 +13,12 @@ public partial class AncientSmithyHammer : BaseTool
|
|||
public AncientSmithyHammer(int bonus, int uses = 600) : base(uses, 0x13E4)
|
||||
{
|
||||
_bonus = bonus;
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = 0x482;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 8.0;
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Bonus
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ public partial class ColoredAnvil : Item
|
|||
{
|
||||
// TODO: Color weighted by rarity?
|
||||
Hue = CraftResources.GetRandomResource(CraftResource.DullCopper, CraftResource.Valorite)?.Hue ?? 0;
|
||||
Weight = 20;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 20.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,12 @@ public partial class PowderOfTemperament : Item, IUsesRemaining
|
|||
[Constructible]
|
||||
public PowderOfTemperament(int charges = 10) : base(4102)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 2419;
|
||||
UsesRemaining = charges;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1049082; // powder of fortifying
|
||||
|
||||
bool IUsesRemaining.ShowUsesRemaining
|
||||
|
|
|
|||
|
|
@ -11,11 +11,9 @@ public partial class JesterHatofChuckles : BaseHat
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public JesterHatofChuckles(int hue) : base(0x171C, hue)
|
||||
{
|
||||
Attributes.Luck = 150;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public JesterHatofChuckles(int hue) : base(0x171C, hue) => Attributes.Luck = 150;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1073256; // Jester Hat of Chuckles - Museum of Vesper Replica 1073256
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ public partial class RoseOfTrinsic : Item, ISecurable
|
|||
[Constructible]
|
||||
public RoseOfTrinsic() : base(0x234D)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
_petals = 0;
|
||||
StartSpawnTimer(TimeSpan.FromMinutes(1.0));
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1062913; // Rose of Trinsic
|
||||
|
||||
public override void OnAfterDuped(Item newItem)
|
||||
|
|
@ -156,11 +156,11 @@ public partial class RoseOfTrinsicPetal : Item
|
|||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
|
||||
Weight = 1.0;
|
||||
Hue = 0xE;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1062926; // Petal of the Rose of Trinsic
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ public partial class SamuraiHelm : BaseArmor
|
|||
[Constructible]
|
||||
public SamuraiHelm() : base(0x236C)
|
||||
{
|
||||
Weight = 5.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Attributes.DefendChance = 15;
|
||||
|
|
@ -18,6 +17,8 @@ public partial class SamuraiHelm : BaseArmor
|
|||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override int LabelNumber => 1062923; // Ancient Samurai Helm
|
||||
|
||||
public override int BasePhysicalResistance => 15;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,9 @@ namespace Server.Items;
|
|||
public partial class HeritageToken : Item
|
||||
{
|
||||
[Constructible]
|
||||
public HeritageToken() : base(0x367A)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 5.0;
|
||||
}
|
||||
public HeritageToken() : base(0x367A) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 5.0;
|
||||
public override int LabelNumber => 1076596; // A Heritage Token
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ public partial class GiftBox : BaseContainer
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBox(int hue) : base(Utility.Random(0x232A, 2))
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = hue;
|
||||
}
|
||||
public GiftBox(int hue) : base(Utility.Random(0x232A, 2)) => Hue = hue;
|
||||
|
||||
public override double DefaultWeight => 2.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,13 +87,14 @@ public partial class Snowman : Item, IDyable
|
|||
[Constructible]
|
||||
public Snowman(int hue, string title) : base(Utility.Random(0x2328, 2))
|
||||
{
|
||||
Weight = 10.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
_title = title;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 10.0;
|
||||
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
|
|
|
|||
|
|
@ -165,11 +165,12 @@ public partial class WreathDeed : Item
|
|||
[Constructible]
|
||||
public WreathDeed(int hue) : base(0x14F0)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1062837; // holiday wreath deed
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ public partial class MiniHouseDeed : BaseAddonDeed
|
|||
public MiniHouseDeed(MiniHouseType type = MiniHouseType.StoneAndPlaster)
|
||||
{
|
||||
_type = type;
|
||||
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override BaseAddon Addon => new MiniHouseAddon(_type);
|
||||
public override int LabelNumber => 1062096; // a mini house deed
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,9 @@ namespace Server.Items;
|
|||
public partial class PlagueBeastGland : Item
|
||||
{
|
||||
[Constructible]
|
||||
public PlagueBeastGland() : base(0x1CEF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x6;
|
||||
}
|
||||
public PlagueBeastGland() : base(0x1CEF) => Hue = 0x6;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1153759; // a healthy gland
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ public partial class PlagueBeastInnard : Item, IScissorable, ICarvable
|
|||
{
|
||||
Hue = hue;
|
||||
Movable = false;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public PlagueBeastLord Owner => RootParent as PlagueBeastLord;
|
||||
public override string DefaultName => "plague beast innards";
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,11 @@ public partial class PlagueBeastMutationCore : Item, IScissorable
|
|||
public PlagueBeastMutationCore() : base(0x1CF0)
|
||||
{
|
||||
_cut = true;
|
||||
Weight = 1.0;
|
||||
Hue = 0x480;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1153760; // a plague beast mutation core
|
||||
|
||||
public virtual bool Scissor(Mobile from, Scissors scissors)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ public partial class RewardCake : Item
|
|||
public RewardCake() : base(0x9e9)
|
||||
{
|
||||
Stackable = false;
|
||||
Weight = 1.0;
|
||||
Hue = Utility.RandomList(
|
||||
0x135,
|
||||
0xcd,
|
||||
|
|
@ -31,6 +30,8 @@ public partial class RewardCake : Item
|
|||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1049786; // Happy Birthday! ...
|
||||
|
||||
public override bool DisplayLootType => false;
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ public partial class BagOfSending : Item, TranslocationItem
|
|||
[Constructible]
|
||||
public BagOfSending(BagOfSendingHue hue) : base(0xE76)
|
||||
{
|
||||
Weight = 2.0;
|
||||
|
||||
BagOfSendingHue = hue;
|
||||
_charges = Utility.RandomMinMax(3, 9);
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 2.0;
|
||||
|
||||
public override int LabelNumber => 1054104; // a bag of sending
|
||||
|
||||
[SerializableProperty(0)]
|
||||
|
|
|
|||
|
|
@ -21,13 +21,14 @@ public partial class BallOfSummoning : Item, TranslocationItem
|
|||
[Constructible]
|
||||
public BallOfSummoning() : base(0xE2E)
|
||||
{
|
||||
Weight = 10.0;
|
||||
Light = LightType.Circle150;
|
||||
|
||||
_charges = Utility.RandomMinMax(3, 9);
|
||||
_petName = null;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 10.0;
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Recharges
|
||||
|
|
|
|||
|
|
@ -23,11 +23,9 @@ public partial class BraceletOfBinding : BaseBracelet, TranslocationItem
|
|||
private TransportTimer _timer;
|
||||
|
||||
[Constructible]
|
||||
public BraceletOfBinding() : base(0x1086)
|
||||
{
|
||||
Hue = 0x489;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public BraceletOfBinding() : base(0x1086) => Hue = 0x489;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
|
|
|
|||
|
|
@ -19,10 +19,11 @@ public partial class PowderOfTranslocation : Item
|
|||
public PowderOfTranslocation(int amount = 1) : base(0x26B8)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 0.1;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 0.1;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 2))
|
||||
|
|
|
|||
|
|
@ -9,10 +9,11 @@ public partial class ZoogiFungus : Item, ICommodity
|
|||
public ZoogiFungus(int amount = 1) : base(0x26B7)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 0.1;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 0.1;
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => Core.ML;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,12 +20,13 @@ public abstract partial class SpecialScroll : Item
|
|||
public SpecialScroll(SkillName skill, double value) : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Cursed;
|
||||
Weight = 1.0;
|
||||
|
||||
_skill = skill;
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public abstract int Message { get; }
|
||||
public virtual int Title => 0;
|
||||
public abstract string DefaultTitle { get; }
|
||||
|
|
|
|||
|
|
@ -100,12 +100,9 @@ public partial class BannerDeed : Item, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public BannerDeed() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public BannerDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
public override int LabelNumber => 1041007; // a banner deed
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
|
|
|
|||
|
|
@ -25,11 +25,9 @@ public partial class RewardBrazier : Item, IRewardItem
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardBrazier(int itemID) : base(itemID)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 10.0;
|
||||
}
|
||||
public RewardBrazier(int itemID) : base(itemID) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 10.0;
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
|
|
@ -115,11 +113,9 @@ public partial class RewardBrazierDeed : Item, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public RewardBrazierDeed() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public RewardBrazierDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1080527; // Brazier Deed
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,9 @@ public partial class CommodityDeedBox : BaseContainer, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public CommodityDeedBox() : base(0x9AA)
|
||||
{
|
||||
Hue = 0x47;
|
||||
Weight = 4.0;
|
||||
}
|
||||
public CommodityDeedBox() : base(0x9AA) => Hue = 0x47;
|
||||
|
||||
public override double DefaultWeight => 4.0;
|
||||
public override int LabelNumber => 1080523; // Commodity Deed Box
|
||||
public override int DefaultGumpID => 0x43;
|
||||
|
||||
|
|
|
|||
|
|
@ -84,12 +84,9 @@ public partial class DecorativeShieldDeed : Item, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public DecorativeShieldDeed() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public DecorativeShieldDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
public override int LabelNumber => 1049771; // deed for a decorative shield wall hanging
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
|
|
|
|||
|
|
@ -98,12 +98,9 @@ public partial class FlamingHeadDeed : Item, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public FlamingHeadDeed() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public FlamingHeadDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
public override int LabelNumber => 1041050; // a flaming head deed
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
|
|
|
|||
|
|
@ -88,12 +88,9 @@ public partial class HangingSkeletonDeed : Item, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public HangingSkeletonDeed() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public HangingSkeletonDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
public override int LabelNumber => 1049772; // deed for a hanging skeleton decoration
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
|
|
|
|||
|
|
@ -37,12 +37,9 @@ public partial class PottedCactusDeed : Item, IRewardItem
|
|||
private bool _isRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public PottedCactusDeed() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public PottedCactusDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
public override int LabelNumber => 1080407; // Potted Cactus Deed
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ public partial class WeaponEngravingTool : Item, IUsesRemaining, IRewardItem
|
|||
public WeaponEngravingTool(int uses = 10) : base(0x32F8)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
|
||||
_usesRemaining = uses;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1076158; // Weapon Engraving Tool
|
||||
|
||||
public bool ShowUsesRemaining
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue