Browse Source

bane commander NPC

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
3d745e93b6
  1. 6
      src/engine/net/client/msg/VendorDialogMsg.java
  2. 14
      src/engine/objects/Contract.java

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

@ -120,6 +120,10 @@ public class VendorDialogMsg extends ClientNetMsg { @@ -120,6 +120,10 @@ public class VendorDialogMsg extends ClientNetMsg {
VendorDialog vd = null;
Contract contract = npc.getContract();
if(contract.getContractID() == 1502042){
vd = Contract.HandleBaneCommanderOptions(msg.unknown03);
}else {
if (contract == null)
vd = VendorDialog.getHostileVendorDialog();
else if (npc.getBuilding() != null) {
@ -131,7 +135,7 @@ public class VendorDialogMsg extends ClientNetMsg { @@ -131,7 +135,7 @@ public class VendorDialogMsg extends ClientNetMsg {
vd = contract.getVendorDialog();
if (vd == null)
vd = VendorDialog.getHostileVendorDialog();
}
if (msg.messageType == 1 || msg.unknown03 == vd.getObjectUUID()) {
msg.updateMessage(3, vd);
} else {

14
src/engine/objects/Contract.java

@ -187,17 +187,21 @@ public class Contract extends AbstractGameObject { @@ -187,17 +187,21 @@ public class Contract extends AbstractGameObject {
}
public VendorDialog getVendorDialog() {
if(this.contractID == 1502042) {
return this.vendorDialog;
}
public static VendorDialog HandleBaneCommanderOptions(int optionId){
if(optionId == 0) {
VendorDialog vd = VendorDialog.getHostileVendorDialog();
vd.getOptions().clear();
MenuOption option1 = new MenuOption(796,"Set Bane Day",796);
MenuOption option1 = new MenuOption(796, "Set Bane Day", 796);
vd.getOptions().add(option1);
MenuOption option2 = new MenuOption(797, "Set Bane Time", 797);
vd.getOptions().add(option2);
return vd;
}
return this.vendorDialog;
return VendorDialog.getHostileVendorDialog();
}
public ArrayList<Integer> getNPCMenuOptions() {

Loading…
Cancel
Save