|
|
@ -21,6 +21,7 @@ import java.sql.PreparedStatement; |
|
|
|
import java.sql.ResultSet; |
|
|
|
import java.sql.ResultSet; |
|
|
|
import java.sql.SQLException; |
|
|
|
import java.sql.SQLException; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
|
|
|
|
public class dbMobBaseHandler extends dbHandlerBase { |
|
|
|
public class dbMobBaseHandler extends dbHandlerBase { |
|
|
|
|
|
|
|
|
|
|
@ -113,7 +114,7 @@ public class dbMobBaseHandler extends dbHandlerBase { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void LOAD_ALL_MOBBASE_RACES() { |
|
|
|
public void LOAD_ALL_MOBBASE_RACES() { |
|
|
|
|
|
|
|
MobBase.mobbase_race_types = new HashMap<>(); |
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase_race`;")) { |
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase_race`;")) { |
|
|
|
|
|
|
|
|
|
|
@ -121,13 +122,8 @@ public class dbMobBaseHandler extends dbHandlerBase { |
|
|
|
|
|
|
|
|
|
|
|
while (rs.next()) { |
|
|
|
while (rs.next()) { |
|
|
|
int id = rs.getInt("loadID"); |
|
|
|
int id = rs.getInt("loadID"); |
|
|
|
MobBase mobbase = MobBase.getMobBase(id); |
|
|
|
if(MobBase.mobbase_race_types.containsKey(id) == false){ |
|
|
|
if(mobbase != null){ |
|
|
|
MobBase.mobbase_race_types.put(id,rs.getString("raceType")); |
|
|
|
try { |
|
|
|
|
|
|
|
mobbase.raceType = rs.getString("raceType"); |
|
|
|
|
|
|
|
}catch(Exception e){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|