|
|
|
@ -22,7 +22,6 @@ import java.util.HashMap;
@@ -22,7 +22,6 @@ import java.util.HashMap;
|
|
|
|
|
public class ItemBase { |
|
|
|
|
|
|
|
|
|
public static ItemBase GOLD_ITEM_BASE = null; |
|
|
|
|
public static int GOLD_BASE_ID = 7; |
|
|
|
|
public static HashMap<Integer, ItemBase> _itemBaseByUUID = new HashMap<>(); |
|
|
|
|
private static final HashMap<Integer, Integer> itemHashIDMap = new HashMap<>(); |
|
|
|
|
private static final HashMap<String, Integer> _IDsByNames = new HashMap<>(); |
|
|
|
@ -79,35 +78,15 @@ public class ItemBase {
@@ -79,35 +78,15 @@ public class ItemBase {
|
|
|
|
|
_IDsByNames.put(template.item_base_name.toLowerCase().replace(" ", "_"), itemBase.uuid); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static HashMap<Integer, Integer> getItemHashIDMap() { |
|
|
|
|
return itemHashIDMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static ItemBase getItemBase(int uuid) { |
|
|
|
|
|
|
|
|
|
return _itemBaseByUUID.get(uuid); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static ItemBase getGoldItemBase() { |
|
|
|
|
if (ItemBase.GOLD_ITEM_BASE == null) |
|
|
|
|
ItemBase.GOLD_ITEM_BASE = getItemBase(7); |
|
|
|
|
return ItemBase.GOLD_ITEM_BASE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static int getIDByName(String name) { |
|
|
|
|
if (ItemBase._IDsByNames.containsKey(name)) |
|
|
|
|
return ItemBase._IDsByNames.get(name); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static HashMap<Integer, ItemBase> getUUIDCache() { |
|
|
|
|
return _itemBaseByUUID; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static ArrayList<ItemBase> getResourceList() { |
|
|
|
|
return _resourceList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void loadAllItemBases() { |
|
|
|
|
DbManager.ItemBaseQueries.LOAD_ALL_ITEMBASES(); |
|
|
|
|
} |
|
|
|
@ -118,11 +97,6 @@ public class ItemBase {
@@ -118,11 +97,6 @@ public class ItemBase {
|
|
|
|
|
return ID > 2499 && ID < 3050; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean isGlass() { |
|
|
|
|
int ID = uuid; |
|
|
|
|
return ID > 7000099 && ID < 7000281; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getModTable() { |
|
|
|
|
return modTable; |
|
|
|
|
} |
|
|
|
|