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)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user