From e1d36125d2f0c54900a8b391206001c7565c9050 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 28 Dec 2024 08:11:14 -0600 Subject: [PATCH] bane commander NPC --- src/engine/objects/City.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index dfe53f4a..dfebdb20 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -234,7 +234,20 @@ public class City extends AbstractWorldObject { writer.putInt(rulingGuild.getObjectUUID()); writer.putString(rulingGuild.getName()); - writer.putString(city.motto); + if(city.getBane() != null) { + Bane bane = city.getBane(); + if(bane.daySet && bane.timeSet){ + int day = bane.getLiveDate().dayOfMonth().get(); + int month = bane.getLiveDate().getMonthOfYear(); + int year = bane.getLiveDate().year().get(); + int hour = bane.getLiveDate().getHourOfDay(); + writer.putString("BANE SET: " + month + "/" + day + "/" + year + " " + hour + ":00 pm CST"); + }else { + writer.putString("BANED!: Unset"); + } + }else{ + writer.putString(city.motto); + } writer.putString(rulingGuild.getLeadershipType()); // Serialize guild ruler's name @@ -320,8 +333,11 @@ public class City extends AbstractWorldObject { writer.putFloat(city.location.y); writer.putFloat(city.location.z); - writer.putInt(city.siegesWithstood); - + if(city.getBane() != null) { + writer.putInt(city.getBane().capSize); + }else{ + writer.putInt(0); + } writer.put((byte) 1); writer.put((byte) 0); writer.putInt(0x64);