Browse Source

Arena Manager NPC

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
85514987e7
  1. 2
      src/engine/gameManager/ArenaManager.java
  2. 6
      src/engine/net/client/msg/VendorDialogMsg.java
  3. 31
      src/engine/objects/Contract.java

2
src/engine/gameManager/ArenaManager.java

@ -14,7 +14,7 @@ import java.util.concurrent.ThreadLocalRandom;
public class ArenaManager { public class ArenaManager {
private static final List<Arena> activeArenas = new ArrayList<>(); private static final List<Arena> activeArenas = new ArrayList<>();
private static final List<PlayerCharacter> playerQueue = new ArrayList<>(); public static final List<PlayerCharacter> playerQueue = new ArrayList<>();
public static void pulseArenas() { public static void pulseArenas() {
Iterator<Arena> iterator = activeArenas.iterator(); Iterator<Arena> iterator = activeArenas.iterator();

6
src/engine/net/client/msg/VendorDialogMsg.java

@ -114,8 +114,10 @@ public class VendorDialogMsg extends ClientNetMsg {
VendorDialog vd = null; VendorDialog vd = null;
Contract contract = npc.getContract(); Contract contract = npc.getContract();
if(npc.contractUUID == 1502043){
if(npc.contractUUID == 1502040){ //enrollment officer vd = Contract.HandleArenaMaster(msg.unknown03,npc,playerCharacter);
msg.updateMessage(3, vd);
}else if(npc.contractUUID == 1502040){ //enrollment officer
//PlayerCharacter.unboxPlayer(playerCharacter); //PlayerCharacter.unboxPlayer(playerCharacter);
vd = Contract.HandleEnrollmentOfficer(msg.unknown03,npc,playerCharacter); vd = Contract.HandleEnrollmentOfficer(msg.unknown03,npc,playerCharacter);
msg.updateMessage(3, vd); msg.updateMessage(3, vd);

31
src/engine/objects/Contract.java

@ -11,10 +11,7 @@ package engine.objects;
import ch.claude_martin.enumbitset.EnumBitSet; import ch.claude_martin.enumbitset.EnumBitSet;
import engine.Enum; import engine.Enum;
import engine.gameManager.BuildingManager; import engine.gameManager.*;
import engine.gameManager.DbManager;
import engine.gameManager.SessionManager;
import engine.gameManager.ZoneManager;
import engine.net.Dispatch; import engine.net.Dispatch;
import engine.net.DispatchMessage; import engine.net.DispatchMessage;
import engine.net.client.msg.CityDataMsg; import engine.net.client.msg.CityDataMsg;
@ -198,6 +195,32 @@ public class Contract extends AbstractGameObject {
return this.vendorDialog; 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){ public static VendorDialog HandleEnrollmentOfficer(int optionId, NPC npc, PlayerCharacter pc){
pc.setLastNPCDialog(npc); pc.setLastNPCDialog(npc);
//VendorDialog vd = new VendorDialog(npc.contract.getVendorDialog().getDialogType(),npc.contract.getVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog(); //VendorDialog vd = new VendorDialog(npc.contract.getVendorDialog().getDialogType(),npc.contract.getVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog();

Loading…
Cancel
Save