private GetSmithingCostsForWeaponDesign ( WeaponDesign weaponDesign, Array &__result ) : void | ||
weaponDesign | WeaponDesign | |
__result | Array | |
return | void |
public static void GetSmithingCostsForWeaponDesign(WeaponDesign weaponDesign, ref int[] __result)
{
try
{
if (BannerlordCheatsSettings.Instance?.SmithingCostPercentage < 100f)
{
var factor = BannerlordCheatsSettings.Instance.SmithingCostPercentage / 100f;
for (var i = 0; i < __result.Length; i++)
{
var newValue = (int)Math.Round(factor * __result[i]);
__result[i] = newValue;
}
}
}
catch (Exception e)
{
SubModule.LogError(e, typeof(SmithingCostPercentage));
}
}
}