From b484b7e9270bef8bf6347c75a4c71b25bb750b11 Mon Sep 17 00:00:00 2001 From: Alan Deutscher Date: Sun, 10 Jul 2022 10:28:54 -0700 Subject: Core/Auras: Do not remove auras unaffected by invincibility (#28100) * Mark WSG's Focused Assault and Brutal Assault as unaffected by immunities --- src/server/game/Spells/SpellInfo.cpp | 6 +++++- src/server/game/Spells/SpellMgr.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index df709fdfb10..88479010f44 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -2889,7 +2889,11 @@ void SpellInfo::ApplyAllSpellImmunitiesTo(Unit* target, uint8 effIndex, bool app { target->ApplySpellImmune(Id, IMMUNITY_STATE, auraType, apply); if (apply && HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY)) - target->RemoveAurasByType(auraType); + target->RemoveAurasByType(auraType, [](AuraApplication const* aurApp) -> bool + { + // if the aura has SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY, then it cannot be removed by immunity + return !aurApp->GetBase()->GetSpellInfo()->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY); + }); } for (SpellEffects effectType : immuneInfo.SpellEffectImmune) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index c940accb449..084bb633cef 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3150,6 +3150,16 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->_GetEffect(EFFECT_0).TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ANY); }); + // Warsong Gulch Anti-Stall Debuffs + ApplySpellFix({ + 46392, // Focused Assault + 46393, // Brutal Assault + }, [](SpellInfo* spellInfo) + { + // due to discrepancies between ranks + spellInfo->Attributes |= SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY; + }); + // Summon Skeletons ApplySpellFix({ 52611, 52612 }, [](SpellInfo* spellInfo) { -- cgit v1.2.3