Browse Source

Moved method in class.

combat-2
MagicBot 8 months ago
parent
commit
5537934f88
  1. 17
      src/engine/objects/ItemTemplate.java

17
src/engine/objects/ItemTemplate.java

@ -370,15 +370,6 @@ public class ItemTemplate {
} }
public static boolean isTwoHanded(Item item) {
if (!item.template.item_type.equals(Enum.ItemType.WEAPON))
return false;
return item.template.item_eq_slots_and.contains(EnumSet.of(Enum.EquipSlotType.LHELD, Enum.EquipSlotType.RHELD));
}
public static Boolean ValidRace(Item item, Enum.MonsterType race) { public static Boolean ValidRace(Item item, Enum.MonsterType race) {
if (item.template.item_race_req.isEmpty() && item.template.item_race_res.isEmpty()) if (item.template.item_race_req.isEmpty() && item.template.item_race_res.isEmpty())
@ -468,6 +459,14 @@ public class ItemTemplate {
return false; return false;
} }
public static boolean isTwoHanded(Item item) {
if (!item.template.item_type.equals(Enum.ItemType.WEAPON))
return false;
return item.template.item_eq_slots_and.contains(EnumSet.of(Enum.EquipSlotType.LHELD, Enum.EquipSlotType.RHELD));
}
public static boolean isShield(Item item) { public static boolean isShield(Item item) {
if (item.template.item_skill_required.containsKey("Block")) if (item.template.item_skill_required.containsKey("Block"))

Loading…
Cancel
Save