From 55b316190054af48f740ca86ff6943ebc520c211 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 1 Jan 2025 18:15:22 -0600 Subject: [PATCH] Enrollment officer dialog --- src/engine/mobileAI/MobAI.java | 3 +++ src/engine/net/client/msg/VendorDialogMsg.java | 11 ++++++----- src/engine/objects/Contract.java | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 9fdcf6d1..cabe0d9d 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -601,6 +601,9 @@ public class MobAI { if (mob == null) return; + if(mob.isAlive()) + if(!mob.getMovementLoc().equals(Vector3fImmutable.ZERO)) + mob.setLoc(mob.getMovementLoc()); if (mob.getTimestamps().containsKey("lastExecution") == false) mob.getTimestamps().put("lastExecution", System.currentTimeMillis()); diff --git a/src/engine/net/client/msg/VendorDialogMsg.java b/src/engine/net/client/msg/VendorDialogMsg.java index 52af70ef..c8d65742 100644 --- a/src/engine/net/client/msg/VendorDialogMsg.java +++ b/src/engine/net/client/msg/VendorDialogMsg.java @@ -96,11 +96,6 @@ public class VendorDialogMsg extends ClientNetMsg { return; } - - if(npc.contractUUID == 1502040){ //enrollment officer - PlayerCharacter.unboxPlayer(playerCharacter); - } - // Restrict disc trainers to only characters who have // tht disc applied. @@ -120,6 +115,12 @@ public class VendorDialogMsg extends ClientNetMsg { VendorDialog vd = null; Contract contract = npc.getContract(); + if(npc.contractUUID == 1502040){ //enrollment officer + //PlayerCharacter.unboxPlayer(playerCharacter); + vd = Contract.HandleEnrollmentOfficer(msg.unknown03,npc,playerCharacter); + msg.updateMessage(3, vd); + } + if(contract.getContractID() == 1502042){ vd = Contract.HandleBaneCommanderOptions(msg.unknown03, npc, playerCharacter); msg.updateMessage(3, vd); diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index dc50e15f..2929daa3 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -198,6 +198,23 @@ public class Contract extends AbstractGameObject { return this.vendorDialog; } + public static VendorDialog HandleEnrollmentOfficer(int optionId, NPC npc, PlayerCharacter pc){ + pc.setLastNPCDialog(npc); + VendorDialog vd = new VendorDialog(VendorDialog.getHostileVendorDialog().getDialogType(),VendorDialog.getHostileVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog(); + vd.getOptions().clear(); + switch(optionId) { + default: + if (pc.isBoxed) { + MenuOption option1 = new MenuOption(15020401, "Unbox", 15020401); + vd.getOptions().add(option1); + } + break; + case 15020401: + PlayerCharacter.unboxPlayer(pc); + break; + } + return vd; + } public static VendorDialog HandleBaneCommanderOptions(int optionId, NPC npc, PlayerCharacter pc){ pc.setLastNPCDialog(npc); VendorDialog vd = new VendorDialog(VendorDialog.getHostileVendorDialog().getDialogType(),VendorDialog.getHostileVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog();