From a92cc6506c0d7fd270e5adcafabcbfb482e351f9 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 28 Dec 2024 07:53:49 -0600 Subject: [PATCH] bane commander NPC --- src/engine/db/handlers/dbBaneHandler.java | 1 + src/engine/objects/Contract.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/db/handlers/dbBaneHandler.java b/src/engine/db/handlers/dbBaneHandler.java index 33cd56eb..72d9c679 100644 --- a/src/engine/db/handlers/dbBaneHandler.java +++ b/src/engine/db/handlers/dbBaneHandler.java @@ -86,6 +86,7 @@ public class dbBaneHandler extends dbHandlerBase { } public boolean SET_BANE_TIME_NEW(int hour, int cityUUID) { + hour += 12; try (Connection connection = DbManager.getConnection(); 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`=?")) { diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index 120ff202..b76fabbb 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -354,7 +354,7 @@ public class Contract extends AbstractGameObject { } } 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; } }