aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorclick <none@none>2010-07-04 16:57:26 +0200
committerclick <none@none>2010-07-04 16:57:26 +0200
commitc834a45ba531967ec9fd9329aaf18332411d6f31 (patch)
treef856c08c2f383b4bbb7bbab265a896e8478ec1d5 /src/server
parent962b48c6a36016a24c5487a12b0d78e642ed942c (diff)
Initialize m_flags after m_isNeedManyNegativeEffects, as m_isNeedManyNegativeEffects is used in _CheckPositive()
Thanks to ge0rg and his valgrind-running --HG-- branch : trunk
Diffstat (limited to 'src/server')
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index b3d0f3a3b12..cb6ddfb2307 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -77,14 +77,15 @@ AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint
else
sLog.outDebug("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
}
- m_flags |= (_CheckPositive(caster) ? AFLAG_POSITIVE : AFLAG_NEGATIVE) |
- (GetBase()->GetCasterGUID() == GetTarget()->GetGUID() ? AFLAG_CASTER : AFLAG_NONE);
m_isNeedManyNegativeEffects = false;
if (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) // caster == target - 1 negative effect is enough for aura to be negative
m_isNeedManyNegativeEffects = false;
else if (caster)
m_isNeedManyNegativeEffects = caster->IsFriendlyTo(m_target);
+
+ m_flags |= (_CheckPositive(caster) ? AFLAG_POSITIVE : AFLAG_NEGATIVE) |
+ (GetBase()->GetCasterGUID() == GetTarget()->GetGUID() ? AFLAG_CASTER : AFLAG_NONE);
}
void AuraApplication::_Remove()