mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "Chat.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "Common.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
@@ -297,7 +298,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
|
||||
if (!_player->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - time(nullptr));
|
||||
std::string timeStr = secsToTimeString(m_muteTime - GameTime::GetGameTime().count());
|
||||
SendNotification(GetAcoreString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
|
||||
return;
|
||||
}
|
||||
@@ -729,7 +730,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().count());
|
||||
SendNotification(GetAcoreString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user