aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-12-13 14:43:12 -0300
committerfunjoker <funjoker109@gmail.com>2021-03-15 20:17:31 +0100
commit88ae43fa516ec5b195bfb9047a6c140541fcab72 (patch)
treed5fdee5c82191df5ab65504f1119b54aefd0b1cc /src/server/game/Maps/Map.cpp
parent72f99531b7cdfad1c3fca02d32e88f4ac2662043 (diff)
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)
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp8
1 files changed, 4 insertions, 4 deletions
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<HighGuid::Creature>(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<time_t>::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;