mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "blackrock_depths.h"
|
||||
#include "GameTime.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -154,7 +155,7 @@ public:
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
time_t now = time(nullptr);
|
||||
time_t now = GameTime::GetGameTime().count();
|
||||
if (instance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || instance->GetData(TYPE_RING_OF_LAW) == DONE)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "GameTime.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "blackrock_depths.h"
|
||||
|
||||
#define MAX_ENCOUNTER 6
|
||||
constexpr auto MAX_ENCOUNTER = 6;
|
||||
|
||||
enum Timers
|
||||
{
|
||||
@@ -462,7 +463,7 @@ public:
|
||||
{
|
||||
TempSummonGrimstone->RemoveFromWorld();
|
||||
TempSummonGrimstone = nullptr;
|
||||
timeRingFail = time(nullptr);
|
||||
timeRingFail = GameTime::GetGameTime().count();
|
||||
}
|
||||
SetData(TYPE_RING_OF_LAW, NOT_STARTED);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user