feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
parent
12da792a90
commit
8b7df23f06
129 changed files with 1147 additions and 817 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue