Fixed an issue with attack speed when holding a weapon in off hand

This commit is contained in:
Jules 2022-02-24 07:21:17 +01:00
parent 20d1a13f5c
commit 02da23566e

View File

@ -74,8 +74,8 @@ public class PlayerStats {
Type type = item.getItem().getType();
ModifierSource source = type == null ? ModifierSource.OTHER : type.getItemSet().getModifierSource();
// Apply main hand weapon stat offset
if (item.getSlot() == EquipmentSlot.MAIN_HAND && stat instanceof AttackWeaponStat)
// Apply hand weapon stat offset
if (item.getSlot().isHand() && stat instanceof AttackWeaponStat)
value -= ((AttackWeaponStat) stat).getOffset(playerData);
packet.addModifier(new StatModifier("MMOItem-" + index++, stat.getId(), value, ModifierType.FLAT, item.getSlot(), source));