Core/Spells: Implemented SPELL_ATTR9_FORCE_CORPSE_TARGET

Port From (https://github.com/TrinityCore/TrinityCore/commit/af39104798d78f0cf8f51dc36e7302f1f4e69b7b)
This commit is contained in:
Hondacrx
2024-08-31 17:37:20 -04:00
parent 03bcadf2c6
commit bc7568ca34
2 changed files with 2 additions and 2 deletions
@@ -1993,7 +1993,7 @@ namespace Framework.Constants
IgnoreCasterHealingModifiers = 0x1000000, // Ignore Caster Healing Modifiers 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 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 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 Unk28 = 0x10000000, // 28
Unk29 = 0x20000000, // 29 Unk29 = 0x20000000, // 29
Unk30 = 0x40000000, // 30 Unk30 = 0x40000000, // 30
+1 -1
View File
@@ -8857,7 +8857,7 @@ namespace Game.Spells
spell.m_damage = Damage; spell.m_damage = Damage;
spell.m_healing = Healing; spell.m_healing = Healing;
if (unit.IsAlive() != IsAlive) if (unit.IsAlive() != IsAlive && !spell.m_spellInfo.HasAttribute(SpellAttr9.ForceCorpseTarget))
return; return;
if (!spell.m_spellInfo.HasAttribute(SpellAttr8.IgnoreSanctuary) && spell.GetState() == SpellState.Delayed && !spell.IsPositive() && (GameTime.GetGameTimeMS() - TimeDelay) <= unit.LastSanctuaryTime) if (!spell.m_spellInfo.HasAttribute(SpellAttr8.IgnoreSanctuary) && spell.GetState() == SpellState.Delayed && !spell.IsPositive() && (GameTime.GetGameTimeMS() - TimeDelay) <= unit.LastSanctuaryTime)