fix(Core/Spells): Resolve a case of triggered spells prolonging combat. (#19991)

* Revert "fix(Core/Spells): Revert triggered spell logic change. (#19983)"

This reverts commit 3bb5ec779d.

* Add aura effect check.

Co-Authored-By: Anton Popovichenko <walkline.ua@gmail.com>

* Add comment, use target instead of owner.

* Adjust comment terminology.

---------

Co-authored-by: Anton Popovichenko <walkline.ua@gmail.com>
This commit is contained in:
Benjamin Jackson
2024-09-19 08:49:56 -04:00
committed by GitHub
parent dbde182ecd
commit a0057b9e90
2 changed files with 21 additions and 6 deletions

View File

@@ -2931,7 +2931,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
{
if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(effectUnit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
{
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
if (!m_triggeredByAuraSpell.spellInfo || (!(m_triggeredByAuraSpell.spellInfo->Effects[m_triggeredByAuraSpell.effectIndex].TriggerSpell == m_spellInfo->Id) && !(m_triggeredByAuraSpell.spellInfo->IsAuraEffectEqual(m_spellInfo))))
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
// Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
if (effectUnit->IsInCombatWith(m_caster))