Browse Source

Resource Merchant

lakebane-master
FatBoy-DOTC 10 months ago
parent
commit
46a9dad407
  1. 21
      src/engine/server/world/WorldServer.java

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

@ -657,6 +657,27 @@ public class WorldServer {
catch(Exception e){ catch(Exception e){
Logger.error("FAILED TO ADD RUNE MERCHANT"); Logger.error("FAILED TO ADD RUNE MERCHANT");
} }
try {
Building sdrHut = BuildingManager.getBuilding(27984);
Zone sdr = sdrHut.parentZone;
boolean exists = false;
for(NPC merchant : sdr.zoneNPCSet)
if(merchant.contract.getContractID() == 12287)
exists = true;
if (!exists) {
NPC runeMerchant = NPC.createNPC("Stocky", 12287, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
runeMerchant.sellPercent = 9999.00f;
runeMerchant.buildingUUID = sdrHut.getObjectUUID();
runeMerchant.building = sdrHut;
NPCManager.slotCharacterInBuilding(runeMerchant);
runeMerchant.setLoc(runeMerchant.bindLoc);
runeMerchant.updateDatabase();
}
}
catch(Exception e){
Logger.error("FAILED TO ADD RESOURCE MERCHANT");
}
Logger.info("time to load World Objects: " + (System.currentTimeMillis() - start) + " ms"); Logger.info("time to load World Objects: " + (System.currentTimeMillis() - start) + " ms");
} }

Loading…
Cancel
Save