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

namespace Server.Items
{
	public class DecoratedDeskWAddon : BaseAddon
	{
        private static int[,] m_AddOnSimpleComponents = new int[,] {
			  {2928, -1, 2, 1}, {2929, 1, 2, 1}, {2930, 1, -2, 1}// 1	2	3	
			, {2931, 0, -1, 1}, {2931, 0, 0, 1}, {2931, 0, 1, 1}// 4	5	6	
			, {2931, 1, -1, 1}, {2931, 1, 0, 1}, {2931, 1, 1, 1}// 7	8	9	
			, {2931, 0, -2, 1}, {2932, 0, 2, 1}, {2928, -1, -2, 0}// 10	11	12	
			, {4029, 0, 0, 7}, {4031, 0, -1, 7}, {2867, -1, 0, 1}// 15	16	23	
			, {2457, 0, 1, 7}// 24	
		};

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

		[ Constructable ]
		public DecoratedDeskWAddon()
		{

            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, 2886, 1, 2, 7, 0, -1, "Porcelain", 1);// 13
			AddComplexComponent( (BaseAddon) this, 6378, 1, 2, 12, 0, -1, "Long Stemmed Rose", 1);// 14
			AddComplexComponent( (BaseAddon) this, 5357, 0, 2, 7, 0, -1, "Personal Correspondence", 1);// 17
			AddComplexComponent( (BaseAddon) this, 5358, 0, 2, 8, 0, -1, "Personal Correspondence", 1);// 18
			AddComplexComponent( (BaseAddon) this, 7717, -1, -2, 6, 0, -1, "Stack of Books", 1);// 19
			AddComplexComponent( (BaseAddon) this, 5154, 1, -1, 14, 2690, -1, "Sealing Wax", 1);// 20
			AddComplexComponent( (BaseAddon) this, 4327, 1, -1, 14, 0, -1, "Wax Stamp", 1);// 21
			AddComplexComponent( (BaseAddon) this, 4810, 1, -2, 7, 1150, -1, "", 1);// 22

		}

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

		[Constructable]
		public DecoratedDeskWAddonDeed()
		{
			Name = "DecoratedDeskW";
		}

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