diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-10-18 21:00:17 -0300 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-10-15 16:02:40 +0200 |
commit | 135098962897553406db38f8d7b2d615a813d830 (patch) | |
tree | ed602196c97bec3df81b40e2a960a6c8419a8b9d | |
parent | 2ecc372658930a31e734fedfc11cf5fee082c3e9 (diff) |
Core/Spell: do positivity spell checks only against actually hitted effects instead of the whole spell
Closes #18097
(cherry picked from commit 5c1dfce168e31f473418930fdd09eb800c64c44c)
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 92faf274ee5..64e2a2814c9 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2415,7 +2415,19 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) if (m_damage > 0) positive = false; else if (!m_healing) - positive = m_spellInfo->IsPositive(); + { + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + if (!(target->effectMask & (1 << i))) + continue; + + if (!m_spellInfo->IsPositiveEffect(i)) + { + positive = false; + break; + } + } + } switch (m_spellInfo->DmgClass) { |