fix: Optimizes items to use default weights. (Part 3) (#2242)

This commit is contained in:
Kamron Batman 2025-07-24 16:21:27 -07:00 • committed by GitHub
parent 2c5441731e
commit 40ba85d7b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 497 additions and 425 deletions

View file

@ -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;
}