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


namespace Server.Items
{
	public class GrenadeShell : BaseBagBall
	{
		[Constructable]
		public GrenadeShell() : base( 0x2257 )
		{
			Name="Grenade Shell";
			Engraving="Fill with explosive items then trigger with heat source";
			Hue=37;
		}
		
		public override int MaxWeight{ get{ return 250; } }	

		
		public override bool CanBeTriggered{get{return true;} }	
		
		public override bool OnTrigger(Mobile from,Item itemfrom,TriggerType type)
		{
			if(type==TriggerType.Heat)
			{
				Effects.SendLocationEffect( Location, Map, 0x36BD, 15, 10 );
				
			/*	Destroy(0.75);	
				
				foreach(object o in this.GetObjectsInRange(0))
				{
					if(o is Item)((Item)o).Trigger(from,this,TriggerType.Explosion);
				}*/
				
				return true;
			}
		return false;
		}		
		
		public GrenadeShell( 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();
		}
	}
}