mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
refactor(Core): NULL -> nullptr (#3275)
* NULL to nullptr * NULL to nullptr * NULL to nullptr * NULL to nullptr * NULL to nullptr Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com> Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
@@ -364,7 +364,7 @@ class spell_dk_death_and_decay : public SpellScriptLoader
|
||||
if (GetCaster() && GetTarget())
|
||||
{
|
||||
int32 basePoints0 = aurEff->GetAmount();
|
||||
GetCaster()->CastCustomSpell(GetTarget(), SPELL_DK_DEATH_AND_DECAY_TRIGGER, &basePoints0, NULL, NULL, true, 0, aurEff);
|
||||
GetCaster()->CastCustomSpell(GetTarget(), SPELL_DK_DEATH_AND_DECAY_TRIGGER, &basePoints0, nullptr, nullptr, true, 0, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ class spell_dk_blood_caked_blade : public SpellScriptLoader
|
||||
{
|
||||
if (soulFragments->GetStackAmount() >= 10)
|
||||
{
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE, true, NULL);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE, true, nullptr);
|
||||
soulFragments->Remove();
|
||||
}
|
||||
}
|
||||
@@ -780,7 +780,7 @@ class spell_dk_dancing_rune_weapon : public SpellScriptLoader
|
||||
|
||||
Unit* player = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
Unit* dancingRuneWeapon = NULL;
|
||||
Unit* dancingRuneWeapon = nullptr;
|
||||
for (Unit::ControlSet::const_iterator itr = player->m_Controlled.begin(); itr != player->m_Controlled.end(); ++itr)
|
||||
if (int32((*itr)->GetEntry()) == GetSpellInfo()->Effects[EFFECT_0].MiscValue)
|
||||
{
|
||||
@@ -1267,7 +1267,7 @@ class spell_dk_blood_gorged : public SpellScriptLoader
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_procTarget = NULL;
|
||||
_procTarget = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1345,14 +1345,14 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_target = NULL;
|
||||
_target = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CheckTarget(WorldObject*& target)
|
||||
{
|
||||
if (CorpseExplosionCheck(GetCaster()->GetGUID(), true)(target))
|
||||
target = NULL;
|
||||
target = nullptr;
|
||||
|
||||
_target = target;
|
||||
}
|
||||
@@ -1381,7 +1381,7 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
|
||||
if (effIndex == EFFECT_0)
|
||||
GetCaster()->CastCustomSpell(GetSpellInfo()->Effects[EFFECT_1].CalcValue(), SPELLVALUE_BASE_POINT0, GetEffectValue(), target, true);
|
||||
else if (effIndex == EFFECT_1)
|
||||
GetCaster()->CastCustomSpell(GetEffectValue(), SPELLVALUE_BASE_POINT0, GetSpell()->CalculateSpellDamage(EFFECT_0, NULL), target, true);
|
||||
GetCaster()->CastCustomSpell(GetEffectValue(), SPELLVALUE_BASE_POINT0, GetSpell()->CalculateSpellDamage(EFFECT_0, nullptr), target, true);
|
||||
}
|
||||
|
||||
void HandleCorpseExplosion(SpellEffIndex effIndex)
|
||||
@@ -1453,13 +1453,13 @@ class spell_dk_death_coil : public SpellScriptLoader
|
||||
if (caster->IsFriendlyTo(target))
|
||||
{
|
||||
int32 bp = int32(damage * 1.5f);
|
||||
caster->CastCustomSpell(target, SPELL_DK_DEATH_COIL_HEAL, &bp, NULL, NULL, true);
|
||||
caster->CastCustomSpell(target, SPELL_DK_DEATH_COIL_HEAL, &bp, nullptr, nullptr, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AuraEffect const* auraEffect = caster->GetAuraEffect(SPELL_DK_ITEM_SIGIL_VENGEFUL_HEART, EFFECT_1))
|
||||
damage += auraEffect->GetBaseAmount();
|
||||
caster->CastCustomSpell(target, SPELL_DK_DEATH_COIL_DAMAGE, &damage, NULL, NULL, true);
|
||||
caster->CastCustomSpell(target, SPELL_DK_DEATH_COIL_DAMAGE, &damage, nullptr, nullptr, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1693,7 +1693,7 @@ class spell_dk_death_pact : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targetList)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
Unit* target = nullptr;
|
||||
for (std::list<WorldObject*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
|
||||
{
|
||||
if (Unit* unit = (*itr)->ToUnit())
|
||||
@@ -1753,7 +1753,7 @@ class spell_dk_death_strike : public SpellScriptLoader
|
||||
// Improved Death Strike
|
||||
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, DK_ICON_ID_IMPROVED_DEATH_STRIKE, 0))
|
||||
AddPct(bp, caster->CalculateSpellDamage(caster, aurEff->GetSpellInfo(), 2));
|
||||
caster->CastCustomSpell(caster, SPELL_DK_DEATH_STRIKE_HEAL, &bp, NULL, NULL, false);
|
||||
caster->CastCustomSpell(caster, SPELL_DK_DEATH_STRIKE_HEAL, &bp, nullptr, nullptr, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2265,7 +2265,7 @@ class spell_dk_raise_dead : public SpellScriptLoader
|
||||
{
|
||||
// Don't add caster to target map, if we found a corpse to raise dead
|
||||
if (_corpse)
|
||||
target = NULL;
|
||||
target = nullptr;
|
||||
}
|
||||
|
||||
void ConsumeReagents()
|
||||
@@ -2292,7 +2292,7 @@ class spell_dk_raise_dead : public SpellScriptLoader
|
||||
SpellCastTargets targets;
|
||||
targets.SetDst(*GetHitUnit());
|
||||
|
||||
GetCaster()->CastSpell(targets, spellInfo, NULL, TRIGGERED_FULL_MASK, NULL, NULL, GetCaster()->GetGUID());
|
||||
GetCaster()->CastSpell(targets, spellInfo, NULL, TRIGGERED_FULL_MASK, nullptr, nullptr, GetCaster()->GetGUID());
|
||||
GetCaster()->ToPlayer()->RemoveSpellCooldown(GetSpellInfo()->Id, true);
|
||||
}
|
||||
|
||||
@@ -2429,7 +2429,7 @@ class spell_dk_scourge_strike : public SpellScriptLoader
|
||||
if (Unit *unitTarget = ObjectAccessor::GetUnit(*caster, guid))
|
||||
{
|
||||
int32 bp = GetHitDamage() * multiplier;
|
||||
caster->CastCustomSpell(unitTarget, SPELL_DK_SCOURGE_STRIKE_TRIGGERED, &bp, NULL, NULL, true);
|
||||
caster->CastCustomSpell(unitTarget, SPELL_DK_SCOURGE_STRIKE_TRIGGERED, &bp, nullptr, nullptr, true);
|
||||
|
||||
// Xinef: Shadowmourne hack (scourge strike trigger proc disabled...)
|
||||
if (roll_chance_i(75) && caster->FindMap() && !caster->FindMap()->IsBattlegroundOrArena() && caster->HasAura(71903) && !caster->HasAura(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF))
|
||||
@@ -2441,7 +2441,7 @@ class spell_dk_scourge_strike : public SpellScriptLoader
|
||||
{
|
||||
if (soulFragments->GetStackAmount() >= 10)
|
||||
{
|
||||
caster->CastSpell(caster, SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE, true, NULL);
|
||||
caster->CastSpell(caster, SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE, true, nullptr);
|
||||
soulFragments->Remove();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user