|
|
@ -97,17 +97,19 @@ public class dbItemBaseHandler extends dbHandlerBase { |
|
|
|
Logger.info("read: " + recordsRead + " cached: " + ItemBase.getUUIDCache().size()); |
|
|
|
Logger.info("read: " + recordsRead + " cached: " + ItemBase.getUUIDCache().size()); |
|
|
|
} |
|
|
|
} |
|
|
|
public void LOAD_ALL_ITEM_REQUIREMENTS(){ |
|
|
|
public void LOAD_ALL_ITEM_REQUIREMENTS(){ |
|
|
|
for(ItemBase itemBase : ItemBase._itemBaseByUUID.values()) |
|
|
|
for(ItemBase itemBase : ItemBase._itemBaseByUUID.values()){ |
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_item_requirements WHERE 'itemID' = ?")) { |
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_item_requirements WHERE 'itemID' = ?")) { |
|
|
|
preparedStatement.setInt(1, itemBase.getUUID()); |
|
|
|
preparedStatement.setInt(1, itemBase.getUUID()); |
|
|
|
ResultSet rs = preparedStatement.executeQuery(); |
|
|
|
ResultSet rs = preparedStatement.executeQuery(); |
|
|
|
while(rs.next()) { |
|
|
|
while(rs.next()) { |
|
|
|
itemBase.LoadRequirements(rs.getString("racesRequired"),rs.getString("racesRestricted"),rs.getString("classesRequired"),rs.getString("classesRestricted"),rs.getString("discsRequired"),rs.getString("discsRestricted")); |
|
|
|
itemBase.LoadRequirements(rs.getString("racesRequired"), rs.getString("racesRestricted"), rs.getString("classesRequired"), rs.getString("classesRestricted"), rs.getString("discsRequired"), rs.getString("discsRestricted")); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (SQLException e) { |
|
|
|
} catch (SQLException e) { |
|
|
|
Logger.error("No Entry In static_item_requirements for item UUID: " + itemBase.getUUID()); |
|
|
|
Logger.error("No Entry In static_item_requirements for item UUID: " + itemBase.getUUID()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public HashMap<Integer, ArrayList<Integer>> LOAD_RUNES_FOR_NPC_AND_MOBS() { |
|
|
|
public HashMap<Integer, ArrayList<Integer>> LOAD_RUNES_FOR_NPC_AND_MOBS() { |
|
|
|
|
|
|
|
|
|
|
|