fix(Core/Unit): DualWield Off-hand hit penalty (#12906)

This commit is contained in:
SoglaHash
2022-09-07 02:01:29 +02:00
committed by GitHub
parent d3ecfe62fe
commit 11086c89f9

View File

@@ -18561,8 +18561,11 @@ float Unit::MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, i
//calculate miss chance
float missChance = victim->GetUnitMissChance(attType);
if (!spellId && haveOffhandWeapon())
// Check if dual wielding, add additional miss penalty - when mainhand has on next swing spell, offhand doesnt suffer penalty
if (!spellId && (attType != RANGED_ATTACK) && haveOffhandWeapon() && (!m_currentSpells[CURRENT_MELEE_SPELL] || !m_currentSpells[CURRENT_MELEE_SPELL]->IsNextMeleeSwingSpell()))
{
missChance += 19;
}
// bonus from skills is 0.04%
//miss_chance -= skillDiff * 0.04f;