diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index c2cdcbfb641..dd5dcb04f1a 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -3674,29 +3674,26 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor return true; case SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE: case SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT: - case SPELL_AURA_PERIODIC_TRIGGER_SPELL: - if (!_isPositiveTarget(spellInfo, effIndex)) + if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(spellInfo->Effects[effIndex].TriggerSpell)) { - if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(spellInfo->Effects[effIndex].TriggerSpell)) + // negative targets of main spell return early + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - // negative targets of main spell return early - for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) - { - // already seen this - if (visited.count({ spellTriggeredProto->Id, i }) > 0) - continue; + // already seen this + if (visited.count({ spellTriggeredProto->Id, i }) > 0) + continue; - if (!spellTriggeredProto->Effects[i].Effect) - continue; + if (!spellTriggeredProto->Effects[i].Effect) + continue; - // if non-positive trigger cast targeted to positive target this main cast is non-positive - // this will place this spell auras as debuffs - if (_isPositiveTarget(spellTriggeredProto, i) && !_isPositiveEffectImpl(spellTriggeredProto, i, visited)) - return false; - } + // if non-positive trigger cast targeted to positive target this main cast is non-positive + // this will place this spell auras as debuffs + if (_isPositiveTarget(spellTriggeredProto, i) && !_isPositiveEffectImpl(spellTriggeredProto, i, visited)) + return false; } } break; + case SPELL_AURA_PERIODIC_TRIGGER_SPELL: case SPELL_AURA_MOD_STUN: case SPELL_AURA_TRANSFORM: case SPELL_AURA_MOD_DECREASE_SPEED: |