From 04eaeb0fe8c0912d121ca0b753adfff260b585ce Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 1 Jul 2023 09:12:21 -0400 Subject: [PATCH] Core/Spells: Allow filtering procs in FINISH phase by SpellTypeMask Port From (https://github.com/TrinityCore/TrinityCore/commit/bacfbec25180cd0a02fec20e788d74e2fcaf1a0c) --- Source/Game/Spells/Spell.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 4727e65ed..7182840b2 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -3104,7 +3104,10 @@ namespace Game.Spells // consider spell hit for some spells without target, so they may proc on finish phase correctly if (m_UniqueTargetInfo.Empty()) + { m_hitMask = ProcFlagsHit.Normal; + m_procSpellType = ProcFlagsSpellType.NoDmgHeal; + } else DoProcessTargetContainer(m_UniqueTargetInfo); @@ -3295,7 +3298,7 @@ namespace Game.Spells } if (!m_spellInfo.HasAttribute(SpellAttr3.SuppressCasterProcs)) - Unit.ProcSkillsAndAuras(m_originalCaster, null, procAttacker, new ProcFlagsInit(ProcFlags.None), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.Finish, m_hitMask, this, null, null); + Unit.ProcSkillsAndAuras(m_originalCaster, null, procAttacker, new ProcFlagsInit(ProcFlags.None), m_procSpellType, ProcFlagsSpellPhase.Finish, m_hitMask, this, null, null); } void SendSpellCooldown() @@ -8131,6 +8134,7 @@ namespace Game.Spells internal ProcFlagsInit m_procAttacker; // Attacker trigger flags internal ProcFlagsInit m_procVictim; // Victim trigger flags internal ProcFlagsHit m_hitMask; + internal ProcFlagsSpellType m_procSpellType; // for finish procs // ***************************************** // Spell target subsystem @@ -8645,6 +8649,7 @@ namespace Game.Spells // set hitmask for finish procs spell.m_hitMask |= hitMask; + spell.m_procSpellType |= procSpellType; // Do not take combo points on dodge and miss if (MissCondition != SpellMissInfo.None && spell.m_needComboPoints && spell.m_targets.GetUnitTargetGUID() == TargetGUID)