Browse Source

realm override

birdbane
FatBoy-DOTC 10 months ago
parent
commit
930434f35b
  1. 26
      src/engine/objects/Realm.java

26
src/engine/objects/Realm.java

@ -76,9 +76,15 @@ public class Realm { @@ -76,9 +76,15 @@ public class Realm {
this.mapG = (float) (mapColor.getGreen() * 0.00392156863);
this.mapB = (float) (mapColor.getBlue() * 0.00392156863);
this.mapA = 1;
this.canBeClaimed = rs.getBoolean("canBeClaimed");
this.canPlaceCities = rs.getBoolean("canPlaceCities");
this.numCities = rs.getInt("numCities");
if(overridePlacement(rs.getString("realmName"))){
this.canBeClaimed = false;
this.canPlaceCities = false;
this.numCities = 0;
}else {
this.canBeClaimed = rs.getBoolean("canBeClaimed");
this.canPlaceCities = rs.getBoolean("canPlaceCities");
this.numCities = rs.getInt("numCities");
}
this.realmName = rs.getString("realmName");
this.rulingCityUUID = rs.getInt("rulingCityUID");
this.charterType = rs.getInt("charterType");
@ -100,6 +106,20 @@ public class Realm { @@ -100,6 +106,20 @@ public class Realm {
this.hash = rs.getString("hash");
}
public static boolean overridePlacement(String realm){
switch(realm.toLowerCase()) {
case "neshraa":
case "adduram":
case "letharuun":
case "kralgaard":
case "ecklund":
case "nordenthol":
case "thollmar":
case "haldorn isles":
return true;
}
return false;
}
public static void configureAllRealms() {
for (Realm realm : Realm._realms.values()) {

Loading…
Cancel
Save