display correct maintenance costs
This commit is contained in:
@@ -275,7 +275,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
|
|||||||
|
|
||||||
writer.putString(npcHire.getName());
|
writer.putString(npcHire.getName());
|
||||||
writer.putInt(1);
|
writer.putInt(1);
|
||||||
writer.putInt(Blueprint.getNpcMaintCost(npcHire.getRank()));
|
writer.putInt(0);
|
||||||
if (npcHire.getObjectType() == GameObjectType.NPC)
|
if (npcHire.getObjectType() == GameObjectType.NPC)
|
||||||
writer.putInt(((NPC) npcHire).getContract().getIconID()); // Was 60
|
writer.putInt(((NPC) npcHire).getContract().getIconID()); // Was 60
|
||||||
else if (npcHire.getObjectType() == GameObjectType.Mob) {
|
else if (npcHire.getObjectType() == GameObjectType.Mob) {
|
||||||
@@ -497,7 +497,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
|
|||||||
if (building.getBlueprint() == null)
|
if (building.getBlueprint() == null)
|
||||||
writer.putInt(0);
|
writer.putInt(0);
|
||||||
else
|
else
|
||||||
writer.putInt(building.getBlueprint().getMaintCost(building.getRank())); // maint cost
|
writer.putInt(building.getBlueprint().getMaintCost()); // maint cost
|
||||||
|
|
||||||
if (building.getRank() == 8) {
|
if (building.getRank() == 8) {
|
||||||
writer.putInt(74856115); // Stone
|
writer.putInt(74856115); // Stone
|
||||||
|
|||||||
@@ -605,26 +605,14 @@ public class Blueprint {
|
|||||||
return this.blueprintUUID;
|
return this.blueprintUUID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaintCost(int rank) {
|
public int getMaintCost() {
|
||||||
|
|
||||||
int maintCost = Integer.MAX_VALUE;
|
int maintCost = Integer.MAX_VALUE;
|
||||||
|
|
||||||
switch (this.buildingGroup) {
|
if(this.buildingGroup.equals(BuildingGroup.TOL)){
|
||||||
case TOL:
|
return 3000000;
|
||||||
case BARRACK:
|
}else{
|
||||||
maintCost = (61500 * rank) + 19500;
|
return 0;
|
||||||
break;
|
|
||||||
case SPIRE:
|
|
||||||
maintCost = (4800 * rank) + 1200;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (maxRank == 1)
|
|
||||||
maintCost = 22500;
|
|
||||||
else
|
|
||||||
maintCost = (15900 * rank) + 3300;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return maintCost;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user