/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\usedelay\UseDelayTestItem1.cs
Lines of code: 38
***********************************************************/


using System;
using Server;
using Server.Items;
using Server.Mobiles;



namespace Server.Items
{
	public class UseDelayTestItem1 : Item
	{
		[Constructable]
		public UseDelayTestItem1() :  base(7955)
		{
		Name="UseDelayTestItem 1";
		}
		

		
		public override void OnDoubleClick( Mobile from )
		{
			if(UseDelaySystem.CheckContext(from,DelayContextType.TestItem1))
			{
			from.SendMessage("You must wait to use this again");		
			return;
			}
		
		from.SendMessage("You use UseDelayTestItem1");
		
		UseDelaySystem.AddContext(from, DelayContextType.TestItem1,TimeSpan.FromSeconds(10));		
		}
		


		public UseDelayTestItem1( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
		}

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