mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-06 08:39:06 +00:00
Fixup shops
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package redone.game.bots;
|
||||
|
||||
|
||||
import redone.Server;
|
||||
import redone.game.players.Client;
|
||||
import redone.game.players.Player;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package redone.game.bots;
|
||||
|
||||
public class BotConstants
|
||||
{
|
||||
public class BotConstants {
|
||||
public static final int MAX_BOTS = 100;
|
||||
}
|
||||
@@ -2,10 +2,8 @@ package redone.game.bots;
|
||||
|
||||
import redone.Constants;
|
||||
import redone.game.players.Client;
|
||||
import redone.game.players.Player;
|
||||
import redone.game.players.PlayerHandler;
|
||||
import redone.game.shops.ShopHandler;
|
||||
import redone.util.Misc;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ShopAssistant {
|
||||
public static final int RANGE_SHOP = 111, PEST_SHOP = 175, CASTLE_SHOP = 112;
|
||||
|
||||
public boolean shopSellsItem(int itemID) {
|
||||
for (int i = 0; i < ShopHandler.ShopItems.length; i++) {
|
||||
for (int i = 0; i < ShopHandler.ShopItems[player.myShopId].length; i++) {
|
||||
if (itemID == ShopHandler.ShopItems[player.myShopId][i] - 1) {
|
||||
return true;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class ShopAssistant {
|
||||
player.getOutStream().writeWord(3900);
|
||||
player.getOutStream().writeWord(player.TotalShopItems);
|
||||
int TotalCount = 0;
|
||||
for (int i = 0; i < ShopHandler.ShopItems.length; i++)
|
||||
for (int i = 0; i < ShopHandler.ShopItems[player.myShopId].length; i++)
|
||||
{
|
||||
if (ShopHandler.ShopItems[ShopID][i] > 0
|
||||
|| i <= ShopHandler.ShopItemsStandard[ShopID])
|
||||
@@ -449,14 +449,14 @@ public class ShopAssistant {
|
||||
if (Item.itemIsNote[itemID]) {
|
||||
itemID = player.getItemAssistant().getUnnotedItem(itemID);
|
||||
}
|
||||
for (int i = 0; i < ShopHandler.ShopItems.length; i++) {
|
||||
for (int i = 0; i < ShopHandler.ShopItems[player.myShopId].length; i++) {
|
||||
if (ShopHandler.ShopItems[player.myShopId][i] - 1 == itemID) {
|
||||
ShopHandler.ShopItemsN[player.myShopId][i] += amount;
|
||||
Added = true;
|
||||
}
|
||||
}
|
||||
if (Added == false) {
|
||||
for (int i = 0; i < ShopHandler.ShopItems.length; i++) {
|
||||
for (int i = 0; i < ShopHandler.ShopItems[player.myShopId].length; i++) {
|
||||
if (ShopHandler.ShopItems[player.myShopId][i] == 0) {
|
||||
ShopHandler.ShopItems[player.myShopId][i] = itemID + 1;
|
||||
ShopHandler.ShopItemsN[player.myShopId][i] = amount;
|
||||
|
||||
@@ -179,8 +179,6 @@ public class ShopHandler {
|
||||
player.myShopId = id;
|
||||
ShopSModifier[id] = 0;
|
||||
ShopName[id] = player.properName + "'s Store";
|
||||
ShopItems[id][0] = 2;
|
||||
ShopItemsN[id][0] = 1;
|
||||
TotalShops++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user