Browse Source

zone override

birdbane
FatBoy-DOTC 10 months ago
parent
commit
2bfdc0f203
  1. 16
      src/engine/objects/Realm.java

16
src/engine/objects/Realm.java

@ -76,33 +76,35 @@ public class Realm {
this.mapG = (float) (mapColor.getGreen() * 0.00392156863); this.mapG = (float) (mapColor.getGreen() * 0.00392156863);
this.mapB = (float) (mapColor.getBlue() * 0.00392156863); this.mapB = (float) (mapColor.getBlue() * 0.00392156863);
this.mapA = 1; this.mapA = 1;
if(overridePlacement(rs.getString("realmName"))){ if (overridePlacement(rs.getString("realmName"))) {
this.canBeClaimed = false; this.canBeClaimed = false;
this.canPlaceCities = false; this.canPlaceCities = false;
this.numCities = 0; this.numCities = 0;
this.rulingCityUUID = 0; this.rulingCityUUID = 0;
this.charterType = 0; this.charterType = 0;
this.realmName = "Plagued Land"; this.realmName = "Plagued Land";
}else { } else {
this.canBeClaimed = rs.getBoolean("canBeClaimed"); this.canBeClaimed = rs.getBoolean("canBeClaimed");
this.canPlaceCities = rs.getBoolean("canPlaceCities"); this.canPlaceCities = rs.getBoolean("canPlaceCities");
this.numCities = rs.getInt("numCities"); this.numCities = rs.getInt("numCities");
this.rulingCityUUID = rs.getInt("rulingCityUID"); this.rulingCityUUID = rs.getInt("rulingCityUID");
if(this.rulingCityUUID == 0){ if (this.rulingCityUUID == 0) {
this.charterType = rs.getInt("charterType"); this.charterType = rs.getInt("charterType");
}else { } else {
this.charterType = 0; this.charterType = 0;
} }
this.realmName = rs.getString("realmName"); this.realmName = rs.getString("realmName");
} }
java.sql.Timestamp ruledTimeStamp = rs.getTimestamp("ruledSince"); java.sql.Timestamp ruledTimeStamp = rs.getTimestamp("ruledSince");
if (ruledTimeStamp != null) if (ruledTimeStamp != null){
this.ruledSince = LocalDateTime.ofInstant(ruledTimeStamp.toInstant(), ZoneId.systemDefault()); this.ruledSince = LocalDateTime.ofInstant(ruledTimeStamp.toInstant(), ZoneId.systemDefault());
}else {
this.rulingCityUUID = 0;
this.charterType = 0;
}
this.mapY1 = rs.getFloat("mapY1"); this.mapY1 = rs.getFloat("mapY1");
this.mapX1 = rs.getFloat("mapX1"); this.mapX1 = rs.getFloat("mapX1");
this.mapY2 = rs.getFloat("mapY2"); this.mapY2 = rs.getFloat("mapY2");

Loading…
Cancel
Save