
////////////////////////////////////////
//                                    //
//   Generated by CEO's YAAAG - V1.2  //
// (Yet Another Arya Addon Generator) //
//                                    //
////////////////////////////////////////
using System;
using Server;
using Server.Items;

namespace Server.Items
{
	public class SpiritualityShrineAddon : BaseAddon
	{
        private static int[,] m_AddOnSimpleComponents = new int[,] {
			  {4, 0, -1, 0}, {5, 1, -1, 0}, {5315, 0, 0, 0}// 1	2	3	
			, {5316, 0, 1, 0}, {5317, 1, 1, 0}, {5318, 1, 0, 0}// 4	5	6	
			, {3223, -1, 0, 0}, {3223, -1, 1, 0}, {3223, 2, 0, 0}// 7	8	9	
			, {3223, 2, 1, 0}, {7978, -1, 2, 0}, {3147, 2, 1, 0}// 10	12	14	
			, {3147, 2, 1, 5}, {3147, 2, 0, 5}, {3147, -1, 0, 5}// 15	16	17	
			, {3147, -1, 1, 5}, {3265, 0, 2, 0}, {3265, 1, 2, 0}// 18	19	20	
			, {7978, 2, 2, 0}// 21	
		};

 
            
		public override BaseAddonDeed Deed
		{
			get
			{
				return new SpiritualityShrineAddonDeed();
			}
		}

		[ Constructable ]
		public SpiritualityShrineAddon()
		{

            for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
                AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );


			AddComplexComponent( (BaseAddon) this, 9610, -1, 2, 8, 0, -1, "Monk of Spirituality", 1);// 11
			AddComplexComponent( (BaseAddon) this, 7961, 2, 2, 5, 0, -1, "Crystal of Spirituality", 1);// 13
			AddComplexComponent( (BaseAddon) this, 9932, 1, 1, 2, 1153, -1, "Bow of Spirituality", 1);// 22

		}

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

        private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
        {
            AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
        }

        private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
        {
            AddonComponent ac;
            ac = new AddonComponent(item);
            if (name != null && name.Length > 0)
                ac.Name = name;
            if (hue != 0)
                ac.Hue = hue;
            if (amount > 1)
            {
                ac.Stackable = true;
                ac.Amount = amount;
            }
            if (lightsource != -1)
                ac.Light = (LightType) lightsource;
            addon.AddComponent(ac, xoffset, yoffset, zoffset);
        }

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

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

	public class SpiritualityShrineAddonDeed : BaseAddonDeed
	{
		public override BaseAddon Addon
		{
			get
			{
				return new SpiritualityShrineAddon();
			}
		}

		[Constructable]
		public SpiritualityShrineAddonDeed()
		{
			Name = "SpiritualityShrine";
		}

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

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

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