aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2019-07-01 21:36:32 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-13 00:42:20 +0100
commit4e6c59dca78ce563c327ea3106d0ff6786b1e127 (patch)
tree11baa861d6e0eda35d4d73feba91a79c1bae788d /src/server/game/Spells/SpellInfo.cpp
parentb8d675eba761a5616c7d69a78851ea61af61f4f6 (diff)
Core/Unit: rename several getters to follow codestyle
uint8 GetLevel() uint8 GetLevelForTarget(WorldObject const* /*target*/) void SetLevel(uint8 lvl) uint8 GetRace() uint32 GetRaceMask() uint8 GetClass() uint32 GetClassMask() uint8 GetGender() (cherry picked from commit 5c09ff51f7015b775def8d5cc1f678eaef37200f)
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 4b1db88eb4f..21fab92e836 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -485,7 +485,7 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster /*= nullptr*/, int32
{
if (casterUnit && basePointsPerLevel != 0.0f)
{
- int32 level = int32(casterUnit->getLevel());
+ int32 level = int32(casterUnit->GetLevel());
if (level > int32(_spellInfo->MaxLevel) && _spellInfo->MaxLevel > 0)
level = int32(_spellInfo->MaxLevel);
@@ -518,9 +518,9 @@ int32 SpellEffectInfo::CalcBaseValue(WorldObject const* caster, Unit const* targ
{
uint32 level = _spellInfo->SpellLevel;
if (target && _spellInfo->IsPositiveEffect(EffectIndex) && (Effect == SPELL_EFFECT_APPLY_AURA))
- level = target->getLevel();
+ level = target->GetLevel();
else if (caster && caster->IsUnit())
- level = caster->ToUnit()->getLevel();
+ level = caster->ToUnit()->GetLevel();
if (_spellInfo->BaseLevel && !_spellInfo->HasAttribute(SPELL_ATTR11_SCALES_WITH_ITEM_LEVEL) && _spellInfo->HasAttribute(SPELL_ATTR10_USE_SPELL_BASE_LEVEL_FOR_SCALING))
level = _spellInfo->BaseLevel;
@@ -589,7 +589,7 @@ int32 SpellEffectInfo::CalcBaseValue(WorldObject const* caster, Unit const* targ
if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(contentTuningId))
expansion = contentTuning->ExpansionID;
- int32 level = caster && caster->IsUnit() ? int32(caster->ToUnit()->getLevel()) : 1;
+ int32 level = caster && caster->IsUnit() ? int32(caster->ToUnit()->GetLevel()) : 1;
value = sDB2Manager.EvaluateExpectedStat(stat, level, expansion, 0, CLASS_NONE) * BasePoints / 100.0f;
}
@@ -641,7 +641,7 @@ float SpellEffectInfo::CalcRadius(WorldObject* caster /*= nullptr*/, Spell* spel
if (caster)
{
if (Unit* casterUnit = caster->ToUnit())
- radius += entry->RadiusPerLevel * casterUnit->getLevel();
+ radius += entry->RadiusPerLevel * casterUnit->GetLevel();
radius = std::min(radius, entry->RadiusMax);
@@ -3977,7 +3977,7 @@ Optional<SpellPowerCost> SpellInfo::CalcPowerCost(SpellPowerEntry const* power,
if (HasAttribute(SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION))
{
GtNpcManaCostScalerEntry const* spellScaler = sNpcManaCostScalerGameTable.GetRow(SpellLevel);
- GtNpcManaCostScalerEntry const* casterScaler = sNpcManaCostScalerGameTable.GetRow(unitCaster->getLevel());
+ GtNpcManaCostScalerEntry const* casterScaler = sNpcManaCostScalerGameTable.GetRow(unitCaster->GetLevel());
if (spellScaler && casterScaler)
powerCost *= casterScaler->Scaler / spellScaler->Scaler;
}
@@ -4128,7 +4128,7 @@ float SpellInfo::CalcProcPPM(Unit* caster, int32 itemLevel) const
}
case SPELL_PPM_MOD_CLASS:
{
- if (caster->getClassMask() & mod->Param)
+ if (caster->GetClassMask() & mod->Param)
ppm *= 1.0f + mod->Coeff;
break;
}
@@ -4141,7 +4141,7 @@ float SpellInfo::CalcProcPPM(Unit* caster, int32 itemLevel) const
}
case SPELL_PPM_MOD_RACE:
{
- if (caster->getRaceMask() & mod->Param)
+ if (caster->GetRaceMask() & mod->Param)
ppm *= 1.0f + mod->Coeff;
break;
}