Ultima Expansion
Age Of Shadows
Hello, i am triyng to adding some prooperties to material when i craft armor or weapon, but inew properties doesn't work.
Someone knows what is the issue?
Thanks

Version AOS; my resourceinfo.cs::

Code:
using System;
using System.Collections;

namespace Server.Items
{
    public enum CraftResource
    {
        None = 0,
        Iron = 1,
        DullCopper,
        ShadowIron,
        Copper,
        Bronze,
        Gold,
        Agapite,
        Verite,
        Valorite,

        RegularLeather = 101,
        SpinedLeather,
        HornedLeather,
        BarbedLeather,

        RedScales = 201,
        YellowScales,
        BlackScales,
        GreenScales,
        WhiteScales,
        BlueScales,

        RegularWood = 301,
        OakWood,
        AshWood,
        YewWood,
        Heartwood,
        Bloodwood,
        Frostwood
    }

    public enum CraftResourceType
    {
        None,
        Metal,
        Leather,
        Scales,
        Wood
    }

    public class CraftAttributeInfo
    {
        private int m_WeaponFireDamage;
        private int m_WeaponColdDamage;
        private int m_WeaponPoisonDamage;
        private int m_WeaponEnergyDamage;
        private int m_WeaponChaosDamage;
        private int m_WeaponDirectDamage;
        private int m_WeaponDurability;
        private int m_WeaponLuck;
        private int m_WeaponGoldIncrease;
        private int m_WeaponLowerRequirements;
        private int m_WeaponDamage;
        private int m_WeaponHitChance;
        private int m_WeaponHitLifeLeech;
        private int m_WeaponRegenHits;
        private int m_WeaponSwingSpeed;
	private int m_WeaponDefendchance;
	private int m_WeaponHitLowerAttack;
	private int m_WeaponHitLowerDefend;
	private int m_WeaponHitManaLeech;
	private int m_WeaponHitDispell;

        private int m_ArmorPhysicalResist;
        private int m_ArmorFireResist;
        private int m_ArmorColdResist;
        private int m_ArmorPoisonResist;
        private int m_ArmorEnergyResist;
        private int m_ArmorDurability;
        private int m_ArmorLuck;
        private int m_ArmorGoldIncrease;
        private int m_ArmorLowerRequirements;
        private int m_ArmorDamage;
        private int m_ArmorHitChance;
        private int m_ArmorRegenHits;
        private int m_ArmorMage;
	private int m_ArmorLowerRegCost;
	private int m_ArmorSpellDamage;
	private int m_ArmorEnhancePotions;
	private int m_ArmorRegenMana;
	private int m_ArmorBonusDex;

        private int m_ShieldPhysicalResist;
        private int m_ShieldFireResist;
        private int m_ShieldColdResist;
        private int m_ShieldPoisonResist;
        private int m_ShieldEnergyResist;
        private int m_ShieldPhysicalRandom;
        private int m_ShieldColdRandom;
        private int m_ShieldSpellChanneling;
        private int m_ShieldLuck;
        private int m_ShieldLowerRequirements;
        private int m_ShieldRegenHits;
        private int m_ShieldBonusDex;
        private int m_ShieldBonusStr;
        private int m_ShieldReflectPhys;
        private int m_SelfRepair;

        private int m_OtherSpellChanneling;
        private int m_OtherLuck;
        private int m_OtherRegenHits;
        private int m_OtherLowerRequirements;
	private int m_OtherHitLowerAttack;
	private int m_OtherHitLowerDefend;
	private int m_OtherHitManaLeech;
	private int m_OtherHitDispell;
	private int m_OtherPoisonDamage;
	private int m_OtherDefendchance;
	private int m_OtherHitLifeLeech;

        private int m_RunicMinAttributes;
        private int m_RunicMaxAttributes;
        private int m_RunicMinIntensity;
        private int m_RunicMaxIntensity;
        
        public int WeaponFireDamage { get { return m_WeaponFireDamage; } set { m_WeaponFireDamage = value; } }
        public int WeaponColdDamage { get { return m_WeaponColdDamage; } set { m_WeaponColdDamage = value; } }
        public int WeaponPoisonDamage { get { return m_WeaponPoisonDamage; } set { m_WeaponPoisonDamage = value; } }
        public int WeaponEnergyDamage { get { return m_WeaponEnergyDamage; } set { m_WeaponEnergyDamage = value; } }
        public int WeaponChaosDamage { get { return m_WeaponChaosDamage; } set { m_WeaponChaosDamage = value; } }
        public int WeaponDirectDamage { get { return m_WeaponDirectDamage; } set { m_WeaponDirectDamage = value; } }
        public int WeaponDurability { get { return m_WeaponDurability; } set { m_WeaponDurability = value; } }
        public int WeaponLuck { get { return m_WeaponLuck; } set { m_WeaponLuck = value; } }
        public int WeaponGoldIncrease { get { return m_WeaponGoldIncrease; } set { m_WeaponGoldIncrease = value; } }
        public int WeaponLowerRequirements { get { return m_WeaponLowerRequirements; } set { m_WeaponLowerRequirements = value; } }
        public int WeaponDamage { get { return m_WeaponDamage; } set { m_WeaponDamage = value; } }
        public int WeaponHitChance { get { return m_WeaponHitChance; } set { m_WeaponHitChance = value; } }
        public int WeaponHitLifeLeech { get { return m_WeaponHitLifeLeech; } set { m_WeaponHitLifeLeech = value; } }
        public int WeaponRegenHits { get { return m_WeaponRegenHits; } set { m_WeaponRegenHits = value; } }
        public int WeaponSwingSpeed { get { return m_WeaponSwingSpeed; } set { m_WeaponSwingSpeed = value; } }
	 public int WeaponDefendchance { get { return m_WeaponDefendchance; } set { m_WeaponDefendchance = value; } }
	 public int WeaponHitLowerAttack { get { return m_WeaponHitLowerAttack; } set { m_WeaponHitLowerAttack = value; } }
	 public int WeaponHitLowerDefend { get { return m_WeaponHitLowerDefend; } set { m_WeaponHitLowerDefend = value; } }
	 public int WeaponHitManaLeech { get { return m_WeaponHitManaLeech; } set { m_WeaponHitManaLeech = value; } }
 	 public int WeaponHitDispell { get { return m_WeaponHitDispell; } set { m_WeaponHitDispell = value; } }

        public int ArmorPhysicalResist { get { return m_ArmorPhysicalResist; } set { m_ArmorPhysicalResist = value; } }
        public int ArmorFireResist { get { return m_ArmorFireResist; } set { m_ArmorFireResist = value; } }
        public int ArmorColdResist { get { return m_ArmorColdResist; } set { m_ArmorColdResist = value; } }
        public int ArmorPoisonResist { get { return m_ArmorPoisonResist; } set { m_ArmorPoisonResist = value; } }
        public int ArmorEnergyResist { get { return m_ArmorEnergyResist; } set { m_ArmorEnergyResist = value; } }
        public int ArmorDurability { get { return m_ArmorDurability; } set { m_ArmorDurability = value; } }
        public int ArmorLuck { get { return m_ArmorLuck; } set { m_ArmorLuck = value; } }
        public int ArmorGoldIncrease { get { return m_ArmorGoldIncrease; } set { m_ArmorGoldIncrease = value; } }
        public int ArmorLowerRequirements { get { return m_ArmorLowerRequirements; } set { m_ArmorLowerRequirements = value; } }
        public int ArmorDamage { get { return m_ArmorDamage; } set { m_ArmorDamage = value; } }
        public int ArmorHitChance { get { return m_ArmorHitChance; } set { m_ArmorHitChance = value; } }
        public int ArmorRegenHits { get { return m_ArmorRegenHits; } set { m_ArmorRegenHits = value; } }
        public int ArmorMage { get { return m_ArmorMage; } set { m_ArmorMage = value; } }
	public int ArmorLowerRegCost { get { return m_ArmorLowerRegCost; } set { m_ArmorLowerRegCost = value; } }
	public int ArmorSpellDamage { get { return m_ArmorSpellDamage; } set { m_ArmorSpellDamage = value; } }
	public int ArmorEnhancePotions { get { return m_ArmorEnhancePotions; } set { m_ArmorEnhancePotions = value; } }
	public int ArmorRegenMana { get { return m_ArmorRegenMana; } set { m_ArmorRegenMana = value; } }
	public int ArmorBonusDex { get { return m_ArmorBonusDex; } set { m_ArmorBonusDex = value; } }

        public int ShieldPhysicalResist { get { return m_ShieldPhysicalResist; } set { m_ShieldPhysicalResist = value; } }
        public int ShieldFireResist { get { return m_ShieldFireResist; } set { m_ShieldFireResist = value; } }
        public int ShieldColdResist { get { return m_ShieldColdResist; } set { m_ShieldColdResist = value; } }
        public int ShieldPoisonResist { get { return m_ShieldPoisonResist; } set { m_ShieldPoisonResist = value; } }
        public int ShieldEnergyResist { get { return m_ShieldEnergyResist; } set { m_ShieldEnergyResist = value; } }
        public int ShieldPhysicalRandom { get { return m_ShieldPhysicalRandom; } set { m_ShieldPhysicalRandom = value; } }
        public int ShieldColdRandom { get { return m_ShieldColdRandom; } set { m_ShieldColdRandom = value; } }
        public int ShieldSpellChanneling { get { return m_ShieldSpellChanneling; } set { m_ShieldSpellChanneling = value; } }
        public int ShieldLuck { get { return m_ShieldLuck; } set { m_ShieldLuck = value; } }
        public int ShieldLowerRequirements { get { return m_ShieldLowerRequirements; } set { m_ShieldLowerRequirements = value; } }
        public int ShieldRegenHits { get { return m_ShieldRegenHits; } set { m_ShieldRegenHits = value; } }
        public int ShieldBonusDex { get { return m_ShieldBonusDex; } set { m_ShieldBonusDex = value; } }
        public int ShieldBonusStr { get { return m_ShieldBonusStr; } set { m_ShieldBonusStr = value; } }
        public int ShieldReflectPhys { get { return m_ShieldReflectPhys; } set { m_ShieldReflectPhys = value; } }
        public int ShieldSelfRepair { get { return m_SelfRepair; } set { m_SelfRepair = value; } }

        public int OtherSpellChanneling { get { return m_OtherSpellChanneling; } set { m_OtherSpellChanneling = value; } }
        public int OtherLuck { get { return m_OtherLuck; } set { m_OtherLuck = value; } }
        public int OtherRegenHits { get { return m_OtherRegenHits; } set { m_OtherRegenHits = value; } }
        public int OtherLowerRequirements { get { return m_OtherLowerRequirements; } set { m_OtherLowerRequirements = value; } }
	public int OtherDefendchance { get { return m_OtherDefendchance; } set { m_OtherDefendchance = value; } }
	public int OtherHitLowerAttack { get { return m_OtherHitLowerAttack; } set { m_OtherHitLowerAttack = value; } }
	public int OtherHitLowerDefend { get { return m_OtherHitLowerDefend; } set { m_OtherHitLowerDefend = value; } }
	public int OtherHitManaLeech { get { return m_OtherHitManaLeech; } set { m_OtherHitManaLeech = value; } }
	public int OtherHitDispell { get { return m_OtherHitDispell; } set { m_OtherHitDispell = value; } }
	public int OtherPoisonDamage { get { return m_OtherPoisonDamage; } set { m_OtherPoisonDamage = value; } }
	 public int OtherHitLifeLeech { get { return m_OtherHitLifeLeech; } set { m_OtherHitLifeLeech = value; } }
	 

        public int RunicMinAttributes { get { return m_RunicMinAttributes; } set { m_RunicMinAttributes = value; } }
        public int RunicMaxAttributes { get { return m_RunicMaxAttributes; } set { m_RunicMaxAttributes = value; } }
        public int RunicMinIntensity { get { return m_RunicMinIntensity; } set { m_RunicMinIntensity = value; } }
        public int RunicMaxIntensity { get { return m_RunicMaxIntensity; } set { m_RunicMaxIntensity = value; } }

        public CraftAttributeInfo()
        {
        }

        public static readonly CraftAttributeInfo Blank;
        public static readonly CraftAttributeInfo DullCopper, ShadowIron, Copper, Bronze, Golden, Agapite, Verite, Valorite;
        public static readonly CraftAttributeInfo Spined, Horned, Barbed;
        public static readonly CraftAttributeInfo RedScales, YellowScales, BlackScales, GreenScales, WhiteScales, BlueScales;
        public static readonly CraftAttributeInfo OakWood, AshWood, YewWood, Heartwood, Bloodwood, Frostwood;

        static CraftAttributeInfo()
        {
            Blank = new CraftAttributeInfo();

            CraftAttributeInfo dullCopper = DullCopper = new CraftAttributeInfo();

            dullCopper.ArmorPhysicalResist = 0;
	    dullCopper.ArmorLowerRegCost = 10;
            dullCopper.ArmorDurability = 50;
            dullCopper.ArmorLowerRequirements = 0;
            dullCopper.WeaponDurability = 100;
            dullCopper.WeaponLowerRequirements = 0;
	    dullCopper.WeaponHitChance = 2;
            dullCopper.RunicMinAttributes = 0;
            dullCopper.RunicMaxAttributes = 0;

            if (Core.ML)
            {
                dullCopper.RunicMinIntensity = 0;
                dullCopper.RunicMaxIntensity = 0;
            }
            else
            {
                dullCopper.RunicMinIntensity = 0;
                dullCopper.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo shadowIron = ShadowIron = new CraftAttributeInfo();

            shadowIron.ArmorPhysicalResist = 0;
            shadowIron.ArmorFireResist = 0;
            shadowIron.ArmorEnergyResist = 0;
	    shadowIron.ArmorPoisonResist = 2;
            shadowIron.ArmorDurability = 100;

            shadowIron.WeaponColdDamage = 0;
            shadowIron.WeaponDurability = 50;
	shadowIron.WeaponPoisonDamage = 8;

            shadowIron.RunicMinAttributes = 0;
            shadowIron.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                shadowIron.RunicMinIntensity = 0;
                shadowIron.RunicMaxIntensity = 0;
            }
            else
            {
                shadowIron.RunicMinIntensity = 0;
                shadowIron.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo copper = Copper = new CraftAttributeInfo();

            copper.ArmorPhysicalResist = 0;
            copper.ArmorFireResist = 0;
            copper.ArmorPoisonResist = 0;
            copper.ArmorEnergyResist = 0;
copper.ArmorEnhancePotions = 1;
            copper.WeaponPoisonDamage = 0;
            copper.WeaponEnergyDamage = 0;
	copper.WeaponHitLowerAttack = 4;
            copper.RunicMinAttributes = 0;
            copper.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                copper.RunicMinIntensity = 0;
                copper.RunicMaxIntensity = 0;
            }
            else
            {
                copper.RunicMinIntensity = 0;
                copper.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo bronze = Bronze = new CraftAttributeInfo();

            bronze.ArmorPhysicalResist = 0;
            bronze.ArmorColdResist = 0;
            bronze.ArmorPoisonResist = 0;
            bronze.ArmorEnergyResist = 0;
bronze.ArmorRegenMana = 1;
            bronze.WeaponFireDamage = 0;
bronze.WeaponHitLowerDefend = 3;
            bronze.RunicMinAttributes = 0;
            bronze.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                bronze.RunicMinIntensity = 0;
                bronze.RunicMaxIntensity = 0;
            }
            else
            {
                bronze.RunicMinIntensity = 0;
                bronze.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo golden = Golden = new CraftAttributeInfo();

            golden.ArmorPhysicalResist = 0;
            golden.ArmorFireResist = 0;
            golden.ArmorColdResist = 0;
            golden.ArmorEnergyResist = 0;
            golden.ArmorLuck = 1;
            golden.ArmorLowerRequirements = 0;
	    golden.ArmorRegenHits = 1;
            golden.WeaponLuck = 0;
            golden.WeaponLowerRequirements = 0;
	    golden.WeaponHitDispell = 4;
            golden.RunicMinAttributes = 0;
            golden.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                golden.RunicMinIntensity = 0;
                golden.RunicMaxIntensity = 0;
            }
            else
            {
                golden.RunicMinIntensity = 0;
                golden.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo agapite = Agapite = new CraftAttributeInfo();

            agapite.ArmorPhysicalResist = 0;
            agapite.ArmorFireResist = 2;
            agapite.ArmorColdResist = 2;
            agapite.ArmorPoisonResist = 0;
            agapite.ArmorEnergyResist = 2;
            agapite.WeaponHitManaLeech = 4;
            agapite.WeaponEnergyDamage = 0;
            agapite.RunicMinAttributes = 0;
            agapite.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                agapite.RunicMinIntensity = 0;
                agapite.RunicMaxIntensity = 0;
            }
            else
            {
                agapite.RunicMinIntensity = 0;
                agapite.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo verite = Verite = new CraftAttributeInfo();

            verite.ArmorPhysicalResist = 1;
            verite.ArmorFireResist = 0;
            verite.ArmorColdResist = 0;
            verite.ArmorPoisonResist = 0;
            verite.ArmorEnergyResist = 0;
            verite.WeaponHitLifeLeech = 4;
            verite.WeaponEnergyDamage = 0;
            verite.RunicMinAttributes = 0;
            verite.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                verite.RunicMinIntensity = 0;
                verite.RunicMaxIntensity = 0;
            }
            else
            {
                verite.RunicMinIntensity = 0;
                verite.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo valorite = Valorite = new CraftAttributeInfo();

            valorite.ArmorPhysicalResist = 0;
            valorite.ArmorColdResist = 0;
            valorite.ArmorPoisonResist = 0;
            valorite.ArmorEnergyResist = 0;
valorite.ArmorBonusDex = 1;
            valorite.ArmorDurability = 50;
            valorite.WeaponFireDamage = 0;
            valorite.WeaponColdDamage = 0;
            valorite.WeaponDamage = 2;
            valorite.WeaponEnergyDamage = 0;
            valorite.RunicMinAttributes = 0;
            valorite.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                valorite.RunicMinIntensity = 0;
                valorite.RunicMaxIntensity = 0;
            }
            else
            {
                valorite.RunicMinIntensity = 0;
                valorite.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo spined = Spined = new CraftAttributeInfo();

            spined.ArmorPhysicalResist = 9;
	    spined.ArmorLowerRegCost = 13;
            spined.ArmorLuck = 0;
            spined.RunicMinAttributes = 0;
            spined.RunicMaxAttributes = 0;

            if (Core.ML)
            {
                spined.RunicMinIntensity = 0;
                spined.RunicMaxIntensity = 0;
            }
            else
            {
                spined.RunicMinIntensity = 0;
                spined.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo horned = Horned = new CraftAttributeInfo();

            horned.ArmorPhysicalResist = 0;
            horned.ArmorFireResist = 0;
            horned.ArmorColdResist = 0;
            horned.ArmorPoisonResist = 0;
            horned.ArmorEnergyResist = 0;
	    horned.ArmorRegenHits = 1;
            horned.RunicMinAttributes = 0;
            horned.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                horned.RunicMinIntensity = 0;
                horned.RunicMaxIntensity = 0;
            }
            else
            {
                horned.RunicMinIntensity = 0;
                horned.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo barbed = Barbed = new CraftAttributeInfo();

            barbed.ArmorPhysicalResist = 1;
            barbed.ArmorFireResist = 0;
            barbed.ArmorColdResist = 0;
            barbed.ArmorPoisonResist = 0;
            barbed.ArmorEnergyResist = 0;
	    barbed.ArmorSpellDamage = 1;
            barbed.RunicMinAttributes = 0;
            barbed.RunicMaxAttributes = 0;
            if (Core.ML)
            {
                barbed.RunicMinIntensity = 0;
                barbed.RunicMaxIntensity = 0;
            }
            else
            {
                barbed.RunicMinIntensity = 0;
                barbed.RunicMaxIntensity = 0;
            }

            CraftAttributeInfo red = RedScales = new CraftAttributeInfo();
            red.ArmorPhysicalResist = 0;
            red.ArmorFireResist = 0;
            red.ArmorColdResist = 0;
            red.ArmorPoisonResist = 0;
            red.ArmorEnergyResist = 0;

            CraftAttributeInfo yellow = YellowScales = new CraftAttributeInfo();

            yellow.ArmorPhysicalResist = -3;
            yellow.ArmorFireResist = 0;
            yellow.ArmorColdResist = 0;
            yellow.ArmorPoisonResist = 0;
            yellow.ArmorPoisonResist = 0;
            yellow.ArmorLuck = 0;

            CraftAttributeInfo black = BlackScales = new CraftAttributeInfo();

            black.ArmorPhysicalResist = 0;
            black.ArmorEnergyResist = -3;
            black.ArmorFireResist = 0;
            black.ArmorPoisonResist = 0;
            black.ArmorColdResist = 0;

            CraftAttributeInfo green = GreenScales = new CraftAttributeInfo();

            green.ArmorFireResist = -3;
            green.ArmorPhysicalResist = 0;
            green.ArmorColdResist = 0;
            green.ArmorEnergyResist = 0;
            green.ArmorPoisonResist = 0;

            CraftAttributeInfo white = WhiteScales = new CraftAttributeInfo();

            white.ArmorPhysicalResist = -3;
            white.ArmorFireResist = 0;
            white.ArmorEnergyResist = 0;
            white.ArmorPoisonResist = 0;
            white.ArmorColdResist = 0;

            CraftAttributeInfo blue = BlueScales = new CraftAttributeInfo();

            blue.ArmorPhysicalResist = 0;
            blue.ArmorFireResist = 0;
            blue.ArmorColdResist = 0;
            blue.ArmorPoisonResist = -3;
            blue.ArmorEnergyResist = 0;

            #region Mondain's Legacy
            CraftAttributeInfo oak = OakWood = new CraftAttributeInfo();

            oak.ArmorPhysicalResist = 0;
            oak.ArmorFireResist = 0;
            oak.ArmorPoisonResist = 0;
            oak.ArmorEnergyResist = 0;
            oak.ArmorLuck = 0;

            oak.ShieldPhysicalResist = 0;
            oak.ShieldFireResist = 0;
            oak.ShieldColdResist = 0;
            oak.ShieldPoisonResist = 0;
            oak.ShieldEnergyResist = 0;

            oak.WeaponLuck = 0;
            oak.WeaponDamage = 0;
oak.WeaponHitChance = 2;
oak.OtherHitLifeLeech = 3;

            oak.RunicMinAttributes = 0;
            oak.RunicMaxAttributes = 0;
            oak.RunicMinIntensity = 0;
            oak.RunicMaxIntensity = 0;

            CraftAttributeInfo ash = AshWood = new CraftAttributeInfo();

            ash.ArmorPhysicalResist = 0;
            ash.ArmorColdResist = 0;
            ash.ArmorPoisonResist = 0;
            ash.ArmorEnergyResist = 0;
            ash.ArmorLowerRequirements = 0;

            ash.ShieldEnergyResist = 0;
            ash.ShieldLowerRequirements = 0;

            ash.WeaponSwingSpeed = 0;
            ash.WeaponLowerRequirements = 0;
ash.WeaponPoisonDamage = 8;

            ash.OtherLowerRequirements = 0;
ash.OtherPoisonDamage = 8;

            ash.RunicMinAttributes = 0;
            ash.RunicMaxAttributes = 0;
            ash.RunicMinIntensity = 0;
            ash.RunicMaxIntensity = 0;

            CraftAttributeInfo yew = YewWood = new CraftAttributeInfo();

            yew.ArmorPhysicalResist = 0;
            yew.ArmorFireResist = 0;
            yew.ArmorColdResist = 0;
            yew.ArmorEnergyResist = 0;
            yew.ArmorRegenHits = 0;

            yew.ShieldPhysicalResist = 0;
            yew.ShieldRegenHits = 0;

            yew.WeaponHitChance = 0;
yew.WeaponHitLowerAttack = 4;
            yew.WeaponDamage = 0;

            yew.OtherRegenHits = 0;
yew.OtherHitLowerDefend = 3;


            yew.RunicMinAttributes = 0;
            yew.RunicMaxAttributes = 0;
            yew.RunicMinIntensity = 0;
            yew.RunicMaxIntensity = 0;

            CraftAttributeInfo heartwood = Heartwood = new CraftAttributeInfo();

            heartwood.ArmorPhysicalResist = 0;
            heartwood.ArmorFireResist = 0;
            heartwood.ArmorColdResist = 0;
            heartwood.ArmorPoisonResist = 0;
            heartwood.ArmorEnergyResist = 0;

            // one of below
            heartwood.ArmorDamage = 0;

            heartwood.ArmorHitChance = 0;
            heartwood.ArmorLuck = 0;
            heartwood.ArmorLowerRequirements = 0;
            heartwood.ArmorMage = 0;

            // one of below
            heartwood.WeaponDamage = 0;
heartwood.WeaponHitLowerDefend = 3;
            heartwood.WeaponHitChance = 0;
            heartwood.WeaponHitLifeLeech = 0;
            heartwood.WeaponLuck = 0;
            heartwood.WeaponLowerRequirements = 0;
            heartwood.WeaponSwingSpeed = 0;

            heartwood.ShieldBonusDex = 0;
            heartwood.ShieldBonusStr = 0;
            heartwood.ShieldPhysicalRandom = 0;
            heartwood.ShieldReflectPhys = 0;
            heartwood.ShieldSelfRepair = 0;
            heartwood.ShieldColdRandom = 0;
            heartwood.ShieldSpellChanneling = 0;
heartwood.OtherHitDispell = 5;

            heartwood.RunicMinAttributes = 0;
            heartwood.RunicMaxAttributes = 0;
            heartwood.RunicMinIntensity = 0;
            heartwood.RunicMaxIntensity = 0;

            CraftAttributeInfo bloodwood = Bloodwood = new CraftAttributeInfo();

            bloodwood.ArmorPhysicalResist = 0;
            bloodwood.ArmorFireResist = 0;
            bloodwood.ArmorColdResist = 0;
            bloodwood.ArmorPoisonResist = 0;
            bloodwood.ArmorEnergyResist = 0;
            bloodwood.ArmorRegenHits = 0;

            bloodwood.ShieldFireResist = 0;
            bloodwood.ShieldLuck = 0;
            bloodwood.ShieldRegenHits = 0;

            bloodwood.WeaponRegenHits = 0;
            bloodwood.WeaponHitLifeLeech = 0;
	bloodwood.WeaponHitManaLeech = 4;

            bloodwood.OtherLuck = 0;
            bloodwood.OtherRegenHits = 0;
bloodwood. OtherHitLowerAttack = 5;

            CraftAttributeInfo frostwood = Frostwood = new CraftAttributeInfo();

            frostwood.ArmorPhysicalResist = 0;
            frostwood.ArmorFireResist = 0;
            frostwood.ArmorColdResist = 0;
            frostwood.ArmorPoisonResist = 0;
            frostwood.ArmorEnergyResist = 0;

            frostwood.ShieldColdResist = 0;
            frostwood.ShieldSpellChanneling = 0;

            frostwood.WeaponHitLifeLeech = 4;
            frostwood.WeaponDamage = 1;

            frostwood.OtherSpellChanneling = 0;
frostwood.OtherDefendchance = 7;
            #endregion
        }
    }

    public class CraftResourceInfo
    {
        private readonly int m_Hue;
        private readonly int m_Number;
        private readonly string m_Name;
        private readonly CraftAttributeInfo m_AttributeInfo;
        private readonly CraftResource m_Resource;
        private readonly Type[] m_ResourceTypes;

        public int Hue
        {
            get
            {
                return this.m_Hue;
            }
        }
        public int Number
        {
            get
            {
                return this.m_Number;
            }
        }
        public string Name
        {
            get
            {
                return this.m_Name;
            }
        }
        public CraftAttributeInfo AttributeInfo
        {
            get
            {
                return this.m_AttributeInfo;
            }
        }
        public CraftResource Resource
        {
            get
            {
                return this.m_Resource;
            }
        }
        public Type[] ResourceTypes
        {
            get
            {
                return this.m_ResourceTypes;
            }
        }

        public CraftResourceInfo(int hue, int number, string name, CraftAttributeInfo attributeInfo, CraftResource resource, params Type[] resourceTypes)
        {
            this.m_Hue = hue;
            this.m_Number = number;
            this.m_Name = name;
            this.m_AttributeInfo = attributeInfo;
            this.m_Resource = resource;
            this.m_ResourceTypes = resourceTypes;

            for (int i = 0; i < resourceTypes.Length; ++i)
                CraftResources.RegisterType(resourceTypes[i], resource);
        }
    }

    public class CraftResources
    {
        private static readonly CraftResourceInfo[] m_MetalInfo = new CraftResourceInfo[]
        {
            new CraftResourceInfo(0x000, 1053109, "Iron", CraftAttributeInfo.Blank, CraftResource.Iron, typeof(IronIngot), typeof(IronOre), typeof(Granite)),
            new CraftResourceInfo(0x973, 1053108, "Dull Copper",	CraftAttributeInfo.DullCopper,	CraftResource.DullCopper, typeof(DullCopperIngot),	typeof(DullCopperOre),	typeof(DullCopperGranite)),
            new CraftResourceInfo(0x966, 1053107, "Shadow Iron",	CraftAttributeInfo.ShadowIron,	CraftResource.ShadowIron, typeof(ShadowIronIngot),	typeof(ShadowIronOre),	typeof(ShadowIronGranite)),
            new CraftResourceInfo(0x96D, 1053106, "Copper", CraftAttributeInfo.Copper, CraftResource.Copper, typeof(CopperIngot), typeof(CopperOre), typeof(CopperGranite)),
            new CraftResourceInfo(0x972, 1053105, "Bronze", CraftAttributeInfo.Bronze, CraftResource.Bronze, typeof(BronzeIngot), typeof(BronzeOre), typeof(BronzeGranite)),
            new CraftResourceInfo(0x8A5, 1053104, "Gold", CraftAttributeInfo.Golden, CraftResource.Gold, typeof(GoldIngot), typeof(GoldOre), typeof(GoldGranite)),
            new CraftResourceInfo(0x979, 1053103, "Agapite", CraftAttributeInfo.Agapite, CraftResource.Agapite, typeof(AgapiteIngot), typeof(AgapiteOre), typeof(AgapiteGranite)),
            new CraftResourceInfo(0x89F, 1053102, "Verite", CraftAttributeInfo.Verite, CraftResource.Verite, typeof(VeriteIngot), typeof(VeriteOre), typeof(VeriteGranite)),
            new CraftResourceInfo(0x8AB, 1053101, "Valorite", CraftAttributeInfo.Valorite,	CraftResource.Valorite, typeof(ValoriteIngot),	typeof(ValoriteOre), typeof(ValoriteGranite)),
        };

        private static readonly CraftResourceInfo[] m_ScaleInfo = new CraftResourceInfo[]
        {
            new CraftResourceInfo(0x66D, 1053129, "Red Scales",	CraftAttributeInfo.RedScales, CraftResource.RedScales, typeof(RedScales)),
            new CraftResourceInfo(0x8A8, 1053130, "Yellow Scales",	CraftAttributeInfo.YellowScales,	CraftResource.YellowScales, typeof(YellowScales)),
            new CraftResourceInfo(0x455, 1053131, "Black Scales",	CraftAttributeInfo.BlackScales, CraftResource.BlackScales, typeof(BlackScales)),
            new CraftResourceInfo(0x851, 1053132, "Green Scales",	CraftAttributeInfo.GreenScales, CraftResource.GreenScales, typeof(GreenScales)),
            new CraftResourceInfo(0x8FD, 1053133, "White Scales",	CraftAttributeInfo.WhiteScales, CraftResource.WhiteScales, typeof(WhiteScales)),
            new CraftResourceInfo(0x8B0, 1053134, "Blue Scales",	CraftAttributeInfo.BlueScales, CraftResource.BlueScales, typeof(BlueScales))
        };

        private static readonly CraftResourceInfo[] m_LeatherInfo = new CraftResourceInfo[]
        {
            new CraftResourceInfo(0x000, 1049353, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularLeather,	typeof(Leather), typeof(Hides)),
            new CraftResourceInfo(0x283, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather,	typeof(SpinedLeather),	typeof(SpinedHides)),
            new CraftResourceInfo(0x227, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather,	typeof(HornedLeather),	typeof(HornedHides)),
            new CraftResourceInfo(0x1C1, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather,	typeof(BarbedLeather),	typeof(BarbedHides))
        };

        private static readonly CraftResourceInfo[] m_AOSLeatherInfo = new CraftResourceInfo[]
        {
            new CraftResourceInfo(0x000, 1049353, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularLeather,	typeof(Leather), typeof(Hides)),
            new CraftResourceInfo(0x8AC, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather,	typeof(SpinedLeather),	typeof(SpinedHides)),
            new CraftResourceInfo(0x845, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather,	typeof(HornedLeather),	typeof(HornedHides)),
            new CraftResourceInfo(0x851, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather,	typeof(BarbedLeather),	typeof(BarbedHides)),
        };

        private static readonly CraftResourceInfo[] m_WoodInfo = new CraftResourceInfo[]
        {
            new CraftResourceInfo(0x000, 1011542, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularWood,	typeof(Log), typeof(Board)),
            new CraftResourceInfo(0x7DA, 1072533, "Oak", CraftAttributeInfo.OakWood, CraftResource.OakWood, typeof(OakLog), typeof(OakBoard)),
            new CraftResourceInfo(0x4A7, 1072534, "Ash", CraftAttributeInfo.AshWood, CraftResource.AshWood, typeof(AshLog), typeof(AshBoard)),
            new CraftResourceInfo(0x4A8, 1072535, "Yew", CraftAttributeInfo.YewWood, CraftResource.YewWood, typeof(YewLog), typeof(YewBoard)),
            new CraftResourceInfo(0x4A9, 1072536, "Heartwood", CraftAttributeInfo.Heartwood,	CraftResource.Heartwood,	typeof(HeartwoodLog),	typeof(HeartwoodBoard)),
            new CraftResourceInfo(0x4AA, 1072538, "Bloodwood", CraftAttributeInfo.Bloodwood,	CraftResource.Bloodwood,	typeof(BloodwoodLog),	typeof(BloodwoodBoard)),
            new CraftResourceInfo(0x47F, 1072539, "Frostwood", CraftAttributeInfo.Frostwood,	CraftResource.Frostwood,	typeof(FrostwoodLog),	typeof(FrostwoodBoard))
        };

        /// <summary>
        /// Returns true if '<paramref name="resource"/>' is None, Iron, RegularLeather or RegularWood. False if otherwise.
        /// </summary>
        public static bool IsStandard(CraftResource resource)
        {
            return (resource == CraftResource.None || resource == CraftResource.Iron || resource == CraftResource.RegularLeather || resource == CraftResource.RegularWood);
        }

        private static Hashtable m_TypeTable;

        /// <summary>
        /// Registers that '<paramref name="resourceType"/>' uses '<paramref name="resource"/>' so that it can later be queried by <see cref="CraftResources.GetFromType"/>
        /// </summary>
        public static void RegisterType(Type resourceType, CraftResource resource)
        {
            if (m_TypeTable == null)
                m_TypeTable = new Hashtable();

            m_TypeTable[resourceType] = resource;
        }

        /// <summary>
        /// Returns the <see cref="CraftResource"/> value for which '<paramref name="resourceType"/>' uses -or- CraftResource.None if an unregistered type was specified.
        /// </summary>
        public static CraftResource GetFromType(Type resourceType)
        {
            if (m_TypeTable == null)
                return CraftResource.None;

            object obj = m_TypeTable[resourceType];

            if (!(obj is CraftResource))
                return CraftResource.None;

            return (CraftResource)obj;
        }

        /// <summary>
        /// Returns a <see cref="CraftResourceInfo"/> instance describing '<paramref name="resource"/>' -or- null if an invalid resource was specified.
        /// </summary>
        public static CraftResourceInfo GetInfo(CraftResource resource)
        {
            CraftResourceInfo[] list = null;

            switch (GetType(resource))
            {
                case CraftResourceType.Metal:
                    list = m_MetalInfo;
                    break;
                case CraftResourceType.Leather:
                    list = Core.AOS ? m_AOSLeatherInfo : m_LeatherInfo;
                    break;
                case CraftResourceType.Scales:
                    list = m_ScaleInfo;
                    break;
                case CraftResourceType.Wood:
                    list = m_WoodInfo;
                    break;
            }

            if (list != null)
            {
                int index = GetIndex(resource);

                if (index >= 0 && index < list.Length)
                    return list[index];
            }

            return null;
        }

        /// <summary>
        /// Returns a <see cref="CraftResourceType"/> value indiciating the type of '<paramref name="resource"/>'.
        /// </summary>
        public static CraftResourceType GetType(CraftResource resource)
        {
            if (resource >= CraftResource.Iron && resource <= CraftResource.Valorite)
                return CraftResourceType.Metal;

            if (resource >= CraftResource.RegularLeather && resource <= CraftResource.BarbedLeather)
                return CraftResourceType.Leather;

            if (resource >= CraftResource.RedScales && resource <= CraftResource.BlueScales)
                return CraftResourceType.Scales;

            if (resource >= CraftResource.RegularWood && resource <= CraftResource.Frostwood)
                return CraftResourceType.Wood;

            return CraftResourceType.None;
        }

        /// <summary>
        /// Returns the first <see cref="CraftResource"/> in the series of resources for which '<paramref name="resource"/>' belongs.
        /// </summary>
        public static CraftResource GetStart(CraftResource resource)
        {
            switch (GetType(resource))
            {
                case CraftResourceType.Metal:
                    return CraftResource.Iron;
                case CraftResourceType.Leather:
                    return CraftResource.RegularLeather;
                case CraftResourceType.Scales:
                    return CraftResource.RedScales;
                case CraftResourceType.Wood:
                    return CraftResource.RegularWood;
            }

            return CraftResource.None;
        }

        /// <summary>
        /// Returns the index of '<paramref name="resource"/>' in the seriest of resources for which it belongs.
        /// </summary>
        public static int GetIndex(CraftResource resource)
        {
            CraftResource start = GetStart(resource);

            if (start == CraftResource.None)
                return 0;

            return (int)(resource - start);
        }

        /// <summary>
        /// Returns the <see cref="CraftResourceInfo.Number"/> property of '<paramref name="resource"/>' -or- 0 if an invalid resource was specified.
        /// </summary>
        public static int GetLocalizationNumber(CraftResource resource)
        {
            CraftResourceInfo info = GetInfo(resource);

            return (info == null ? 0 : info.Number);
        }

        /// <summary>
        /// Returns the <see cref="CraftResourceInfo.Hue"/> property of '<paramref name="resource"/>' -or- 0 if an invalid resource was specified.
        /// </summary>
        public static int GetHue(CraftResource resource)
        {
            CraftResourceInfo info = GetInfo(resource);

            return (info == null ? 0 : info.Hue);
        }

        /// <summary>
        /// Returns the <see cref="CraftResourceInfo.Name"/> property of '<paramref name="resource"/>' -or- an empty string if the resource specified was invalid.
        /// </summary>
        public static string GetName(CraftResource resource)
        {
            CraftResourceInfo info = GetInfo(resource);

            return (info == null ? String.Empty : info.Name);
        }

        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
                return CraftResource.SpinedLeather;
            else if (info.Name.IndexOf("Horned") >= 0)
                return CraftResource.HornedLeather;
            else if (info.Name.IndexOf("Barbed") >= 0)
                return CraftResource.BarbedLeather;
            else if (info.Name.IndexOf("Leather") >= 0)
                return CraftResource.RegularLeather;

            if (info.Level == 0)
                return CraftResource.Iron;
            else if (info.Level == 1)
                return CraftResource.DullCopper;
            else if (info.Level == 2)
                return CraftResource.ShadowIron;
            else if (info.Level == 3)
                return CraftResource.Copper;
            else if (info.Level == 4)
                return CraftResource.Bronze;
            else if (info.Level == 5)
                return CraftResource.Gold;
            else if (info.Level == 6)
                return CraftResource.Agapite;
            else if (info.Level == 7)
                return CraftResource.Verite;
            else if (info.Level == 8)
                return CraftResource.Valorite;

            return CraftResource.None;
        }

        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather || material == ArmorMaterialType.Spined ||
                material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
            {
                if (info.Level == 0)
                    return CraftResource.RegularLeather;
                else if (info.Level == 1)
                    return CraftResource.SpinedLeather;
                else if (info.Level == 2)
                    return CraftResource.HornedLeather;
                else if (info.Level == 3)
                    return CraftResource.BarbedLeather;

                return CraftResource.None;
            }

            return GetFromOreInfo(info);
        }
    }

    // NOTE: This class is only for compatability with very old RunUO versions.
    // No changes to it should be required for custom resources.
    public class OreInfo
    {
        public static readonly OreInfo Iron = new OreInfo(0, 0x000, "Iron");
        public static readonly OreInfo DullCopper = new OreInfo(1, 0x973, "Dull Copper");
        public static readonly OreInfo ShadowIron = new OreInfo(2, 0x966, "Shadow Iron");
        public static readonly OreInfo Copper = new OreInfo(3, 0x96D, "Copper");
        public static readonly OreInfo Bronze = new OreInfo(4, 0x972, "Bronze");
        public static readonly OreInfo Gold = new OreInfo(5, 0x8A5, "Gold");
        public static readonly OreInfo Agapite = new OreInfo(6, 0x979, "Agapite");
        public static readonly OreInfo Verite = new OreInfo(7, 0x89F, "Verite");
        public static readonly OreInfo Valorite = new OreInfo(8, 0x8AB, "Valorite");

        private readonly int m_Level;
        private readonly int m_Hue;
        private readonly string m_Name;

        public OreInfo(int level, int hue, string name)
        {
            this.m_Level = level;
            this.m_Hue = hue;
            this.m_Name = name;
        }

        public int Level
        {
            get
            {
                return this.m_Level;
            }
        }

        public int Hue
        {
            get
            {
                return this.m_Hue;
            }
        }

        public string Name
        {
            get
            {
                return this.m_Name;
            }
        }
    }
}
maybe need to write something like "Aos" before?
 
Back