/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Jan-01-2012 10:09:13pm
Filepath: scripts\events and scenarios\Halloween2011\Candy Collection\CandyCollectionBox.cs
Lines of code: 88

Description: 

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


using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Gumps;
using Server.Network;
using Server.Engines.Quests;

namespace Server.Items
{
	public class CandyCollectionBox : BaseCollectionItem
	{
		//public override int LabelNumber{ get{ return ""; } } // Please Contribute to the public Museum of Vesper.
		public override Collection CollectionID{ get{ return Collection.CandyCollection; } }
		public override int MaxTier{ get{ return 1; } }
		
		[Constructable]
		public CandyCollectionBox() : base( 0xE7D )
		{
			Hue = 1364;
			Name = "Donate your candy here";
			StartTier = 5000;
			NextTier = 5000;
			DailyDecay = 100;
		}
		
		public CandyCollectionBox( Serial serial ) : base( serial )
		{			
		}
		
		public override void Init()
		{
			base.Init();
			
			Donations.Add( new CollectionItem( typeof( RedLicorice ), 3978, 503213, "Red Licorice", 39, 1 ) );
			Donations.Add( new CollectionItem( typeof( RockCandy ), 4189, 503213, "Rock Candy", 63, 5 ) );
			Donations.Add( new CollectionItem( typeof( CherryLolipop ), 18061, 503213, "Cherry Lolipop", 0, 10 ) );
			Donations.Add( new CollectionItem( typeof( OrangeLolipop ), 18062, 503213, "Orange Lolipop", 0, 1 ) );
			Donations.Add( new CollectionItem( typeof( CandiedApple ), 2512, 503213, "Candied Apple", 1194, 5 ) );
			Donations.Add( new CollectionItem( typeof( NougatSwirl ), 18064, 503213, "Nougat Swirl", 0, 10 ) );
			Donations.Add( new CollectionItem( typeof( Taffy ), 18077, 503213, "Taffy", 0, 1 ) );
			Donations.Add( new CollectionItem( typeof( Jellybeans ), 18060, 503213, "Jellybeans", 0, 5 ) );
			Donations.Add( new CollectionItem( typeof( CaramelApple ), 2512, 503213, "Caramel Apple", 449, 10 ) );
			Donations.Add( new CollectionItem( typeof( LimeLolipop ), 18063, 503213, "Lime Lolipop", 0, 1 ) );
			Donations.Add( new CollectionItem( typeof( BlackLicorice ), 3978, 503213, "Black Licorice", 1175, 5 ) );
			Donations.Add( new CollectionItem( typeof( MilkChocolateTruffle ),  3967, 503213, "Milk Chocolate Truffle", 1192, 10 ) );
			Donations.Add( new CollectionItem( typeof( WrappedCandy ), 18078, 503213, "Wrapped Candy", 0, 1 ) );
			Donations.Add( new CollectionItem( typeof( BerryGumdrop ), 7847, 503213, "Berry Gumdrop", 1324, 5 ) );
			Donations.Add( new CollectionItem( typeof( WhiteChocolateTruffle ), 3967, 503213, "White Chocolate Truffle", 1150, 10 ) );
			Donations.Add( new CollectionItem( typeof( LemonGumdrop ), 7847, 503213, "Lemon Gumdrop", 53, 10 ) );

			Rewards.Add( new CollectionItem( typeof( BlackToadstool ), 0x26B7, 503213, "Black Toadstools", 1175, 1 ) );
			Rewards.Add( new CollectionItem( typeof( GreenToadstool ), 0x26B7, 503213, "Green Toadstools", 1155, 5 ) );
			Rewards.Add( new CollectionItem( typeof( RedToadstool ), 0x26B7, 503213, "Red Toadstools", 1157, 10 ) );
		}
		
		public override void IncreaseTier()
		{			
			base.IncreaseTier();
			
			List<object> list = new List<object>();
			Item c;
		
			switch ( Tier )
			{				
				case 1:								
					break;
			}
			
			if ( list.Count > 0 )
				Tiers.Add( list );
		}
		
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.Alive )
			{
				if ( from.InRange( Location, 2 ) && from is PlayerMobile && CanDonate( (PlayerMobile) from ) )
				{
					//if ( from.Quests.Count != 0)
					//{
					//	from.SendMessage("You are too preoccupied with quests. Return when you have none");
					//}
					//else {
						from.CloseGump( typeof( ComunityCollectionGump ) );
						from.SendGump( new ComunityCollectionGump( (PlayerMobile) from, this, Location ) );
					//}
				}
				else
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
			}
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}
}