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

@@ -19,6 +19,7 @@
#include "Creature.h"
#include "CreatureAI.h"
#include "CreatureGroups.h"
#include "GameTime.h"
#include "MapMgr.h"
#include "MoveSpline.h"
#include "MoveSplineInit.h"
@@ -316,7 +317,7 @@ void FlightPathMovementGenerator::DoFinalize(Player* player)
// this prevent cheating with landing point at lags
// when client side flight end early in comparison server side
player->StopMoving();
player->SetFallInformation(time(nullptr), player->GetPositionZ());
player->SetFallInformation(GameTime::GetGameTime().count(), player->GetPositionZ());
}
player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK);
@@ -409,7 +410,7 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
if (i_currentNode >= i_path.size() - 1)
{
player->CleanupAfterTaxiFlight();
player->SetFallInformation(time(nullptr), player->GetPositionZ());
player->SetFallInformation(GameTime::GetGameTime().count(), player->GetPositionZ());
if (player->pvpInfo.IsHostile)
player->CastSpell(player, 2479, true);