Core/Auras: Corrected check relying on a not yet initialized variable

This commit is contained in:
Shauren
2012-03-24 13:43:28 +01:00
parent 7c4b2f17bf
commit 25c13de8b3
+2 -1
View File
@@ -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;
}