From ec3bc7cc38125cbf74749f47e0bdd1a0a76de852 Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 4 Aug 2015 17:04:49 +0200 Subject: [PATCH] Try fixing the map selection. --- .../arcade/gui/privateServer/button/ChooseMapButton.java | 2 ++ .../game/arcade/gui/privateServer/page/ChooseMapPage.java | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java index 5282a03f6..37a38e6f8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java @@ -34,6 +34,8 @@ public class ChooseMapButton implements IButton public void onClick(Player player, ClickType clickType) { _arcadeManager.GetGameCreationManager().MapSource = _gameType.GetName(); + if(_gameType.getMapSource() != null) + _arcadeManager.GetGameCreationManager().MapSource = _gameType.getMapSource()[0].GetName(); _arcadeManager.GetGameCreationManager().MapPref = _map; _arcadeManager.GetGame().setGame(_gameType, player, true); player.closeInventory(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/ChooseMapPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/ChooseMapPage.java index 88914ff5d..551616b8c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/ChooseMapPage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/ChooseMapPage.java @@ -34,7 +34,13 @@ public class ChooseMapPage extends BasePage addBackToSetGamePage(); int slot = 9; - for (String cur : getPlugin().LoadFiles(_gameType.GetName())){ + String loadMaps = _gameType.GetName(); + if(_gameType.getMapSource() != null) + { + loadMaps = _gameType.getMapSource()[0].GetName(); + } + for(String cur : getPlugin().LoadFiles(loadMaps)) + { ChooseMapButton btn = new ChooseMapButton(getPlugin(), getShop(), _gameType, cur); addButton(slot, new ShopItem(Material.PAPER, cur.split("_")[1], new String[]{"ยง7Click to select map."}, 1, false), btn); slot++;