public int CalcPowerCost(Unit caster, DamageSchool school, Spell spell, PowerType type) { var cost = PowerCost + (PowerCostPerlevel * GetMaxLevelDiff(caster.Level)); if (PowerCostPercentage > 0) { cost += (PowerCostPercentage * ((type == PowerType.Health ? caster.BaseHealth : caster.BasePower))) / 100; } return caster.GetPowerCost(school, spell, cost); }
public int CalcPowerCost(Unit caster, DamageSchool school) { return caster.GetPowerCost(school, this, CalcBasePowerCost(caster)); }