Core/Misc: Fixed deprecation warnings for c++20
This commit is contained in:
@@ -319,7 +319,7 @@ void Player::UpdateMaxPower(Powers power)
|
||||
if (powerIndex == MAX_POWERS || powerIndex >= MAX_POWERS_PER_CLASS)
|
||||
return;
|
||||
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(power));
|
||||
|
||||
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowerValue(power);
|
||||
value *= GetPctModifierValue(unitMod, BASE_PCT);
|
||||
@@ -922,7 +922,7 @@ void Creature::UpdateMaxPower(Powers power)
|
||||
if (GetPowerIndex(power) == MAX_POWERS)
|
||||
return;
|
||||
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(power));
|
||||
|
||||
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowerValue(power);
|
||||
value *= GetPctModifierValue(unitMod, BASE_PCT);
|
||||
@@ -1173,7 +1173,7 @@ void Guardian::UpdateMaxPower(Powers power)
|
||||
if (GetPowerIndex(power) == MAX_POWERS)
|
||||
return;
|
||||
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(power));
|
||||
|
||||
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowerValue(power);
|
||||
value *= GetPctModifierValue(unitMod, BASE_PCT);
|
||||
|
||||
Reference in New Issue
Block a user