Browse Source

allowed siege engineer alchemist and banker on ToL

lakebane-new
FatBoy-DOTC 6 months ago
parent
commit
b8e0165da2
  1. 18
      src/engine/gameManager/BuildingManager.java
  2. 6
      src/engine/objects/Contract.java

18
src/engine/gameManager/BuildingManager.java

@ -520,6 +520,24 @@ public enum BuildingManager {
if (building.getBlueprintUUID() == 0) if (building.getBlueprintUUID() == 0)
return false; 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(); int maxSlots = building.getBlueprint().getMaxSlots();
if(building.getBlueprint().getBuildingGroup() != null) { if(building.getBlueprint().getBuildingGroup() != null) {
building.getBlueprint().getSlotsForRank(building.getRank()); building.getBlueprint().getSlotsForRank(building.getRank());

6
src/engine/objects/Contract.java

@ -86,6 +86,12 @@ public class Contract extends AbstractGameObject {
this.iconID = rs.getInt("iconID"); this.iconID = rs.getInt("iconID");
this.vendorID = rs.getInt("vendorID"); this.vendorID = rs.getInt("vendorID");
this.allowedBuildings = EnumBitSet.asEnumBitSet(rs.getLong("allowedBuildingTypeID"), Enum.BuildingGroup.class); 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.equipmentSet = rs.getInt("equipSetID");
this.inventorySet = rs.getInt("inventorySet"); this.inventorySet = rs.getInt("inventorySet");

Loading…
Cancel
Save