From b8e0165da26350e9613c2c61dcea257d5c54bf4f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 23 Jun 2024 19:44:10 -0500 Subject: [PATCH] allowed siege engineer alchemist and banker on ToL --- src/engine/gameManager/BuildingManager.java | 18 ++++++++++++++++++ src/engine/objects/Contract.java | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index d0e71883..a938eb62 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -520,6 +520,24 @@ public enum BuildingManager { if (building.getBlueprintUUID() == 0) return false; + if(building.getBlueprint().getBuildingGroup().equals(BuildingGroup.TOL)){ + if(contract.getContractID() == 850) { + boolean hasRunemaster = false; + for (AbstractCharacter npc : building.getHirelings().keySet()) { + + if (npc.getObjectType() != GameObjectType.NPC) + continue; + + if(npc.contractUUID == 850) + hasRunemaster = true; + } + + if(hasRunemaster) + return false; + } + } + + int maxSlots = building.getBlueprint().getMaxSlots(); if(building.getBlueprint().getBuildingGroup() != null) { building.getBlueprint().getSlotsForRank(building.getRank()); diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index 70c438fd..f050d156 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -86,6 +86,12 @@ public class Contract extends AbstractGameObject { this.iconID = rs.getInt("iconID"); this.vendorID = rs.getInt("vendorID"); this.allowedBuildings = EnumBitSet.asEnumBitSet(rs.getLong("allowedBuildingTypeID"), Enum.BuildingGroup.class); + switch(this.contractID){ + case 866: //banker + case 865: //siege engineer + case 899: //alchemist + this.allowedBuildings.add(Enum.BuildingGroup.TOL); + } this.equipmentSet = rs.getInt("equipSetID"); this.inventorySet = rs.getInt("inventorySet");