Core/Auras: fixed SPELL_AURA_MOD_HIT_CHANCE honoring stack rules in all cases

Port From (https://github.com/TrinityCore/TrinityCore/commit/b0a05812d23aa1ebe69045243233a5eaba064f11)
This commit is contained in:
hondacrx
2021-08-20 18:51:50 -04:00
parent 936f9d4d93
commit 14392fe24c
+4 -2
View File
@@ -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;
}
}