diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellMgr.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index b1ddf0cead3..6c4c607c389 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -587,6 +587,23 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) case SPELL_AURA_ADD_TARGET_TRIGGER: return true; case SPELL_AURA_PERIODIC_TRIGGER_SPELL: + if(!deep) + { + uint32 spellTriggeredId = spellproto->EffectTriggerSpell[effIndex]; + SpellEntry const *spellTriggeredProto = sSpellStore.LookupEntry(spellTriggeredId); + + if(spellTriggeredProto) + { + // non-positive targets of main spell return early + for(int i = 0; i < 3; ++i) + { + // 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->EffectImplicitTargetA[effIndex],spellTriggeredProto->EffectImplicitTargetB[effIndex]) && !IsPositiveEffect(spellTriggeredId,i, true)) + return false; + } + } + } case SPELL_AURA_PROC_TRIGGER_SPELL: // many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example) break; @@ -697,7 +714,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) return false; if (!deep && spellproto->EffectTriggerSpell[effIndex] - && spellproto->EffectImplicitTargetA[effIndex]!=TARGET_SELF + && !spellproto->procFlags && IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex],spellproto->EffectImplicitTargetB[effIndex]) && !IsPositiveSpell(spellproto->EffectTriggerSpell[effIndex], true)) return false; |