diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 70ecf782e37..88bc426aa2a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2319,6 +2319,8 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack // Reduce dodge chance by attacker expertise rating if (GetTypeId() == TYPEID_PLAYER) dodge_chance -= int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType)*100); + else + dodge_chance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE)*25; // Modify dodge chance by attacker SPELL_AURA_MOD_COMBAT_RESULT_CHANCE dodge_chance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE)*100; @@ -2345,7 +2347,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack { // Reduce parry chance by attacker expertise rating if (GetTypeId() == TYPEID_PLAYER) - parry_chance-= int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType)*100); + parry_chance -= int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType)*100); + else + parry_chance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE)*25; if(pVictim->GetTypeId() == TYPEID_PLAYER || !(((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY) ) { @@ -2738,7 +2742,9 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell) dodgeChance = int32 (float (dodgeChance) * GetTotalAuraMultiplier(SPELL_AURA_MOD_ENEMY_DODGE)); // Reduce dodge chance by attacker expertise rating if (GetTypeId() == TYPEID_PLAYER) - dodgeChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); + dodgeChance -= int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); + else + dodgeChance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE)*25; if (dodgeChance < 0) dodgeChance = 0; @@ -2753,7 +2759,9 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell) int32 parryChance = int32(pVictim->GetUnitParryChance()*100.0f) - skillDiff * 4; // Reduce parry chance by attacker expertise rating if (GetTypeId() == TYPEID_PLAYER) - parryChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); + parryChance -= int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); + else + parryChance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE)*25; if (parryChance < 0) parryChance = 0; |