This commit is contained in:
parent
f0e69501ac
commit
e332541b61
4 changed files with 40 additions and 4 deletions
|
|
@ -379,6 +379,11 @@ namespace Server.Engines.Craft
|
||||||
|
|
||||||
public bool RetainsColorFrom( CraftSystem system, Type type )
|
public bool RetainsColorFrom( CraftSystem system, Type type )
|
||||||
{
|
{
|
||||||
|
if (DefTailoring.IsNonColorable(m_Type))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( system.RetainsColorFrom( this, type ) )
|
if ( system.RetainsColorFrom( this, type ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,24 @@ namespace Server.Engines.Craft
|
||||||
return 0;
|
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[]
|
private static Type[] m_TailorColorables = new Type[]
|
||||||
{
|
{
|
||||||
typeof( GozaMatEastDeed ), typeof( GozaMatSouthDeed ),
|
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 );
|
index = AddCraft( typeof( BoneChest ), 1049149, 1025199, 96.0, 121.0, typeof( Leather ), 1044462, 12, 1044463 );
|
||||||
AddRes( index, typeof( Bone ), 1049064, 10, 1049063 );
|
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
|
#endregion
|
||||||
|
|
||||||
// Set the overridable material
|
// Set the overridable material
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,11 @@ namespace Server.Items
|
||||||
UnscaleDurability();
|
UnscaleDurability();
|
||||||
|
|
||||||
m_Resource = value;
|
m_Resource = value;
|
||||||
Hue = CraftResources.GetHue( m_Resource );
|
|
||||||
|
if (!DefTailoring.IsNonColorable(this.GetType()))
|
||||||
|
{
|
||||||
|
Hue = CraftResources.GetHue(m_Resource);
|
||||||
|
}
|
||||||
|
|
||||||
Invalidate();
|
Invalidate();
|
||||||
InvalidateProperties();
|
InvalidateProperties();
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,16 @@ namespace Server.Items
|
||||||
|
|
||||||
public override int ArmorBase{ get{ return 20; } }
|
public override int ArmorBase{ get{ return 20; } }
|
||||||
|
|
||||||
|
public override int DefaultWeight { get { return 5; } }
|
||||||
|
|
||||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
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]
|
[Constructable]
|
||||||
public OrcHelm() : base( 0x1F0B )
|
public OrcHelm() : base( 0x1F0B )
|
||||||
{
|
{
|
||||||
Weight = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrcHelm( Serial serial ) : base( serial )
|
public OrcHelm( Serial serial ) : base( serial )
|
||||||
|
|
@ -44,6 +45,11 @@ namespace Server.Items
|
||||||
{
|
{
|
||||||
base.Deserialize( reader );
|
base.Deserialize( reader );
|
||||||
int version = reader.ReadInt();
|
int version = reader.ReadInt();
|
||||||
|
|
||||||
|
if( version == 0 && Weight == 1 )
|
||||||
|
{
|
||||||
|
Weight = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue