/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\dawns music box\Quest\LordOlaf.cs
Lines of code: 84
***********************************************************/


using System;
using System.Collections;
using Server.Items;
using Server.Targeting;
using Server.ContextMenus;
using Server.Gumps;
using Server.Misc;
using Server.Network;
using Server.Spells;
using System.Collections.Generic;

namespace Server.Mobiles
{
	[CorpseName( "Olaf's Corpse" )]
	public class LordOlaf : Mobile
	{
                
		[Constructable]
		public LordOlaf()
		{
			Name = "Olaf";
                        Title = "Lord";
			Body = 0x190;
                        CantWalk = false;
			Hue = Utility.RandomSkinHue();
			AddItem( new Server.Items.Boots( GetBootsHue() ) );
			AddItem( new Server.Items.VikingSword() );
			AddItem( new Server.Items.PlateChest() );
                        AddItem( new Server.Items.PlateArms() );
			AddItem( new Server.Items.PlateGloves() );
                        AddItem( new Server.Items.PlateLegs() );
			AddItem( new Server.Items.Kilt() );
			AddItem( new Server.Items.BodySash() );
                        		int hairHue = 1153;

			switch ( Utility.Random( 1 ) )
			{
				case 0: AddItem( new LongHair( hairHue ) ); break;
			} 
			
			Blessed = true;
			
			}

			public virtual int GetBootsHue()
			{
			return 1623;
		}

		public LordOlaf( Serial serial ) : base( serial )
		{
		}

		public override void GetContextMenuEntries( Mobile from,  List<ContextMenuEntry> list ) 
	        { 
	                base.GetContextMenuEntries( from, list ); 
        	        list.Add( new OlafEntry( from, this ) ); 
	        } 

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

		public class OlafEntry : ContextMenuEntry
		{
			private Mobile m_Mobile;
			private Mobile m_Giver;
			
			public OlafEntry( Mobile from, Mobile giver ) : base( 6146, 3 )
			{
				m_Mobile = from;
				m_Giver = giver;
			}

			public override void OnClick()
			{
				

                          if( !( m_Mobile is PlayerMobile ) )
					return;
				
				PlayerMobile mobile = (PlayerMobile) m_Mobile;

				{
					if ( ! mobile.HasGump( typeof( LordOlafGump ) ) )
					{
						mobile.SendGump( new LordOlafGump( mobile ));
						
					} 
				}
			}
		}							  
}
}
		