bane commander NPC
This commit is contained in:
@@ -120,18 +120,22 @@ public class VendorDialogMsg extends ClientNetMsg {
|
|||||||
VendorDialog vd = null;
|
VendorDialog vd = null;
|
||||||
Contract contract = npc.getContract();
|
Contract contract = npc.getContract();
|
||||||
|
|
||||||
if (contract == null)
|
if(contract.getContractID() == 1502042){
|
||||||
vd = VendorDialog.getHostileVendorDialog();
|
vd = Contract.HandleBaneCommanderOptions(msg.unknown03);
|
||||||
else if (npc.getBuilding() != null) {
|
}else {
|
||||||
if (BuildingManager.IsPlayerHostile(npc.getBuilding(), playerCharacter))
|
|
||||||
vd = VendorDialog.getHostileVendorDialog();
|
|
||||||
else
|
|
||||||
vd = contract.getVendorDialog();
|
|
||||||
} else
|
|
||||||
vd = contract.getVendorDialog();
|
|
||||||
if (vd == null)
|
|
||||||
vd = VendorDialog.getHostileVendorDialog();
|
|
||||||
|
|
||||||
|
if (contract == null)
|
||||||
|
vd = VendorDialog.getHostileVendorDialog();
|
||||||
|
else if (npc.getBuilding() != null) {
|
||||||
|
if (BuildingManager.IsPlayerHostile(npc.getBuilding(), playerCharacter))
|
||||||
|
vd = VendorDialog.getHostileVendorDialog();
|
||||||
|
else
|
||||||
|
vd = contract.getVendorDialog();
|
||||||
|
} else
|
||||||
|
vd = contract.getVendorDialog();
|
||||||
|
if (vd == null)
|
||||||
|
vd = VendorDialog.getHostileVendorDialog();
|
||||||
|
}
|
||||||
if (msg.messageType == 1 || msg.unknown03 == vd.getObjectUUID()) {
|
if (msg.messageType == 1 || msg.unknown03 == vd.getObjectUUID()) {
|
||||||
msg.updateMessage(3, vd);
|
msg.updateMessage(3, vd);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -187,17 +187,21 @@ public class Contract extends AbstractGameObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public VendorDialog getVendorDialog() {
|
public VendorDialog getVendorDialog() {
|
||||||
if(this.contractID == 1502042) {
|
return this.vendorDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static VendorDialog HandleBaneCommanderOptions(int optionId){
|
||||||
|
if(optionId == 0) {
|
||||||
VendorDialog vd = VendorDialog.getHostileVendorDialog();
|
VendorDialog vd = VendorDialog.getHostileVendorDialog();
|
||||||
vd.getOptions().clear();
|
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);
|
vd.getOptions().add(option1);
|
||||||
|
MenuOption option2 = new MenuOption(797, "Set Bane Time", 797);
|
||||||
|
vd.getOptions().add(option2);
|
||||||
return vd;
|
return vd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return VendorDialog.getHostileVendorDialog();
|
||||||
|
|
||||||
return this.vendorDialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Integer> getNPCMenuOptions() {
|
public ArrayList<Integer> getNPCMenuOptions() {
|
||||||
|
|||||||
Reference in New Issue
Block a user