Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct

This commit is contained in:
Spp
2012-10-02 12:17:42 +02:00
parent f8846cdeaf
commit 380db44583
31 changed files with 321 additions and 357 deletions

View File

@@ -2026,16 +2026,16 @@ uint32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask)
{
// health as power used
case POWER_HEALTH:
powerCost += int32(CalculatePctU(caster->GetCreateHealth(), ManaCostPercentage));
powerCost += int32(CalculatePct(caster->GetCreateHealth(), ManaCostPercentage));
break;
case POWER_MANA:
powerCost += int32(CalculatePctU(caster->GetCreateMana(), ManaCostPercentage));
powerCost += int32(CalculatePct(caster->GetCreateMana(), ManaCostPercentage));
break;
case POWER_RAGE:
case POWER_FOCUS:
case POWER_ENERGY:
case POWER_HAPPINESS:
powerCost += int32(CalculatePctU(caster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
powerCost += int32(CalculatePct(caster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
break;
case POWER_RUNE:
case POWER_RUNIC_POWER: