diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 782dda75..284f2eb1 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,33 +8,12 @@
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -45,11 +24,6 @@
-
-
-
-
-
@@ -114,8 +88,8 @@
-
+
@@ -124,7 +98,7 @@
-
+
1572306880139
diff --git a/2006Redone Server/src/redone/game/bots/Bot.java b/2006Redone Server/src/redone/game/bots/Bot.java
index 0bbfa806..6edf1adc 100644
--- a/2006Redone Server/src/redone/game/bots/Bot.java
+++ b/2006Redone Server/src/redone/game/bots/Bot.java
@@ -67,7 +67,8 @@ public class Bot {
if (items.size() <= 0) return;
int item_id = Misc.randomArrayListItem(items);
String item_name = ItemAssistant.getItemName(item_id);
- int value = Math.max(1, BotHandler.getItemPrice(botClient.myShopId, item_id));
+ int value = BotHandler.getItemPrice(botClient.myShopId, item_id);
+ if (value <= 0) return;
botClient.forcedChat("Selling " + item_name + " " + formatSellPrice(value) + " ea");
/*
Real chat - Disabled for now, can't get it to function correctly
diff --git a/2006Redone Server/src/redone/game/bots/BotHandler.java b/2006Redone Server/src/redone/game/bots/BotHandler.java
index 2100d376..bf4b4497 100644
--- a/2006Redone Server/src/redone/game/bots/BotHandler.java
+++ b/2006Redone Server/src/redone/game/bots/BotHandler.java
@@ -107,13 +107,13 @@ public class BotHandler
public static int getItemPrice(int shop_id, int item_id){
item_id++;
Client shop = getPlayerShop(shop_id);
- if (shop == null) return 1;
+ if (shop == null) return 0;
for (int slot = 0; slot < ShopHandler.MaxShopItems; slot++) {
if (shop.bankItems[slot] == item_id) {
return Math.max(1, shop.bankItemsV[slot]);
}
}
- return 1;
+ return 0;
}
public static void setPrice(int shop_id, int item_id, int amount){
diff --git a/2006Redone Server/src/redone/game/items/ItemAssistant.java b/2006Redone Server/src/redone/game/items/ItemAssistant.java
index f136c80e..a2fd84d1 100644
--- a/2006Redone Server/src/redone/game/items/ItemAssistant.java
+++ b/2006Redone Server/src/redone/game/items/ItemAssistant.java
@@ -1804,9 +1804,11 @@ public class ItemAssistant {
for (int j = k; j <= highestSlot; j++) {
c.bankItems[j - spots] = c.bankItems[j];
c.bankItemsN[j - spots] = c.bankItemsN[j];
+ c.bankItemsV[j - spots] = c.bankItemsV[j];
stop = true;
c.bankItems[j] = 0;
c.bankItemsN[j] = 0;
+ c.bankItemsV[j] = 0;
}
}
}
diff --git a/2006Redone Server/src/redone/game/shops/ShopHandler.java b/2006Redone Server/src/redone/game/shops/ShopHandler.java
index 0b73b265..6a0ddd44 100644
--- a/2006Redone Server/src/redone/game/shops/ShopHandler.java
+++ b/2006Redone Server/src/redone/game/shops/ShopHandler.java
@@ -197,14 +197,14 @@ public class ShopHandler {
public static void refreshShop(int shop_id){
// We don't want to remove items that should be kept in stock
for (int j = ShopItemsStandard[shop_id]; j < MaxShopItems; j++) {
- if (ShopItems[shop_id][j] > 0 && ShopItemsN[shop_id][j] <= 0) {
+ if (ShopItemsN[shop_id][j] <= 0) {
ResetItem(shop_id, j);
- if (ShopItems[shop_id][j + 1] > 0) {
- ShopItems[shop_id][j] = ShopItems[shop_id][j + 1];
- ShopItemsN[shop_id][j] = ShopItemsN[shop_id][j + 1];
- ShopItemsSN[shop_id][j] = ShopItemsSN[shop_id][j + 1];
- ShopItemsDelay[shop_id][j] = ShopItemsDelay[shop_id][j + 1];
- ResetItem(shop_id, j + 1);
+ int next = j + 1;
+ if (next < MaxShopItems && ShopItemsN[shop_id][next] > 0) {
+ ShopItems[shop_id][j] = ShopItems[shop_id][next];
+ ShopItemsN[shop_id][j] = ShopItemsN[shop_id][next];
+ ShopItemsDelay[shop_id][j] = ShopItemsDelay[shop_id][next];
+ ResetItem(shop_id, next);
}
}
}
diff --git a/CompiledServer/production/2006rebotted/redone/game/bots/Bot.class b/CompiledServer/production/2006rebotted/redone/game/bots/Bot.class
index 87de6a5d..27266f32 100644
Binary files a/CompiledServer/production/2006rebotted/redone/game/bots/Bot.class and b/CompiledServer/production/2006rebotted/redone/game/bots/Bot.class differ
diff --git a/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class b/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class
index 2ebea5be..adbf2113 100644
Binary files a/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class and b/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class differ
diff --git a/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class b/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class
index e11b29ca..57368207 100644
Binary files a/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class and b/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class differ
diff --git a/CompiledServer/production/2006rebotted/redone/game/shops/ShopHandler.class b/CompiledServer/production/2006rebotted/redone/game/shops/ShopHandler.class
index 17eaf66e..98c6ac46 100644
Binary files a/CompiledServer/production/2006rebotted/redone/game/shops/ShopHandler.class and b/CompiledServer/production/2006rebotted/redone/game/shops/ShopHandler.class differ