diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-12-13 14:43:12 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-12-13 14:43:12 -0300 |
commit | 78a1c687a25d91dd6b13251f28d03ec6a0a49b8a (patch) | |
tree | d141b1a90ade918ed52a8e6217206010756321e3 /src/server/game/Maps/Map.cpp | |
parent | 57c13c539b91ff939bb600f6902c29f640289057 (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)
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index f1af14e5b8d..369ecba1c30 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2975,7 +2975,7 @@ bool Map::CheckRespawn(RespawnInfo* info) ObjectGuid thisGUID = ObjectGuid((info->type == SPAWN_TYPE_GAMEOBJECT) ? HighGuid::GameObject : HighGuid::Unit, 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; @@ -3006,7 +3006,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; } } @@ -3179,7 +3179,7 @@ void Map::RemoveRespawnTime(RespawnVector& respawnData, bool doRespawn, SQLTrans void Map::ProcessRespawns() { - time_t now = time(NULL); + time_t now = time(nullptr); while (!_respawnTimes.empty()) { RespawnInfo* next = _respawnTimes.top(); @@ -3276,7 +3276,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; |