From 25c13de8b39184c9b1070d5dac1ac2525e8473eb Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 24 Mar 2012 13:43:28 +0100 Subject: Core/Auras: Corrected check relying on a not yet initialized variable --- src/server/game/Spells/Auras/SpellAuras.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 1fddd3a04ba..a22b9e73fc6 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -719,7 +719,8 @@ int32 Aura::CalcMaxDuration(Unit* caster) const if (IsPassive() && !m_spellInfo->DurationEntry) maxDuration = -1; - if (!IsPermanent() && modOwner) + // IsPermanent() checks max duration (which we are supposed to calculate here) + if (maxDuration != -1 && modOwner) modOwner->ApplySpellMod(GetId(), SPELLMOD_DURATION, maxDuration); return maxDuration; } -- cgit v1.2.3