forked from MagicBane/Server
duplicated zone loading disabled
This commit is contained in:
@@ -32,14 +32,7 @@ public abstract class dbHandlerBase {
|
||||
try {
|
||||
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);
|
||||
}
|
||||
DbManager.addToCache(abstractGameObject);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
|
||||
@@ -61,6 +61,7 @@ public class Zone extends AbstractGameObject {
|
||||
//public static ArrayList<Mob> respawnQue = new ArrayList<>();
|
||||
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
public static long lastRespawn = 0;
|
||||
public int canLoad;
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
@@ -101,6 +102,7 @@ public class Zone extends AbstractGameObject {
|
||||
if (hash == null)
|
||||
setHash();
|
||||
|
||||
this.canLoad = rs.getInt("canLoad");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -568,6 +568,9 @@ public class WorldServer {
|
||||
|
||||
for (Zone zone : rootParent) {
|
||||
|
||||
if(zone.canLoad == 0)
|
||||
continue;
|
||||
|
||||
try {
|
||||
ZoneManager.addZone(zone.getLoadNum(), zone);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user