mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
Core/Spells: Make sure that spells with overridden duration but default duration 0 are not flagged immune
This commit is contained in:
@@ -3201,7 +3201,10 @@ SpellMissInfo Spell::PreprocessSpellHit(Unit* unit, TargetInfo& hitInfo)
|
||||
}
|
||||
}
|
||||
|
||||
hitInfo.AuraDuration = Aura::CalcMaxDuration(m_spellInfo, origCaster, &m_powerCost);
|
||||
if (m_spellValue->Duration)
|
||||
hitInfo.AuraDuration = *m_spellValue->Duration;
|
||||
else
|
||||
hitInfo.AuraDuration = Aura::CalcMaxDuration(m_spellInfo, origCaster, &m_powerCost);
|
||||
|
||||
// unit is immune to aura if it was diminished to 0 duration
|
||||
if (!hitInfo.Positive && !unit->ApplyDiminishingToDuration(m_spellInfo, hitInfo.AuraDuration, origCaster, diminishLevel))
|
||||
|
||||
Reference in New Issue
Block a user