Browse Source

Enrollment officer dialog

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
55b3161900
  1. 3
      src/engine/mobileAI/MobAI.java
  2. 11
      src/engine/net/client/msg/VendorDialogMsg.java
  3. 17
      src/engine/objects/Contract.java

3
src/engine/mobileAI/MobAI.java

@ -601,6 +601,9 @@ public class MobAI {
if (mob == null) if (mob == null)
return; return;
if(mob.isAlive())
if(!mob.getMovementLoc().equals(Vector3fImmutable.ZERO))
mob.setLoc(mob.getMovementLoc());
if (mob.getTimestamps().containsKey("lastExecution") == false) if (mob.getTimestamps().containsKey("lastExecution") == false)
mob.getTimestamps().put("lastExecution", System.currentTimeMillis()); mob.getTimestamps().put("lastExecution", System.currentTimeMillis());

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

@ -96,11 +96,6 @@ public class VendorDialogMsg extends ClientNetMsg {
return; return;
} }
if(npc.contractUUID == 1502040){ //enrollment officer
PlayerCharacter.unboxPlayer(playerCharacter);
}
// Restrict disc trainers to only characters who have // Restrict disc trainers to only characters who have
// tht disc applied. // tht disc applied.
@ -120,6 +115,12 @@ public class VendorDialogMsg extends ClientNetMsg {
VendorDialog vd = null; VendorDialog vd = null;
Contract contract = npc.getContract(); 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){ if(contract.getContractID() == 1502042){
vd = Contract.HandleBaneCommanderOptions(msg.unknown03, npc, playerCharacter); vd = Contract.HandleBaneCommanderOptions(msg.unknown03, npc, playerCharacter);
msg.updateMessage(3, vd); msg.updateMessage(3, vd);

17
src/engine/objects/Contract.java

@ -198,6 +198,23 @@ public class Contract extends AbstractGameObject {
return this.vendorDialog; 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){ public static VendorDialog HandleBaneCommanderOptions(int optionId, NPC npc, PlayerCharacter pc){
pc.setLastNPCDialog(npc); pc.setLastNPCDialog(npc);
VendorDialog vd = new VendorDialog(VendorDialog.getHostileVendorDialog().getDialogType(),VendorDialog.getHostileVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog(); VendorDialog vd = new VendorDialog(VendorDialog.getHostileVendorDialog().getDialogType(),VendorDialog.getHostileVendorDialog().getIntro(),-1);//VendorDialog.getHostileVendorDialog();

Loading…
Cancel
Save