From 22a0cb24742899ea49c80b0371dc1be297252beb Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 14 Feb 2024 19:28:11 -0600 Subject: [PATCH] Tol can now support 4 max slost at r7/8 --- .../handlers/ActivateNPCMsgHandler.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/engine/net/client/handlers/ActivateNPCMsgHandler.java b/src/engine/net/client/handlers/ActivateNPCMsgHandler.java index 0d2897bf..3759b052 100644 --- a/src/engine/net/client/handlers/ActivateNPCMsgHandler.java +++ b/src/engine/net/client/handlers/ActivateNPCMsgHandler.java @@ -57,6 +57,21 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler { if (contract.canSlotinBuilding(building)) ItemLists.add(hirelings); + + if(building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)){ + if(contract.getContractID() == 899)//alchemist + ItemLists.add(hirelings); + + if(contract.getContractID() == 866)//banker + ItemLists.add(hirelings); + + if(contract.getContractID() == 865)//siege engineer + ItemLists.add(hirelings); + } + if(building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SIEGETENT)){ + if(contract.getContractID() == 865)//siege engineer + ItemLists.add(hirelings); + } } } @@ -85,6 +100,13 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler { if (contractItem == null) return false; + if(msg.getContractItem() == 850){//runemaster + for(AbstractCharacter abs : building.getHirelings().keySet()) { + NPC npc = (NPC)abs; + if(npc.contract.getContractID() == 850) + return false; //can only have 1 runemaster + } + } if (!player.getCharItemManager().doesCharOwnThisItem(contractItem.getObjectUUID())) { Logger.error(player.getName() + "has attempted to place Hireling : " + contractItem.getName() + "without a valid contract!");