mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Update ShopHandler.java
This commit is contained in:
@@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import redone.game.bots.Bot;
|
||||
import redone.game.players.Client;
|
||||
import redone.game.players.PlayerHandler;
|
||||
import redone.util.Misc;
|
||||
@@ -172,4 +173,21 @@ public class ShopHandler {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void createPlayerShop(Client player){
|
||||
int id = getEmptyShop();
|
||||
player.myShopId = id;
|
||||
ShopSModifier[id] = 0;
|
||||
ShopName[id] = player.properName + "'s Store";
|
||||
ShopItems[id][0] = 2;
|
||||
ShopItemsN[id][0] = 1;
|
||||
TotalShops++;
|
||||
}
|
||||
|
||||
private static int getEmptyShop(){
|
||||
for (int i = 0; i < MaxShops; i++) {
|
||||
if (ShopName[i] == "") return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user