/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\events and scenarios\misc\Easter\EasterEggTrophee.cs
Lines of code: 47
***********************************************************/


using System;
using Server;
using Server.Targeting;

namespace Server.Items
{
	public class EasterEggTrophee: Item
	{
		private string playername;
		private int playerpos;
		private int playeryear;
	
		[Constructable]
		public EasterEggTrophee(string name, int position, int eventyear) : base( 10249 )
		{
			Hue = Utility.RandomList(41, 495, 567, 48, 131, 75, 1001, 1169, 1155, 1164, 1160, 1162, 2210, 1324, 1157, 1364, 1156, 2101, 1281, 1158, 1266, 1150, 1167, 1109, 33, 1420, 1644, 1359, 1166, 1165, 1172, 1168, 1175, 1152, 1161, 1151, 1154, 1153, 1177);
			Name = "Easter Egg Trophee";
			playername = name;
			playerpos = position;
			playeryear = eventyear;
			
			LootType=LootType.Blessed;
		}
		
		public override bool DisplayWeight { get { return ( false ); } }			

		public EasterEggTrophee( Serial serial ) : base( serial )
		{
		}
		
		public override void GetProperties( ObjectPropertyList list)
		{
			base.GetProperties( list );
			list.Add(1060658,"Easter Egg Hunt Winner (" + playername + ") \t" + playerpos + (playerpos==1 ? "st" : playerpos==2 ? "nd" : playerpos ==3 ? "rd" : "th") + " place " + playeryear);
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
			
			writer.Write((string)playername);
			writer.Write((int)playerpos);
			writer.Write((int)playeryear);
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			
			playername = reader.ReadString();
			playerpos = reader.ReadInt();
			playeryear = reader.ReadInt();
		}
	}
}