fix(Core/Spells): Lightning Shield should not proc off from self-cast… (#12501)

fix(Core/Spells): Lightning Shield should not proc off from self-casted items.

Fixes #12361
This commit is contained in:
UltraNix
2022-07-25 21:09:39 +02:00
committed by GitHub
parent 2a7b5685e9
commit 7aea91fcb3

View File

@@ -8920,6 +8920,15 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc
if (auraSpellInfo->SpellFamilyFlags[0] & 0x400)
{
// Do not proc off from self-casted items
if (Spell const* spell = eventInfo.GetProcSpell())
{
if (spell->m_castItemGUID && victim->GetGUID() == GetGUID())
{
return false;
}
}
trigger_spell_id = sSpellMgr->GetSpellWithRank(26364, auraSpellInfo->GetRank());
}
// Nature's Guardian