From b1de3755fdce5b7837a0f424a68d9a8b178a00ae Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 3 Jul 2024 20:07:27 -0500 Subject: [PATCH] display correct maintenance costs --- .../net/client/msg/ManageCityAssetsMsg.java | 4 ++-- src/engine/objects/Blueprint.java | 22 +++++-------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/engine/net/client/msg/ManageCityAssetsMsg.java b/src/engine/net/client/msg/ManageCityAssetsMsg.java index 52205b61..41ffa1bf 100644 --- a/src/engine/net/client/msg/ManageCityAssetsMsg.java +++ b/src/engine/net/client/msg/ManageCityAssetsMsg.java @@ -275,7 +275,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg { writer.putString(npcHire.getName()); writer.putInt(1); - writer.putInt(Blueprint.getNpcMaintCost(npcHire.getRank())); + writer.putInt(0); if (npcHire.getObjectType() == GameObjectType.NPC) writer.putInt(((NPC) npcHire).getContract().getIconID()); // Was 60 else if (npcHire.getObjectType() == GameObjectType.Mob) { @@ -497,7 +497,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg { if (building.getBlueprint() == null) writer.putInt(0); else - writer.putInt(building.getBlueprint().getMaintCost(building.getRank())); // maint cost + writer.putInt(building.getBlueprint().getMaintCost()); // maint cost if (building.getRank() == 8) { writer.putInt(74856115); // Stone diff --git a/src/engine/objects/Blueprint.java b/src/engine/objects/Blueprint.java index 4f9939eb..9e96dd21 100644 --- a/src/engine/objects/Blueprint.java +++ b/src/engine/objects/Blueprint.java @@ -605,26 +605,14 @@ public class Blueprint { return this.blueprintUUID; } - public int getMaintCost(int rank) { + public int getMaintCost() { int maintCost = Integer.MAX_VALUE; - switch (this.buildingGroup) { - case TOL: - case BARRACK: - maintCost = (61500 * rank) + 19500; - break; - case SPIRE: - maintCost = (4800 * rank) + 1200; - break; - default: - if (maxRank == 1) - maintCost = 22500; - else - maintCost = (15900 * rank) + 3300; - break; + if(this.buildingGroup.equals(BuildingGroup.TOL)){ + return 3000000; + }else{ + return 0; } - - return maintCost; } }