Core/Misc: fixed a bunch of deprecation warnings

This commit is contained in:
Ovahlord committed 2023-07-07 22:14:22 +02:00
1 parent 63f85a613f
commit d924871a2a
8 files changed
+48 -48

No files matched your search

+2 -2
View File
@@ -4780,7 +4780,7 @@ void Unit::UpdateStatBuffMod(Stats stat)
float modNeg = 0.0f;
float factor = 0.0f;
UnitMods const unitMod = static_cast<UnitMods>(UNIT_MOD_STAT_START + stat);
UnitMods const unitMod = static_cast<UnitMods>(UNIT_MOD_STAT_START + AsUnderlyingType(stat));
// includes value from items and enchantments
float modValue = GetFlatModifierValue(unitMod, BASE_VALUE);
@@ -9055,7 +9055,7 @@ void Unit::UpdateAllDamagePctDoneMods()
float Unit::GetTotalStatValue(Stats stat) const
{
UnitMods unitMod = UnitMods(UNIT_MOD_STAT_START + stat);
UnitMods unitMod = UnitMods(UNIT_MOD_STAT_START + AsUnderlyingType(stat));
// value = ((base_value * base_pct) + total_value) * total_pct
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreateStat(stat);