diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 9 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 5 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 7e406b86635..812cc20a971 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -22,6 +22,7 @@ */ #include "Player.h" +#include "GameTime.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -234,7 +235,7 @@ class spell_dru_eclipse : public SpellScriptLoader if (!spellInfo || !(spellInfo->SpellFamilyFlags[0] & 4)) // Starfire return false; - return _solarProcCooldownEnd <= std::chrono::steady_clock::now(); + return _solarProcCooldownEnd <= GameTime::GetGameTimeSteadyPoint(); } bool CheckLunar(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) @@ -247,14 +248,14 @@ class spell_dru_eclipse : public SpellScriptLoader if (!roll_chance_i(60)) return false; - return _lunarProcCooldownEnd <= std::chrono::steady_clock::now(); + return _lunarProcCooldownEnd <= GameTime::GetGameTimeSteadyPoint(); } void ProcSolar(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); - _solarProcCooldownEnd = std::chrono::steady_clock::now() + Seconds(30); + _solarProcCooldownEnd = GameTime::GetGameTimeSteadyPoint() + Seconds(30); eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_DRUID_ECLIPSE_SOLAR_PROC, TRIGGERED_FULL_MASK, nullptr, aurEff); } @@ -262,7 +263,7 @@ class spell_dru_eclipse : public SpellScriptLoader { PreventDefaultAction(); - _lunarProcCooldownEnd = std::chrono::steady_clock::now() + Seconds(30); + _lunarProcCooldownEnd = GameTime::GetGameTimeSteadyPoint() + Seconds(30); eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_DRUID_ECLIPSE_LUNAR_PROC, TRIGGERED_FULL_MASK, nullptr, aurEff); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index effb3fb9b5c..0a5890f4a5d 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -23,6 +23,7 @@ */ #include "ScriptMgr.h" +#include "GameTime.h" #include "Battleground.h" #include "Cell.h" #include "CellImpl.h" @@ -3570,7 +3571,7 @@ class spell_gen_turkey_marker : public SpellScriptLoader void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { // store stack apply times, so we can pop them while they expire - _applyTimes.push_back(getMSTime()); + _applyTimes.push_back(GameTime::GetGameTimeMS()); Unit* target = GetTarget(); // on stack 15 cast the achievement crediting spell @@ -3584,7 +3585,7 @@ class spell_gen_turkey_marker : public SpellScriptLoader return; // pop stack if it expired for us - if (_applyTimes.front() + GetMaxDuration() < getMSTime()) + if (_applyTimes.front() + GetMaxDuration() < GameTime::GetGameTimeMS()) ModStackAmount(-1, AURA_REMOVE_BY_EXPIRE); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 6dc6681a7a1..20d632b3c2a 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -22,6 +22,7 @@ */ #include "Player.h" +#include "GameTime.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -1988,7 +1989,7 @@ class spell_pal_sacred_shield_dummy : public SpellScriptLoader if (!caster) return; - std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); + std::chrono::steady_clock::time_point now = GameTime::GetGameTimeSteadyPoint(); if (_cooldownEnd > now) return; |
