Browse Source

duplicated zone loading disabled

lakebane-new
FatBoy-DOTC 6 months ago
parent
commit
e98f9cf1f7
  1. 3
      src/engine/db/handlers/dbCityHandler.java
  2. 6
      src/engine/db/handlers/dbHandlerBase.java

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

@ -32,9 +32,6 @@ public class dbCityHandler extends dbHandlerBase { @@ -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);

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

@ -33,8 +33,14 @@ public abstract class dbHandlerBase { @@ -33,8 +33,14 @@ public abstract class dbHandlerBase {
if (rs.next()) {
abstractGameObject = localClass.getConstructor(ResultSet.class).newInstance(rs);
if(abstractGameObject.getObjectType().equals(GameObjectType.Zone)){
if(rs.getInt("canLoad") == 1){
DbManager.addToCache(abstractGameObject);
}
}else {
DbManager.addToCache(abstractGameObject);
}
}
} catch (Exception e) {
Logger.error(e);
}

Loading…
Cancel
Save