From bc7568ca34249ad95d3447d5c23062a0a3881754 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sat, 31 Aug 2024 17:37:20 -0400 Subject: [PATCH] Core/Spells: Implemented SPELL_ATTR9_FORCE_CORPSE_TARGET Port From (https://github.com/TrinityCore/TrinityCore/commit/af39104798d78f0cf8f51dc36e7302f1f4e69b7b) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Spells/Spell.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index d174c3058..b340014fd 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1993,7 +1993,7 @@ namespace Framework.Constants IgnoreCasterHealingModifiers = 0x1000000, // Ignore Caster Healing Modifiers DontConsumeChargeIfItemDeleted = 0x2000000, // NYI - some sort of bugfix attribute to prevent double item deletion? // (Programmer Only) Don't consume charge if item deleted ItemPassiveOnClient = 0x4000000, // Item Passive On Client - Unk27 = 0x8000000, // 27 + ForceCorpseTarget = 0x8000000, // Causes the spell to continue executing effects on the target even if one of them kills it Unk28 = 0x10000000, // 28 Unk29 = 0x20000000, // 29 Unk30 = 0x40000000, // 30 diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index b14f3d13f..069c1d0eb 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -8857,7 +8857,7 @@ namespace Game.Spells spell.m_damage = Damage; spell.m_healing = Healing; - if (unit.IsAlive() != IsAlive) + if (unit.IsAlive() != IsAlive && !spell.m_spellInfo.HasAttribute(SpellAttr9.ForceCorpseTarget)) return; if (!spell.m_spellInfo.HasAttribute(SpellAttr8.IgnoreSanctuary) && spell.GetState() == SpellState.Delayed && !spell.IsPositive() && (GameTime.GetGameTimeMS() - TimeDelay) <= unit.LastSanctuaryTime)