Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)

This reverts commit 51b8773528.
This commit is contained in:
Nefertumm
2019-02-15 15:14:49 -03:00
committed by GitHub
parent 23e7ae6a2f
commit c15206fc15
108 changed files with 509 additions and 933 deletions

View File

@@ -23,7 +23,6 @@
#include "Vehicle.h"
#include "VMapFactory.h"
#include "LFGMgr.h"
#include "GameTime.h"
#include "Chat.h"
#ifdef ELUNA
#include "LuaEngine.h"
@@ -2649,7 +2648,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
// increase current instances (hourly limit)
// xinef: specific instances are still limited
if (!group || !group->isLFGGroup() || !group->IsLfgRandomInstance())
player->AddInstanceEnterTime(GetInstanceId(), GameTime::GetGameTime());
player->AddInstanceEnterTime(GetInstanceId(), time(NULL));
if (!playerBind->perm && !mapSave->CanReset() && (!group || !group->isLFGGroup() || !group->IsLfgRandomInstance()))
{
@@ -2995,7 +2994,7 @@ void Map::SaveCreatureRespawnTime(uint32 dbGuid, time_t& respawnTime)
return;
}
time_t now = GameTime::GetGameTime();
time_t now = time(NULL);
if (GetInstanceResetPeriod() > 0 && respawnTime-now+5 >= GetInstanceResetPeriod())
respawnTime = now+YEAR;
@@ -3029,7 +3028,7 @@ void Map::SaveGORespawnTime(uint32 dbGuid, time_t& respawnTime)
return;
}
time_t now = GameTime::GetGameTime();
time_t now = time(NULL);
if (GetInstanceResetPeriod() > 0 && respawnTime-now+5 >= GetInstanceResetPeriod())
respawnTime = now+YEAR;