From 647aca03c208cef43757821a0c681b6ea34f3f3a Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 9 Sep 2021 13:55:36 -0400 Subject: [PATCH] Core/Entities: completely remove 60% melee miss cap as there is no proof of its existence Port From (https://github.com/TrinityCore/TrinityCore/commit/a6e84ebfabdaef50c9e0039dea4ec52b88827b26) --- Source/Game/Entities/StatSystem.cs | 12 ++++-------- Source/Game/Spells/Auras/AuraEffect.cs | 22 ---------------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/Source/Game/Entities/StatSystem.cs b/Source/Game/Entities/StatSystem.cs index f4ba44a18..cbdba4468 100644 --- a/Source/Game/Entities/StatSystem.cs +++ b/Source/Game/Entities/StatSystem.cs @@ -813,10 +813,8 @@ namespace Game.Entities else missChance -= ModMeleeHitChance; - // Limit miss chance to 60% - missChance = Math.Min(missChance, 60f); - - // miss chance from SPELL_AURA_MOD_ATTACKER_xxx_HIT_CHANCE can exceed 60% miss cap (eg aura 50240) + // miss chance from auras after calculating skill based miss + missChance -= GetTotalAuraModifier(AuraType.ModHitChance); if (attType == WeaponAttackType.RangedAttack) missChance -= victim.GetTotalAuraModifier(AuraType.ModAttackerRangedHitChance); else @@ -1885,14 +1883,12 @@ namespace Game.Entities public void UpdateMeleeHitChances() { - ModMeleeHitChance = 7.5f + GetTotalAuraModifier(AuraType.ModHitChance); - ModMeleeHitChance += GetRatingBonusValue(CombatRating.HitMelee); + ModMeleeHitChance = 7.5f + GetRatingBonusValue(CombatRating.HitMelee); } public void UpdateRangedHitChances() { - ModRangedHitChance = 7.5f + GetTotalAuraModifier(AuraType.ModHitChance); - ModRangedHitChance += GetRatingBonusValue(CombatRating.HitRanged); + ModRangedHitChance = 7.5f + GetRatingBonusValue(CombatRating.HitRanged); } public void UpdateSpellHitChances() diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 7a5ab984b..1600c7ae1 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -3609,28 +3609,6 @@ namespace Game.Spells target.UpdateAllWeaponDependentCritAuras(); } - [AuraEffectHandler(AuraType.ModHitChance)] - void HandleModHitChance(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) - { - if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))) - return; - - Unit target = aurApp.GetTarget(); - - // handle stack rules - if (target.IsTypeId(TypeId.Player)) - { - target.ToPlayer().UpdateMeleeHitChances(); - target.ToPlayer().UpdateRangedHitChances(); - } - else - { - float value = target.GetTotalAuraModifier(AuraType.ModHitChance); - target.ModMeleeHitChance = value; - target.ModRangedHitChance = value; - } - } - [AuraEffectHandler(AuraType.ModSpellHitChance)] void HandleModSpellHitChance(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) {