mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Replaced time(NULL) on sGameTime.GetGameTime() this is used for better performance.
Original Timer.h divided into 2 parts. Shared project has no need to know about GameTime Singleton. 2 Identical structures with different types are now replaced with one generic templated structure and 2 typedefs. --HG-- branch : trunk
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "ScriptCalls.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Util.h"
|
||||
#include "TimeMgr.h"
|
||||
|
||||
bool WorldSession::processChatmessageFurtherAfterSecurityChecks(std::string& msg, uint32 lang)
|
||||
{
|
||||
@@ -166,7 +167,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||
|
||||
if (!_player->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
|
||||
std::string timeStr = secsToTimeString(m_muteTime - sGameTime.GetGameTime());
|
||||
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING),timeStr.c_str());
|
||||
return;
|
||||
}
|
||||
@@ -627,7 +628,7 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
||||
|
||||
if (!GetPlayer()->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
|
||||
std::string timeStr = secsToTimeString(m_muteTime - sGameTime.GetGameTime());
|
||||
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING),timeStr.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user