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 {
} 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)

3
src/engine/objects/Zone.java

@ -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) {

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

@ -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);

Loading…
Cancel
Save