duplicated zone loading disabled
This commit is contained in:
@@ -62,6 +62,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)
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ public class Zone extends AbstractGameObject {
|
|||||||
//public static ArrayList<Mob> respawnQue = new ArrayList<>();
|
//public static ArrayList<Mob> respawnQue = new ArrayList<>();
|
||||||
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||||
public static long lastRespawn = 0;
|
public static long lastRespawn = 0;
|
||||||
public int canLoad;
|
|
||||||
/**
|
/**
|
||||||
* ResultSet Constructor
|
* ResultSet Constructor
|
||||||
*/
|
*/
|
||||||
@@ -102,8 +101,6 @@ public class Zone extends AbstractGameObject {
|
|||||||
if (hash == null)
|
if (hash == null)
|
||||||
setHash();
|
setHash();
|
||||||
|
|
||||||
this.canLoad = rs.getInt("canLoad");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) {
|
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) {
|
||||||
|
|||||||
@@ -568,9 +568,6 @@ public class WorldServer {
|
|||||||
|
|
||||||
for (Zone zone : rootParent) {
|
for (Zone zone : rootParent) {
|
||||||
|
|
||||||
if(zone.canLoad == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ZoneManager.addZone(zone.getLoadNum(), zone);
|
ZoneManager.addZone(zone.getLoadNum(), zone);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user