From 88ae43fa516ec5b195bfb9047a6c140541fcab72 Mon Sep 17 00:00:00 2001 From: ariel- Date: Wed, 13 Dec 2017 14:43:12 -0300 Subject: Core/Misc: minor typo and codestyle fixes - Replace NULL uses in new code with nullptr - Fix wrong (accumulated) load time log when loading calendar invites - Make Creature::CanRegenerateHealth const as its just a getter - Mark OnlyOnceAreaTriggerScript::OnTrigger as final in case someone wants to override that (you are supposed to use protected _OnTrigger hook) (cherry picked from commit 78a1c687a25d91dd6b13251f28d03ec6a0a49b8a) --- src/server/game/Maps/Map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/Maps/Map.cpp') diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 230ebc374c7..b40cf3a5deb 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3300,7 +3300,7 @@ bool Map::CheckRespawn(RespawnInfo* info) : ObjectGuid::Create(GetId(), info->entry, info->spawnId); if (time_t linkedTime = GetLinkedRespawnTime(thisGUID)) { - time_t now = time(NULL); + time_t now = time(nullptr); time_t respawnTime; if (linkedTime == std::numeric_limits::max()) respawnTime = linkedTime; @@ -3331,7 +3331,7 @@ bool Map::CheckRespawn(RespawnInfo* info) { if (!sScriptMgr->CanSpawn(info->spawnId, info->entry, sObjectMgr->GetCreatureData(info->spawnId), this)) { // if a script blocks our respawn, schedule next check in a little bit - info->respawnTime = time(NULL) + urand(4, 7); + info->respawnTime = time(nullptr) + urand(4, 7); return false; } } @@ -3504,7 +3504,7 @@ void Map::RemoveRespawnTime(RespawnVector& respawnData, bool doRespawn, Characte void Map::ProcessRespawns() { - time_t now = time(NULL); + time_t now = time(nullptr); while (!_respawnTimes.empty()) { RespawnInfo* next = _respawnTimes.top(); @@ -3601,7 +3601,7 @@ bool Map::SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn, bool force, std::v continue; time_t respawnTime = GetRespawnTime(data->type, data->spawnId); - if (respawnTime && respawnTime > time(NULL)) + if (respawnTime && respawnTime > time(nullptr)) { if (!force && !ignoreRespawn) continue; -- cgit v1.2.3