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

@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "GameTime.h"
#include "Log.h"
#include "Opcodes.h"
#include "Player.h"
@@ -38,7 +39,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
LOG_DEBUG("network.opcode", "Player 1 is: %s (%s)", player->GetGUID().ToString().c_str(), player->GetName().c_str());
LOG_DEBUG("network.opcode", "Player 2 is: %s (%s)", target->GetGUID().ToString().c_str(), target->GetName().c_str());
time_t now = time(nullptr);
time_t now = GameTime::GetGameTime().count();
player->duel->StartTime = now + 3;
target->duel->StartTime = now + 3;