mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(Core/Unit): -Wdeprecated-enum-enum-conversion warning (#6868)
This commit is contained in:
@@ -290,7 +290,7 @@ void Player::UpdateMaxHealth()
|
||||
|
||||
void Player::UpdateMaxPower(Powers power)
|
||||
{
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + power);
|
||||
|
||||
float bonusPower = (power == POWER_MANA && GetCreatePowers(power) > 0) ? GetManaBonusFromIntellect() : 0;
|
||||
|
||||
@@ -799,7 +799,7 @@ void Player::UpdateSpellCritChance(uint32 school)
|
||||
void Player::UpdateArmorPenetration(int32 amount)
|
||||
{
|
||||
// Store Rating Value
|
||||
SetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + CR_ARMOR_PENETRATION, amount);
|
||||
SetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + static_cast<uint16>(CR_ARMOR_PENETRATION), amount);
|
||||
}
|
||||
|
||||
void Player::UpdateMeleeHitChances()
|
||||
@@ -1002,7 +1002,7 @@ void Creature::UpdateMaxHealth()
|
||||
|
||||
void Creature::UpdateMaxPower(Powers power)
|
||||
{
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + power);
|
||||
|
||||
float value = GetTotalAuraModValue(unitMod);
|
||||
SetMaxPower(power, uint32(value));
|
||||
@@ -1202,7 +1202,7 @@ void Guardian::UpdateMaxHealth()
|
||||
|
||||
void Guardian::UpdateMaxPower(Powers power)
|
||||
{
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + power);
|
||||
|
||||
float addValue = (power == POWER_MANA) ? std::max<float>(GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT), 0.0f) : 0.0f;
|
||||
float multiplicator = 15.0f;
|
||||
|
||||
Reference in New Issue
Block a user