diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-07-18 17:48:15 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-14 19:39:42 +0200 |
commit | 3418a33a87cba1ed5cedc7de35e799cddb546d4f (patch) | |
tree | 5d110f1d8255a6ebc5a4e459e3ed8756d1835a67 | |
parent | ab5792a33a42dea6f0ddfbf358b6e29571f4fb2a (diff) |
Misc: Pass std::chrono types by value everywhere.
(cherry picked from commit 2ef9d301f0869b443122e2ba543af054c5b0e53c)
21 files changed, 39 insertions, 38 deletions
diff --git a/src/common/Utilities/EventMap.cpp b/src/common/Utilities/EventMap.cpp index c12b212e686..3f6a92869bf 100644 --- a/src/common/Utilities/EventMap.cpp +++ b/src/common/Utilities/EventMap.cpp @@ -33,7 +33,7 @@ void EventMap::SetPhase(uint8 phase) _phase = uint8(1 << (phase - 1)); } -void EventMap::ScheduleEvent(uint32 eventId, Milliseconds const& minTime, Milliseconds const& maxTime, uint32 group /*= 0*/, uint8 phase /*= 0*/) +void EventMap::ScheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group /*= 0*/, uint8 phase /*= 0*/) { ScheduleEvent(eventId, urand(uint32(minTime.count()), uint32(maxTime.count())), group, phase); } @@ -49,7 +49,7 @@ void EventMap::ScheduleEvent(uint32 eventId, uint32 time, uint32 group /*= 0*/, _eventMap.insert(EventStore::value_type(_time + time, eventId)); } -void EventMap::RescheduleEvent(uint32 eventId, Milliseconds const& minTime, Milliseconds const& maxTime, uint32 group /*= 0*/, uint8 phase /*= 0*/) +void EventMap::RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group /*= 0*/, uint8 phase /*= 0*/) { RescheduleEvent(eventId, urand(uint32(minTime.count()), uint32(maxTime.count())), group, phase); } diff --git a/src/common/Utilities/EventMap.h b/src/common/Utilities/EventMap.h index 2ec9194901d..ddbb742e851 100644 --- a/src/common/Utilities/EventMap.h +++ b/src/common/Utilities/EventMap.h @@ -120,7 +120,7 @@ public: * @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group. * @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases. */ - void ScheduleEvent(uint32 eventId, Milliseconds const& time, uint32 group = 0, uint8 phase = 0) + void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group = 0, uint8 phase = 0) { ScheduleEvent(eventId, uint32(time.count()), group, phase); } @@ -134,7 +134,7 @@ public: * @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group. * @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases. */ - void ScheduleEvent(uint32 eventId, Milliseconds const& minTime, Milliseconds const& maxTime, uint32 group = 0, uint8 phase = 0); + void ScheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint8 phase = 0); /** * @name ScheduleEvent @@ -154,7 +154,7 @@ public: * @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group. * @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases. */ - void RescheduleEvent(uint32 eventId, Milliseconds const& time, uint32 group = 0, uint8 phase = 0) + void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group = 0, uint8 phase = 0) { RescheduleEvent(eventId, uint32(time.count()), group, phase); } @@ -168,7 +168,7 @@ public: * @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group. * @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases. */ - void RescheduleEvent(uint32 eventId, Milliseconds const& minTime, Milliseconds const& maxTime, uint32 group = 0, uint8 phase = 0); + void RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint8 phase = 0); /** * @name RescheduleEvent @@ -189,7 +189,7 @@ public: * @brief Repeats the mostly recently executed event. * @param time Time until in milliseconds as std::chrono::duration the event occurs. */ - void Repeat(Milliseconds const& time) + void Repeat(Milliseconds time) { Repeat(uint32(time.count())); } @@ -210,7 +210,7 @@ public: * @param minTime Minimum time as std::chrono::duration until the event occurs. * @param maxTime Maximum time as std::chrono::duration until the event occurs. */ - void Repeat(Milliseconds const& minTime, Milliseconds const& maxTime) + void Repeat(Milliseconds minTime, Milliseconds maxTime) { Repeat(uint32(minTime.count()), uint32(maxTime.count())); } @@ -235,7 +235,7 @@ public: * @brief Delays all events in the map. If delay is greater than or equal internal timer, delay will be 0. * @param delay Amount of delay in ms as std::chrono::duration. */ - void DelayEvents(Milliseconds const& delay) + void DelayEvents(Milliseconds delay) { DelayEvents(uint32(delay.count())); } @@ -256,7 +256,7 @@ public: * @param delay Amount of delay in ms as std::chrono::duration. * @param group Group of the events. */ - void DelayEvents(Milliseconds const& delay, uint32 group) + void DelayEvents(Milliseconds delay, uint32 group) { DelayEvents(uint32(delay.count()), group); } diff --git a/src/common/Utilities/EventProcessor.h b/src/common/Utilities/EventProcessor.h index 591db59b935..7072e9001cd 100644 --- a/src/common/Utilities/EventProcessor.h +++ b/src/common/Utilities/EventProcessor.h @@ -77,7 +77,7 @@ class TC_COMMON_API EventProcessor void Update(uint32 p_time); void KillAllEvents(bool force); void AddEvent(BasicEvent* event, uint64 e_time, bool set_addtime = true); - void AddEventAtOffset(BasicEvent* event, Milliseconds const& offset) { AddEvent(event, CalculateTime(offset.count())); } + void AddEventAtOffset(BasicEvent* event, Milliseconds offset) { AddEvent(event, CalculateTime(offset.count())); } void ModifyEventTime(BasicEvent* event, uint64 newTime); uint64 CalculateTime(uint64 t_offset) const { return m_time + t_offset; } std::multimap<uint64, BasicEvent*> const& GetEvents() const { return m_events; } diff --git a/src/common/Utilities/Random.cpp b/src/common/Utilities/Random.cpp index 44931a5e71f..028163f7456 100644 --- a/src/common/Utilities/Random.cpp +++ b/src/common/Utilities/Random.cpp @@ -62,7 +62,7 @@ float frand(float min, float max) return float(GetRng()->Random() * (max - min) + min); } -Milliseconds randtime(Milliseconds const& min, Milliseconds const& max) +Milliseconds randtime(Milliseconds min, Milliseconds max) { long long diff = max.count() - min.count(); ASSERT(diff >= 0); diff --git a/src/common/Utilities/Random.h b/src/common/Utilities/Random.h index 8175de9b1f1..2f6d105fad1 100644 --- a/src/common/Utilities/Random.h +++ b/src/common/Utilities/Random.h @@ -35,7 +35,7 @@ TC_COMMON_API uint32 urandms(uint32 min, uint32 max); TC_COMMON_API uint32 rand32(); /* Return a random time in the range min..max (up to millisecond precision). Only works for values where millisecond difference is a valid uint32. */ -TC_COMMON_API Milliseconds randtime(Milliseconds const& min, Milliseconds const& max); +TC_COMMON_API Milliseconds randtime(Milliseconds min, Milliseconds max); /* Return a random number in the range min..max */ TC_COMMON_API float frand(float min, float max); diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 7237deb2493..4783d67f6dc 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -802,7 +802,7 @@ void AuctionHouseMgr::Update() ++itr; } - _playerThrottleObjectsCleanupTime = now + Hours(1); + _playerThrottleObjectsCleanupTime = now + 1h; } } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index ef6c5385fda..2ca94a09e97 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2271,7 +2271,7 @@ void Creature::Respawn(bool force) } -void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds const& forceRespawnTimer) +void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer) { if (timeMSToDespawn) { @@ -2323,7 +2323,7 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds const& forceRespawn } } -void Creature::DespawnOrUnsummon(uint32 msTimeToDespawn /*= 0*/, Seconds const& forceRespawnTimer /*= 0*/) +void Creature::DespawnOrUnsummon(uint32 msTimeToDespawn /*= 0*/, Seconds forceRespawnTimer /*= 0*/) { if (TempSummon* summon = ToTempSummon()) summon->UnSummon(msTimeToDespawn); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 8cec597febc..9c53daa0efb 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -258,8 +258,8 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma void RemoveCorpse(bool setSpawnTime = true, bool destroyForNearbyPlayers = true); - void DespawnOrUnsummon(uint32 msTimeToDespawn = 0, Seconds const& forceRespawnTime = Seconds(0)); - void DespawnOrUnsummon(Milliseconds const& time, Seconds const& forceRespawnTime = Seconds(0)) { DespawnOrUnsummon(uint32(time.count()), forceRespawnTime); } + void DespawnOrUnsummon(uint32 msTimeToDespawn = 0, Seconds forceRespawnTime = 0s); + void DespawnOrUnsummon(Milliseconds time, Seconds forceRespawnTime = 0s) { DespawnOrUnsummon(uint32(time.count()), forceRespawnTime); } time_t const& GetRespawnTime() const { return m_respawnTime; } time_t GetRespawnTimeEx() const; @@ -423,7 +423,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma bool CanAlwaysSee(WorldObject const* obj) const override; private: - void ForcedDespawn(uint32 timeMSToDespawn = 0, Seconds const& forceRespawnTimer = Seconds(0)); + void ForcedDespawn(uint32 timeMSToDespawn = 0, Seconds forceRespawnTimer = 0s); bool CheckNoGrayAggroConfig(uint32 playerLevel, uint32 creatureLevel) const; // No aggro from gray creatures // Waypoint path @@ -468,7 +468,7 @@ class TC_GAME_API AssistDelayEvent : public BasicEvent class TC_GAME_API ForcedDespawnDelayEvent : public BasicEvent { public: - ForcedDespawnDelayEvent(Creature& owner, Seconds const& respawnTimer) : BasicEvent(), m_owner(owner), m_respawnTimer(respawnTimer) { } + ForcedDespawnDelayEvent(Creature& owner, Seconds respawnTimer) : BasicEvent(), m_owner(owner), m_respawnTimer(respawnTimer) { } bool Execute(uint64 e_time, uint32 p_time) override; private: diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index f5b649ad4fd..c85374bd4be 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -965,7 +965,7 @@ void GameObject::AddUniqueUse(Player* player) m_unique_users.insert(player->GetGUID()); } -void GameObject::DespawnOrUnsummon(Milliseconds const& delay, Seconds const& forceRespawnTime) +void GameObject::DespawnOrUnsummon(Milliseconds delay, Seconds forceRespawnTime) { if (delay > 0ms) { diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index d16120e0edc..fd06e490ec9 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -164,7 +164,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject> void SetSpawnedByDefault(bool b) { m_spawnedByDefault = b; } uint32 GetRespawnDelay() const { return m_respawnDelayTime; } void Refresh(); - void DespawnOrUnsummon(Milliseconds const& delay = 0ms, Seconds const& forceRespawnTime = 0s); + void DespawnOrUnsummon(Milliseconds delay = 0ms, Seconds forceRespawnTime = 0s); void Delete(); void SendGameObjectDespawn(); void getFishLoot(Loot* loot, Player* loot_owner); diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 874d45ea7c5..b194f96f8c0 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -542,7 +542,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation Scenario* GetScenario() const; TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, uint32 vehId = 0, uint32 spellId = 0, ObjectGuid privateObjectOwner = ObjectGuid::Empty); - TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType, Milliseconds const& despawnTime, uint32 vehId = 0, uint32 spellId = 0, ObjectGuid privateObjectOwner = ObjectGuid::Empty) { return SummonCreature(entry, pos, despawnType, uint32(despawnTime.count()), vehId, spellId, privateObjectOwner); } + TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType, Milliseconds despawnTime, uint32 vehId = 0, uint32 spellId = 0, ObjectGuid privateObjectOwner = ObjectGuid::Empty) { return SummonCreature(entry, pos, despawnType, uint32(despawnTime.count()), vehId, spellId, privateObjectOwner); } TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, ObjectGuid privateObjectOwner = ObjectGuid::Empty); GameObject* SummonGameObject(uint32 entry, Position const& pos, QuaternionData const& rot, uint32 respawnTime /* s */, GOSummonType summonType = GO_SUMMON_TIMED_OR_CORPSE_DESPAWN); GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, QuaternionData const& rot, uint32 respawnTime /* s */); diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index 1df8b5705db..bfc4b226679 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -41,6 +41,7 @@ ScriptReloadMgr* ScriptReloadMgr::instance() #include "Config.h" #include "GitRevision.h" #include "CryptoHash.h" +#include "Duration.h" #include "Log.h" #include "MPSCQueue.h" #include "Regex.h" @@ -1035,7 +1036,7 @@ private: // Wait for the current build job to finish, if the job finishes in time // evaluate it and continue with the next one. if (_build_job->GetProcess()->GetFutureResult(). - wait_for(std::chrono::seconds(0)) == std::future_status::ready) + wait_for(0s) == std::future_status::ready) ProcessReadyBuildJob(); else return; // Return when the job didn't finish in time diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 628c455a0fc..328f2c394d6 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -893,13 +893,13 @@ void WorldSession::ProcessQueryCallbacks() _queryProcessor.ProcessReadyCallbacks(); _transactionCallbacks.ProcessReadyCallbacks(); - if (_realmAccountLoginCallback.valid() && _realmAccountLoginCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready && - _accountLoginCallback.valid() && _accountLoginCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready) + if (_realmAccountLoginCallback.valid() && _realmAccountLoginCallback.wait_for(0s) == std::future_status::ready && + _accountLoginCallback.valid() && _accountLoginCallback.wait_for(0s) == std::future_status::ready) InitializeSessionCallback(static_cast<LoginDatabaseQueryHolder*>(_realmAccountLoginCallback.get()), static_cast<CharacterDatabaseQueryHolder*>(_accountLoginCallback.get())); //! HandlePlayerLoginOpcode - if (_charLoginCallback.valid() && _charLoginCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready) + if (_charLoginCallback.valid() && _charLoginCallback.wait_for(0s) == std::future_status::ready) HandlePlayerLogin(reinterpret_cast<LoginQueryHolder*>(_charLoginCallback.get())); if (_charEnumCallback.valid() && _charEnumCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index e242c33318e..ec17cde281a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -167,7 +167,7 @@ public: void SetupGroundPhase() { events.SetPhase(PHASE_GROUND); - events.ScheduleEvent(EVENT_CLEAVE, Seconds(0), Seconds(15), GROUP_GROUND); + events.ScheduleEvent(EVENT_CLEAVE, 0s, Seconds(15), GROUP_GROUND); events.ScheduleEvent(EVENT_TAIL_SWEEP, Seconds(4), Seconds(23), GROUP_GROUND); events.ScheduleEvent(EVENT_BELLOWING_ROAR, Seconds(48), GROUP_GROUND); events.ScheduleEvent(EVENT_CHARRED_EARTH, Seconds(12), Seconds(18), GROUP_GROUND); diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 29136983d52..907cc91cac1 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -386,12 +386,12 @@ public: _assassinCount = 6; _guardianCount = 2; _venomancerCount = 2; - events.ScheduleEvent(EVENT_DARTER, Seconds(0), 0, PHASE_SUBMERGE); + events.ScheduleEvent(EVENT_DARTER, 0s, 0, PHASE_SUBMERGE); break; } _petCount = _guardianCount + _venomancerCount; if (_assassinCount) - events.ScheduleEvent(EVENT_ASSASSIN, Seconds(0), 0, PHASE_SUBMERGE); + events.ScheduleEvent(EVENT_ASSASSIN, 0s, 0, PHASE_SUBMERGE); if (_guardianCount) events.ScheduleEvent(EVENT_GUARDIAN, Seconds(4), 0, PHASE_SUBMERGE); if (_venomancerCount) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 2f1d0566a0f..31da40234b9 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -103,7 +103,7 @@ class boss_faerlina : public CreatureScript summons.DoZoneInCombat(); events.ScheduleEvent(EVENT_POISON, randtime(Seconds(10), Seconds(15))); events.ScheduleEvent(EVENT_FIRE, randtime(Seconds(6), Seconds(18))); - events.ScheduleEvent(EVENT_FRENZY, Minutes(1)+randtime(Seconds(0), Seconds(20))); + events.ScheduleEvent(EVENT_FRENZY, Minutes(1)+randtime(0s, Seconds(20))); } void Reset() override @@ -173,7 +173,7 @@ class boss_faerlina : public CreatureScript { DoCast(SPELL_FRENZY); Talk(EMOTE_FRENZY); - events.Repeat(Minutes(1) + randtime(Seconds(0), Seconds(20))); + events.Repeat(Minutes(1) + randtime(0s, Seconds(20))); } break; } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 5ff54b70d8b..21bad632cb8 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -528,7 +528,7 @@ class boss_gothik : public CreatureScript break; case EVENT_RESUME_ATTACK: me->SetReactState(REACT_AGGRESSIVE); - events.ScheduleEvent(EVENT_BOLT, Seconds(0), 0, PHASE_TWO); + events.ScheduleEvent(EVENT_BOLT, 0s, 0, PHASE_TWO); // return to the start of this method so victim side etc is re-evaluated return UpdateAI(0u); // tail recursion for efficiency case EVENT_BOLT: diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index 0c8154f4a33..5e366113a6e 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -182,7 +182,7 @@ class boss_sapphiron : public CreatureScript me->CastSpell(me, SPELL_FROST_AURA, true); events.SetPhase(PHASE_GROUND); - events.ScheduleEvent(EVENT_CHECK_RESISTS, Seconds(0)); + events.ScheduleEvent(EVENT_CHECK_RESISTS, 0s); events.ScheduleEvent(EVENT_BERSERK, Minutes(15)); EnterPhaseGround(true); } @@ -207,7 +207,7 @@ class boss_sapphiron : public CreatureScript void MovementInform(uint32 /*type*/, uint32 id) override { if (id == 1) - events.ScheduleEvent(EVENT_LIFTOFF, Seconds(0), 0, PHASE_FLIGHT); + events.ScheduleEvent(EVENT_LIFTOFF, 0s, 0, PHASE_FLIGHT); } void DoAction(int32 param) override diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index 5103dbbc37a..d86fc54b7c5 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -223,7 +223,7 @@ class boss_erekem : public CreatureScript task.Repeat(Seconds(8), Seconds(13)); }); - scheduler.Schedule(Seconds(0), [this](TaskContext task) + scheduler.Schedule(0s, [this](TaskContext task) { for (uint32 i = DATA_EREKEM_GUARD_1; i <= DATA_EREKEM_GUARD_2; ++i) { diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 9a8640a3f3f..8febf564b50 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -586,7 +586,7 @@ class npc_azure_saboteur : public CreatureScript { if (type == EFFECT_MOTION_TYPE && pointId == POINT_INTRO) { - _scheduler.Schedule(Seconds(0), [this](TaskContext task) + _scheduler.Schedule(0s, [this](TaskContext task) { me->CastSpell(me, SPELL_SHIELD_DISRUPTION, false); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 7d9a3956fd4..3bbf3b03fe4 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -1459,7 +1459,7 @@ public: switch (me->GetEntry()) { case NPC_ENRAGED_WATER_SPIRIT: - _events.ScheduleEvent(EVENT_ENRAGED_WATER_SPIRIT, Seconds(0), Seconds(1)); + _events.ScheduleEvent(EVENT_ENRAGED_WATER_SPIRIT, 0s, Seconds(1)); break; case NPC_ENRAGED_FIRE_SPIRIT: if (!me->GetAura(SPELL_FEL_FIRE_AURA)) |