From c80a0f1fad6211ae8f929fda1812a23389fd9db4 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Wed, 18 Mar 2026 08:11:04 -0500 Subject: [PATCH] fix(Core/Spells): Fix Entrapment not proccing from trap activation (#25110) Co-authored-by: blinkysc --- src/server/game/Spells/Spell.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 739fe62efc..2018bb89bf 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2247,7 +2247,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/) // Hunter trap spells - activation proc for Lock and Load, Entrapment and Misdirection if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (m_spellInfo->SpellFamilyFlags[0] & 0x18 || // Freezing and Frost Trap, Freezing Arrow - m_spellInfo->Id == 57879 || m_spellInfo->Id == 45145 || // Snake Trap - done this way to avoid double proc + m_spellInfo->Id == 57879 || // Snake Trap - done this way to avoid double proc m_spellInfo->SpellFamilyFlags[2] & 0x00024000)) // Explosive and Immolation Trap { m_procAttacker |= PROC_FLAG_DONE_TRAP_ACTIVATION; @@ -4307,7 +4307,13 @@ void Spell::_handle_finish_phase() break; } - Unit::ProcSkillsAndAuras(m_originalCaster, nullptr, procAttacker, PROC_FLAG_NONE, hitMask, 1, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell.spellInfo, + // For trap activation, pass the original target (trap triggerer) so proc trigger spells + // like Entrapment can find a valid target to cast on + Unit* finishVictim = nullptr; + if (procAttacker & PROC_FLAG_DONE_TRAP_ACTIVATION) + finishVictim = GetOriginalTarget(); + + Unit::ProcSkillsAndAuras(m_originalCaster, finishVictim, procAttacker, PROC_FLAG_NONE, hitMask, 1, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell.spellInfo, m_triggeredByAuraSpell.effectIndex, this, nullptr, nullptr, PROC_SPELL_PHASE_FINISH); } }