From 1ee88435c5775385de3f267d1e2bdbac18658e0b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 11 Jan 2023 00:47:11 -0500 Subject: [PATCH] Core/Auras: Implemented SPELL_ATTR12_ONLY_PROC_FROM_CLASS_ABILITIES and SPELL_ATTR13_ALLOW_CLASS_ABILITY_PROCS attributes Port From (https://github.com/TrinityCore/TrinityCore/commit/33954538bc30650f639e258eeb057c1340f4c949) --- Source/Framework/Constants/Spells/SpellConst.cs | 4 ++-- Source/Game/Spells/Auras/Aura.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index c45028aba..f0670515c 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -2082,11 +2082,11 @@ namespace Framework.Constants Unk28 = 0x10000000, // 28 Unk29 = 0x20000000, // 29 Unk30 = 0x40000000, // 30 - Unk31 = 0x80000000 // 31 + OnlyProcFromClassAbilities = 0x80000000 // 31 Only Proc From Class Abilities } public enum SpellAttr13 : uint { - Unk0 = 0x01, // 0 + AllowClassAbilityProcs = 0x01, // 0 Allow Class Ability Procs Unk1 = 0x02, // 1 PassiveIsUpgrade = 0x04, // 2 Displays "Upgrade" in spell tooltip instead of "Passive" Unk3 = 0x08, // 3 diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index fc023efbd..55948c23e 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -1747,6 +1747,9 @@ namespace Game.Spells if (spell.GetSpellInfo().HasAttribute(SpellAttr4.SuppressWeaponProcs) && GetSpellInfo().HasAttribute(SpellAttr6.AuraIsWeaponProc)) return 0; + + if (GetSpellInfo().HasAttribute(SpellAttr12.OnlyProcFromClassAbilities) && !spell.GetSpellInfo().HasAttribute(SpellAttr13.AllowClassAbilityProcs)) + return 0; } // check don't break stealth attr present