From 7aea91fcb3f43f1401e1383e6ccc4de218d79b1a Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Mon, 25 Jul 2022 21:09:39 +0200 Subject: [PATCH] =?UTF-8?q?fix(Core/Spells):=20Lightning=20Shield=20should?= =?UTF-8?q?=20not=20proc=20off=20from=20self-cast=E2=80=A6=20(#12501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spells): Lightning Shield should not proc off from self-casted items. Fixes #12361 --- src/server/game/Entities/Unit/Unit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1823c9be7..9e642a36f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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