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

@@ -123,10 +123,10 @@ class spell_item_mind_amplify_dish : public SpellScript
return;
if (GetSpellInfo()->Id != SPELL_AMPLIFY_10S)
if (target->getLevel() > 60)
if (target->GetLevel() > 60)
return;
uint8 pct = std::max(0, 20 + player->getLevel() - target->getLevel());
uint8 pct = std::max(0, 20 + player->GetLevel() - target->GetLevel());
if (roll_chance_i(pct))
player->CastSpell(target, SPELL_MENTAL_BATTLE, true);
else if (roll_chance_i(pct))
@@ -156,7 +156,7 @@ class spell_item_runescroll_of_fortitude : public SpellScript
if (Unit* target = GetHitUnit())
{
if (target->getLevel() < 70)
if (target->GetLevel() < 70)
return;
target->CastSpell(target, SPELL_FORTITUDE, true);
@@ -264,7 +264,7 @@ class spell_item_with_mount_speed : public AuraScript
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
if (target->getLevel() <= 70)
if (target->GetLevel() <= 70)
{
if (auto spellId = getMountSpellId())
{
@@ -297,9 +297,9 @@ class spell_item_magic_dust : public SpellScript
{
if (Unit* target = GetHitUnit())
{
if (target->getLevel() >= 30)
if (target->GetLevel() >= 30)
{
uint8 chance = 100 - std::min<uint8>(100, target->getLevel() - 30 * urand(3, 10));
uint8 chance = 100 - std::min<uint8>(100, target->GetLevel() - 30 * urand(3, 10));
if (!roll_chance_i(chance))
{
PreventHitAura();
@@ -1362,7 +1362,7 @@ class spell_item_arcane_shroud : public AuraScript
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
int32 diff = GetUnitOwner()->getLevel() - 60;
int32 diff = GetUnitOwner()->GetLevel() - 60;
if (diff > 0)
amount += 2 * diff;
}
@@ -2142,7 +2142,7 @@ class spell_item_scroll_of_recall : public SpellScript
break;
}
if (caster->getLevel() > maxSafeLevel)
if (caster->GetLevel() > maxSafeLevel)
{
caster->CastSpell(caster, SPELL_LOST, true);
@@ -2508,7 +2508,7 @@ class spell_item_the_eye_of_diminution : public AuraScript
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
int32 diff = GetUnitOwner()->getLevel() - 60;
int32 diff = GetUnitOwner()->GetLevel() - 60;
if (diff > 0)
amount += diff;
}
@@ -3745,7 +3745,7 @@ class spell_item_green_whelp_armor : public AuraScript
bool CheckProc(ProcEventInfo& eventInfo)
{
if (eventInfo.GetActor() && eventInfo.GetActor()->getLevel() <= 50)
if (eventInfo.GetActor() && eventInfo.GetActor()->GetLevel() <= 50)
return true;
return false;