From 663b230e67ffecfaca83c38f80381b865a0b53cf Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 26 Jan 2021 16:47:34 -0500 Subject: [PATCH] Core/Spells: IsAllowingDeadTargets now checks effects targets as well Port From (https://github.com/TrinityCore/TrinityCore/commit/e08910deaf224557102b4ec93972347bb7a3ea16) --- Source/Game/Spells/SpellInfo.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index e9757bbad..fc9c07b24 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -480,8 +480,19 @@ namespace Game.Spells public bool IsAllowingDeadTarget() { - return HasAttribute(SpellAttr2.CanTargetDead) - || Convert.ToBoolean(targets & (SpellCastTargetFlags.CorpseAlly | SpellCastTargetFlags.CorpseEnemy | SpellCastTargetFlags.UnitDead)); + if (HasAttribute(SpellAttr2.CanTargetDead) || targets.HasAnyFlag(SpellCastTargetFlags.CorpseAlly | SpellCastTargetFlags.CorpseEnemy | SpellCastTargetFlags.UnitDead)) + return true; + + foreach (SpellEffectInfo effect in _effects) + { + if (effect == null) + continue; + + if (effect.TargetA.GetObjectType() == SpellTargetObjectTypes.Corpse || effect.TargetB.GetObjectType() == SpellTargetObjectTypes.Corpse) + return true; + } + + return false; } public bool IsGroupBuff() @@ -3164,7 +3175,11 @@ namespace Game.Spells { case 29214: // Wrath of the Plaguebringer case 34700: // Allergic Reaction + case 41914: // Parasitic Shadowfiend (Illidan) + case 41917: // Parasitic Shadowfiend (Illidan) case 54836: // Wrath of the Plaguebringer + case 61987: // Avenging Wrath Marker + case 61988: // Divine Shield exclude aura return false; case 30877: // Tag Murloc case 61716: // Rabbit Costume