/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on [date]
Filepath: scripts\_custom\items\special\ChristmasDeco.cs
Lines of code: 86
***********************************************************/



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 ChristmasDeco : Item
	{
		public enum CMdecoType
		{
		None,
		MiniHouseP1=8983,
		MiniHouseP2=8984,
		MiniHouseP3=8985,
		SnowManSouth=9000,
		SnowManEast=9001,
		GiftBox1=9002,
		GiftBox2=9003,
		WreathEast=9004,
		WreathSouth=9005,
		SnowFlake1=9006,
		SnowFlake2=9007,
		Pointsettia1=9008,
		Pointsettia2=9009,
		MistleToeEast=9076,
		MistleToeSouth=9077,
		FestiveCactus=9078,
		SnowyTree1=9079,
		SnowyTree2=9080,
		Stocking1East=11225,
		Stocking1South=11226,
		Stocking2East=11227,
		Stocking2South=11228,
		CandyCane1East=11229,
		CandyCane1South=11230,
		CandyCane2East=11231,
		CandyCane2South=11232
		}; 
	
		CMdecoType m_decotype;
		
		public override bool DisplayWeight { get { return ( false ); } }		
	
		[CommandProperty( AccessLevel.GameMaster )]
		public CMdecoType type
		{
			get{ return m_decotype; }
			set{ m_decotype = (CMdecoType)value; UpdateType();Modify(); }
		}

		[Constructable]
		public ChristmasDeco(CMdecoType ptype) : base( 9002 )
		{
		type=ptype;
		Movable=false;
		}
		
		[Constructable]
		public ChristmasDeco() : this( CMdecoType.None )
		{
		}		

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

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

			int version = reader.ReadInt();
			
			m_decotype=(CMdecoType)reader.ReadInt();
		}

	}

}


