aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorCarbenium <carbenium@outlook.com>2020-07-25 23:07:29 +0200
committerPeter Keresztes Schmidt <carbenium@outlook.com>2020-07-27 13:36:25 +0200
commit92a02a5c8750913f596d7e3b58bf8439cb770c28 (patch)
tree3663148e3332b1e51040fc8747c5666850425100 /src/server/game/Spells/Spell.cpp
parent1131229ee9c43704b11187f0b11c327db92018b6 (diff)
Core/EventProcessor: std::chrono-ify CalculateTime
uint64 CalculateTime(uint64 t_offset) has been replaced with Milliseconds CalculateTime(Milliseconds t_offset). Also add the std::chrono-ified overload void AddEvent(BasicEvent*, Milliseconds, bool)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 615e4093a3e..2a3dfec9f75 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2158,7 +2158,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
targetInfo.ReflectResult = unitCaster->SpellHitResult(unitCaster, m_spellInfo, false); // can't reflect twice
// Proc spell reflect aura when missile hits the original target
- target->m_Events.AddEvent(new ProcReflectDelayed(target, m_originalCasterGUID), target->m_Events.CalculateTime(targetInfo.TimeDelay));
+ target->m_Events.AddEvent(new ProcReflectDelayed(target, m_originalCasterGUID), target->m_Events.CalculateTime(Milliseconds(targetInfo.TimeDelay)));
// Increase time interval for reflected spells by 1.5
targetInfo.TimeDelay += targetInfo.TimeDelay >> 1;
@@ -3034,7 +3034,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const& targets, AuraEffect const
// create and add update event for this spell
_spellEvent = new SpellEvent(this);
- m_caster->m_Events.AddEvent(_spellEvent, m_caster->m_Events.CalculateTime(1));
+ m_caster->m_Events.AddEvent(_spellEvent, m_caster->m_Events.CalculateTime(1ms));
// check disables
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, m_caster))