From 14392fe24c12bdd74bb6911928cf2049fbeb4568 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 20 Aug 2021 18:51:50 -0400 Subject: [PATCH] Core/Auras: fixed SPELL_AURA_MOD_HIT_CHANCE honoring stack rules in all cases Port From (https://github.com/TrinityCore/TrinityCore/commit/b0a05812d23aa1ebe69045243233a5eaba064f11) --- Source/Game/Spells/Auras/AuraEffect.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 7cabc5e6d..069824c3e 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -3609,6 +3609,7 @@ namespace Game.Spells Unit target = aurApp.GetTarget(); + // handle stack rules if (target.IsTypeId(TypeId.Player)) { target.ToPlayer().UpdateMeleeHitChances(); @@ -3616,8 +3617,9 @@ namespace Game.Spells } else { - target.ModMeleeHitChance += (apply) ? GetAmount() : (-GetAmount()); - target.ModRangedHitChance += (apply) ? GetAmount() : (-GetAmount()); + float value = target.GetTotalAuraModifier(AuraType.ModHitChance); + target.ModMeleeHitChance = value; + target.ModRangedHitChance = value; } }