Browse Source

resource merchant work

lakebane-master
FatBoy-DOTC 10 months ago
parent
commit
e5d606fe8a
  1. 2
      src/engine/objects/Contract.java
  2. 13
      src/engine/server/world/WorldServer.java

2
src/engine/objects/Contract.java

@ -30,7 +30,7 @@ public class Contract extends AbstractGameObject { @@ -30,7 +30,7 @@ public class Contract extends AbstractGameObject {
public int inventorySet = 0;
private int vendorID;
private boolean isTrainer;
private VendorDialog vendorDialog;
public VendorDialog vendorDialog;
private ArrayList<Integer> npcMenuOptions = new ArrayList<>();
private ArrayList<Integer> npcModTypeTable = new ArrayList<>();
private ArrayList<Integer> npcModSuffixTable = new ArrayList<>();

13
src/engine/server/world/WorldServer.java

@ -647,17 +647,20 @@ public class WorldServer { @@ -647,17 +647,20 @@ public class WorldServer {
Logger.error("FAILED TO ADD RUNE MERCHANT");
}
try {
NPC resourceMerchant = NPC.createNPC("Resources", 960124, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
NPC resourceMerchant = NPC.createNPC("Resource Merchant", 960124, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
resourceMerchant.sellPercent = 0;
resourceMerchant.contract.vendorDialog = VendorDialog.getVendorDialog(623);
Building sdrHut = BuildingManager.getBuilding(27984);
resourceMerchant.buildingUUID = sdrHut.getObjectUUID();
resourceMerchant.building = sdrHut;
NPCManager.slotCharacterInBuilding(resourceMerchant);
resourceMerchant.setLoc(resourceMerchant.bindLoc);
//for(MobEquipment item : resourceMerchant.contract.getSellInventory()){
// item.magicValue = 10000000;
//}
//resourceMerchant.contract.getSellInventory()
resourceMerchant.contract.getSellInventory().clear();
for(int resourceID : Warehouse.getMaxResources().keySet()){
MobEquipment me = new MobEquipment(ItemBase.getItemBase(resourceID), 0, 0);
resourceMerchant.contract.getSellInventory().add(me);
}
}
catch(Exception e){
Logger.error("FAILED TO ADD RUNE MERCHANT");

Loading…
Cancel
Save