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:
Kitzunu
2020-08-31 11:55:09 +02:00
committed by GitHub
parent 38903b5dfb
commit 1f89282b22
325 changed files with 2348 additions and 2348 deletions

View File

@@ -726,7 +726,7 @@ class spell_kaelthas_kael_phase_two : public SpellScriptLoader
if (GetCaster()->GetTypeId() == TYPEID_UNIT)
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
if (Creature* kael = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(NPC_KAELTHAS)))
kael->AI()->SummonedCreatureDies(GetCaster()->ToCreature(), NULL);
kael->AI()->SummonedCreatureDies(GetCaster()->ToCreature(), nullptr);
return true;
}

View File

@@ -201,7 +201,7 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* target = GetHitUnit())
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, NULL, NULL, GetCaster()->GetGUID());
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, nullptr, nullptr, GetCaster()->GetGUID());
}
void Register()

View File

@@ -81,7 +81,7 @@ class instance_mechanar : public InstanceMapScript
if (Player* player = itr->GetSource())
if (player->GetPositionX() < x && player->GetPositionZ() > 24.0f && player->GetPositionY() > -30.0f)
return player;
return NULL;
return nullptr;
}
void DoSummonAction(Creature* summon, Player* player)

View File

@@ -168,7 +168,7 @@ class npc_millhouse_manastorm : public CreatureScript
break;
case EVENT_SEARCH_FIGHT:
if (!me->IsInCombat() && !me->IsInEvadeMode())
if (Unit* target = me->SelectNearbyTarget(NULL, 30.0f))
if (Unit* target = me->SelectNearbyTarget(nullptr, 30.0f))
AttackStart(target);
events2.ScheduleEvent(EVENT_SEARCH_FIGHT, 1000);
break;

View File

@@ -150,7 +150,7 @@ class spell_botanica_shift_form : public SpellScriptLoader
{
if (SpellInfo const* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo())
{
if ((spellInfo->GetSchoolMask() & _lastSchool) && _swapTime > time(NULL))
if ((spellInfo->GetSchoolMask() & _lastSchool) && _swapTime > time(nullptr))
return false;
uint32 form = 0;
@@ -166,7 +166,7 @@ class spell_botanica_shift_form : public SpellScriptLoader
if (form)
{
_swapTime = time(NULL) + 6;
_swapTime = time(nullptr) + 6;
_lastSchool = spellInfo->GetSchoolMask();
GetUnitOwner()->RemoveAurasDueToSpell(_lastForm);
_lastForm = form;