fix(Core/Spells): Prevent shorter-duration equal auras from overwriting in exclusive highest groups (#27419)

This commit is contained in:
AlsoNotMehh
2026-09-24 12:00:33 -03:00
committed by GitHub
parent 9df61fafac
commit de4bdb5a09
+12
View File
@@ -4347,6 +4347,18 @@ bool Unit::IsHighestExclusiveAuraEffect(SpellInfo const* spellInfo, AuraType aur
for (int32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
diff += int32((auraEffectMask & (1 << i)) >> i) - int32((existingAurEff->GetBase()->GetEffectMask() & (1 << i)) >> i);
if (!diff && spellInfo->GetFirstRankSpell()->Id != existingAurEff->GetSpellInfo()->GetFirstRankSpell()->Id)
{
int32 newDuration = spellInfo->GetMaxDuration();
int32 existingDuration = existingAurEff->GetBase()->GetMaxDuration();
if (newDuration == -1 && existingDuration != -1)
diff = 1;
else if (newDuration != -1 && existingDuration == -1)
diff = -1;
else
diff = newDuration - existingDuration;
}
if (diff > 0)
{
Aura const* base = existingAurEff->GetBase();