aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-03-10 00:57:19 -0300
committerariel- <ariel-@users.noreply.github.com>2018-03-10 00:57:19 -0300
commitd46f36f7737e6c558c50e1d2a4eadb202ed666bb (patch)
tree12fa07e32d8b396afec84db689025a02758850c8
parentbd3530dd1f71ce0cd4ce8368af3947cb525349b2 (diff)
Core/Spells: tweak 'neutral' spell positivity
- Fixes Mind Control dummy self aura appearing as a debuff
-rw-r--r--src/server/game/Spells/SpellInfo.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 63dadd6ede3..c1f202a459e 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -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;
}