From 2025498ea66174f8fdfc2a8b71ce3afb14e10f66 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 22:14:39 -0400 Subject: [PATCH] Core/Spells: Do not apply SpellModOp::CritChance to spells that can't crit Port From (https://github.com/TrinityCore/TrinityCore/commit/18780206bc6470e5a3c1adf4f917766fedbd1c17) --- Source/Game/Entities/Player/Player.Spells.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index 9c4eb2a2e..4258eba2c 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -2868,6 +2868,10 @@ namespace Game.Entities if (mod.op == SpellModOp.Duration && spellInfo.GetDuration() == -1) return false; + // mod crit to spells that can't crit + if (mod.op == SpellModOp.CritChance && !spellInfo.HasAttribute(SpellCustomAttributes.CanCrit)) + return false; + return spellInfo.IsAffectedBySpellMod(mod); }