Increase gold and resource stack limits
This commit is contained in:
@@ -14,6 +14,7 @@ import engine.gameManager.ChatManager;
|
|||||||
import engine.objects.AbstractGameObject;
|
import engine.objects.AbstractGameObject;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
|
import engine.server.MBServerStatics;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Eighty
|
* @author Eighty
|
||||||
@@ -46,10 +47,10 @@ public class AddGoldCmd extends AbstractDevCmd {
|
|||||||
throwbackError(pc, "Quantity must be a number, " + words[0] + " is invalid");
|
throwbackError(pc, "Quantity must be a number, " + words[0] + " is invalid");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (amt < 1 || amt > 10000000) {
|
if (amt < 1 || amt > MBServerStatics.PLAYER_GOLD_LIMIT) {
|
||||||
throwbackError(pc, "Quantity must be between 1 and 10000000 (10 million)");
|
throwbackError(pc, "Quantity must be between 1 and " + MBServerStatics.PLAYER_GOLD_LIMIT);
|
||||||
return;
|
return;
|
||||||
} else if ((curAmt + amt) > 10000000) {
|
} else if ((curAmt + amt) > MBServerStatics.PLAYER_GOLD_LIMIT) {
|
||||||
throwbackError(pc, "This would place your inventory over 10,000,000 gold.");
|
throwbackError(pc, "This would place your inventory over 10,000,000 gold.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1259,7 +1259,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
|||||||
|
|
||||||
cost *= profit;
|
cost *= profit;
|
||||||
|
|
||||||
if (gold.getNumOfItems() + cost > 10000000) {
|
if (gold.getNumOfItems() + cost > MBServerStatics.PLAYER_GOLD_LIMIT) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2335,15 +2335,14 @@ public class CharacterItemManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.getGoldInventory().getNumOfItems() + goldFrom2 > 10000000) {
|
if (this.getGoldInventory().getNumOfItems() + goldFrom2 > MBServerStatics.PLAYER_GOLD_LIMIT) {
|
||||||
PlayerCharacter pc = (PlayerCharacter) this.absCharacter;
|
PlayerCharacter pc = (PlayerCharacter) this.absCharacter;
|
||||||
if (pc.getClientConnection() != null)
|
if (pc.getClientConnection() != null)
|
||||||
ErrorPopupMsg.sendErrorPopup(pc, 202);
|
ErrorPopupMsg.sendErrorPopup(pc, 202);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tradingWith.getGoldInventory().getNumOfItems() + goldFrom1 > MBServerStatics.PLAYER_GOLD_LIMIT) {
|
||||||
if (tradingWith.getGoldInventory().getNumOfItems() + goldFrom1 > 10000000) {
|
|
||||||
PlayerCharacter pc = (PlayerCharacter) tradingWith.absCharacter;
|
PlayerCharacter pc = (PlayerCharacter) tradingWith.absCharacter;
|
||||||
if (pc.getClientConnection() != null)
|
if (pc.getClientConnection() != null)
|
||||||
ErrorPopupMsg.sendErrorPopup(pc, 202);
|
ErrorPopupMsg.sendErrorPopup(pc, 202);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class Warehouse extends AbstractWorldObject {
|
|||||||
|
|
||||||
public static ConcurrentHashMap<Integer, Integer> getMaxResources() {
|
public static ConcurrentHashMap<Integer, Integer> getMaxResources() {
|
||||||
if (maxResources.size() != 23) {
|
if (maxResources.size() != 23) {
|
||||||
maxResources.put(7, 100000000);
|
maxResources.put(7, 1000000000);
|
||||||
maxResources.put(1580000, 10000);
|
maxResources.put(1580000, 10000);
|
||||||
maxResources.put(1580001, 2000);
|
maxResources.put(1580001, 2000);
|
||||||
maxResources.put(1580002, 2000);
|
maxResources.put(1580002, 2000);
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ public class MBServerStatics {
|
|||||||
// hit box
|
// hit box
|
||||||
// calcs
|
// calcs
|
||||||
public static final boolean PRINT_INCOMING_OPCODES = false; // print
|
public static final boolean PRINT_INCOMING_OPCODES = false; // print
|
||||||
public static final int BANK_GOLD_LIMIT = 25000000;
|
public static final int BANK_GOLD_LIMIT = 1000000000;
|
||||||
// incoming
|
// incoming
|
||||||
// opcodes to
|
// opcodes to
|
||||||
// console
|
// console
|
||||||
public static final int PLAYER_GOLD_LIMIT = 10000000;
|
public static final int PLAYER_GOLD_LIMIT = 500000000;
|
||||||
// buildings, npcs
|
// buildings, npcs
|
||||||
/*
|
/*
|
||||||
* Login cache flags
|
* Login cache flags
|
||||||
|
|||||||
Reference in New Issue
Block a user