diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-10-18 21:00:17 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2016-10-18 21:00:17 -0300 |
| commit | 5c1dfce168e31f473418930fdd09eb800c64c44c (patch) | |
| tree | d7d2697caaeaca1452e257038c4a966426f03a5c | |
| parent | 0285486603a0364f8dfe2b6bec1391880adcede4 (diff) | |
Core/Spell: do positivity spell checks only against actually hitted effects instead of the whole spell
Closes #18097
| -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 a83a5a122ad..b67a488624f 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2352,7 +2352,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) { |
