/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\PlagueBeastLordQuest\Items\Plague_Core.cs
Lines of code: 54
***********************************************************/


using System;
using Server;
using Server.Mobiles;

namespace Server.Items
{
	public class Plague_Core : Item
	{
		[Constructable]
		public Plague_Core() : base( 7408 )
		{
			Name = PlagueHelper.Line[13];
			Movable = false;
			Visible = false;
			Hue = 0x480;
			Weight = 0;
		}

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

		public void OnCutFrom( Mobile from )
		{
			if ( !Movable )
			{
				PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
				if ( plaguebl != null )
				{
					if ( plaguebl is PlagueBeastLordTest )
					{
						from.PlaySound( 0x248 );
						from.SendMessage( PlagueHelper.Line[38] );
					}
					else
					{
						Movable = true;
						from.AddToBackpack( this );
						from.PlaySound( 0x248 );
						from.SendMessage( PlagueHelper.Line[32] );
					}
					
					plaguebl.Kill();
				}
			}
		}

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