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

@@ -141,7 +141,7 @@ public:
{
if (param == ACTION_START_FIGHT)
{
Creature* cr = NULL;
Creature* cr = nullptr;
for (int i = 0; i < 3; ++i)
{
@@ -285,7 +285,7 @@ public:
if (Unit* coren = me->ToTempSummon()->GetSummoner())
return coren->ToCreature();
return NULL;
return nullptr;
}
void JustDied(Unit*)
@@ -436,7 +436,7 @@ public:
{
if (Aura* aur = player->GetAura(SPELL_RAM_AURA))
{
int32 diff = aur->GetApplyTime() - (time(NULL)-(HOUR*18)+spellCooldown);
int32 diff = aur->GetApplyTime() - (time(nullptr)-(HOUR*18)+spellCooldown);
if (diff > 10) // aura applied later
return;
@@ -844,7 +844,7 @@ public:
bool AllowStart()
{
time_t curtime = time(NULL);
time_t curtime = time(nullptr);
tm strDate;
ACE_OS::localtime_r(&curtime, &strDate);
@@ -1113,7 +1113,7 @@ public:
if (timer >= 500)
{
timer = 0;
Player* player = NULL;
Player* player = nullptr;
acore::AnyPlayerInObjectRangeCheck checker(me, 2.0f);
acore::PlayerSearcher<acore::AnyPlayerInObjectRangeCheck> searcher(me, player, checker);
me->VisitNearbyWorldObject(2.0f, searcher);
@@ -1471,7 +1471,7 @@ public:
if (item && player->AddItem(item, 1)) // ensure filled keg is stored
{
player->DestroyItemCount(itemCaster->GetEntry(), 1, true);
GetSpell()->m_CastItem = NULL;
GetSpell()->m_CastItem = nullptr;
GetSpell()->m_castItemGUID = 0;
}
}
@@ -1538,7 +1538,7 @@ public:
if (item && player->AddItem(item, 1)) // ensure filled keg is stored
{
player->DestroyItemCount(itemCaster->GetEntry(), 1, true);
GetSpell()->m_CastItem = NULL;
GetSpell()->m_CastItem = nullptr;
GetSpell()->m_castItemGUID = 0;
}
}
@@ -1584,7 +1584,7 @@ public:
if (!caster)
return;
WorldObject* target = NULL;
WorldObject* target = nullptr;
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
if (caster->HasInLine((*itr), 2.0f))
{
@@ -1613,7 +1613,7 @@ public:
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Creature* cr = NULL;
Creature* cr = nullptr;
Unit* caster = GetCaster();
if (!caster)
return;