Browse Source

city bane status update fix

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
931eaaae4a
  1. 26
      src/engine/objects/City.java

26
src/engine/objects/City.java

@ -237,18 +237,22 @@ public class City extends AbstractWorldObject {
writer.putInt(rulingGuild.getObjectUUID()); writer.putInt(rulingGuild.getObjectUUID());
writer.putString(rulingGuild.getName()); writer.putString(rulingGuild.getName());
if(city.getBane() != null) { try {
Bane bane = city.getBane(); if (city.getBane() != null) {
if(bane.daySet && bane.timeSet && bane.getLiveDate() != null){ Bane bane = city.getBane();
int day = bane.getLiveDate().dayOfMonth().get(); if (bane.daySet && bane.timeSet && bane.getLiveDate() != null) {
int month = bane.getLiveDate().getMonthOfYear(); int day = bane.getLiveDate().dayOfMonth().get();
int year = bane.getLiveDate().year().get(); int month = bane.getLiveDate().getMonthOfYear();
int hour = bane.getLiveDate().getHourOfDay(); int year = bane.getLiveDate().year().get();
writer.putString("BANE SET: " + month + "/" + day + "/" + year + " " + hour + ":00 CST"); int hour = bane.getLiveDate().getHourOfDay();
}else { writer.putString("BANE SET: " + month + "/" + day + "/" + year + " " + hour + ":00 CST");
writer.putString("BANED!: Unset"); } else {
writer.putString("BANED!: Unset");
}
} else {
writer.putString(city.motto);
} }
}else{ }catch(Exception e){
writer.putString(city.motto); writer.putString(city.motto);
} }
writer.putString(rulingGuild.getLeadershipType()); writer.putString(rulingGuild.getLeadershipType());

Loading…
Cancel
Save