mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/Spells): possible crashes within class spells (#9168)
This commit is contained in:
@@ -94,6 +94,11 @@ class spell_pal_seal_of_command_aura : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (!eventInfo.GetActor() || !eventInfo.GetActionTarget())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
|
||||
{
|
||||
if (procSpell->SpellIconID == 3025) // Righteous Vengeance, should not proc SoC
|
||||
@@ -117,12 +122,10 @@ class spell_pal_seal_of_command_aura : public AuraScript
|
||||
}
|
||||
}
|
||||
|
||||
if (Unit* target = eventInfo.GetActionTarget())
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
if (target->IsAlive())
|
||||
{
|
||||
if (target->IsAlive())
|
||||
{
|
||||
eventInfo.GetActor()->CastCustomSpell(aurEff->GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, SPELLVALUE_MAX_TARGETS, targets, target, false, nullptr, aurEff);
|
||||
}
|
||||
eventInfo.GetActor()->CastCustomSpell(aurEff->GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, SPELLVALUE_MAX_TARGETS, targets, target, false, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user