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
committerccrs <ccrs@users.noreply.github.com>2019-07-01 21:36:32 +0200
commit401777d024785c58f90947cfdadd9b1b7d8fbd3b (patch)
tree6a04418719d5fdaa519258a601a91ce073d1444b /src/server/game/Spells/SpellInfo.cpp
parente9004f9c905247f2240c3ca6e168bf9b858bf380 (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()
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index b8c3d17b1e1..9a3e8bc445b 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -408,7 +408,7 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster /*= nullptr*/, int32
// base amount modification based on spell lvl vs caster lvl
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);
else if (level < int32(_spellInfo->BaseLevel))
@@ -451,7 +451,7 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster /*= nullptr*/, int32
{
// amount multiplication based on caster's level
if (!casterUnit->IsControlledByPlayer() &&
- _spellInfo->SpellLevel && _spellInfo->SpellLevel != casterUnit->getLevel() &&
+ _spellInfo->SpellLevel && _spellInfo->SpellLevel != casterUnit->GetLevel() &&
!basePointsPerLevel && _spellInfo->HasAttribute(SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION))
{
bool canEffectScale = false;
@@ -495,7 +495,7 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster /*= nullptr*/, int32
if (canEffectScale)
{
GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(_spellInfo->SpellLevel - 1);
- GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(casterUnit->getLevel() - 1);
+ GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(casterUnit->GetLevel() - 1);
if (spellScaler && casterScaler)
value *= casterScaler->ratio / spellScaler->ratio;
}
@@ -545,7 +545,7 @@ float SpellEffectInfo::CalcRadius(WorldObject* caster /*= nullptr*/, Spell* spel
if (caster)
{
if (Unit* casterUnit = caster->ToUnit())
- radius += RadiusEntry->RadiusPerLevel * casterUnit->getLevel();
+ radius += RadiusEntry->RadiusPerLevel * casterUnit->GetLevel();
radius = std::min(radius, RadiusEntry->RadiusMax);
@@ -3221,7 +3221,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
if (HasAttribute(SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION))
{
GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1);
- GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(unitCaster->getLevel() - 1);
+ GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(unitCaster->GetLevel() - 1);
if (spellScaler && casterScaler)
powerCost *= casterScaler->ratio / spellScaler->ratio;
}