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


using Server;
using System;


namespace Server.EventSystem
{
	public class TestEventController : BaseEventController
	{
		public override int m_MinTeams { get { return  0; } }
		public override int m_MaxTeams { get { return  0; } }

		
		[Constructable]
		public TestEventController() : base()
		{	
		}
		
		/*OPTIONAL OVERRIDES
		protected override void OnPreStart() 						//when registration starts
		protected override void OnStartEvent()						//when event starts (NOT optional - event control is done by child class from this point)
		protected override void OnStopEvent()						//when event ends
		public override void StartTeleportMobile(Mobile mob)			//teleport mobile on event start
		public override void StopTeleportMobile(Mobile mob)			//teleport mobile on event end
		protected override void OnRegister(Mobile mob)				//when mob registers
		protected override void OnEventTick()								//while event is on
		public override bool RegionOnDamage(Mobile m, ref int damage)			//when mob is damaged
		public override bool RegionOnResurrect(Mobile m)						//when mob is rezed
		public override void RegionOnBeforeDeath(Mobile m)					//When mob dies
		public override bool RegionAllowBeneficial(Mobile from, Mobile target)	//return whether those mobs can attack each other or not
		public override bool RegionAllowHarmful(Mobile from, Mobile target)		//return whether those mobs can benifit each other or not
		public override bool RegionOnDoubleClick(Mobile m, object o)			//on double click
		public override bool RegionOnSkillUse(Mobile m, int skill)				//on skill use
		public override bool RegionOnBeginSpellCast(Mobile from, ISpell s)		//on cast spell
		public override int GetTeamHueOverride(int teamnum)					//get hue color for team
		public override string GetTeamName(int teamnum)						//get team name
		
		
		Non overrides:
		
		EventBroadcast(string message,bool eventmembersonly);			//broadcast something		
		*/
		
		
		
		
		
		protected override void OnStartEvent()
		{
		}
	

		public override int GetTeamHueOverride(int teamnum)
		{
			return teamnum*10;
		}
		

		protected override void OnEventTick()
		{
		
			if(0.03>Utility.RandomDouble())StopEvent();
		}
				
		
		public TestEventController( 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();			
		
		}		
		
		

	}

}