mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
fixup ordering of shop items
This commit is contained in:
Generated
+5
-31
@@ -8,33 +8,12 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9c1d485e-b413-4c80-b742-7c5a88c1c73c" name="Default Changelist" comment="">
|
<list default="true" id="9c1d485e-b413-4c80-b742-7c5a88c1c73c" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/Server.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/Server.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/Bot.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/Bot.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/Bot.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/Bot.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/BotConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/BotConstants.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/BotHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/BotHandler.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/BotHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/bots/BotHandler.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopAssistant.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopAssistant.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/items/ItemAssistant.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/items/ItemAssistant.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopHandler.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopHandler.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/Constants.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/Constants.class" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/Server.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/Server.class" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/npcs/Npc.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/npcs/Npc.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client$2.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client$2.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client$3.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client$3.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client$4.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client$4.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Client.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Player.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Player.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant$1$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant$1$1.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant$1.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant$2.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant$2.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerHandler.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/PlayerHandler.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/shops/ShopHandler.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/shops/ShopHandler.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/ActionSender.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/ActionSender.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/ConnectionHandler.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/ConnectionHandler.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands$1.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/IdleLogout.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/IdleLogout.class" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
@@ -45,11 +24,6 @@
|
|||||||
<component name="Git.Settings">
|
<component name="Git.Settings">
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectFrameBounds">
|
|
||||||
<option name="x" value="-7" />
|
|
||||||
<option name="width" value="1294" />
|
|
||||||
<option name="height" value="1407" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectId" id="1Sr1PyvKre5eWJ6XgOrqWrHM5hp" />
|
<component name="ProjectId" id="1Sr1PyvKre5eWJ6XgOrqWrHM5hp" />
|
||||||
<component name="PropertiesComponent">
|
<component name="PropertiesComponent">
|
||||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||||
@@ -114,8 +88,8 @@
|
|||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list>
|
<list>
|
||||||
<item itemvalue="Application.Server" />
|
<item itemvalue="Application.Server" />
|
||||||
<item itemvalue="Application.FileServer" />
|
|
||||||
<item itemvalue="Application.Client" />
|
<item itemvalue="Application.Client" />
|
||||||
|
<item itemvalue="Application.FileServer" />
|
||||||
</list>
|
</list>
|
||||||
</recent_temporary>
|
</recent_temporary>
|
||||||
</component>
|
</component>
|
||||||
@@ -124,7 +98,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="TaskManager">
|
<component name="TaskManager">
|
||||||
<task active="true" id="Default" summary="Default task">
|
<task active="true" id="Default" summary="Default task">
|
||||||
<changelist id="e34c4650-a3c9-498e-b05e-c1cbb72d0ad7" name="Default Changelist" comment="" />
|
<changelist id="9c1d485e-b413-4c80-b742-7c5a88c1c73c" name="Default Changelist" comment="" />
|
||||||
<created>1572306880139</created>
|
<created>1572306880139</created>
|
||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ public class Bot {
|
|||||||
if (items.size() <= 0) return;
|
if (items.size() <= 0) return;
|
||||||
int item_id = Misc.randomArrayListItem(items);
|
int item_id = Misc.randomArrayListItem(items);
|
||||||
String item_name = ItemAssistant.getItemName(item_id);
|
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");
|
botClient.forcedChat("Selling " + item_name + " " + formatSellPrice(value) + " ea");
|
||||||
/*
|
/*
|
||||||
Real chat - Disabled for now, can't get it to function correctly
|
Real chat - Disabled for now, can't get it to function correctly
|
||||||
|
|||||||
@@ -107,13 +107,13 @@ public class BotHandler
|
|||||||
public static int getItemPrice(int shop_id, int item_id){
|
public static int getItemPrice(int shop_id, int item_id){
|
||||||
item_id++;
|
item_id++;
|
||||||
Client shop = getPlayerShop(shop_id);
|
Client shop = getPlayerShop(shop_id);
|
||||||
if (shop == null) return 1;
|
if (shop == null) return 0;
|
||||||
for (int slot = 0; slot < ShopHandler.MaxShopItems; slot++) {
|
for (int slot = 0; slot < ShopHandler.MaxShopItems; slot++) {
|
||||||
if (shop.bankItems[slot] == item_id) {
|
if (shop.bankItems[slot] == item_id) {
|
||||||
return Math.max(1, shop.bankItemsV[slot]);
|
return Math.max(1, shop.bankItemsV[slot]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPrice(int shop_id, int item_id, int amount){
|
public static void setPrice(int shop_id, int item_id, int amount){
|
||||||
|
|||||||
@@ -1804,9 +1804,11 @@ public class ItemAssistant {
|
|||||||
for (int j = k; j <= highestSlot; j++) {
|
for (int j = k; j <= highestSlot; j++) {
|
||||||
c.bankItems[j - spots] = c.bankItems[j];
|
c.bankItems[j - spots] = c.bankItems[j];
|
||||||
c.bankItemsN[j - spots] = c.bankItemsN[j];
|
c.bankItemsN[j - spots] = c.bankItemsN[j];
|
||||||
|
c.bankItemsV[j - spots] = c.bankItemsV[j];
|
||||||
stop = true;
|
stop = true;
|
||||||
c.bankItems[j] = 0;
|
c.bankItems[j] = 0;
|
||||||
c.bankItemsN[j] = 0;
|
c.bankItemsN[j] = 0;
|
||||||
|
c.bankItemsV[j] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,14 +197,14 @@ public class ShopHandler {
|
|||||||
public static void refreshShop(int shop_id){
|
public static void refreshShop(int shop_id){
|
||||||
// We don't want to remove items that should be kept in stock
|
// We don't want to remove items that should be kept in stock
|
||||||
for (int j = ShopItemsStandard[shop_id]; j < MaxShopItems; j++) {
|
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);
|
ResetItem(shop_id, j);
|
||||||
if (ShopItems[shop_id][j + 1] > 0) {
|
int next = j + 1;
|
||||||
ShopItems[shop_id][j] = ShopItems[shop_id][j + 1];
|
if (next < MaxShopItems && ShopItemsN[shop_id][next] > 0) {
|
||||||
ShopItemsN[shop_id][j] = ShopItemsN[shop_id][j + 1];
|
ShopItems[shop_id][j] = ShopItems[shop_id][next];
|
||||||
ShopItemsSN[shop_id][j] = ShopItemsSN[shop_id][j + 1];
|
ShopItemsN[shop_id][j] = ShopItemsN[shop_id][next];
|
||||||
ShopItemsDelay[shop_id][j] = ShopItemsDelay[shop_id][j + 1];
|
ShopItemsDelay[shop_id][j] = ShopItemsDelay[shop_id][next];
|
||||||
ResetItem(shop_id, j + 1);
|
ResetItem(shop_id, next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user