From 544f266c8f10ff64a8f4a2ff80310bdf269d7fdc Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 22 Nov 2019 20:46:39 +1300 Subject: [PATCH] Open player shop --- .../src/redone/game/players/Trading.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/2006Redone Server/src/redone/game/players/Trading.java b/2006Redone Server/src/redone/game/players/Trading.java index 3863222d..61da6c75 100644 --- a/2006Redone Server/src/redone/game/players/Trading.java +++ b/2006Redone Server/src/redone/game/players/Trading.java @@ -36,19 +36,28 @@ public class Trading { if (id == player.playerId) { return; } + + // player owned shop + if (o.isBot && o.myShopId >= 0){ + if (isCloseTo(o)) { + player.getShopAssistant().openShop(o.myShopId); + } else { + player.getActionSender().sendMessage("Player is not close enough. Retry when you are closer..."); + } + return; + } + player.tradeWith = id; if (player.isBotting) { player.getActionSender().sendMessage("You can't trade items, until you confirm you aren't botting."); player.getActionSender().sendMessage("If you need to you can type ::amibotting, to see if your botting."); return; } - /*if (c.connectedFrom.equals(o.connectedFrom)) { - c.getActionSender().sendMessage("You cannot trade your own IP."); - return; - }*/ + if (!CastleWars.deleteCastleWarsItems(player, id)) { return; } + if (!player.inTrade && o.tradeRequested && o.tradeWith == player.playerId && player.playerIsBusy() == false && o.playerIsBusy() == false) { //start trading process if (!isCloseTo(o)) { player.getActionSender().sendMessage("Player is not close enough. Retry when you are closer...");