Browse Source

increase building gold limit to 100,000,000

lakebane-recovery
FatBoy-DOTC 4 days ago
parent
commit
4bca41ab6b
  1. 3
      src/engine/net/client/handlers/ItemProductionMsgHandler.java
  2. 2
      src/engine/objects/Building.java
  3. 1
      src/engine/server/MBServerStatics.java

3
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -24,6 +24,7 @@ import engine.net.client.msg.ErrorPopupMsg; @@ -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 { @@ -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());
}

2
src/engine/objects/Building.java

@ -221,7 +221,7 @@ public class Building extends AbstractWorldObject { @@ -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?

1
src/engine/server/MBServerStatics.java

@ -380,6 +380,7 @@ public class MBServerStatics { @@ -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;

Loading…
Cancel
Save