aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 7545aa100ad..3f5b679afb9 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -3133,7 +3133,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(nullptr);
+ time_t now = GameTime::GetGameTime();
time_t respawnTime;
if (linkedTime == std::numeric_limits<time_t>::max())
respawnTime = linkedTime;
@@ -3164,7 +3164,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;
}
}
@@ -3337,7 +3337,7 @@ void Map::RemoveRespawnTime(RespawnVector& respawnData, bool doRespawn, Characte
void Map::ProcessRespawns()
{
- time_t now = time(nullptr);
+ time_t now = GameTime::GetGameTime();
while (!_respawnTimes.empty())
{
RespawnInfo* next = _respawnTimes.top();
@@ -3434,7 +3434,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;
@@ -3897,7 +3897,7 @@ bool InstanceMap::AddPlayerToMap(Player* player, bool initPlayer /*= true*/)
// 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());
@@ -4756,7 +4756,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());