public int GetModifiedMountBodyArmor()
        {
            int armorValue = 0;

            if (this.Item.HasArmorComponent)
            {
                ArmorComponent armorComponent = this.Item.ArmorComponent;
                armorValue = this.Item.ItemType == ItemObject.ItemTypeEnum.HorseHarness ? armorComponent.BodyArmor : 0;
            }
            else if (this.Item.WeaponComponent != null)
            {
                armorValue = this.Item.WeaponComponent.PrimaryWeapon.BodyArmor;
            }
            if (armorValue > 0 && this.ItemModifier != null)
            {
                armorValue = this.ItemModifier.ModifyArmor(armorValue);
            }
            return(armorValue <= 0 ? 0 : armorValue);
        }
Ejemplo n.º 2
0
        private float CalculateArmorTier(ArmorComponent armorComponent)
        {
            float num = (float)(1.20000004768372 * (double)armorComponent.HeadArmor + 1.0 * (double)armorComponent.BodyArmor + 1.0 * (double)armorComponent.LegArmor + 1.0 * (double)armorComponent.ArmArmor);

            if (armorComponent.Item.ItemType == ItemObject.ItemTypeEnum.LegArmor)
            {
                num *= 1.6f;
            }
            else if (armorComponent.Item.ItemType == ItemObject.ItemTypeEnum.HandArmor)
            {
                num *= 1.7f;
            }
            else if (armorComponent.Item.ItemType == ItemObject.ItemTypeEnum.HeadArmor)
            {
                num *= 1.2f;
            }
            else if (armorComponent.Item.ItemType == ItemObject.ItemTypeEnum.Cape)
            {
                num *= 1.8f;
            }
            return((float)((double)num * 0.100000001490116 - 0.400000005960464));
        }