mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 08:59:11 +01:00
Core/Spells: Grand Crusader will now only have a chance to proc by hitting the trigger spell's primary target
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user