mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 20:44:17 +08:00
returned to def skill for the chance to daze, to avoid resil and other modifiers taking part. Added aura-based crit chance reduction by converting it back to def
This commit is contained in:
parent
441208b272
commit
47456a720e
@ -1956,11 +1956,11 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
Probability = 0.65f * victim->GetLevel() + 0.5f;
|
||||
|
||||
uint32 VictimDefense = victim->GetDefenseSkillValue();
|
||||
uint32 VictimAuraDefense = -victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE) * 25;
|
||||
uint32 AttackerMeleeSkill = GetUnitMeleeSkill();
|
||||
|
||||
// xinef: fix daze mechanics
|
||||
float chanceToCrit = GetUnitCriticalChance(BASE_ATTACK, victim);
|
||||
Probability += chanceToCrit * 3.57 - 20;
|
||||
Probability -= ((float)VictimDefense + (float)VictimAuraDefense - AttackerMeleeSkill) * 0.1428f;
|
||||
|
||||
if (Probability > 40.0f)
|
||||
Probability = 40.0f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user