mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 11:33:48 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user