Browse Source

resource merchant work

lakebane-master
FatBoy-DOTC 10 months ago
parent
commit
257d864132
  1. 47
      src/engine/server/world/WorldServer.java

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

@ -632,36 +632,39 @@ public class WorldServer {
} }
//add extra vendors for lakebane //add extra vendors for lakebane
try { try {
NPC runeMerchant = NPC.createNPC("Runey", 1200, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
runeMerchant.sellPercent = 0;
Building sdrHut = BuildingManager.getBuilding(27979); Building sdrHut = BuildingManager.getBuilding(27979);
runeMerchant.buildingUUID = sdrHut.getObjectUUID(); if (sdrHut.getHirelings().size() < 1) {
runeMerchant.building = sdrHut; NPC runeMerchant = NPC.createNPC("Runey", 1200, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
NPCManager.slotCharacterInBuilding(runeMerchant); runeMerchant.sellPercent = 0;
runeMerchant.setLoc(runeMerchant.bindLoc); runeMerchant.buildingUUID = sdrHut.getObjectUUID();
for(MobEquipment item : runeMerchant.contract.getSellInventory()){ runeMerchant.building = sdrHut;
item.magicValue = 10000000; NPCManager.slotCharacterInBuilding(runeMerchant);
runeMerchant.setLoc(runeMerchant.bindLoc);
for (MobEquipment item : runeMerchant.contract.getSellInventory()) {
item.magicValue = 10000000;
}
} }
} }
catch(Exception e){ catch(Exception e){
Logger.error("FAILED TO ADD RUNE MERCHANT"); Logger.error("FAILED TO ADD RUNE MERCHANT");
} }
try { try {
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); Building sdrHut = BuildingManager.getBuilding(27984);
resourceMerchant.buildingUUID = sdrHut.getObjectUUID(); if(sdrHut.getHirelings().size() < 2) {
resourceMerchant.building = sdrHut; NPC resourceMerchant = NPC.createNPC("Resource Merchant", 830, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
NPCManager.slotCharacterInBuilding(resourceMerchant); resourceMerchant.sellPercent = 0;
resourceMerchant.setLoc(resourceMerchant.bindLoc); resourceMerchant.contract.vendorDialog = VendorDialog.getVendorDialog(623);
resourceMerchant.contract.getSellInventory().clear(); resourceMerchant.buildingUUID = sdrHut.getObjectUUID();
for(int resourceID : Warehouse.getMaxResources().keySet()){ resourceMerchant.building = sdrHut;
if(resourceID == 7 || resourceID == 1580021) NPCManager.slotCharacterInBuilding(resourceMerchant);
continue; resourceMerchant.setLoc(resourceMerchant.bindLoc);
MobEquipment me = new MobEquipment(ItemBase.getItemBase(resourceID), 0, 0); //resourceMerchant.contract.getSellInventory().clear();
resourceMerchant.contract.getSellInventory().add(me); for(int resourceID : Warehouse.getMaxResources().keySet()){
if(resourceID == 7 || resourceID == 1580021)
continue;
MobLoot resource = new MobLoot(resourceMerchant,ItemBase.getItemBase(resourceID), 1, true);
resourceMerchant.getCharItemManager().addItemToInventory(resource);
}
} }
} }
catch(Exception e){ catch(Exception e){

Loading…
Cancel
Save