refactor(Core): replace NULL with nullptr (#4593)

This commit is contained in:
Kitzunu
2021-03-02 01:34:20 +01:00
committed by GitHub
parent dbefa17a53
commit 28f1dc5c0c
231 changed files with 923 additions and 923 deletions

View File

@@ -463,7 +463,7 @@ void Battlefield::SendWarningToAllInZone(uint32 entry)
{
if (Unit* unit = ObjectAccessor::FindUnit(StalkerGuid))
if (Creature* stalker = unit->ToCreature())
sCreatureTextMgr->SendChat(stalker, (uint8)entry, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
sCreatureTextMgr->SendChat(stalker, (uint8)entry, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
}
void Battlefield::SendWarningToPlayer(Player* player, uint32 entry)

View File

@@ -98,7 +98,7 @@ public:
virtual void SendChangePhase();
bool SetCapturePointData(GameObject* capturePoint);
GameObject* GetCapturePointGo() { return ObjectAccessor::GetObjectInWorld(m_capturePoint, (GameObject*)NULL); }
GameObject* GetCapturePointGo() { return ObjectAccessor::GetObjectInWorld(m_capturePoint, (GameObject*)nullptr); }
GameObject* GetCapturePointGo(WorldObject* obj) { return ObjectAccessor::GetGameObject(*obj, m_capturePoint); }
TeamId GetTeamId() { return m_team; }

View File

@@ -373,7 +373,7 @@ public:
bool SetupBattlefield() override;
/// Return pointer to relic object
GameObject* GetRelic() { return ObjectAccessor::GetObjectInWorld(m_titansRelic, (GameObject*)NULL); }
GameObject* GetRelic() { return ObjectAccessor::GetObjectInWorld(m_titansRelic, (GameObject*)nullptr); }
/// Define relic object
//void SetRelic(GameObject* relic) { m_titansRelic = relic; }
@@ -1136,11 +1136,11 @@ struct BfWGGameObjectBuilding
break;
}
GameObject* go = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL);
GameObject* go = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr);
if (go)
{
// Rebuild gameobject
go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true);
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]);
}
@@ -1190,7 +1190,7 @@ struct BfWGGameObjectBuilding
{
// Inform the global wintergrasp script of the destruction of this object
case BATTLEFIELD_WG_OBJECTTYPE_TOWER:
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL));
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr));
break;
case BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST:
m_WG->SetRelicInteractible(true);
@@ -1202,7 +1202,7 @@ struct BfWGGameObjectBuilding
case BATTLEFIELD_WG_OBJECTTYPE_DOOR:
case BATTLEFIELD_WG_OBJECTTYPE_WALL:
case BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER:
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL));
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr));
break;
}
@@ -1247,7 +1247,7 @@ struct BfWGGameObjectBuilding
{
case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT:
case BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT:
gobj->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
gobj->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true);
break;
case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY:
case BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY:
@@ -1379,7 +1379,7 @@ struct BfWGGameObjectBuilding
void UpdateTurretAttack(bool disable)
{
GameObject* build = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL);
GameObject* build = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr);
if (!build)
return;