From a61bdc7b3d0027e19ccc6458563a4f86c17673da Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 9 Jun 2021 17:56:45 +0200 Subject: [PATCH] fix(Scripts/Spells): Seal of Command cannot be casted on dead targets (#6186) - Closes #5517 - Closes https://github.com/chromiecraft/chromiecraft/issues/476 --- src/server/scripts/Spells/spell_paladin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 16546916e..1f3424e75 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -103,7 +103,13 @@ public: if (procSpell->IsAffectingArea()) targets = 1; - eventInfo.GetActor()->CastCustomSpell(aurEff->GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, SPELLVALUE_MAX_TARGETS, targets, eventInfo.GetActionTarget(), false, nullptr, aurEff); + if (Unit* target = eventInfo.GetActionTarget()) + { + if (target->IsAlive()) + { + eventInfo.GetActor()->CastCustomSpell(aurEff->GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, SPELLVALUE_MAX_TARGETS, targets, target, false, nullptr, aurEff); + } + } } void Register() override