bane commander NPC

This commit is contained in:
2024-12-28 07:53:49 -06:00
parent 3971548142
commit a92cc6506c
2 changed files with 2 additions and 1 deletions
@@ -86,6 +86,7 @@ public class dbBaneHandler extends dbHandlerBase {
} }
public boolean SET_BANE_TIME_NEW(int hour, int cityUUID) { public boolean SET_BANE_TIME_NEW(int hour, int cityUUID) {
hour += 12;
try (Connection connection = DbManager.getConnection(); try (Connection connection = DbManager.getConnection();
PreparedStatement getStatement = connection.prepareStatement("SELECT `placementDate`, `liveDate` FROM `dyn_banes` WHERE `cityUUID`=?"); PreparedStatement getStatement = connection.prepareStatement("SELECT `placementDate`, `liveDate` FROM `dyn_banes` WHERE `cityUUID`=?");
PreparedStatement updateStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `liveDate`=?, `time_set`=? WHERE `cityUUID`=?")) { PreparedStatement updateStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `liveDate`=?, `time_set`=? WHERE `cityUUID`=?")) {
+1 -1
View File
@@ -354,7 +354,7 @@ public class Contract extends AbstractGameObject {
} }
} }
if (updateBaneTime > 0) { if (updateBaneTime > 0) {
if(DbManager.BaneQueries.SET_BANE_TIME_NEW(updateBaneDay,bane.getCityUUID())){ if(DbManager.BaneQueries.SET_BANE_TIME_NEW(updateBaneTime,bane.getCityUUID())){
bane.timeSet = true; bane.timeSet = true;
} }
} }