Core/Spells: Remove stealth auras by dispel type when handling SPELL_ATTR1_FAILURE_BREAKS_STEALTH instead of picking a random interrupt flag that stealth has

This commit is contained in:
Shauren
2025-10-18 11:35:38 +02:00
parent b228ab993b
commit 273e7fc45b

View File

@@ -2948,7 +2948,10 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
if (MissCondition == SPELL_MISS_RESIST && spell->m_spellInfo->HasAttribute(SPELL_ATTR1_FAILURE_BREAKS_STEALTH) && spell->unitTarget->GetTypeId() == TYPEID_UNIT)
{
Unit* unitCaster = ASSERT_NOTNULL(spell->m_caster->ToUnit());
unitCaster->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Interacting);
unitCaster->RemoveAppliedAuras([](AuraApplication const* aurApp)
{
return aurApp->GetBase()->GetSpellInfo()->Dispel == DISPEL_STEALTH;
});
spell->unitTarget->ToCreature()->EngageWithTarget(unitCaster);
}
}