mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "GameTime.h"
|
||||
#include "Log.h"
|
||||
#include "MapMgr.h"
|
||||
#include "NPCHandler.h"
|
||||
@@ -81,9 +82,11 @@ void WorldSession::HandleQueryTimeOpcode(WorldPacket& /*recvData*/)
|
||||
|
||||
void WorldSession::SendQueryTimeResponse()
|
||||
{
|
||||
auto timeResponse = sWorld->GetNextDailyQuestsResetTime() - GameTime::GetGameTime();
|
||||
|
||||
WorldPacket data(SMSG_QUERY_TIME_RESPONSE, 4 + 4);
|
||||
data << uint32(time(nullptr));
|
||||
data << uint32(sWorld->GetNextDailyQuestsResetTime() - time(nullptr));
|
||||
data << uint32(GameTime::GetGameTime().count());
|
||||
data << uint32(timeResponse.count());
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user