aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-01-01 00:26:53 +0100
committerShauren <shauren.trinity@gmail.com>2023-08-12 14:24:24 +0200
commitb7287e85e4bc8acb2b95271ece9dd8a5b93873cd (patch)
tree6088602ac914ef69573ce551d7fc4f0613beb5ce /src/server/game/Spells/SpellInfo.cpp
parentf9033a5dbd559fde3030a21d83d664983d95f39f (diff)
Core/Misc: Fixed deprecation warnings for c++20
(cherry picked from commit ba9bbbc9d0c3b80d8954ad6390d23ae3d0f804b2)
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 56d8c741cdd..38347a1bae5 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -3214,7 +3214,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
}
SpellSchools school = GetFirstSchoolInMask(schoolMask);
// Flat mod from caster auras by spell school
- powerCost += unitCaster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + school);
+ powerCost += unitCaster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + AsUnderlyingType(school));
// Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
if (HasAttribute(SPELL_ATTR4_SPELL_VS_EXTEND_COST))
@@ -3244,7 +3244,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
}
// PCT mod from user auras by school
- powerCost = int32(powerCost * (1.0f + unitCaster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER + school)));
+ powerCost = int32(powerCost * (1.0f + unitCaster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER + AsUnderlyingType(school))));
if (powerCost < 0)
powerCost = 0;
return powerCost;