### THIS IS A BREAKING CHANGE IF YOU ARE ALREADY USING CODEGEN. IF YOUR WORLD HAS ERRORS LOADING PLEASE CONTACT ME ON DISCORD. ORE MIGHT FAIL TO LOAD. ### Changes * Fixes Components from addons not marking dirty * Code gens BaseAddonContainer * Code gens Ingots * Fixes code gen deserialization for Ore * Code gens dyetubs * Code gens reagents * Code gens tailor commodities * Code gens fish
50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
using Server.Engines.VeteranRewards;
|
|
|
|
namespace Server.Items
|
|
{
|
|
[Serializable(1, false)]
|
|
public partial class LeatherDyeTub : DyeTub, IRewardItem
|
|
{
|
|
[SerializableField(0)]
|
|
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
|
private bool _isRewardItem;
|
|
|
|
[Constructible]
|
|
public LeatherDyeTub() => LootType = LootType.Blessed;
|
|
|
|
public override bool AllowDyables => false;
|
|
public override bool AllowLeather => true;
|
|
public override int TargetMessage => 1042416; // Select the leather item to dye.
|
|
public override int FailMessage => 1042418; // You can only dye leather with this tub.
|
|
public override int LabelNumber => 1041284; // Leather Dye Tub
|
|
public override CustomHuePicker CustomHuePicker => CustomHuePicker.LeatherDyeTub;
|
|
|
|
public override void OnDoubleClick(Mobile from)
|
|
{
|
|
if (_isRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
|
{
|
|
return;
|
|
}
|
|
|
|
base.OnDoubleClick(from);
|
|
}
|
|
|
|
public override void GetProperties(ObjectPropertyList list)
|
|
{
|
|
base.GetProperties(list);
|
|
|
|
if (Core.ML && _isRewardItem)
|
|
{
|
|
list.Add(1076218); // 2nd Year Veteran Reward
|
|
}
|
|
}
|
|
|
|
private void Deserialize(IGenericReader reader, int version)
|
|
{
|
|
if (LootType == LootType.Regular)
|
|
{
|
|
LootType = LootType.Blessed;
|
|
}
|
|
}
|
|
}
|
|
}
|