Browse Source

Error trap

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
a3d29bb8f0
  1. 8
      src/engine/objects/Zone.java

8
src/engine/objects/Zone.java

@ -77,7 +77,10 @@ public class Zone extends AbstractGameObject { @@ -77,7 +77,10 @@ public class Zone extends AbstractGameObject {
* ResultSet Constructor
*/
public Zone(ResultSet rs) throws SQLException {
super(rs);
try {
this.parentZoneID = rs.getInt("parent");
this.playerCityUUID = rs.getInt("playerCityUUID");
this.guild_zone = this.playerCityUUID != 0;
@ -127,13 +130,16 @@ public class Zone extends AbstractGameObject { @@ -127,13 +130,16 @@ public class Zone extends AbstractGameObject {
if (parentZone != null)
parentZone.addNode(this);
} catch (Exception e) {
Logger.error(e);
throw new RuntimeException(e);
}
// If zone doesn't yet hava a hash then write it back to the zone table
if (hash == null)
setHash();
}
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) {

Loading…
Cancel
Save