From fbfca46d2ffca19d0c2330d0f804070ab9ab0be7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 11 Jun 2024 20:02:58 -0500 Subject: [PATCH] fix for mines loading --- src/engine/db/handlers/dbHandlerBase.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/db/handlers/dbHandlerBase.java b/src/engine/db/handlers/dbHandlerBase.java index e237306c..67ec76a7 100644 --- a/src/engine/db/handlers/dbHandlerBase.java +++ b/src/engine/db/handlers/dbHandlerBase.java @@ -60,11 +60,12 @@ public abstract class dbHandlerBase { if (DbManager.inCache(localObjectType, id)) { objectList.add((T) DbManager.getFromCache(localObjectType, id)); } else { - AbstractGameObject toAdd = localClass.getConstructor(ResultSet.class).newInstance(rs); - DbManager.addToCache(toAdd); - if(toAdd.getObjectType().equals(GameObjectType.Mine) && rs.getInt("mineLiveHour") == 1){ + int mineLiveHour = rs.getInt("mineLiveHour"); + if (!rs.wasNull() && mineLiveHour == 1) { continue; } + AbstractGameObject toAdd = localClass.getConstructor(ResultSet.class).newInstance(rs); + DbManager.addToCache(toAdd); if(toAdd.getObjectType().equals(GameObjectType.Zone) && rs.getInt("canLoad") == 0){ continue; }