mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +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:
@@ -105,9 +105,9 @@ void MapInstanced::UnloadAll()
|
||||
Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player)
|
||||
{
|
||||
if (GetId() != mapId || !player)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Map* map = NULL;
|
||||
Map* map = nullptr;
|
||||
|
||||
if (IsBattlegroundOrArena())
|
||||
{
|
||||
@@ -115,7 +115,7 @@ Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player)
|
||||
// the instance id is set in battlegroundid
|
||||
uint32 newInstanceId = player->GetBattlegroundId();
|
||||
if (!newInstanceId)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
map = sMapMgr->FindMap(mapId, newInstanceId);
|
||||
if (!map)
|
||||
@@ -126,7 +126,7 @@ Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player)
|
||||
else
|
||||
{
|
||||
player->TeleportToEntryPoint();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player)
|
||||
else if (IsSharedDifficultyMap(mapId) && !map->HavePlayers() && map->GetDifficulty() != realdiff)
|
||||
{
|
||||
if (player->isBeingLoaded()) // pussywizard: crashfix (assert(passengers.empty) fail in ~transport), could be added to a transport during loading from db
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (!map->AllTransportsEmpty())
|
||||
map->AllTransportsRemovePassengers(); // pussywizard: gameobjects / summons (assert(passengers.empty) fail in ~transport)
|
||||
|
||||
Reference in New Issue
Block a user