From 642270aacfbeacd33fa3d90ee0de8a9924ff6b00 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 7 Mar 2024 09:30:13 -0500 Subject: [PATCH] Helper method created --- src/engine/objects/ItemTemplate.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index c8d74160..ad3c699a 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -356,4 +356,11 @@ public class ItemTemplate { } + public static boolean isTwoHanded(ItemTemplate template) { + + if (!template.item_type.equals(Enum.ItemType.WEAPON)) + return false; + + return template.item_eq_slots_or.contains(EnumSet.of(Enum.ItemEquipSlotType.LHELD, Enum.ItemEquipSlotType.RHELD)); + } }