From c00a8d32ead6bf2045558acf63e3280f59170d5a Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 1 Feb 2024 10:27:09 -0500 Subject: [PATCH] Core/Auras: Implemented SPELL_ATTR7_DISABLE_AURA_WHILE_DEAD (suppress aura applications while dead without removing the aura) Port From (https://github.com/TrinityCore/TrinityCore/commit/0f7dd4eadf90a5407fd232d083485430d725152f) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Spells/Auras/Aura.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index a24cee0d5..f486683cb 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1894,7 +1894,7 @@ namespace Framework.Constants { Unk0 = 0x01, // 0 Shaman'S New Spells (Call Of The ...), Feign Death. IgnoreDurationMods = 0x02, // 1 Duration is not affected by duration modifiers - ReactivateAtResurrect = 0x04, // 2 Paladin'S Auras And 65607 Only. + DisableAuraWhileDead = 0x04, // 2 Disable Aura While Dead IsCheatSpell = 0x08, // 3 Cannot Cast If Caster Doesn'T Have Unitflag2 & UnitFlag2AllowCheatSpells Unk4 = 0x10, // 4 Only 47883 (Soulstone Resurrection) And Test Spell. SummonTotem = 0x20, // 5 Only Shaman Player Totems. diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index d1781278b..778c43e30 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -2716,6 +2716,9 @@ namespace Game.Spells public override void FillTargetMap(ref Dictionary targets, Unit caster) { + if (GetSpellInfo().HasAttribute(SpellAttr7.DisableAuraWhileDead) && !GetUnitOwner().IsAlive()) + return; + Unit refe = caster; if (refe == null) refe = GetUnitOwner();