using System;
namespace Server.Items
{
public class RewardItem : Item
{
private string m_dateobtained;
[Constructable]
public RewardItem( int itemid, string name, int hue ) : base( itemid )
{
Weight = 1.0;
Name = name;
Hue = hue;
DateTime dt = DateTime.Now;
m_dateobtained = dt.ToString("yyyy");
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add("Found in {0}", m_dateobtained);
}
public RewardItem(Serial serial)
: base(serial)
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write((string)this.m_dateobtained);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch (version)
{
case 0:
{
this.m_dateobtained = reader.ReadString();
break;
}
}
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.