fix(Scripts/Spells): Seal of Command cannot be casted on dead targets (#6186)
- Closes #5517 - Closes https://github.com/chromiecraft/chromiecraft/issues/476
This commit is contained in:
@@ -103,7 +103,13 @@ public:
|
|||||||
if (procSpell->IsAffectingArea())
|
if (procSpell->IsAffectingArea())
|
||||||
targets = 1;
|
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
|
void Register() override
|
||||||
|
|||||||
Reference in New Issue
Block a user