Browse Source

server side race/cass restrictions

combat-2
FatBoy-DOTC 9 months ago
parent
commit
28bf0413cc
  1. 4
      src/engine/db/handlers/dbItemBaseHandler.java

4
src/engine/db/handlers/dbItemBaseHandler.java

@ -102,7 +102,7 @@ public void LOAD_ALL_ITEM_REQUIREMENTS(){
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()) {
String racesRequired = ""; String racesRequired = "";
if(rs.getString("racesRequired") != null) if(rs.getString("racesRequired") != null)
@ -129,7 +129,7 @@ public void LOAD_ALL_ITEM_REQUIREMENTS(){
discsRestricted = rs.getString("discsRestricted"); discsRestricted = rs.getString("discsRestricted");
itemBase.LoadRequirements(racesRequired,racesRestricted,classesRequired, classesRestricted, discsRequired, discsRestricted); itemBase.LoadRequirements(racesRequired,racesRestricted,classesRequired, classesRestricted, discsRequired, 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());
} }

Loading…
Cancel
Save