Browse Source

cleanup

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
9e44c9475a
  1. 66
      src/engine/server/world/WorldServer.java

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

@ -703,41 +703,41 @@ public class WorldServer { @@ -703,41 +703,41 @@ public class WorldServer {
catch(Exception e){
Logger.error("FAILED TO ADD RUNE MERCHANT");
}
try {
Building sdrHut = BuildingManager.getBuilding(27978);
Zone sdr = sdrHut.parentZone;
NPC resourceMerchant = null;
boolean exists = false;
for(NPC merchant : sdr.zoneNPCSet)
if(merchant.contract.getContractID() == 900) {
exists = true;
resourceMerchant = merchant;
}
if (!exists) {
resourceMerchant = NPC.createNPC("Stocky", 900, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
resourceMerchant.sellPercent = 9999.00f;
resourceMerchant.buildingUUID = sdrHut.getObjectUUID();
resourceMerchant.building = sdrHut;
NPCManager.slotCharacterInBuilding(resourceMerchant);
resourceMerchant.setLoc(resourceMerchant.bindLoc);
//try {
// Building sdrHut = BuildingManager.getBuilding(27978);
// Zone sdr = sdrHut.parentZone;
// NPC resourceMerchant = null;
// boolean exists = false;
// for(NPC merchant : sdr.zoneNPCSet)
// if(merchant.contract.getContractID() == 900) {
// exists = true;
// resourceMerchant = merchant;
// }
// if (!exists) {
// resourceMerchant = NPC.createNPC("Stocky", 900, Vector3fImmutable.ZERO, Guild.getGuild(6), ZoneManager.getZoneByUUID(656), (short) 70, null);
// resourceMerchant.sellPercent = 9999.00f;
// resourceMerchant.buildingUUID = sdrHut.getObjectUUID();
// resourceMerchant.building = sdrHut;
// NPCManager.slotCharacterInBuilding(resourceMerchant);
// resourceMerchant.setLoc(resourceMerchant.bindLoc);
//resourceMerchant.updateDatabase();
}
if(resourceMerchant != null) {
for (int resourceID : Warehouse.getMaxResources().keySet()) {
//MobLoot resource = new MobLoot(resourceMerchant,ItemBase.getItemBase(resourceID),1,false);
//resource.magicValue = Warehouse.getCostForResource(resourceID);
MobEquipment resource = new MobEquipment(resourceID, 100.0f);
resource.magicValue = Warehouse.getCostForResource(resourceID);
resourceMerchant.contract.getSellInventory().add(resource);
}
resourceMerchant.sellPercent = 0.0f;
resourceMerchant.setName("Stocky the Resource Merchant");
// }
// if(resourceMerchant != null) {
// for (int resourceID : Warehouse.getMaxResources().keySet()) {
// //MobLoot resource = new MobLoot(resourceMerchant,ItemBase.getItemBase(resourceID),1,false);
// //resource.magicValue = Warehouse.getCostForResource(resourceID);
// MobEquipment resource = new MobEquipment(resourceID, 100.0f);
// resource.magicValue = Warehouse.getCostForResource(resourceID);
// resourceMerchant.contract.getSellInventory().add(resource);
// }
// resourceMerchant.sellPercent = 0.0f;
// resourceMerchant.setName("Stocky the Resource Merchant");
//resourceMerchant.updateDatabase();
}
}
catch(Exception e){
Logger.error("FAILED TO ADD RESOURCE MERCHANT");
}
// }
//}
//catch(Exception e){
// Logger.error("FAILED TO ADD RESOURCE MERCHANT");
//}
Logger.info("time to load World Objects: " + (System.currentTimeMillis() - start) + " ms");
}

Loading…
Cancel
Save