/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\Event System\items\powerups\FourHealthVials.cs
Lines of code: 43
***********************************************************/


using System;
using Server;
using Server.Network;
using Server.Targeting;
using Server.Mobiles;

namespace Server.Items
{
	public class FourHealthVials : BaseTrap
	{
		[Constructable]
		public FourHealthVials() : base( 6235 )
		{
			Name = "Four Vials of Health (20 HP)";
			Hue = 1165;
		}

		public override bool PassivelyTriggered{ get{ return true; } }
		public override TimeSpan PassiveTriggerDelay{ get{ return TimeSpan.Zero; } }
		public override int PassiveTriggerRange{ get{ return 1; } }
		public override TimeSpan ResetDelay{ get{ return TimeSpan.FromSeconds( 0.0 ); } }

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

			from.Hits += 20;
			
			from.FixedParticles( 0x376A, 9, 32, 5005, EffectLayer.Waist );
			from.PlaySound( 0x1F2 );
			
			from.Say("* You have been healed 20 hit points *");
			this.Delete();
			
		}

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