mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
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:
@@ -352,7 +352,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
// Shield Slam
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->GetCategory() == 1209)
|
||||
{
|
||||
uint8 level = m_caster->getLevel();
|
||||
uint8 level = m_caster->GetLevel();
|
||||
// xinef: shield block should increase the limit
|
||||
float limit = m_caster->HasAura(2565) ? 2.0f : 1.0f;
|
||||
uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f * limit), uint32(float(level) * 34.5f * limit));
|
||||
@@ -641,7 +641,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
// Shield of Righteousness
|
||||
if (m_spellInfo->SpellFamilyFlags[EFFECT_1] & 0x100000)
|
||||
{
|
||||
uint8 level = m_caster->getLevel();
|
||||
uint8 level = m_caster->GetLevel();
|
||||
uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 29.5f), uint32(float(level) * 34.5f));
|
||||
if (m_caster->GetAuraEffect(64882, EFFECT_0))
|
||||
block_value += 225;
|
||||
@@ -1911,15 +1911,15 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 9512: // Restore Energy
|
||||
level_diff = m_caster->getLevel() - 40;
|
||||
level_diff = m_caster->GetLevel() - 40;
|
||||
level_multiplier = 2;
|
||||
break;
|
||||
case 24571: // Blood Fury
|
||||
level_diff = m_caster->getLevel() - 60;
|
||||
level_diff = m_caster->GetLevel() - 60;
|
||||
level_multiplier = 10;
|
||||
break;
|
||||
case 24532: // Burst of Energy
|
||||
level_diff = m_caster->getLevel() - 60;
|
||||
level_diff = m_caster->GetLevel() - 60;
|
||||
level_multiplier = 4;
|
||||
break;
|
||||
case 31930: // Judgements of the Wise
|
||||
@@ -1981,7 +1981,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
for (std::set<uint32>::iterator itr = availableElixirs.begin(); itr != availableElixirs.end();)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(*itr);
|
||||
if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->getLevel())
|
||||
if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->GetLevel())
|
||||
availableElixirs.erase(itr++);
|
||||
else
|
||||
++itr;
|
||||
@@ -2817,7 +2817,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
// do not allow to add too many honor for player (50 * 21) = 1040 at level 70, or (50 * 31) = 1550 at level 80
|
||||
if (damage <= 50)
|
||||
{
|
||||
uint32 honor_reward = Acore::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
|
||||
uint32 honor_reward = Acore::Honor::hk_honor_at_level(unitTarget->GetLevel(), float(damage));
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, honor_reward, false);
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id {}) rewards {} honor points (scale) to player: {}",
|
||||
m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUID().ToString());
|
||||
@@ -3127,7 +3127,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
|
||||
// "kill" original creature
|
||||
creatureTarget->DespawnOrUnsummon();
|
||||
|
||||
uint8 level = (creatureTarget->getLevel() < (m_caster->getLevel() - 5)) ? (m_caster->getLevel() - 5) : creatureTarget->getLevel();
|
||||
uint8 level = (creatureTarget->GetLevel() < (m_caster->GetLevel() - 5)) ? (m_caster->GetLevel() - 5) : creatureTarget->GetLevel();
|
||||
|
||||
// prepare visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
|
||||
@@ -4181,7 +4181,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->GetFaction());
|
||||
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() + 1);
|
||||
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->GetLevel() + 1);
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
@@ -4391,7 +4391,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex)
|
||||
minLevel = 80;
|
||||
break;
|
||||
}
|
||||
if (minLevel && m_caster->getLevel() < minLevel)
|
||||
if (minLevel && m_caster->GetLevel() < minLevel)
|
||||
{
|
||||
SendCastResult(SPELL_FAILED_GLYPH_SOCKET_LOCKED);
|
||||
return;
|
||||
@@ -4648,7 +4648,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->GetLevel());
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
@@ -4922,7 +4922,7 @@ void Spell::EffectSkinning(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
Creature* creature = unitTarget->ToCreature();
|
||||
int32 targetLevel = creature->getLevel();
|
||||
int32 targetLevel = creature->GetLevel();
|
||||
|
||||
uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill();
|
||||
|
||||
@@ -5511,7 +5511,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
pGameObj->SetOwnerGUID(m_caster->GetGUID());
|
||||
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->GetLevel());
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
|
||||
ExecuteLogEffectSummonObject(effIndex, pGameObj);
|
||||
@@ -6015,7 +6015,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
caster = caster->ToTotem()->GetOwner();
|
||||
|
||||
// in another case summon new
|
||||
uint8 summonLevel = caster->getLevel();
|
||||
uint8 summonLevel = caster->GetLevel();
|
||||
|
||||
// level of pet summoned using engineering item based at engineering skill level
|
||||
if (m_CastItem && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -6113,7 +6113,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
summon->SetLevel(summonLevel);
|
||||
|
||||
// if summonLevel changed, set stats for calculated level
|
||||
if (summonLevel != caster->getLevel())
|
||||
if (summonLevel != caster->GetLevel())
|
||||
{
|
||||
((Guardian*)summon)->InitStatsForLevel(summonLevel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user