diff options
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/areatrigger_scripts.cpp | 9 | ||||
| -rw-r--r-- | src/server/scripts/World/duel_reset.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/World/go_scripts.cpp | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 72ae363c743..a3fb056ba8f 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -35,6 +35,7 @@ at_brewfest at_area_52_entrance EndContentData */ +#include "GameTime.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Player.h" @@ -314,7 +315,7 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript { uint32 triggerId = trigger->id; // Second trigger happened too early after first, skip for now - if (sWorld->GetGameTime() - _triggerTimes[triggerId] < AREATRIGGER_TALK_COOLDOWN) + if (GameTime::GetGameTime() - _triggerTimes[triggerId] < AREATRIGGER_TALK_COOLDOWN) return false; switch (triggerId) @@ -331,7 +332,7 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript break; } - _triggerTimes[triggerId] = sWorld->GetGameTime(); + _triggerTimes[triggerId] = GameTime::GetGameTime(); return false; } @@ -371,7 +372,7 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript return false; uint32 triggerId = trigger->id; - if (sWorld->GetGameTime() - _triggerTimes[trigger->id] < SUMMON_COOLDOWN) + if (GameTime::GetGameTime() - _triggerTimes[trigger->id] < SUMMON_COOLDOWN) return false; switch (triggerId) @@ -400,7 +401,7 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript player->SummonCreature(NPC_SPOTLIGHT, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000); player->AddAura(SPELL_A52_NEURALYZER, player); - _triggerTimes[trigger->id] = sWorld->GetGameTime(); + _triggerTimes[trigger->id] = GameTime::GetGameTime(); return false; } diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp index d792a1cb47f..3d8692780b6 100644 --- a/src/server/scripts/World/duel_reset.cpp +++ b/src/server/scripts/World/duel_reset.cpp @@ -15,6 +15,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "GameTime.h" #include "ScriptMgr.h" #include "Player.h" #include "Pet.h" @@ -103,7 +104,7 @@ class DuelResetScript : public PlayerScript // remove cooldowns on spells that have < 10 min CD > 30 sec and has no onHold player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool { - SpellHistory::Clock::time_point now = SpellHistory::Clock::now(); + SpellHistory::Clock::time_point now = GameTime::GetGameTimeSystemPoint(); uint32 cooldownDuration = itr->second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(itr->second.CooldownEnd - now).count() : 0; SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first); return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index e237b3d7286..ccdde9eb799 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -53,6 +53,7 @@ EndContentData */ #include "Player.h" #include "WorldSession.h" #include "GameEventMgr.h" +#include "GameTime.h" /*###### ## go_cat_figurine @@ -1644,7 +1645,7 @@ public: { if (eventId == GAME_EVENT_HOURLY_BELLS && start) { - time_t time = sWorld->GetGameTime(); + time_t time = GameTime::GetGameTime(); tm localTm; localtime_r(&time, &localTm); uint8 _rings = (localTm.tm_hour - 1) % 12 + 1; |
