Core/Misc: Replace time(NULL) with GameTime::GetGameTime()

(ported commit: 12701cb0c6c45eb105ad449eb9a56e76d84d691e)
This commit is contained in:
Ovahlord committed 2019-07-08 12:19:19 +02:00
1 parent ba38f74816
commit 5fe3a1f7f9
68 files changed
+335 -259

No files matched your search

+3 -2
View File
@@ -24,6 +24,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "GameTime.h"
#include "GameEventMgr.h"
#include "Language.h"
#include "Player.h"
@@ -116,8 +117,8 @@ public:
std::string endTimeStr = TimeToTimestampStr(eventData.end);
uint32 delay = sGameEventMgr->NextCheck(eventId);
time_t nextTime = time(nullptr) + delay;
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(nullptr) + delay) : "-";
time_t nextTime = GameTime::GetGameTime() + delay;
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(GameTime::GetGameTime() + delay) : "-";
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE);
std::string lengthStr = secsToTimeString(eventData.length * MINUTE);