2013-10-28 07:09:42 +00:00
|
|
|
using Server.Engines.VeteranRewards;
|
|
|
|
|
|
|
|
|
|
namespace Server.Items
|
2020-04-14 15:23:42 -04:00
|
|
|
{
|
2016-08-29 18:56:56 -07:00
|
|
|
[Flipable(0x9AA, 0xE7D)]
|
2013-10-28 07:09:42 +00:00
|
|
|
public class CommodityDeedBox : BaseContainer, IRewardItem
|
|
|
|
|
{
|
|
|
|
|
private bool m_IsRewardItem;
|
|
|
|
|
[Constructable]
|
|
|
|
|
public CommodityDeedBox()
|
|
|
|
|
: base(0x9AA)
|
|
|
|
|
{
|
2020-04-16 21:29:55 -04:00
|
|
|
Hue = 0x47;
|
|
|
|
|
Weight = 4.0;
|
2013-10-28 07:09:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CommodityDeedBox(Serial serial)
|
|
|
|
|
: base(serial)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-16 20:21:33 -04:00
|
|
|
public override int LabelNumber => 1080523;// Commodity Deed Box
|
|
|
|
|
public override int DefaultGumpID => 0x43;
|
2013-10-28 07:09:42 +00:00
|
|
|
[CommandProperty(AccessLevel.GameMaster)]
|
|
|
|
|
public bool IsRewardItem
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2020-04-16 21:29:55 -04:00
|
|
|
return m_IsRewardItem;
|
2013-10-28 07:09:42 +00:00
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
2020-04-16 21:29:55 -04:00
|
|
|
m_IsRewardItem = value;
|
|
|
|
|
InvalidateProperties();
|
2013-10-28 07:09:42 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public static CommodityDeedBox Find(Item deed)
|
|
|
|
|
{
|
|
|
|
|
Item parent = deed;
|
|
|
|
|
|
|
|
|
|
while (parent != null && !(parent is CommodityDeedBox))
|
|
|
|
|
parent = parent.Parent as Item;
|
|
|
|
|
|
|
|
|
|
return parent as CommodityDeedBox;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void GetProperties(ObjectPropertyList list)
|
|
|
|
|
{
|
|
|
|
|
base.GetProperties(list);
|
2020-04-14 15:23:42 -04:00
|
|
|
|
2020-04-16 21:29:55 -04:00
|
|
|
if (m_IsRewardItem)
|
2013-10-28 07:09:42 +00:00
|
|
|
list.Add(1076217); // 1st Year Veteran Reward
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(GenericWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
|
|
|
|
|
writer.WriteEncodedInt(0); // version
|
|
|
|
|
|
2020-04-16 05:04:29 -04:00
|
|
|
writer.Write(m_IsRewardItem);
|
2013-10-28 07:09:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Deserialize(GenericReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
|
|
|
|
|
int version = reader.ReadEncodedInt();
|
|
|
|
|
|
2020-04-16 21:29:55 -04:00
|
|
|
m_IsRewardItem = reader.ReadBool();
|
2013-10-28 07:09:42 +00:00
|
|
|
}
|
|
|
|
|
}
|
2020-09-23 10:58:02 -04:00
|
|
|
}
|