diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index d4d754e1..63dbd6a2 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -24,6 +24,7 @@ import engine.net.client.msg.ErrorPopupMsg; import engine.net.client.msg.ItemProductionMsg; import engine.net.client.msg.ManageNPCMsg; import engine.objects.*; +import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; import java.util.HashMap; @@ -361,7 +362,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { vendor.removeItemFromForge(targetItem); //refund the gold for cancelled item - if(vendor.building.getStrongboxValue() + targetItem.getItemBase().getBaseValue() < 15000000){ + if(vendor.building.getStrongboxValue() + targetItem.getItemBase().getBaseValue() < MBServerStatics.BUILDING_GOLD_LIMIT){ vendor.building.setStrongboxValue(vendor.building.getStrongboxValue() + targetItem.getItemBase().getBaseValue()); } diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index 8c79d2c8..a06894fc 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -221,7 +221,7 @@ public class Building extends AbstractWorldObject { } this._strongboxValue = rs.getInt("currentGold"); - this.maxGold = 15000000; // *** Refactor to blueprint method + this.maxGold = MBServerStatics.BUILDING_GOLD_LIMIT; // *** Refactor to blueprint method this.reserve = rs.getInt("reserve"); // Does building have a protection contract? diff --git a/src/engine/server/MBServerStatics.java b/src/engine/server/MBServerStatics.java index e9fdad66..7c97efc8 100644 --- a/src/engine/server/MBServerStatics.java +++ b/src/engine/server/MBServerStatics.java @@ -380,6 +380,7 @@ public class MBServerStatics { public static final int MINE_EARLY_WINDOW = 16; // 4pm public static final int MINE_LATE_WINDOW = 0; // Midnight public static final Long THREE_MINUTES = 180000L; + public static final int BUILDING_GOLD_LIMIT = 100000000; public static boolean DEBUG_PROTOCOL = false; public static int SPATIAL_HASH_BUCKETSX = 16384; public static int SPATIAL_HASH_BUCKETSY = 12288;