mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/EventProcessor: std::chrono-ify the remaining public API
(cherry picked from commit 1d8782e356)
This commit is contained in:
@@ -243,7 +243,7 @@ class ActivateLivingConstellation : public BasicEvent
|
||||
return true; // delete event
|
||||
|
||||
_owner->CastSpell(nullptr, SPELL_TRIGGER_3_ADDS, TRIGGERED_FULL_MASK);
|
||||
_owner->m_Events.AddEvent(this, execTime + urand(45000, 50000));
|
||||
_owner->m_Events.AddEvent(this, Milliseconds(execTime) + randtime(45s, 50s));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ class SummonUnleashedDarkMatter : public BasicEvent
|
||||
bool Execute(uint64 execTime, uint32 /*diff*/) override
|
||||
{
|
||||
_caster->CastSpell(nullptr, SPELL_SUMMON_UNLEASHED_DARK_MATTER, TRIGGERED_FULL_MASK);
|
||||
_caster->m_Events.AddEvent(this, execTime + 30000);
|
||||
_caster->m_Events.AddEvent(this, Milliseconds(execTime) + 30s);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ class TrashJumpEvent : public BasicEvent
|
||||
case 0:
|
||||
_owner->CastSpell(nullptr, SPELL_LEAP);
|
||||
++_stage;
|
||||
_owner->m_Events.AddEvent(this, eventTime + 2000);
|
||||
_owner->m_Events.AddEvent(this, Milliseconds(eventTime) + 2s);
|
||||
return false;
|
||||
case 1:
|
||||
_owner->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -423,7 +423,7 @@ class LightningFieldEvent : public BasicEvent
|
||||
if (instance->GetBossState(BOSS_THORIM) == IN_PROGRESS)
|
||||
{
|
||||
_owner->CastSpell(nullptr, SPELL_LIGHTNING_FIELD);
|
||||
_owner->m_Events.AddEvent(this, eventTime + 1000);
|
||||
_owner->m_Events.AddEvent(this, Milliseconds(eventTime) + 1s);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user