From a167709cdf14cc1e156b4b9e22cb71d7c9364a89 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 28 Apr 2022 10:40:19 -0400 Subject: [PATCH] Core/Spells: Implemented PROC_ATTR_CANT_PROC_FROM_ITEM_CAST Port From (https://github.com/TrinityCore/TrinityCore/commit/a3cc94080f9e5a246f5d6d64ef8ab5cc929da2ab) --- Source/Framework/Constants/Spells/SpellConst.cs | 3 ++- Source/Game/Spells/Auras/Aura.cs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 3b9339c23..2c42b2ed8 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -2546,8 +2546,9 @@ namespace Framework.Constants ReqSpellmod = 0x08, // requires triggering spell to be affected by proccing aura to drop charges UseStacksForCharges = 0x10, // consuming proc drops a stack from proccing aura instead of charge ReduceProc60 = 0x80, // aura should have a reduced chance to proc if level of proc Actor > 60 + CantProcFromItemCast = 0x0000100, // do not allow aura proc if proc is caused by a spell casted by item - AllAllowed = ReqExpOrHonor | TriggeredCanProc | ReqPowerCost | ReqSpellmod | UseStacksForCharges | ReduceProc60 + AllAllowed = ReqExpOrHonor | TriggeredCanProc | ReqPowerCost | ReqSpellmod | UseStacksForCharges | ReduceProc60 | CantProcFromItemCast } // Spell aura states diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index 9a8edb0d3..45d41d457 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -1712,6 +1712,9 @@ namespace Game.Spells if (!GetSpellInfo().HasAttribute(SpellAttr3.CanProcFromProcs) && !procEntry.AttributesMask.HasFlag(ProcAttributes.TriggeredCanProc) && !eventInfo.GetTypeMask().HasFlag(ProcFlags.AutoAttackMask)) if (spell.IsTriggered() && !spell.GetSpellInfo().HasAttribute(SpellAttr3.NotAProc)) return 0; + + if (spell.m_CastItem != null && procEntry.AttributesMask.HasFlag(ProcAttributes.CantProcFromItemCast)) + return 0; } // check don't break stealth attr present