From c9428d2b568f956776e0908baa9a3b1f06e42c4d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 20 Feb 2024 20:39:38 -0600 Subject: [PATCH] test rune vendor --- src/engine/server/world/WorldServer.java | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 45aacb61..a190e4d6 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -631,23 +631,23 @@ public class WorldServer { } //add extra vendors for lakebane - //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); - // runeMerchant.sellPercent = 0; - // runeMerchant.buildingUUID = sdrHut.getObjectUUID(); - // runeMerchant.building = sdrHut; - // NPCManager.slotCharacterInBuilding(runeMerchant); - // runeMerchant.setLoc(runeMerchant.bindLoc); - // for (MobEquipment item : runeMerchant.contract.getSellInventory()) { - // item.magicValue = 10000000; - // } - // } - //} - //catch(Exception e){ - // Logger.error("FAILED TO ADD RUNE MERCHANT"); - //} + try { + Building sdrHut = BuildingManager.getBuilding(27979); + if (sdrHut.getHirelings() == null || sdrHut.getHirelings().size() != 1) { + NPC runeMerchant = NPC.createNPC("Runey", 1200, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null); + runeMerchant.sellPercent = 0; + runeMerchant.buildingUUID = sdrHut.getObjectUUID(); + runeMerchant.building = sdrHut; + NPCManager.slotCharacterInBuilding(runeMerchant); + runeMerchant.setLoc(runeMerchant.bindLoc); + for (MobEquipment item : runeMerchant.contract.getSellInventory()) { + item.magicValue = 10000000; + } + } + } + catch(Exception e){ + Logger.error("FAILED TO ADD RUNE MERCHANT"); + } Logger.info("time to load World Objects: " + (System.currentTimeMillis() - start) + " ms"); }