--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-09 17:32:22 +02:00
parent e60abd830e
commit 2105aa45d5

View File

@@ -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;