diff options
author | CraftedRO <24683355+CraftedRO@users.noreply.github.com> | 2024-11-20 18:55:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 17:55:58 +0100 |
commit | c6fb43947bf531eb737c17c1a95d8157db421c75 (patch) | |
tree | 9169bb47375ddc41b497a200c537f2967265ee91 | |
parent | a93b1151f20271b4149834912e7d3e7fc3a39747 (diff) |
Core/Unit: Fix DualWield Off-hand hit penalty (#30444)
* Offhand attacks that occur while on-next-hit abilities such as Heroic Strike are queued do not suffer the dual wield to-hit penalty.
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4ef204e5f79..cc67ca2da60 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12128,8 +12128,8 @@ float Unit::MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, i //calculate miss chance float missChance = victim->GetUnitMissChance(); - // melee attacks while dual wielding have +19% chance to miss - if (!spellId && haveOffhandWeapon()) + // Check if dual wielding, add additional miss penalty - when mainhand has on next swing spell, offhand doesnt suffer penalty + if (!spellId && haveOffhandWeapon() && attType != RANGED_ATTACK && !m_currentSpells[CURRENT_MELEE_SPELL]) missChance += 19.0f; // bonus from skills is 0.04% |