From e98f9cf1f717d1c44375dbed50f04c150944b113 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 11 Jun 2024 19:40:14 -0500 Subject: [PATCH] duplicated zone loading disabled --- src/engine/db/handlers/dbCityHandler.java | 3 --- src/engine/db/handlers/dbHandlerBase.java | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/engine/db/handlers/dbCityHandler.java b/src/engine/db/handlers/dbCityHandler.java index f0daf3d0..bf3d9d98 100644 --- a/src/engine/db/handlers/dbCityHandler.java +++ b/src/engine/db/handlers/dbCityHandler.java @@ -32,9 +32,6 @@ public class dbCityHandler extends dbHandlerBase { String type = rs.getString("type"); switch (type) { case "zone": - if(rs.getInt("canLoad") == 0){ - return; - } Zone zone = new Zone(rs); DbManager.addToCache(zone); list.add(zone); diff --git a/src/engine/db/handlers/dbHandlerBase.java b/src/engine/db/handlers/dbHandlerBase.java index 1e1ee851..94a25ab2 100644 --- a/src/engine/db/handlers/dbHandlerBase.java +++ b/src/engine/db/handlers/dbHandlerBase.java @@ -33,7 +33,13 @@ public abstract class dbHandlerBase { if (rs.next()) { abstractGameObject = localClass.getConstructor(ResultSet.class).newInstance(rs); - DbManager.addToCache(abstractGameObject); + if(abstractGameObject.getObjectType().equals(GameObjectType.Zone)){ + if(rs.getInt("canLoad") == 1){ + DbManager.addToCache(abstractGameObject); + } + }else { + DbManager.addToCache(abstractGameObject); + } } } catch (Exception e) { Logger.error(e);