forked from MagicBane/Server
mob resist issue
This commit is contained in:
@@ -23,7 +23,25 @@ public class dbResistHandler extends dbHandlerBase {
|
||||
public dbResistHandler() {
|
||||
|
||||
}
|
||||
public void LOAD_RESISTS_FOR_MOBS() {
|
||||
|
||||
Resists resists = null;
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mob_resists`;")) {
|
||||
|
||||
ResultSet rs = preparedStatement.executeQuery();
|
||||
|
||||
while(rs.next()){
|
||||
resists = new Resists(rs);
|
||||
if(!Resists.mobResists.containsKey(rs.getInt("ID")))
|
||||
Resists.mobResists.put(rs.getInt("ID"),resists);
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
public Resists GET_RESISTS_FOR_MOB(int resistID) {
|
||||
|
||||
Resists resists = null;
|
||||
|
||||
Reference in New Issue
Block a user