aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-03-24 13:43:28 +0100
committerShauren <shauren.trinity@gmail.com>2012-03-24 13:43:28 +0100
commit25c13de8b39184c9b1070d5dac1ac2525e8473eb (patch)
tree907fcc45850da0533993e1fd56998e5231d8fb24
parent7c4b2f17bf75f685ace2490321f8df8f4ecc8682 (diff)
Core/Auras: Corrected check relying on a not yet initialized variable
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}