Browse Source

duplicated zone loading disabled

lakebane-new
FatBoy-DOTC 5 months ago
parent
commit
17fcf0ee40
  1. 3
      src/engine/db/handlers/dbHandlerBase.java
  2. 3
      src/engine/objects/Zone.java
  3. 3
      src/engine/server/world/WorldServer.java

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

@ -62,6 +62,9 @@ public abstract class dbHandlerBase { @@ -62,6 +62,9 @@ public abstract class dbHandlerBase {
} else {
AbstractGameObject toAdd = localClass.getConstructor(ResultSet.class).newInstance(rs);
DbManager.addToCache(toAdd);
if(toAdd.getObjectType().equals(GameObjectType.Zone) && rs.getInt("canLoad") == 0){
continue;
}
objectList.add((T) toAdd);
if (toAdd != null && toAdd instanceof AbstractWorldObject)

3
src/engine/objects/Zone.java

@ -61,7 +61,6 @@ public class Zone extends AbstractGameObject { @@ -61,7 +61,6 @@ 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
*/
@ -102,8 +101,6 @@ public class Zone extends AbstractGameObject { @@ -102,8 +101,6 @@ public class Zone extends AbstractGameObject {
if (hash == null)
setHash();
this.canLoad = rs.getInt("canLoad");
}
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) {

3
src/engine/server/world/WorldServer.java

@ -568,9 +568,6 @@ public class WorldServer { @@ -568,9 +568,6 @@ public class WorldServer {
for (Zone zone : rootParent) {
if(zone.canLoad == 0)
continue;
try {
ZoneManager.addZone(zone.getLoadNum(), zone);

Loading…
Cancel
Save