using System;
using Server;

namespace Server.Items
{
	public class ShadowDancerLeggings : LeatherLegs
	{
		public override int LabelNumber{ get{ return 1061598; } } // Shadow Dancer Leggings
		public override int ArtifactRarity{ get{ return 11; } }

		public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }

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

		[Constructable]
		public ShadowDancerLeggings()
		{
			ItemID = 0x13D2;
			Hue = 0x455;
			SkillBonuses.SetValues( 0, SkillName.Hiding, 20.0 );
			SkillBonuses.SetValues( 1, SkillName.Provocation, 20.0 );
			ArmorAttributes.SelfRepair = 5;
			IsUWItem = true;
			ProtectionLevel = ArmorProtectionLevel.Guarding;
		}

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

			if ( version < 1 )
			{
				if ( ItemID == 0x13CB )
					ItemID = 0x13D2;

				PhysicalBonus = 0;
				PoisonBonus = 0;
				EnergyBonus = 0;
			}
		}
	}
}