mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user