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;
|
||||
|
||||
[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)
|
||||
{
|
||||
|
|
@ -12,4 +12,7 @@ public abstract partial class BaseReagent : Item
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BatWing : BaseReagent, ICommodity
|
||||
public partial class BatWing : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BlackPearl : BaseReagent, ICommodity
|
||||
public partial class BlackPearl : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Bloodmoss : BaseReagent, ICommodity
|
||||
public partial class Bloodmoss : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DaemonBlood : BaseReagent, ICommodity
|
||||
public partial class DaemonBlood : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DaemonBone : BaseReagent, ICommodity
|
||||
public partial class DaemonBone : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
public DaemonBone(int amount = 1) : base(0xF80, amount)
|
||||
|
|
@ -12,6 +12,5 @@ public partial class DaemonBone : BaseReagent, ICommodity
|
|||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => Core.ML;
|
||||
}
|
||||
public override bool IsDeedable => Core.ML;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
|||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DeadWood : BaseReagent, ICommodity
|
||||
public partial class DeadWood : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
public DeadWood(int amount = 1) : base(0xF90, amount)
|
||||
{
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@
|
|||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DragonsBlood : BaseReagent, ICommodity
|
||||
public partial class DragonsBlood : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
public DragonsBlood(int amount = 1) : base(0x4077, amount)
|
||||
{
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => Core.ML;
|
||||
}
|
||||
public override bool IsDeedable => Core.ML;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,10 @@ using ModernUO.Serialization;
|
|||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Garlic : BaseReagent, ICommodity
|
||||
public partial class Garlic : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Ginseng : BaseReagent, ICommodity
|
||||
public partial class Ginseng : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GraveDust : BaseReagent, ICommodity
|
||||
public partial class GraveDust : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class MandrakeRoot : BaseReagent, ICommodity
|
||||
public partial class MandrakeRoot : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Nightshade : BaseReagent, ICommodity
|
||||
public partial class Nightshade : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class NoxCrystal : BaseReagent, ICommodity
|
||||
public partial class NoxCrystal : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class PigIron : BaseReagent, ICommodity
|
||||
public partial class PigIron : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SpidersSilk : BaseReagent, ICommodity
|
||||
public partial class SpidersSilk : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SulfurousAsh : BaseReagent, ICommodity
|
||||
public partial class SulfurousAsh : BaseReagent
|
||||
{
|
||||
[Constructible]
|
||||
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