Core/Spells: tweak 'neutral' spell positivity

- Fixes Mind Control dummy self aura appearing as a debuff
This commit is contained in:
ariel-
2018-03-10 00:57:19 -03:00
parent bd3530dd1f
commit d46f36f773

View File

@@ -3801,7 +3801,7 @@ void SpellInfo::_InitializeSpellPositivity()
switch (Effects[i].ApplyAuraName)
{
// has other non positive effect?
// then it should be marked negative despite of targets (ex 8510, 8511, 8893, 10267)
// then it should be marked negative if has same target as negative effect (ex 8510, 8511, 8893, 10267)
case SPELL_AURA_DUMMY:
case SPELL_AURA_MOD_STUN:
case SPELL_AURA_MOD_FEAR:
@@ -3809,9 +3809,13 @@ void SpellInfo::_InitializeSpellPositivity()
case SPELL_AURA_TRANSFORM:
case SPELL_AURA_MOD_ATTACKSPEED:
case SPELL_AURA_MOD_DECREASE_SPEED:
if (!IsPositive())
AttributesCu |= (SPELL_ATTR0_CU_NEGATIVE_EFF0 << i);
{
for (uint8 j = i + 1; j < MAX_SPELL_EFFECTS; ++j)
if (!IsPositiveEffect(j) && Effects[i].TargetA.GetTarget() == Effects[j].TargetA.GetTarget() && Effects[i].TargetB.GetTarget() == Effects[j].TargetB.GetTarget())
AttributesCu |= (SPELL_ATTR0_CU_NEGATIVE_EFF0 << i);
break;
}
default:
break;
}