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
@@ -25,6 +25,7 @@
#include "Common.h"
#include "DatabaseEnv.h"
#include "DBCStores.h"
#include "GameTime.h"
#include "GridNotifiersImpl.h"
#include "Group.h"
#include "Guild.h"
@@ -213,7 +214,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (!sender->CanSpeak())
{
std::string timeStr = secsToTimeString(m_muteTime - time(nullptr));
std::string timeStr = secsToTimeString(m_muteTime - GameTime::GetGameTime());
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
recvData.rfinish(); // Prevent warnings
return;
@@ -753,7 +754,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData)
if (!GetPlayer()->CanSpeak())
{
std::string timeStr = secsToTimeString(m_muteTime - time(nullptr));
std::string timeStr = secsToTimeString(m_muteTime - GameTime::GetGameTime());
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
return;
}