/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Aug-08-2011 09:29:14pm
Filepath: scripts\Items\artifacts\champion spawns\SashOfGreese.cs
Lines of code: 53

Description: 

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


using System;
using Server;

namespace Server.Items
{
	public class SashOfGreese : BodySash
	{
		public override int ArtifactRarity{ get{ return 11; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public SashOfGreese()
		{
			Name = "Sash of Greese";
			Hue = 40;
			Attributes.DefendChance = 10;
			SkillBonuses.SetValues(0, SkillName.Cooking, 25.0 );
		}


		public SashOfGreese( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 1 );
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					Resistances.Physical = 0;
					Resistances.Fire = 0;
					Resistances.Cold = 0;
					Resistances.Energy = 0;
					break;
				}
			}
		}
		
		
		
		private static Type[] m_SashesReroll = new Type[]
		{
			typeof(SashOfTheVerminHorde),
			typeof(SashOfTheOrcishScourge)			
		};
		
		public override void OnAfterLoad()
		{		
			Item i = Activator.CreateInstance( m_SashesReroll[Utility.Random( m_SashesReroll.Length )] ) as Item;			
			
			
			Misc.ObjectConverter.ConvertItem(this,i);
		}	
		
	}
}