duplicated zone loading disabled
This commit is contained in:
@@ -32,9 +32,6 @@ public class dbCityHandler extends dbHandlerBase {
|
|||||||
String type = rs.getString("type");
|
String type = rs.getString("type");
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "zone":
|
case "zone":
|
||||||
if(rs.getInt("canLoad") == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Zone zone = new Zone(rs);
|
Zone zone = new Zone(rs);
|
||||||
DbManager.addToCache(zone);
|
DbManager.addToCache(zone);
|
||||||
list.add(zone);
|
list.add(zone);
|
||||||
|
|||||||
@@ -33,7 +33,13 @@ public abstract class dbHandlerBase {
|
|||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
abstractGameObject = localClass.getConstructor(ResultSet.class).newInstance(rs);
|
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) {
|
} catch (Exception e) {
|
||||||
Logger.error(e);
|
Logger.error(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user