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

namespace Server.Items
{
	public class LibraryFireplaceAddon : BaseAddon
	{
        private static int[,] m_AddOnSimpleComponents = new int[,] {
			  {44, 0, 1, 0}, {41, 1, 1, 0}, {27, 2, 1, 0}// 3	4	5	
			, {27, 2, 0, 0}, {27, -2, 0, 0}, {27, -2, 1, 0}// 6	7	8	
			, {28, -1, -1, 0}, {28, 0, -1, 0}, {28, 1, -1, 0}// 9	10	11	
			, {28, 2, -1, 0}, {29, -2, -1, 0}, {49, 3, 1, 16}// 12	13	14	
			, {41, -2, 1, 0}, {2715, 3, 1, 0}, {2711, -3, 1, 0}// 15	16	17	
			, {27, 4, 1, 0}, {27, 4, 0, 0}, {27, -4, 1, 0}// 18	19	20	
			, {27, -4, 0, 0}, {28, -2, -1, 0}, {28, -3, -1, 0}// 21	22	23	
			, {29, -4, -1, 0}, {28, 2, -1, 0}, {28, 3, -1, 0}// 24	25	26	
			, {28, 4, -1, 0}, {41, 4, 1, 0}, {1303, -1, 0, 0}// 27	28	29	
			, {1303, -1, 1, 0}, {1303, 0, 0, 0}, {1303, 0, 1, 0}// 30	31	32	
			, {1303, 1, 0, 0}, {1303, 1, 1, 0}, {1303, 2, 0, 0}// 33	34	35	
			, {1303, 2, 1, 0}, {7134, 0, 1, 0}, {1993, -3, 1, 20}// 36	39	41	
			, {1993, -2, 1, 20}, {1993, -1, 1, 20}, {1993, 0, 1, 20}// 42	43	44	
			, {1993, 1, 1, 20}, {1993, 2, 1, 20}, {1993, 3, 1, 20}// 45	46	47	
			, {1993, 4, 1, 20}, {1993, -3, 0, 20}, {1993, -2, 0, 20}// 48	49	50	
			, {1993, -1, 0, 20}, {1993, 0, 0, 20}, {1993, 1, 0, 20}// 51	52	53	
			, {1993, 2, 0, 20}, {1993, 3, 0, 20}, {1993, 4, 0, 20}// 54	55	56	
			, {28, 0, -1, 20}, {28, 1, -1, 20}, {28, 0, 0, 20}// 57	58	59	
			, {28, 1, 0, 20}, {27, 1, 0, 20}, {27, -1, 0, 20}// 60	61	62	
			, {29, -1, -1, 20}, {4061, 0, 1, 20}, {4062, 1, 1, 20}// 63	66	67	
			, {11599, 1, 1, 21}// 70	
		};

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

		[ Constructable ]
		public LibraryFireplaceAddon()
		{

            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, 10672, -1, 1, 0, 0, 1, "", 1);// 1
			AddComplexComponent( (BaseAddon) this, 10672, 2, 1, 0, 0, 1, "", 1);// 2
			AddComplexComponent( (BaseAddon) this, 4850, 0, 1, 0, 0, 1, "", 1);// 37
			AddComplexComponent( (BaseAddon) this, 4850, 1, 1, 0, 0, 1, "", 1);// 38
			AddComplexComponent( (BaseAddon) this, 6571, 0, 1, 4, 0, 1, "", 1);// 40
			AddComplexComponent( (BaseAddon) this, 2885, 4, 1, 20, 2810, -1, "", 1);// 64
			AddComplexComponent( (BaseAddon) this, 2885, -3, 1, 20, 2810, -1, "", 1);// 65
			AddComplexComponent( (BaseAddon) this, 4811, -1, 1, 20, 0, -1, "Lord British", 1);// 68
			AddComplexComponent( (BaseAddon) this, 4811, 2, 1, 20, 0, -1, "Lord Blackthorn", 1);// 69

		}

		public LibraryFireplaceAddon( 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 LibraryFireplaceAddonDeed : BaseAddonDeed
	{
		public override BaseAddon Addon
		{
			get
			{
				return new LibraryFireplaceAddon();
			}
		}

		[Constructable]
		public LibraryFireplaceAddonDeed()
		{
			Name = "LibraryFireplace";
		}

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