diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-01-21 23:42:21 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-12-09 14:18:42 +0100 |
commit | 63fa69d39fea93b96337f0aff441ea1867436c1c (patch) | |
tree | 049e236483a82de73fb31dbf8d10c1c8dea8420e /src | |
parent | 77cb6c1a3f94a9209581a77fdebd222f15088866 (diff) |
Core/Spell: consider spells with no targets for the purpose of finish procs
Closes #18799
(cherry-picked from c3474f57bc053c67448169a4c7bb83e10bb25015)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index e6130a9d08a..25551136255 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2042,7 +2042,6 @@ void Spell::prepareDataForTriggerSystem() // For other spells trigger procflags are set in Spell::DoAllEffectOnTarget // Because spell positivity is dependant on target } - m_hitMask = PROC_HIT_NONE; // Hunter trap spells - activation proc for Lock and Load, Entrapment and Misdirection if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && @@ -3452,8 +3451,14 @@ void Spell::handle_immediate() // process immediate effects (items, ground, etc.) also initialize some variables _handle_immediate_phase(); - for (std::vector<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) - DoAllEffectOnTarget(&(*ihit)); + // consider spell hit for some spells without target, so they may proc on finish phase correctly + if (m_UniqueTargetInfo.empty()) + m_hitMask = PROC_HIT_NORMAL; + else + { + for (std::vector<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) + DoAllEffectOnTarget(&(*ihit)); + } for (std::vector<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit) DoAllEffectOnTarget(&(*ihit)); |