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

namespace Server.Items
{
	public class HangingMenAddon : BaseAddon
	{
        private static int[,] m_AddOnSimpleComponents = new int[,] {
			  {1848, -1, -3, 0}, {1848, 0, -3, 0}, {1848, -1, -4, 0}// 1	2	3	
			, {1848, 0, -3, 5}, {1851, -1, -3, 10}, {1851, -1, -4, 5}// 4	5	6	
			, {1851, 0, -3, 10}, {1851, 0, -4, 5}, {1848, 0, -4, 0}// 7	8	9	
			, {1848, -1, -3, 5}, {1851, -1, -5, 0}, {1851, 0, -5, 0}// 10	11	12	
			, {8, -2, 3, 0}, {17, 0, 3, 1}, {9, -1, 2, 22}// 13	14	15	
			, {8, -2, 1, 0}, {8, -2, 2, 0}, {17, 0, -2, 1}// 16	17	18	
			, {16, 0, 4, 2}, {8, -2, 2, 0}, {18, -1, 4, 2}// 23	25	26	
			, {2176, 1, 2, 44}, {8, -2, 0, 1}, {2176, 0, 2, 35}// 28	30	31	
			, {9, -1, 1, 20}, {8, -2, 4, 0}, {8, -2, -2, 0}// 33	34	36	
			, {8, -2, -1, 0}, {2176, 1, 4, 47}, {9, -2, 2, 12}// 38	39	40	
			, {17, 0, -1, 2}, {18, -1, -1, 1}, {18, 0, -1, 3}// 42	43	44	
			, {18, 0, 2, 0}, {4651, -1, 3, 14}, {4650, -1, 0, 0}// 45	46	47	
			, {4654, -1, -1, 14}, {7571, 1, 6, 4}, {4245, -1, 3, 13}// 48	49	50	
			, {6869, 1, 2, 46}, {6942, 3, 4, 47}, {7840, 3, 5, 52}// 51	52	53	
			, {6658, 3, 6, 51}, {7572, 2, 0, 8}// 54	55	
		};

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

		[ Constructable ]
		public HangingMenAddon()
		{

            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, 10031, 1, 5, 24, 347, -1, "", 1);// 19
			AddComplexComponent( (BaseAddon) this, 10031, 0, -2, 14, 347, -1, "", 1);// 20
			AddComplexComponent( (BaseAddon) this, 10031, -1, 0, 15, 347, -1, "", 1);// 21
			AddComplexComponent( (BaseAddon) this, 10031, 0, 5, 25, 347, -1, "", 1);// 22
			AddComplexComponent( (BaseAddon) this, 10031, -1, 1, 14, 347, -1, "", 1);// 24
			AddComplexComponent( (BaseAddon) this, 10031, 0, -1, 14, 347, -1, "", 1);// 27
			AddComplexComponent( (BaseAddon) this, 10031, -1, -1, 14, 347, -1, "", 1);// 29
			AddComplexComponent( (BaseAddon) this, 10031, 0, 3, 13, 347, -1, "", 1);// 32
			AddComplexComponent( (BaseAddon) this, 10031, -1, 2, 14, 347, -1, "", 1);// 35
			AddComplexComponent( (BaseAddon) this, 10031, -1, -2, 14, 347, -1, "", 1);// 37
			AddComplexComponent( (BaseAddon) this, 10031, -1, 3, 14, 347, -1, "", 1);// 41

		}

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

		[Constructable]
		public HangingMenAddonDeed()
		{
			Name = "HangingMen";
		}

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