From d0b716eb41c4758e0171f3f2af5392ebb857bd4d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 30 Apr 2024 20:03:22 -0500 Subject: [PATCH] zone loading --- src/engine/db/handlers/dbHandlerBase.java | 3 +++ src/engine/db/handlers/dbZoneHandler.java | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/engine/db/handlers/dbHandlerBase.java b/src/engine/db/handlers/dbHandlerBase.java index 1e1ee851..f484b93b 100644 --- a/src/engine/db/handlers/dbHandlerBase.java +++ b/src/engine/db/handlers/dbHandlerBase.java @@ -63,6 +63,9 @@ public abstract class dbHandlerBase { } else { AbstractGameObject toAdd = localClass.getConstructor(ResultSet.class).newInstance(rs); DbManager.addToCache(toAdd); + if(toAdd.getObjectType().equals(GameObjectType.Zone) && rs.getInt("canLoad") == 0){ + continue; + } objectList.add((T) toAdd); if (toAdd != null && toAdd instanceof AbstractWorldObject) diff --git a/src/engine/db/handlers/dbZoneHandler.java b/src/engine/db/handlers/dbZoneHandler.java index e5fe9e62..84abc1a7 100644 --- a/src/engine/db/handlers/dbZoneHandler.java +++ b/src/engine/db/handlers/dbZoneHandler.java @@ -84,13 +84,6 @@ public class dbZoneHandler extends dbHandlerBase { ResultSet rs = preparedStatement.executeQuery(); zoneList = getObjectsFromRs(rs, 2000); - - zoneList.clear(); - while(rs.next()){ - if(rs.getInt("canLoad") == 1) - zoneList.add(new Zone(rs)); - - } } catch (SQLException e) { Logger.error(e); }