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
|
else
|
||||||
missChance -= ModMeleeHitChance;
|
missChance -= ModMeleeHitChance;
|
||||||
|
|
||||||
// Limit miss chance to 60%
|
// miss chance from auras after calculating skill based miss
|
||||||
missChance = Math.Min(missChance, 60f);
|
missChance -= GetTotalAuraModifier(AuraType.ModHitChance);
|
||||||
|
|
||||||
// miss chance from SPELL_AURA_MOD_ATTACKER_xxx_HIT_CHANCE can exceed 60% miss cap (eg aura 50240)
|
|
||||||
if (attType == WeaponAttackType.RangedAttack)
|
if (attType == WeaponAttackType.RangedAttack)
|
||||||
missChance -= victim.GetTotalAuraModifier(AuraType.ModAttackerRangedHitChance);
|
missChance -= victim.GetTotalAuraModifier(AuraType.ModAttackerRangedHitChance);
|
||||||
else
|
else
|
||||||
@@ -1885,14 +1883,12 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public void UpdateMeleeHitChances()
|
public void UpdateMeleeHitChances()
|
||||||
{
|
{
|
||||||
ModMeleeHitChance = 7.5f + GetTotalAuraModifier(AuraType.ModHitChance);
|
ModMeleeHitChance = 7.5f + GetRatingBonusValue(CombatRating.HitMelee);
|
||||||
ModMeleeHitChance += GetRatingBonusValue(CombatRating.HitMelee);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateRangedHitChances()
|
public void UpdateRangedHitChances()
|
||||||
{
|
{
|
||||||
ModRangedHitChance = 7.5f + GetTotalAuraModifier(AuraType.ModHitChance);
|
ModRangedHitChance = 7.5f + GetRatingBonusValue(CombatRating.HitRanged);
|
||||||
ModRangedHitChance += GetRatingBonusValue(CombatRating.HitRanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSpellHitChances()
|
public void UpdateSpellHitChances()
|
||||||
|
|||||||
@@ -3609,28 +3609,6 @@ namespace Game.Spells
|
|||||||
target.UpdateAllWeaponDependentCritAuras();
|
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)]
|
[AuraEffectHandler(AuraType.ModSpellHitChance)]
|
||||||
void HandleModSpellHitChance(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleModSpellHitChance(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user