Revert "Core/Misc: Replace time(NULL) with GameTime::GetGameTime()"
This reverts commit 5fe3a1f7f9.
This commit is contained in:
1 parent
4dc27b53eb
commit
c074c3a9c6
69 files changed
+258
-357
No files matched your search
@@ -21,7 +21,6 @@
|
||||
#include "Config.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridStates.h"
|
||||
#include "Group.h"
|
||||
@@ -106,7 +105,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
|
||||
resetTime = GetResetTimeFor(mapId, difficulty);
|
||||
else
|
||||
{
|
||||
resetTime = GameTime::GetGameTime() + 2 * HOUR;
|
||||
resetTime = time(nullptr) + 2 * HOUR;
|
||||
// normally this will be removed soon after in InstanceMap::Add, prevent error
|
||||
ScheduleReset(true, resetTime, InstResetEvent(0, mapId, difficulty, instanceId));
|
||||
}
|
||||
@@ -301,7 +300,7 @@ void InstanceSaveManager::LoadInstances()
|
||||
|
||||
void InstanceSaveManager::LoadResetTimes()
|
||||
{
|
||||
time_t now = GameTime::GetGameTime();
|
||||
time_t now = time(nullptr);
|
||||
time_t today = (now / DAY) * DAY;
|
||||
|
||||
// NOTE: Use DirectPExecute for tables that will be queried later
|
||||
@@ -512,12 +511,12 @@ void InstanceSaveManager::ForceGlobalReset(uint32 mapId, Difficulty difficulty)
|
||||
ScheduleReset(false, 0, InstResetEvent(1, mapId, difficulty, 0));
|
||||
ScheduleReset(false, 0, InstResetEvent(4, mapId, difficulty, 0));
|
||||
// force global reset on the instance
|
||||
_ResetOrWarnAll(mapId, difficulty, false, GameTime::GetGameTime());
|
||||
_ResetOrWarnAll(mapId, difficulty, false, time(nullptr));
|
||||
}
|
||||
|
||||
void InstanceSaveManager::Update()
|
||||
{
|
||||
time_t now = GameTime::GetGameTime();
|
||||
time_t now = time(nullptr);
|
||||
time_t t;
|
||||
|
||||
while (!m_resetTimeQueue.empty())
|
||||
@@ -634,7 +633,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
||||
return;
|
||||
TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->Name, mapid, uint8(difficulty), warn);
|
||||
|
||||
time_t now = GameTime::GetGameTime();
|
||||
time_t now = time(nullptr);
|
||||
|
||||
if (!warn)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user