From bad3e89ee6bb20286e7638461ae710a892d2c207 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 14 Sep 2023 04:56:05 -0400 Subject: [PATCH] Core/Auras: Implement SPELL_ATTR8_PERIODIC_CAN_CRIT Port From (https://github.com/TrinityCore/TrinityCore/commit/fa2257681726caf16509940ef8c6d427cd85150e) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Spells/Auras/AuraEffect.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index c057bf03b..1254aa9e5 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1933,7 +1933,7 @@ namespace Framework.Constants Unk6 = 0x40, // 6 Unk7 = 0x80, // 7 AffectPartyAndRaid = 0x100, // 8 - DontResetPeriodicTimer = 0x200, // 9 Periodic Auras With This Flag Keep Old Periodic Timer When Refreshing At Close To One Tick Remaining (Kind Of Anti Dot Clipping) + PeriodicCanCrit = 0x200, // 9 NameChangedDuringTransofrm = 0x400, // 10 Unk11 = 0x800, // 11 AuraSendAmount = 0x1000, // 12 Aura Must Have Flag AflagAnyEffectAmountSent To Send Amount diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index ac614ced3..7f665a458 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -5525,7 +5525,10 @@ namespace Game.Spells if (GetSpellInfo().HasAttribute(SpellAttr2.CantCrit)) return false; - return true; + if (GetSpellInfo().HasAttribute(SpellAttr8.PeriodicCanCrit)) + return true; + + return false; } float CalcPeriodicCritChance(Unit caster)