From 11086c89f9c9907a8b21cf9fe59d512c3596bca6 Mon Sep 17 00:00:00 2001 From: SoglaHash <74299960+SoglaHash@users.noreply.github.com> Date: Wed, 7 Sep 2022 02:01:29 +0200 Subject: [PATCH] fix(Core/Unit): DualWield Off-hand hit penalty (#12906) --- src/server/game/Entities/Unit/Unit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 12e2fc904..584431749 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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;