diff --git a/src/engine/gameManager/ArenaManager.java b/src/engine/gameManager/ArenaManager.java index 278acc3c..2175c24b 100644 --- a/src/engine/gameManager/ArenaManager.java +++ b/src/engine/gameManager/ArenaManager.java @@ -14,7 +14,7 @@ import java.util.concurrent.ThreadLocalRandom; public class ArenaManager { private static final List activeArenas = new ArrayList<>(); - private static final List playerQueue = new ArrayList<>(); + public static final List playerQueue = new ArrayList<>(); public static void pulseArenas() { Iterator iterator = activeArenas.iterator(); diff --git a/src/engine/net/client/msg/VendorDialogMsg.java b/src/engine/net/client/msg/VendorDialogMsg.java index e2e2c8f0..941c07b8 100644 --- a/src/engine/net/client/msg/VendorDialogMsg.java +++ b/src/engine/net/client/msg/VendorDialogMsg.java @@ -114,8 +114,10 @@ public class VendorDialogMsg extends ClientNetMsg { VendorDialog vd = null; Contract contract = npc.getContract(); - - if(npc.contractUUID == 1502040){ //enrollment officer + if(npc.contractUUID == 1502043){ + vd = Contract.HandleArenaMaster(msg.unknown03,npc,playerCharacter); + msg.updateMessage(3, vd); + }else if(npc.contractUUID == 1502040){ //enrollment officer //PlayerCharacter.unboxPlayer(playerCharacter); vd = Contract.HandleEnrollmentOfficer(msg.unknown03,npc,playerCharacter); msg.updateMessage(3, vd); diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index 590b0810..7e1e51ec 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -11,10 +11,7 @@ package engine.objects; import ch.claude_martin.enumbitset.EnumBitSet; import engine.Enum; -import engine.gameManager.BuildingManager; -import engine.gameManager.DbManager; -import engine.gameManager.SessionManager; -import engine.gameManager.ZoneManager; +import engine.gameManager.*; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.CityDataMsg; @@ -198,6 +195,32 @@ public class Contract extends AbstractGameObject { return this.vendorDialog; } + public static VendorDialog HandleArenaMaster(int optionId, NPC npc, PlayerCharacter pc){ + //1502043 + pc.setLastNPCDialog(npc); + VendorDialog vd = new VendorDialog(VendorDialog.getHostileVendorDialog().getDialogType(),VendorDialog.getHostileVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog(); + vd.getOptions().clear(); + + switch(optionId){ + default: + MenuOption option1 = new MenuOption(15020431, "Join Arena Que", 15020431); + vd.getOptions().add(option1); + MenuOption option2 = new MenuOption(15020432, "Leave Arena Que", 15020432); + vd.getOptions().add(option2); + break; + case 15020431: + ArenaManager.joinQueue(pc); + ChatManager.chatSystemInfo(pc, "You Have Joined The Arena Que"); + break; + case 15020432: + if(ArenaManager.playerQueue.contains(pc)) + ArenaManager.leaveQueue(pc); + ChatManager.chatSystemInfo(pc, "You Have Left The Arena Que"); + break; + } + + return vd; + } public static VendorDialog HandleEnrollmentOfficer(int optionId, NPC npc, PlayerCharacter pc){ pc.setLastNPCDialog(npc); //VendorDialog vd = new VendorDialog(npc.contract.getVendorDialog().getDialogType(),npc.contract.getVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog();