This commit is contained in:
xavier 2011-09-05 01:47:49 +00:00
parent f0e69501ac
commit e332541b61
4 changed files with 40 additions and 4 deletions

View file

@ -379,6 +379,11 @@ namespace Server.Engines.Craft
public bool RetainsColorFrom( CraftSystem system, Type type )
{
if (DefTailoring.IsNonColorable(m_Type))
{
return false;
}
if ( system.RetainsColorFrom( this, type ) )
return true;

View file

@ -49,6 +49,24 @@ namespace Server.Engines.Craft
return 0;
}
public static bool IsNonColorable(Type type)
{
for (int i = 0; i < m_TailorNonColorables.Length; ++i)
{
if (m_TailorNonColorables[i] == type)
{
return true;
}
}
return false;
}
private static Type[] m_TailorNonColorables = new Type[]
{
typeof( OrcHelm )
};
private static Type[] m_TailorColorables = new Type[]
{
typeof( GozaMatEastDeed ), typeof( GozaMatSouthDeed ),
@ -353,6 +371,9 @@ namespace Server.Engines.Craft
index = AddCraft( typeof( BoneChest ), 1049149, 1025199, 96.0, 121.0, typeof( Leather ), 1044462, 12, 1044463 );
AddRes( index, typeof( Bone ), 1049064, 10, 1049063 );
index = AddCraft(typeof(OrcHelm), 1049149, 1027947, 90.0, 115.0, typeof(Leather), 1044462, 6, 1044463);
AddRes(index, typeof(Bone), 1049064, 4, 1049063);
#endregion
// Set the overridable material

View file

@ -249,7 +249,11 @@ namespace Server.Items
UnscaleDurability();
m_Resource = value;
Hue = CraftResources.GetHue( m_Resource );
if (!DefTailoring.IsNonColorable(this.GetType()))
{
Hue = CraftResources.GetHue(m_Resource);
}
Invalidate();
InvalidateProperties();

View file

@ -19,15 +19,16 @@ namespace Server.Items
public override int ArmorBase{ get{ return 20; } }
public override int DefaultWeight { get { return 5; } }
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.None; } }
[Constructable]
public OrcHelm() : base( 0x1F0B )
{
Weight = 1;
}
public OrcHelm( Serial serial ) : base( serial )
@ -44,6 +45,11 @@ namespace Server.Items
{
base.Deserialize( reader );
int version = reader.ReadInt();
if( version == 0 && Weight == 1 )
{
Weight = 0;
}
}
}
}