Browse Source

zone loading

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
d0b716eb41
  1. 3
      src/engine/db/handlers/dbHandlerBase.java
  2. 7
      src/engine/db/handlers/dbZoneHandler.java

3
src/engine/db/handlers/dbHandlerBase.java

@ -63,6 +63,9 @@ public abstract class dbHandlerBase { @@ -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)

7
src/engine/db/handlers/dbZoneHandler.java

@ -84,13 +84,6 @@ public class dbZoneHandler extends dbHandlerBase { @@ -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);
}

Loading…
Cancel
Save