diff options
Diffstat (limited to 'src/server/game/Instances/InstanceSaveMgr.cpp')
-rw-r--r-- | src/server/game/Instances/InstanceSaveMgr.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index d8681c08f65..0028b9f38a8 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -82,20 +82,20 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance if (!entry) { TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId); - return NULL; + return nullptr; } if (instanceId == 0) { TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId); - return NULL; + return nullptr; } DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(difficulty); if (!difficultyEntry || difficultyEntry->InstanceType != entry->InstanceType) { TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty); - return NULL; + return nullptr; } if (entranceId && !sObjectMgr->GetWorldSafeLoc(entranceId)) @@ -112,7 +112,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance resetTime = GetResetTimeFor(mapId, difficulty); else { - resetTime = time(NULL) + 2 * HOUR; + resetTime = time(nullptr) + 2 * HOUR; // normally this will be removed soon after in InstanceMap::Add, prevent error ScheduleReset(true, resetTime, InstResetEvent(0, mapId, difficulty, instanceId)); } @@ -131,7 +131,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance InstanceSave* InstanceSaveManager::GetInstanceSave(uint32 InstanceId) { InstanceSaveHashMap::iterator itr = m_instanceSaveById.find(InstanceId); - return itr != m_instanceSaveById.end() ? itr->second : NULL; + return itr != m_instanceSaveById.end() ? itr->second : nullptr; } void InstanceSaveManager::DeleteInstanceFromDB(uint32 instanceid) @@ -312,7 +312,7 @@ void InstanceSaveManager::LoadInstances() void InstanceSaveManager::LoadResetTimes() { - time_t now = time(NULL); + time_t now = time(nullptr); time_t today = (now / DAY) * DAY; // NOTE: Use DirectPExecute for tables that will be queried later @@ -531,7 +531,7 @@ void InstanceSaveManager::ForceGlobalReset(uint32 mapId, Difficulty difficulty) void InstanceSaveManager::Update() { - time_t now = time(NULL); + time_t now = time(nullptr); time_t t; while (!m_resetTimeQueue.empty()) @@ -648,7 +648,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b return; TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->MapName[sWorld->GetDefaultDbcLocale()], mapid, uint8(difficulty), warn); - time_t now = time(NULL); + time_t now = time(nullptr); if (!warn) { |