refactor(Core/Object): getLevel() -> GetLevel() (#14122)

* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
This commit is contained in:
Kitzunu
2022-12-31 17:39:23 +01:00
committed by GitHub
parent 089ce9eb41
commit 4870b14b1f
78 changed files with 326 additions and 314 deletions

View File

@@ -2396,7 +2396,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
if (m_auraScaleMask && ihit->effectMask == m_auraScaleMask && m_caster != target)
{
SpellInfo const* auraSpell = m_spellInfo->GetFirstRankSpell();
if (uint32(target->getLevel() + 10) >= auraSpell->SpellLevel)
if (uint32(target->GetLevel() + 10) >= auraSpell->SpellLevel)
ihit->scaleAura = true;
}
@@ -2419,7 +2419,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
if (m_auraScaleMask && targetInfo.effectMask == m_auraScaleMask && m_caster != target)
{
SpellInfo const* auraSpell = m_spellInfo->GetFirstRankSpell();
if (uint32(target->getLevel() + 10) >= auraSpell->SpellLevel)
if (uint32(target->GetLevel() + 10) >= auraSpell->SpellLevel)
targetInfo.scaleAura = true;
}
@@ -3105,7 +3105,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
int32 basePoints[3];
if (scaleAura)
{
aurSpellInfo = m_spellInfo->GetAuraRankForLevel(unitTarget->getLevel());
aurSpellInfo = m_spellInfo->GetAuraRankForLevel(unitTarget->GetLevel());
ASSERT(aurSpellInfo);
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
@@ -6097,7 +6097,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!learn_spellproto)
return SPELL_FAILED_NOT_KNOWN;
if (m_spellInfo->SpellLevel > pet->getLevel())
if (m_spellInfo->SpellLevel > pet->GetLevel())
return SPELL_FAILED_LOWLEVEL;
break;
@@ -6119,7 +6119,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!learn_spellproto)
return SPELL_FAILED_NOT_KNOWN;
if (m_spellInfo->SpellLevel > pet->getLevel())
if (m_spellInfo->SpellLevel > pet->GetLevel())
return SPELL_FAILED_LOWLEVEL;
}
break;
@@ -6240,7 +6240,7 @@ SpellCastResult Spell::CheckCast(bool strict)
uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill();
int32 skillValue = m_caster->ToPlayer()->GetSkillValue(skill);
int32 TargetLevel = m_targets.GetUnitTarget()->getLevel();
int32 TargetLevel = m_targets.GetUnitTarget()->GetLevel();
int32 ReqValue = (skillValue < 100 ? (TargetLevel - 10) * 10 : TargetLevel * 5);
if (ReqValue > skillValue)
return SPELL_FAILED_LOW_CASTLEVEL;
@@ -6619,7 +6619,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_CANT_BE_CHARMED;
int32 damage = CalculateSpellDamage(i, target);
if (damage && int32(target->getLevel()) > damage)
if (damage && int32(target->GetLevel()) > damage)
return SPELL_FAILED_HIGHLEVEL;
}
@@ -7886,7 +7886,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
if (target->GetCharmerGUID())
return false;
if (int32 damage = CalculateSpellDamage(eff, target))
if ((int32)target->getLevel() > damage)
if ((int32)target->GetLevel() > damage)
return false;
break;
default:
@@ -7958,7 +7958,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
return false;
if (m_caster->ToPlayer()->GetSession()->GetRecruiterId() != target->ToPlayer()->GetSession()->GetAccountId() && target->ToPlayer()->GetSession()->IsARecruiter())
return false;
if (target->ToPlayer()->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
if (target->ToPlayer()->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
return false;
break;
default: // normal case