Refactor isTwoHanded()

This commit is contained in:
2024-03-10 16:21:23 -04:00
parent 32d9322189
commit 56b89b7080
4 changed files with 18 additions and 14 deletions
+8
View File
@@ -471,6 +471,14 @@ public class ItemTemplate {
return item.template.item_eq_slots_and.contains(EnumSet.of(Enum.EquipSlotType.LHELD, Enum.EquipSlotType.RHELD));
}
public static boolean isTwoHanded(ItemTemplate template) {
if (!template.item_type.equals(Enum.ItemType.WEAPON))
return false;
return template.item_eq_slots_and.contains(EnumSet.of(Enum.EquipSlotType.LHELD, Enum.EquipSlotType.RHELD));
}
public static boolean isShield(Item item) {
if (item.template.item_skill_required.containsKey("Block"))