From 3c2d2880b7aa5b0c4bf8d3fc9d742e749727edbc Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 31 Aug 2022 18:57:50 +0200 Subject: [PATCH] Core/Spells: Grand Crusader will now only have a chance to proc by hitting the trigger spell's primary target --- src/server/scripts/Spells/spell_paladin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 28fb16a0a30..cdeca830fff 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -471,14 +471,17 @@ class spell_pal_grand_crusader : public AuraScript return ValidateSpellInfo({ SPELL_PALADIN_AVENGERS_SHIELD }); } - bool CheckProc(ProcEventInfo& /*eventInfo*/) + bool CheckProc(ProcEventInfo& eventInfo) { - return GetTarget()->GetTypeId() == TYPEID_PLAYER; + if (!eventInfo.GetProcSpell() || !eventInfo.GetProcTarget()) + return false; + + return eventInfo.GetProcTarget() == eventInfo.GetProcSpell()->m_targets.GetUnitTarget(); } void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) { - GetTarget()->ToPlayer()->GetSpellHistory()->ResetCooldown(SPELL_PALADIN_AVENGERS_SHIELD, true); + GetTarget()->GetSpellHistory()->ResetCooldown(SPELL_PALADIN_AVENGERS_SHIELD, true); } void Register() override