/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\items\special\SpiderWebTrap.cs
Lines of code: 40
***********************************************************/


using System;
using Server;
using Server.Network;
using Server.Regions;
using Server.Mobiles;

namespace Server.Items
{
	public class SpiderWebTrap : BaseTrap
	{
		[Constructable]
		public SpiderWebTrap() : base(Utility.RandomList(3811, 3812, 3813, 3814))
		{
		}

		public override bool PassivelyTriggered{ get{ return true; } }
		public override TimeSpan PassiveTriggerDelay{ get{ return TimeSpan.Zero; } }
		public override int PassiveTriggerRange{ get{ return 0; } }
		public override TimeSpan ResetDelay{ get{ return TimeSpan.Zero; } }

		public override void OnTrigger( Mobile from )
		{
		if(!HarmItem.ShouldHarm(from))return;		

			from.SendMessage("You are caught in a sticky spider web");
			from.PlaySound( 79 );
			from.Paralyze( TimeSpan.FromSeconds( 4.0 ) );
			Delete();
		}

		public SpiderWebTrap( 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();
		}
	}
}