aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2020-07-14 09:43:41 +0200
committerGitHub <noreply@github.com>2020-07-14 09:43:41 +0200
commit5e1571062ac05bc3e68ebf1cf9ed04ab54e713bd (patch)
tree20e269a51b9784603817d67a5f0bee432c75f188 /src
parenta368606a969cd6b9f7a6e7d61d1cf0bbedda4bc7 (diff)
Core/Spells: Check a few aura effects for determining if should be negative (#25004)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp29
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: