forked from MagicBane/Server
MagicBot
1 year ago
6 changed files with 27 additions and 72 deletions
@ -1,43 +0,0 @@
@@ -1,43 +0,0 @@
|
||||
package engine.db.handlers; |
||||
|
||||
import engine.InterestManagement.Terrain; |
||||
import engine.gameManager.DbManager; |
||||
import org.pmw.tinylog.Logger; |
||||
|
||||
import java.sql.Connection; |
||||
import java.sql.PreparedStatement; |
||||
import java.sql.ResultSet; |
||||
import java.sql.SQLException; |
||||
|
||||
public class dbHeightMapHandler extends dbHandlerBase { |
||||
|
||||
public dbHeightMapHandler() { |
||||
|
||||
|
||||
} |
||||
|
||||
public void LOAD_ALL_HEIGHTMAPS() { |
||||
|
||||
Terrain thisHeightmap; |
||||
Terrain.heightMapsCreated = 0; |
||||
|
||||
try (Connection connection = DbManager.getConnection(); |
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_zone_heightmap INNER JOIN static_zone_size ON static_zone_size.loadNum = static_zone_heightmap.zoneLoadID")) { |
||||
|
||||
ResultSet rs = preparedStatement.executeQuery(); |
||||
|
||||
while (rs.next()) { |
||||
thisHeightmap = new Terrain(rs); |
||||
|
||||
if (thisHeightmap.heightmapImage == null) { |
||||
Logger.info("Imagemap for " + thisHeightmap.heightMapID + " was null"); |
||||
continue; |
||||
} |
||||
} |
||||
|
||||
} catch (SQLException e) { |
||||
Logger.error(e); |
||||
} |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue