diff options
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 43b82be7723..2c989718bff 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2977,7 +2977,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(nullptr); + time_t now = GameTime::GetGameTime(); time_t respawnTime; if (linkedTime == std::numeric_limits<time_t>::max()) respawnTime = linkedTime; @@ -3008,7 +3008,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(nullptr) + urand(4, 7); + info->respawnTime = GameTime::GetGameTime() + urand(4, 7); return false; } } @@ -3181,7 +3181,7 @@ void Map::RemoveRespawnTime(RespawnVector& respawnData, bool doRespawn, SQLTrans void Map::ProcessRespawns() { - time_t now = time(nullptr); + time_t now = GameTime::GetGameTime(); while (!_respawnTimes.empty()) { RespawnInfo* next = _respawnTimes.top(); @@ -3278,7 +3278,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(nullptr)) + if (respawnTime && respawnTime > GameTime::GetGameTime()) { if (!force && !ignoreRespawn) continue; @@ -3734,7 +3734,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) // increase current instances (hourly limit) if (!group || !group->isLFGGroup()) - player->AddInstanceEnterTime(GetInstanceId(), time(nullptr)); + player->AddInstanceEnterTime(GetInstanceId(), GameTime::GetGameTime()); // get or create an instance save for the map InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); @@ -4506,7 +4506,7 @@ Corpse* Map::ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia /*= void Map::RemoveOldCorpses() { - time_t now = time(nullptr); + time_t now = GameTime::GetGameTime(); std::vector<ObjectGuid> corpses; corpses.reserve(_corpsesByPlayer.size()); |