/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Jan-01-2012 10:09:12pm
Filepath: scripts\events and scenarios\Christmas\items\prizechristmasdecoold.cs
Lines of code: 0

Description: 

***********************************************************/


/*

using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Gumps;
using Server.Mobiles;
using Server.Targeting;
using Server.Network;

namespace Server.Items
{
	public class PrizeChristmasDeco : Item
	{
		public enum CMdecoType
		{
			None,
			SnowManSouth=9000,
			SnowManEast=9001,
			WreathEast=9004,
			WreathSouth=9005,
			SnowFlake1=9006,
			SnowFlake2=9007,
			Pointsettia1=9008,
			Pointsettia2=9009,
			MistleToeEast=9076,
			MistleToeSouth=9077,
			FestiveCactus=9078,
			SnowyTree1=9079,
			SnowyTree2=9080,
		}; 
	
		CMdecoType m_decotype;
		private int year;
		
		public override bool DisplayLootType{ get{ return false; } }
		public override bool DisplayWeight { get { return ( false ); } }		
		
		public void Randomize()
		{
			switch(Utility.Random(14))
			{
			case 0: type=CMdecoType.SnowManSouth;break;
			case 1: type=CMdecoType.SnowManEast;break;
			case 2: type=CMdecoType.WreathSouth;break;
			case 3: type=CMdecoType.WreathSouth;break;
			case 4: type=CMdecoType.SnowFlake1;break;
			case 5: type=CMdecoType.SnowFlake2;break;
			case 6: type=CMdecoType.Pointsettia1;break;
			case 7: type=CMdecoType.Pointsettia2;break;
			case 8: type=CMdecoType.MistleToeEast;break;
			case 9: type=CMdecoType.MistleToeSouth;break;
			case 10: type=CMdecoType.FestiveCactus;break;
			case 11: type=CMdecoType.SnowyTree1;break;
			case 12: type=CMdecoType.FestiveCactus;break;
			case 13: type=CMdecoType.SnowyTree2;break;
			}		
		}
		
		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );
			{
				list.Add(String.Format("Christmas {0}",year));
			}
		}		
		
	
		[CommandProperty( AccessLevel.GameMaster )]
		public CMdecoType type
		{
			get{ return m_decotype; }
			set{ m_decotype = (CMdecoType)value; UpdateType(); }
		}

		[Constructable]
		public PrizeChristmasDeco(CMdecoType ptype) : base( 9002 )
		{
			type=ptype;
			year=2008; //change to reflect current year (we could make it auto, but figured its best in case events go a bit through January)
			LootType=LootType.Blessed;
		}
		
		[Constructable]
		public PrizeChristmasDeco() : this( CMdecoType.None )
		{
			Randomize();
		}

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

		public override void OnDoubleClick( Mobile from )
		{
			if(from.AccessLevel>=AccessLevel.GameMaster)from.SendGump(new PropertiesGump(from,this));
		}
		
		
		public void UpdateType()
		{
			if(m_decotype==CMdecoType.None)return;	
			
			ItemID=(int)m_decotype;					
		}		
		

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version

			writer.Write( (int) m_decotype );
			writer.Write(year);
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			
			m_decotype=(CMdecoType)reader.ReadInt();
			year=reader.ReadInt();
		}
		
		public override void OnAfterLoad()
		{		
			ChristmasDecoration replacement=null;
			
			switch(m_decotype)
			{			
				case CMdecoType.SnowManSouth: replacement = new Snowman2(); break;
				case CMdecoType.SnowManEast: replacement = new  Snowman2(); break;
				case CMdecoType.WreathSouth: replacement = new Wreath(); break;
				case CMdecoType.SnowFlake1: replacement = new SnowFlake(); break;
				case CMdecoType.SnowFlake2: replacement = new SnowFlake(); break;
				case CMdecoType.Pointsettia1: replacement = new RedPoinsettia2(); break;
				case CMdecoType.Pointsettia2: replacement = new WhitePoinsettia2(); break;
				case CMdecoType.MistleToeEast: replacement = new MistleToe(); break;
				case CMdecoType.MistleToeSouth: replacement = new MistleToe(); break;
				case CMdecoType.FestiveCactus: replacement = new FestiveCactus(); break;
				case CMdecoType.SnowyTree1: replacement = new SnowyTree2(); break;
				case CMdecoType.SnowyTree2: replacement = new DecorativeTopiary2(); break;
			}
			
			
			if(replacement==null)return; //sanity check
			
			replacement.Year = this.year;
			
			Misc.ObjectConverter.ConvertItem(this,replacement);			
		}		

	}

}

*/
