forked from MagicBane/Server
Removed unused handlers.
This commit is contained in:
@@ -695,87 +695,4 @@ public class dbGuildHandler extends dbHandlerBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO uncomment this when finished with guild history warehouse integration
|
|
||||||
// public HashMap<Integer, GuildRecord> GET_WAREHOUSE_GUILD_HISTORY(){
|
|
||||||
//
|
|
||||||
// HashMap<Integer, GuildRecord> tempMap = new HashMap<>();
|
|
||||||
// prepareCallable("SELECT * FROM `warehouse_guildhistory` WHERE `eventType` = 'CREATE'");
|
|
||||||
// try {
|
|
||||||
// ResultSet rs = executeQuery();
|
|
||||||
//
|
|
||||||
// while (rs.next()) {
|
|
||||||
// GuildRecord guildRecord = new GuildRecord(rs);
|
|
||||||
// tempMap.put(guildRecord.guildID, guildRecord);
|
|
||||||
// }
|
|
||||||
// }catch (Exception e){
|
|
||||||
// Logger.error(e);
|
|
||||||
// }
|
|
||||||
// return tempMap;
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
public ArrayList<Enum.MonsterType> LOAD_CHARTER_RACE_RESTRICTIONS(String name){
|
|
||||||
ArrayList<Enum.MonsterType> reqRaces= new ArrayList<>();
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `lore_charter_restrictions` WHERE `GUILDTYPE` = ?")) {
|
|
||||||
|
|
||||||
preparedStatement.setString(1, name);
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
String read = rs.getString("RACE_REQUIRED");
|
|
||||||
if(read != null){
|
|
||||||
for(String entry : read.split(";"))
|
|
||||||
reqRaces.add(Enum.MonsterType.valueOf(entry.replace("-","")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return reqRaces;
|
|
||||||
}
|
|
||||||
public ArrayList<Enum.PromoteType> LOAD_CHARTER_CLASS_RESTRICTIONS(String name){
|
|
||||||
ArrayList<Enum.PromoteType> reqClasses= new ArrayList<>();
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `lore_charter_restrictions` WHERE `GUILDTYPE` = ?")) {
|
|
||||||
|
|
||||||
preparedStatement.setString(1, name);
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
String read = rs.getString("CLASS_REQUIRED");
|
|
||||||
if(read != null){
|
|
||||||
for(String entry : read.split(";"))
|
|
||||||
reqClasses.add(Enum.PromoteType.valueOf(entry));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return reqClasses;
|
|
||||||
}
|
|
||||||
public Enum.SexType LOAD_CHARTER_SEX_RESTRICTIONS(String name){
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `lore_charter_restrictions` WHERE `GUILDTYPE` = ?")) {
|
|
||||||
|
|
||||||
preparedStatement.setString(1, name);
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
String read = rs.getString("SEX_REQUIRED");
|
|
||||||
if(read != null){
|
|
||||||
if(read == "Female")
|
|
||||||
return Enum.SexType.FEMALE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
return Enum.SexType.NONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user