Core/Spells: Do not apply SpellModOp::CritChance to spells that can't crit

Port From (https://github.com/TrinityCore/TrinityCore/commit/18780206bc6470e5a3c1adf4f917766fedbd1c17)
This commit is contained in:
hondacrx
2021-06-23 22:14:39 -04:00
parent 1be1a5ad1a
commit 2025498ea6
@@ -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);
}