Core/Misc: fixed more deprecation warnings
This commit is contained in:
1 parent
083fb2da32
commit
d6801c5dc4
9 files changed
+31
-36
No files matched your search
@@ -4762,8 +4762,8 @@ void Unit::UpdateResistanceBuffModsMod(SpellSchools school)
|
||||
modPos *= factor;
|
||||
modNeg *= factor;
|
||||
|
||||
SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + school, modPos);
|
||||
SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + school, modNeg);
|
||||
SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + AsUnderlyingType(school), modPos);
|
||||
SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + AsUnderlyingType(school), modNeg);
|
||||
}
|
||||
|
||||
void Unit::InitStatBuffMods()
|
||||
@@ -4829,8 +4829,8 @@ void Unit::UpdateStatBuffMod(Stats stat)
|
||||
modPos *= factor;
|
||||
modNeg *= factor;
|
||||
|
||||
SetFloatValue(UNIT_FIELD_POSSTAT0 + stat, modPos);
|
||||
SetFloatValue(UNIT_FIELD_NEGSTAT0 + stat, modNeg);
|
||||
SetFloatValue(UNIT_FIELD_POSSTAT0 + AsUnderlyingType(stat), modPos);
|
||||
SetFloatValue(UNIT_FIELD_NEGSTAT0 + AsUnderlyingType(stat), modNeg);
|
||||
}
|
||||
|
||||
void Unit::_RegisterDynObject(DynamicObject* dynObj)
|
||||
@@ -6681,7 +6681,7 @@ float Unit::SpellCritChanceDone(SpellInfo const* spellInfo, SpellSchoolMask scho
|
||||
crit_chance = 0.0f;
|
||||
// For other schools
|
||||
else if (GetTypeId() == TYPEID_PLAYER)
|
||||
crit_chance = GetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1 + GetFirstSchoolInMask(schoolMask));
|
||||
crit_chance = GetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1 + uint32(GetFirstSchoolInMask(schoolMask)));
|
||||
else
|
||||
{
|
||||
crit_chance = (float)m_baseSpellCritChance;
|
||||
@@ -8219,7 +8219,7 @@ float Unit::GetPowerRegen(Powers powerType, bool isInCombat) const
|
||||
|
||||
uint32 Unit::GetAttackTime(WeaponAttackType att) const
|
||||
{
|
||||
float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME + att) / m_modAttackSpeedPct[att];
|
||||
float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME + AsUnderlyingType(att)) / m_modAttackSpeedPct[att];
|
||||
return (uint32)f_BaseAttackTime;
|
||||
}
|
||||
|
||||
@@ -10579,7 +10579,7 @@ void ApplyPercentModFloatVar(float& var, float val, bool apply)
|
||||
|
||||
void Unit::ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
|
||||
{
|
||||
float amount = GetFloatValue(UNIT_FIELD_BASEATTACKTIME + att);
|
||||
float amount = GetFloatValue(UNIT_FIELD_BASEATTACKTIME + AsUnderlyingType(att));
|
||||
float hasteAmount = GetTypeId() == TYPEID_PLAYER ? GetFloatValue(PLAYER_FIELD_MOD_HASTE) : 0.f;
|
||||
float rangedHasteAmount = GetTypeId() == TYPEID_PLAYER ? GetFloatValue(PLAYER_FIELD_MOD_RANGED_HASTE) : 0.f;
|
||||
|
||||
@@ -10611,7 +10611,7 @@ void Unit::ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply
|
||||
}
|
||||
}
|
||||
|
||||
SetFloatValue(UNIT_FIELD_BASEATTACKTIME + att, amount);
|
||||
SetFloatValue(UNIT_FIELD_BASEATTACKTIME + AsUnderlyingType(att), amount);
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user