mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 10:03:47 +00:00
fix(Core/Unit): -Wdeprecated-enum-enum-conversion warning (#6868)
This commit is contained in:
@@ -4313,7 +4313,7 @@ void AuraEffect::HandleAuraModIncreaseEnergy(AuraApplication const* aurApp, uint
|
||||
//if (int32(PowerType) != GetMiscValue())
|
||||
// return;
|
||||
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + PowerType);
|
||||
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + PowerType);
|
||||
|
||||
target->HandleStatModifier(unitMod, TOTAL_VALUE, float(GetAmount()), apply);
|
||||
}
|
||||
@@ -4333,7 +4333,7 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurAp
|
||||
//if (int32(PowerType) != GetMiscValue())
|
||||
// return;
|
||||
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + PowerType);
|
||||
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + PowerType);
|
||||
float amount = float(GetAmount());
|
||||
|
||||
if (apply)
|
||||
|
||||
@@ -2382,7 +2382,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
}
|
||||
SpellSchools school = GetFirstSchoolInMask(schoolMask);
|
||||
// Flat mod from caster auras by spell school
|
||||
powerCost += caster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + school);
|
||||
powerCost += caster->GetInt32Value(static_cast<uint16>(UNIT_FIELD_POWER_COST_MODIFIER) + school);
|
||||
|
||||
// Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
|
||||
if (AttributesEx4 & SPELL_ATTR4_WEAPON_SPEED_COST_SCALING)
|
||||
@@ -2418,7 +2418,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
}
|
||||
|
||||
// PCT mod from user auras by school
|
||||
powerCost = int32(powerCost * (1.0f + caster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER + school)));
|
||||
powerCost = int32(powerCost * (1.0f + caster->GetFloatValue(static_cast<uint16>(UNIT_FIELD_POWER_COST_MULTIPLIER) + school)));
|
||||
if (powerCost < 0)
|
||||
powerCost = 0;
|
||||
return powerCost;
|
||||
|
||||
Reference in New Issue
Block a user