fix: Consolidates commodity interface for reagents. (#1709)
This commit is contained in:
parent
3332fabc39
commit
f3d1fb82d8
17 changed files with 39 additions and 80 deletions
|
|
@ -3,7 +3,7 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public abstract partial class BaseReagent : Item
|
public abstract partial class BaseReagent : Item, ICommodity
|
||||||
{
|
{
|
||||||
public BaseReagent(int itemID, int amount = 1) : base(itemID)
|
public BaseReagent(int itemID, int amount = 1) : base(itemID)
|
||||||
{
|
{
|
||||||
|
|
@ -12,4 +12,7 @@ public abstract partial class BaseReagent : Item
|
||||||
}
|
}
|
||||||
|
|
||||||
public override double DefaultWeight => 0.1;
|
public override double DefaultWeight => 0.1;
|
||||||
|
|
||||||
|
public virtual int DescriptionNumber => LabelNumber;
|
||||||
|
public virtual bool IsDeedable => true;
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class BatWing : BaseReagent, ICommodity
|
public partial class BatWing : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public BatWing(int amount = 1) : base(0xF78, amount)
|
public BatWing(int amount = 1) : base(0xF78, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class BlackPearl : BaseReagent, ICommodity
|
public partial class BlackPearl : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public BlackPearl(int amount = 1) : base(0xF7A, amount)
|
public BlackPearl(int amount = 1) : base(0xF7A, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class Bloodmoss : BaseReagent, ICommodity
|
public partial class Bloodmoss : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public Bloodmoss(int amount = 1) : base(0xF7B, amount)
|
public Bloodmoss(int amount = 1) : base(0xF7B, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class DaemonBlood : BaseReagent, ICommodity
|
public partial class DaemonBlood : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public DaemonBlood(int amount = 1) : base(0xF7D, amount)
|
public DaemonBlood(int amount = 1) : base(0xF7D, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class DaemonBone : BaseReagent, ICommodity
|
public partial class DaemonBone : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public DaemonBone(int amount = 1) : base(0xF80, amount)
|
public DaemonBone(int amount = 1) : base(0xF80, amount)
|
||||||
|
|
@ -12,6 +12,5 @@ public partial class DaemonBone : BaseReagent, ICommodity
|
||||||
|
|
||||||
public override double DefaultWeight => 1.0;
|
public override double DefaultWeight => 1.0;
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
public override bool IsDeedable => Core.ML;
|
||||||
bool ICommodity.IsDeedable => Core.ML;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class DeadWood : BaseReagent, ICommodity
|
public partial class DeadWood : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public DeadWood(int amount = 1) : base(0xF90, amount)
|
public DeadWood(int amount = 1) : base(0xF90, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,12 @@
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class DragonsBlood : BaseReagent, ICommodity
|
public partial class DragonsBlood : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public DragonsBlood(int amount = 1) : base(0x4077, amount)
|
public DragonsBlood(int amount = 1) : base(0x4077, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
public override bool IsDeedable => Core.ML;
|
||||||
bool ICommodity.IsDeedable => Core.ML;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class Garlic : BaseReagent, ICommodity
|
public partial class Garlic : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public Garlic(int amount = 1) : base(0xF84, amount)
|
public Garlic(int amount = 1) : base(0xF84, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class Ginseng : BaseReagent, ICommodity
|
public partial class Ginseng : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public Ginseng(int amount = 1) : base(0xF85, amount)
|
public Ginseng(int amount = 1) : base(0xF85, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class GraveDust : BaseReagent, ICommodity
|
public partial class GraveDust : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public GraveDust(int amount = 1) : base(0xF8F, amount)
|
public GraveDust(int amount = 1) : base(0xF8F, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class MandrakeRoot : BaseReagent, ICommodity
|
public partial class MandrakeRoot : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public MandrakeRoot(int amount = 1) : base(0xF86, amount)
|
public MandrakeRoot(int amount = 1) : base(0xF86, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class Nightshade : BaseReagent, ICommodity
|
public partial class Nightshade : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public Nightshade(int amount = 1) : base(0xF88, amount)
|
public Nightshade(int amount = 1) : base(0xF88, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class NoxCrystal : BaseReagent, ICommodity
|
public partial class NoxCrystal : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public NoxCrystal(int amount = 1) : base(0xF8E, amount)
|
public NoxCrystal(int amount = 1) : base(0xF8E, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class PigIron : BaseReagent, ICommodity
|
public partial class PigIron : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public PigIron(int amount = 1) : base(0xF8A, amount)
|
public PigIron(int amount = 1) : base(0xF8A, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class SpidersSilk : BaseReagent, ICommodity
|
public partial class SpidersSilk : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public SpidersSilk(int amount = 1) : base(0xF8D, amount)
|
public SpidersSilk(int amount = 1) : base(0xF8D, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
[SerializationGenerator(0, false)]
|
[SerializationGenerator(0, false)]
|
||||||
public partial class SulfurousAsh : BaseReagent, ICommodity
|
public partial class SulfurousAsh : BaseReagent
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public SulfurousAsh(int amount = 1) : base(0xF8C, amount)
|
public SulfurousAsh(int amount = 1) : base(0xF8C, amount)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICommodity.DescriptionNumber => LabelNumber;
|
|
||||||
bool ICommodity.IsDeedable => true;
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue