aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 36220391e94..9e1a792e156 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -611,7 +611,7 @@ int32 SpellEffectInfo::CalcBaseValue(Unit const* caster, Unit const* target, uin
float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const
{
float multiplier = Amplitude;
- if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
+ if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_VALUE_MULTIPLIER, multiplier, spell);
return multiplier;
}
@@ -619,19 +619,19 @@ float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const
float SpellEffectInfo::CalcDamageMultiplier(Unit* caster, Spell* spell) const
{
float multiplierPercent = ChainAmplitude * 100.0f;
- if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
+ if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplierPercent, spell);
return multiplierPercent / 100.0f;
}
bool SpellEffectInfo::HasRadius() const
{
- return RadiusEntry != NULL;
+ return RadiusEntry != nullptr;
}
bool SpellEffectInfo::HasMaxRadius() const
{
- return MaxRadiusEntry != NULL;
+ return MaxRadiusEntry != nullptr;
}
float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
@@ -1101,10 +1101,10 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S
AttributesEx11 = _misc ? _misc->Attributes[11] : 0;
AttributesEx12 = _misc ? _misc->Attributes[12] : 0;
AttributesEx13 = _misc ? _misc->Attributes[13] : 0;
- CastTimeEntry = _misc ? (_misc->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(_misc->CastingTimeIndex) : NULL) : NULL;
- DurationEntry = _misc ? (_misc->DurationIndex ? sSpellDurationStore.LookupEntry(_misc->DurationIndex) : NULL) : NULL;
+ CastTimeEntry = _misc ? (_misc->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(_misc->CastingTimeIndex) : nullptr) : nullptr;
+ DurationEntry = _misc ? (_misc->DurationIndex ? sSpellDurationStore.LookupEntry(_misc->DurationIndex) : nullptr) : nullptr;
RangeIndex = _misc ? _misc->RangeIndex : 0;
- RangeEntry = _misc ? (_misc->RangeIndex ? sSpellRangeStore.LookupEntry(_misc->RangeIndex) : NULL) : NULL;
+ RangeEntry = _misc ? (_misc->RangeIndex ? sSpellRangeStore.LookupEntry(_misc->RangeIndex) : nullptr) : nullptr;
Speed = _misc ? _misc->Speed : 0;
LaunchDelay = _misc ? _misc->LaunchDelay : 0;
SchoolMask = _misc ? _misc->SchoolMask : 0;
@@ -1229,7 +1229,7 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S
for (uint8 i = 0; i < 2; ++i)
Totem[i] = _totem ? _totem->Totem[i] : 0;
- ChainEntry = NULL;
+ ChainEntry = nullptr;
ExplicitTargetMask = 0;
_spellSpecific = SPELL_SPECIFIC_NORMAL;
@@ -1827,7 +1827,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
return SPELL_CAST_OK;
bool actAsShifted = false;
- SpellShapeshiftFormEntry const* shapeInfo = NULL;
+ SpellShapeshiftFormEntry const* shapeInfo = nullptr;
if (form > 0)
{
shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
@@ -3656,7 +3656,7 @@ int32 SpellInfo::GetMaxDuration() const
return (DurationEntry->MaxDuration == -1) ? -1 : abs(DurationEntry->MaxDuration);
}
-uint32 SpellInfo::CalcCastTime(uint8 level, Spell* spell /*= NULL*/) const
+uint32 SpellInfo::CalcCastTime(uint8 level, Spell* spell /*= nullptr*/) const
{
int32 castTime = 0;
if (CastTimeEntry)
@@ -4044,7 +4044,7 @@ float SpellInfo::CalcProcPPM(Unit* caster, int32 itemLevel) const
bool SpellInfo::IsRanked() const
{
- return ChainEntry != NULL;
+ return ChainEntry != nullptr;
}
uint8 SpellInfo::GetRank() const
@@ -4064,21 +4064,21 @@ SpellInfo const* SpellInfo::GetFirstRankSpell() const
SpellInfo const* SpellInfo::GetLastRankSpell() const
{
if (!ChainEntry)
- return NULL;
+ return nullptr;
return ChainEntry->last;
}
SpellInfo const* SpellInfo::GetNextRankSpell() const
{
if (!ChainEntry)
- return NULL;
+ return nullptr;
return ChainEntry->next;
}
SpellInfo const* SpellInfo::GetPrevRankSpell() const
{
if (!ChainEntry)
- return NULL;
+ return nullptr;
return ChainEntry->prev;
}
@@ -4110,7 +4110,7 @@ SpellInfo const* SpellInfo::GetAuraRankForLevel(uint8 level) const
if (!needRankSelection)
return this;
- for (SpellInfo const* nextSpellInfo = this; nextSpellInfo != NULL; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
+ for (SpellInfo const* nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
{
// if found appropriate level
if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
@@ -4120,7 +4120,7 @@ SpellInfo const* SpellInfo::GetAuraRankForLevel(uint8 level) const
}
// not found
- return NULL;
+ return nullptr;
}
bool SpellInfo::IsRankOf(SpellInfo const* spellInfo) const