aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 4eab08185a9..64483f03e76 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -809,7 +809,7 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
BaseLevel = spellEntry->baseLevel;
SpellLevel = spellEntry->spellLevel;
DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : nullptr;
- PowerType = spellEntry->powerType;
+ PowerType = static_cast<Powers>(spellEntry->powerType);
ManaCost = spellEntry->manaCost;
ManaCostPerlevel = spellEntry->manaCostPerlevel;
ManaPerSecond = spellEntry->manaPerSecond;
@@ -3162,7 +3162,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
return unitCaster->GetHealth();
// Else drain all power
if (PowerType < MAX_POWERS)
- return unitCaster->GetPower(Powers(PowerType));
+ return unitCaster->GetPower(PowerType);
TC_LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
return 0;
}
@@ -3185,7 +3185,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
case POWER_FOCUS:
case POWER_ENERGY:
case POWER_HAPPINESS:
- powerCost += int32(CalculatePct(unitCaster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
+ powerCost += int32(CalculatePct(unitCaster->GetMaxPower(PowerType), ManaCostPercentage));
break;
case POWER_RUNE:
case POWER_RUNIC_POWER: