diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-06-28 17:38:19 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-06-28 17:38:19 +0200 |
commit | b3d814ee50b265c140d65b6f92ce42482ce1f39b (patch) | |
tree | f089da7bd98159cdb2e1001bca00a1c2230e14d3 | |
parent | 68473ccba24560da3db65467dc24b07882cfa057 (diff) |
Core/Spells: Fixed spell effect on caster not being processed instantly for spells that have travel time and hit both caster and another unit
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index bc34002a33b..34261f4f0e2 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6824,8 +6824,8 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time) return true; // spell is deletable, finish event } // event will be re-added automatically at the end of routine) - } break; - + break; + } case SPELL_STATE_DELAYED: { // first, check, if we have just started @@ -6875,17 +6875,21 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time) { // delaying had just started, record the moment m_Spell->SetDelayStart(e_time); + // handle effects on caster if the spell has travel time but also affects the caster in some way + uint64 n_offset = m_Spell->handle_delayed(0); + ASSERT(n_offset == m_Spell->GetDelayMoment()); // re-plan the event for the delay moment m_Spell->GetCaster()->m_Events.AddEvent(this, e_time + m_Spell->GetDelayMoment(), false); return false; // event not complete } - } break; - + break; + } default: { // all other states // event will be re-added automatically at the end of routine) - } break; + break; + } } // spell processing not complete, plan event on the next update interval |