Core/Auras: Corrected check relying on a not yet initialized variable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user