Skip to content

Commit a625997

Browse files
authored
fix(Scripts/Midsummer): prevent Bonfire's Blessing from harming the caster (azerothcore#26322)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
1 parent eb9261a commit a625997

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/server/scripts/Events/midsummer.cpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,13 @@ class spell_bonfires_blessing : public AuraScript
428428
return ValidateSpellInfo({ SPELL_BONFIRES_BLESSING });
429429
}
430430

431+
bool CheckProc(ProcEventInfo& eventInfo)
432+
{
433+
Unit* actor = eventInfo.GetActor();
434+
Unit* actionTarget = eventInfo.GetActionTarget();
435+
return actor && actionTarget && actor->IsValidAttackTarget(actionTarget);
436+
}
437+
431438
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
432439
{
433440
if (!IsHolidayActive(HOLIDAY_FIRE_FESTIVAL))
@@ -439,6 +446,7 @@ class spell_bonfires_blessing : public AuraScript
439446

440447
void Register() override
441448
{
449+
DoCheckProc += AuraCheckProcFn(spell_bonfires_blessing::CheckProc);
442450
AfterEffectApply += AuraEffectApplyFn(spell_bonfires_blessing::OnApply, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
443451
}
444452
};

0 commit comments

Comments
 (0)