/**********************************************************
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\Jormundgand\Rare Drop\SeaSerpentSummoner.cs
Lines of code: 56
***********************************************************/


using System;
using System.Net;
using Server;
using Server.Accounting;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Targeting;
using Server.Prompts;
using Server.Regions;
using System.Collections;
using Server.Engines.PartySystem;

namespace Server.Items 
{ 
    public class SeaSerpentSummoner : Item 
    { 
        [Constructable] 
        public SeaSerpentSummoner() : base( 8443 ) 
        { 
            Hue = 286; 
            Movable = true; 
            Name = "Jormundgand's follower. Will bond instantly on double Click."; 
        } 

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

        public override void OnDoubleClick( Mobile from ) 
        { 
        
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1060640 );
			}
			else
			{
				JormundgandSerpent ps = new JormundgandSerpent();
				ps.Controlled = true;
				ps.ControlMaster = from;
				ps.Location = from.Location;
				ps.Map = from.Map;
				ps.IsBonded = true;
				this.Delete();
			}					
        }
        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(); 
        } 
    } 
}