feat(Core/Time): Implement saparated manager for game time (#8630)

This commit is contained in:
Kargatum
2022-01-24 17:55:00 +07:00
committed by GitHub
parent 12da792a90
commit 8b7df23f06
129 changed files with 1147 additions and 817 deletions

View File

@@ -16,6 +16,7 @@
*/
#include "AccountMgr.h"
#include "GameTime.h"
#include "MapMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
@@ -31,7 +32,7 @@ void Player::UpdateSpeakTime(uint32 specialMessageLimit)
if (!AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()))
return;
time_t current = time (nullptr);
time_t current = GameTime::GetGameTime().count();
if (m_speakTime > current)
{
uint32 max_count = specialMessageLimit ? specialMessageLimit : sWorld->getIntConfig(CONFIG_CHATFLOOD_MESSAGE_COUNT);