/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\ML Peerless + misc areas\Melisande\Quest\FrightenedDryad.cs
Lines of code: 64
***********************************************************/


using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Targeting;
using Server.Gumps;
using Server.Engines.Quests.FrightenedDryad;


namespace Server.Engines.Quests.FrightenedDryad
{
	public class FrightenedDryad : BaseQuester
	{
	

		[Constructable]
		public FrightenedDryad() : base()
		{
			Name = "a frightened dryad";
			Body = 266;
			Blessed=true;
		}


		
	
		public override void OnTalk( PlayerMobile from, bool contextMenu )
		{			
			this.Direction = GetDirectionTo( from );

			FrightenedDryadQuest qs = from.Quest as FrightenedDryadQuest;
			if(qs!=null)
			{
					
				QuestObjective obj = qs.FindObjective( typeof( ReturnAfterKillsObjective ) );
					
					if(obj!=null)
					{
					qs.AddConversation( new EndConversation() );
					}
					else
					{
					qs.AddConversation( new NotDoneConversation() );
					}
			}
			else
			{				
				FrightenedDryadQuest newQuest = new FrightenedDryadQuest(from);
				if ( from.Quest == null && QuestSystem.CanOfferQuest( from, typeof( FrightenedDryadQuest ) ) )
				{
					newQuest.SendOffer();
				}
				else
				{
					newQuest.AddConversation( new DontOfferConversation() );
				}
			}
		}
		
		
		public FrightenedDryad( Serial serial ) : base( serial )
		{
		}

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

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

	}
}
