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
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/xsd/Doors.xsd b/L2J_Mobius_C6_Interlude/dist/game/data/xsd/Doors.xsd
index dfc2b5c1f5..4a6f93a015 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/xsd/Doors.xsd
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/xsd/Doors.xsd
@@ -21,7 +21,7 @@
-
+
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/GameServer.java
index 40b435cdae..060e76737c 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/GameServer.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/GameServer.java
@@ -389,33 +389,8 @@ public class GameServer
Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
- try
- {
- final DoorData doorTable = DoorData.getInstance();
-
- // Opened by players like L2OFF
- doorTable.getDoor(19160012).openMe();
- doorTable.getDoor(19160013).openMe();
- doorTable.getDoor(19160014).openMe();
- doorTable.getDoor(19160015).openMe();
- doorTable.getDoor(19160016).openMe();
- doorTable.getDoor(19160017).openMe();
- doorTable.getDoor(24190001).openMe();
- doorTable.getDoor(24190002).openMe();
- doorTable.getDoor(24190003).openMe();
- doorTable.getDoor(24190004).openMe();
- doorTable.getDoor(23180001).openMe();
- doorTable.getDoor(23180002).openMe();
- doorTable.getDoor(23180003).openMe();
- doorTable.getDoor(23180004).openMe();
- doorTable.getDoor(23180005).openMe();
- doorTable.getDoor(23180006).openMe();
- doorTable.checkAutoOpen();
- }
- catch (NullPointerException e)
- {
- LOGGER.info("There are errors in Doors.xml file, or missing doors.");
- }
+ // Schedule auto opening/closing doors.
+ DoorData.getInstance().checkAutoOpen();
Util.printSection("Scripts");
if (!Config.ALT_DEV_NO_SCRIPT)
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/DoorData.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/DoorData.java
index e899b603eb..c447ba3e65 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/DoorData.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/DoorData.java
@@ -74,7 +74,7 @@ public class DoorData implements IXmlReader
set.set(attr.getNodeName(), attr.getNodeValue());
}
- final DoorInstance door = parseList(set);
+ final DoorInstance door = createDoor(set);
DOORS.put(door.getDoorId(), door);
door.spawnMe(door.getX(), door.getY(), door.getZ());
final ClanHall clanhall = ClanHallManager.getInstance().getNearbyClanHall(door.getX(), door.getY(), 500);
@@ -91,7 +91,7 @@ public class DoorData implements IXmlReader
}
}
- public static DoorInstance parseList(StatsSet set)
+ public static DoorInstance createDoor(StatsSet set)
{
final String name = set.getString("name");
final int id = set.getInt("id");
@@ -108,7 +108,7 @@ public class DoorData implements IXmlReader
final int pDef = set.getInt("pDef");
final int mDef = set.getInt("mDef");
final boolean unlockable = set.getBoolean("unlockable", false);
- final boolean autoOpen = set.getBoolean("autoOpen", false);
+ final boolean isOpen = set.getBoolean("isOpen", false);
if (xMin > xMax)
{
@@ -192,7 +192,7 @@ public class DoorData implements IXmlReader
LOGGER.warning("Error in door data, ID:" + id + " " + e);
}
door.setCurrentHpMp(door.getMaxHp(), door.getMaxMp());
- door.setOpen(autoOpen);
+ door.setOpen(isOpen);
door.setXYZInvisible(x, y, z);
return door;
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/ClanHall.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/ClanHall.java
index 91f75e9e36..b68220a378 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/ClanHall.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/ClanHall.java
@@ -527,7 +527,7 @@ public class ClanHall
if (door.getCurrentHp() <= 0)
{
door.decayMe(); // Kill current if not killed already
- door = DoorData.parseList(_doorDefault.get(i));
+ door = DoorData.createDoor(_doorDefault.get(i));
door.spawnMe(door.getX(), door.getY(), door.getZ());
getDoors().set(i, door);
@@ -883,7 +883,7 @@ public class ClanHall
set.set("mDef", rs.getInt("mDef"));
_doorDefault.add(set);
- final DoorInstance door = DoorData.parseList(_doorDefault.get(_doorDefault.size() - 1));
+ final DoorInstance door = DoorData.createDoor(set);
door.spawnMe(door.getX(), door.getY(), door.getZ());
_doors.add(door);
DoorData.getInstance().putDoor(door);
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Castle.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Castle.java
index 068d7429f0..26cb43ac7f 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Castle.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Castle.java
@@ -454,7 +454,7 @@ public class Castle
if (door.getCurrentHp() <= 0)
{
door.decayMe(); // Kill current if not killed already
- door = DoorData.parseList(_doorDefault.get(i));
+ door = DoorData.createDoor(_doorDefault.get(i));
if (isDoorWeak)
{
@@ -588,7 +588,7 @@ public class Castle
set.set("mDef", rs.getInt("mDef"));
_doorDefault.add(set);
- final DoorInstance door = DoorData.parseList(_doorDefault.get(_doorDefault.size() - 1));
+ final DoorInstance door = DoorData.createDoor(set);
door.spawnMe(door.getX(), door.getY(), door.getZ());
_doors.add(door);
DoorData.getInstance().putDoor(door);
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Fort.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Fort.java
index cf9499e73f..5719a61741 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Fort.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/siege/Fort.java
@@ -287,7 +287,7 @@ public class Fort
if (door.getCurrentHp() >= 0)
{
door.decayMe(); // Kill current if not killed already
- door = DoorData.parseList(_doorDefault.get(i));
+ door = DoorData.createDoor(_doorDefault.get(i));
if (isDoorWeak)
{
@@ -413,11 +413,9 @@ public class Fort
set.set("mDef", rs.getInt("mDef"));
_doorDefault.add(set);
- final DoorInstance door = DoorData.parseList(_doorDefault.get(_doorDefault.size() - 1));
+ final DoorInstance door = DoorData.createDoor(set);
door.spawnMe(door.getX(), door.getY(), door.getZ());
-
_doors.add(door);
-
DoorData.getInstance().putDoor(door);
}