mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +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:
@@ -385,7 +385,7 @@ WorldLocation const* SpellScript::GetExplTargetDest()
|
||||
{
|
||||
if (m_spell->m_targets.HasDst())
|
||||
return m_spell->m_targets.GetDstPos();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SpellScript::SetExplTargetDest(WorldLocation& loc)
|
||||
@@ -418,7 +418,7 @@ Unit* SpellScript::GetHitUnit()
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->unitTarget;
|
||||
}
|
||||
@@ -428,12 +428,12 @@ Creature* SpellScript::GetHitCreature()
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
if (m_spell->unitTarget)
|
||||
return m_spell->unitTarget->ToCreature();
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Player* SpellScript::GetHitPlayer()
|
||||
@@ -441,12 +441,12 @@ Player* SpellScript::GetHitPlayer()
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
if (m_spell->unitTarget)
|
||||
return m_spell->unitTarget->ToPlayer();
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Item* SpellScript::GetHitItem()
|
||||
@@ -454,7 +454,7 @@ Item* SpellScript::GetHitItem()
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->itemTarget;
|
||||
}
|
||||
@@ -464,7 +464,7 @@ GameObject* SpellScript::GetHitGObj()
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->gameObjTarget;
|
||||
}
|
||||
@@ -474,7 +474,7 @@ WorldLocation* SpellScript::GetHitDest()
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->destTarget;
|
||||
}
|
||||
@@ -524,12 +524,12 @@ Aura* SpellScript::GetHitAura()
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
if (!m_spell->m_spellAura)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
if (m_spell->m_spellAura->IsRemoved())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return m_spell->m_spellAura;
|
||||
}
|
||||
|
||||
@@ -894,7 +894,7 @@ void AuraScript::EffectProcHandler::Call(AuraScript* auraScript, AuraEffect cons
|
||||
bool AuraScript::_Load(Aura* aura)
|
||||
{
|
||||
m_aura = aura;
|
||||
_PrepareScriptCall((AuraScriptHookType)SPELL_SCRIPT_STATE_LOADING, NULL);
|
||||
_PrepareScriptCall((AuraScriptHookType)SPELL_SCRIPT_STATE_LOADING, nullptr);
|
||||
bool load = Load();
|
||||
_FinishScriptCall();
|
||||
return load;
|
||||
@@ -1141,7 +1141,7 @@ Unit* AuraScript::GetTarget() const
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AuraApplication const* AuraScript::GetTargetApplication() const
|
||||
|
||||
Reference in New Issue
Block a user