forked from MagicBane/Server
increase building gold limit to 100,000,000
This commit is contained in:
@@ -24,6 +24,7 @@ import engine.net.client.msg.ErrorPopupMsg;
|
|||||||
import engine.net.client.msg.ItemProductionMsg;
|
import engine.net.client.msg.ItemProductionMsg;
|
||||||
import engine.net.client.msg.ManageNPCMsg;
|
import engine.net.client.msg.ManageNPCMsg;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.server.MBServerStatics;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -361,7 +362,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
|||||||
vendor.removeItemFromForge(targetItem);
|
vendor.removeItemFromForge(targetItem);
|
||||||
|
|
||||||
//refund the gold for cancelled item
|
//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());
|
vendor.building.setStrongboxValue(vendor.building.getStrongboxValue() + targetItem.getItemBase().getBaseValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ public class Building extends AbstractWorldObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._strongboxValue = rs.getInt("currentGold");
|
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");
|
this.reserve = rs.getInt("reserve");
|
||||||
|
|
||||||
// Does building have a protection contract?
|
// Does building have a protection contract?
|
||||||
|
|||||||
@@ -380,6 +380,7 @@ public class MBServerStatics {
|
|||||||
public static final int MINE_EARLY_WINDOW = 16; // 4pm
|
public static final int MINE_EARLY_WINDOW = 16; // 4pm
|
||||||
public static final int MINE_LATE_WINDOW = 0; // Midnight
|
public static final int MINE_LATE_WINDOW = 0; // Midnight
|
||||||
public static final Long THREE_MINUTES = 180000L;
|
public static final Long THREE_MINUTES = 180000L;
|
||||||
|
public static final int BUILDING_GOLD_LIMIT = 100000000;
|
||||||
public static boolean DEBUG_PROTOCOL = false;
|
public static boolean DEBUG_PROTOCOL = false;
|
||||||
public static int SPATIAL_HASH_BUCKETSX = 16384;
|
public static int SPATIAL_HASH_BUCKETSX = 16384;
|
||||||
public static int SPATIAL_HASH_BUCKETSY = 12288;
|
public static int SPATIAL_HASH_BUCKETSY = 12288;
|
||||||
|
|||||||
Reference in New Issue
Block a user