zone loading
This commit is contained in:
@@ -63,6 +63,9 @@ public abstract class dbHandlerBase {
|
|||||||
} else {
|
} else {
|
||||||
AbstractGameObject toAdd = localClass.getConstructor(ResultSet.class).newInstance(rs);
|
AbstractGameObject toAdd = localClass.getConstructor(ResultSet.class).newInstance(rs);
|
||||||
DbManager.addToCache(toAdd);
|
DbManager.addToCache(toAdd);
|
||||||
|
if(toAdd.getObjectType().equals(GameObjectType.Zone) && rs.getInt("canLoad") == 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
objectList.add((T) toAdd);
|
objectList.add((T) toAdd);
|
||||||
|
|
||||||
if (toAdd != null && toAdd instanceof AbstractWorldObject)
|
if (toAdd != null && toAdd instanceof AbstractWorldObject)
|
||||||
|
|||||||
@@ -84,13 +84,6 @@ public class dbZoneHandler extends dbHandlerBase {
|
|||||||
ResultSet rs = preparedStatement.executeQuery();
|
ResultSet rs = preparedStatement.executeQuery();
|
||||||
zoneList = getObjectsFromRs(rs, 2000);
|
zoneList = getObjectsFromRs(rs, 2000);
|
||||||
|
|
||||||
|
|
||||||
zoneList.clear();
|
|
||||||
while(rs.next()){
|
|
||||||
if(rs.getInt("canLoad") == 1)
|
|
||||||
zoneList.add(new Zone(rs));
|
|
||||||
|
|
||||||
}
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Logger.error(e);
|
Logger.error(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user