forked from MagicBane/Server
fix up 4
This commit is contained in:
@@ -979,8 +979,8 @@ public class Enum {
|
|||||||
try {
|
try {
|
||||||
returnMod = SourceType.valueOf(modName.replace(",", ""));
|
returnMod = SourceType.valueOf(modName.replace(",", ""));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(modName);
|
//Logger.error(modName);
|
||||||
Logger.error(e);
|
//Logger.error(e);
|
||||||
return SourceType.None;
|
return SourceType.None;
|
||||||
}
|
}
|
||||||
return returnMod;
|
return returnMod;
|
||||||
|
|||||||
@@ -571,6 +571,11 @@ public class ClientMessagePump implements NetMsgHandler {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (i.isCanDestroy()) {
|
if (i.isCanDestroy()) {
|
||||||
|
|
||||||
|
if (i.getItemBase().isRune() && !sourcePlayer.isInSafeZone()) {
|
||||||
|
ChatManager.chatSystemInfo(sourcePlayer, "You May Only Delete Runes In A Safe Zone.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
int goldValue = i.getBaseValue();
|
int goldValue = i.getBaseValue();
|
||||||
if (i.getItemBase().isRune())
|
if (i.getItemBase().isRune())
|
||||||
goldValue = 500000;
|
goldValue = 500000;
|
||||||
@@ -578,7 +583,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
|||||||
if (i.getItemBaseID() == 980066)
|
if (i.getItemBaseID() == 980066)
|
||||||
goldValue = 0;
|
goldValue = 0;
|
||||||
|
|
||||||
if(itemManager.getGoldInventory().getNumOfItems() + goldValue > 10000000)
|
if(itemManager.getGoldInventory().getNumOfItems() + goldValue > MBServerStatics.PLAYER_GOLD_LIMIT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (itemManager.delete(i)) {
|
if (itemManager.delete(i)) {
|
||||||
@@ -792,6 +797,8 @@ public class ClientMessagePump implements NetMsgHandler {
|
|||||||
if (item == null)
|
if (item == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
item.stripCastableEnchants();
|
||||||
|
|
||||||
if (item.lootLock.tryLock()) {
|
if (item.lootLock.tryLock()) {
|
||||||
try {
|
try {
|
||||||
Item itemRet = null;
|
Item itemRet = null;
|
||||||
@@ -1287,7 +1294,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1480,6 +1487,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
|||||||
if (buy != null) {
|
if (buy != null) {
|
||||||
me.transferEnchants(buy);
|
me.transferEnchants(buy);
|
||||||
itemMan.addItemToInventory(buy);
|
itemMan.addItemToInventory(buy);
|
||||||
|
buy.stripCastableEnchants();
|
||||||
if(npc.contractUUID == 900 && buy.getItemBaseID() == 1705032){
|
if(npc.contractUUID == 900 && buy.getItemBaseID() == 1705032){
|
||||||
buy.setNumOfItems(10);
|
buy.setNumOfItems(10);
|
||||||
DbManager.ItemQueries.UPDATE_NUM_ITEMS(buy,buy.getNumOfItems());
|
DbManager.ItemQueries.UPDATE_NUM_ITEMS(buy,buy.getNumOfItems());
|
||||||
|
|||||||
@@ -1510,6 +1510,8 @@ public class CharacterItemManager {
|
|||||||
if (purchasedItem == null || npc == null)
|
if (purchasedItem == null || npc == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
purchasedItem.stripCastableEnchants();
|
||||||
|
|
||||||
itemMan = npc.getCharItemManager();
|
itemMan = npc.getCharItemManager();
|
||||||
|
|
||||||
if (itemMan == null)
|
if (itemMan == null)
|
||||||
@@ -2351,7 +2353,7 @@ 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);
|
||||||
@@ -2359,7 +2361,7 @@ public class CharacterItemManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (tradingWith.getGoldInventory().getNumOfItems() + goldFrom1 > 10000000) {
|
if (tradingWith.getGoldInventory().getNumOfItems() + goldFrom1 > MBServerStatics.PLAYER_GOLD_LIMIT) {
|
||||||
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);
|
||||||
|
|||||||
@@ -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 = 100000000;
|
||||||
// incoming
|
// incoming
|
||||||
// opcodes to
|
// opcodes to
|
||||||
// console
|
// console
|
||||||
public static final int PLAYER_GOLD_LIMIT = 10000000;
|
public static final int PLAYER_GOLD_LIMIT = 50000000;
|
||||||
// buildings, npcs
|
// buildings, npcs
|
||||||
/*
|
/*
|
||||||
* Login cache flags
|
* Login cache flags
|
||||||
@@ -379,6 +379,7 @@ public class MBServerStatics {
|
|||||||
// Mine related
|
// Mine related
|
||||||
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 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