From 0bbedd5983289ffd8860213f79fe591280388db8 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 5 Apr 2024 09:33:57 -0400 Subject: [PATCH] Code removed; column populated --- src/engine/db/handlers/dbContractHandler.java | 19 ------------------- src/engine/server/world/WorldServer.java | 4 ---- 2 files changed, 23 deletions(-) diff --git a/src/engine/db/handlers/dbContractHandler.java b/src/engine/db/handlers/dbContractHandler.java index 33f7d851..5cdb69f5 100644 --- a/src/engine/db/handlers/dbContractHandler.java +++ b/src/engine/db/handlers/dbContractHandler.java @@ -20,7 +20,6 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.ArrayList; public class dbContractHandler extends dbHandlerBase { @@ -29,24 +28,6 @@ public class dbContractHandler extends dbHandlerBase { this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } - public void UPDATE_CONTRACTS() { - - ArrayList contracts = new ArrayList<>(); - - try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_contract`;")) { - - ResultSet rs = preparedStatement.executeQuery(); - contracts = getObjectsFromRs(rs, 1000); - - } catch (SQLException e) { - Logger.error(e); - } - - for (Contract contract : contracts) - DbManager.ContractQueries.updateAllowedBuildings(contract); - } - public Contract GET_CONTRACT(final int objectUUID) { Contract contract = (Contract) DbManager.getFromCache(mbEnums.GameObjectType.Contract, objectUUID); diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 2474a6e1..25a63082 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -455,10 +455,6 @@ public class WorldServer { Logger.info("Starting Mob Respawn Thread"); Respawner.start(); - // Update contract field - Logger.info("Starting Mob Respawn Thread"); - DbManager.ContractQueries.UPDATE_CONTRACTS(); - // Run maintenance MaintenanceManager.dailyMaintenance();