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
|
|
@ -43,6 +43,7 @@ EndContentData */
|
|||
|
||||
#include "CellImpl.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
|
@ -1414,7 +1415,7 @@ class go_inconspicuous_landmark : public GameObjectScript
|
|||
public:
|
||||
go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark")
|
||||
{
|
||||
_lastUsedTime = time(nullptr);
|
||||
_lastUsedTime = GameTime::GetGameTime().count();
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/) override
|
||||
|
|
@ -1422,10 +1423,10 @@ public:
|
|||
if (player->HasItemCount(ITEM_CUERGOS_KEY))
|
||||
return true;
|
||||
|
||||
if (_lastUsedTime > time(nullptr))
|
||||
if (_lastUsedTime > GameTime::GetGameTime().count())
|
||||
return true;
|
||||
|
||||
_lastUsedTime = time(nullptr) + MINUTE;
|
||||
_lastUsedTime = GameTime::GetGameTime().count() + MINUTE;
|
||||
player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue