forked from MagicBane/Server
Refactored isShield and removed equipflag.
This commit is contained in:
@@ -467,4 +467,22 @@ public class ItemTemplate {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isShield(Item item) {
|
||||
|
||||
if (item.template.item_type.equals(Enum.ItemType.ARMOR) &&
|
||||
item.template.item_eq_slots_and.contains(Enum.EquipSlotType.LHELD))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isShield(ItemTemplate template) {
|
||||
|
||||
if (template.item_type.equals(Enum.ItemType.ARMOR) &&
|
||||
template.item_eq_slots_and.contains(Enum.EquipSlotType.LHELD))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user