Browse Source

resource merchant work

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

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

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

Loading…
Cancel
Save