|
|
@ -520,9 +520,40 @@ public enum BuildingManager { |
|
|
|
if (building.getBlueprintUUID() == 0) |
|
|
|
if (building.getBlueprintUUID() == 0) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (building.getBlueprint().getMaxSlots() == building.getHirelings().size()) |
|
|
|
if (building.getBlueprint().getMaxSlots() == building.getHirelings().size() && building.getBlueprint().getBuildingGroup().equals(BuildingGroup.TOL) == false) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int availableSlots = 0; |
|
|
|
|
|
|
|
if(building.getBlueprint().getBuildingGroup().equals(BuildingGroup.TOL)){ |
|
|
|
|
|
|
|
switch (building.getRank()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
availableSlots = 1; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 3: |
|
|
|
|
|
|
|
case 4: |
|
|
|
|
|
|
|
case 5: |
|
|
|
|
|
|
|
availableSlots = 2; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 6: |
|
|
|
|
|
|
|
case 7: |
|
|
|
|
|
|
|
availableSlots = 3; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 8: |
|
|
|
|
|
|
|
availableSlots = 3; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
availableSlots = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
availableSlots += 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (availableSlots == building.getHirelings().size()){ |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String pirateName = NPCManager.getPirateName(contract.getMobbaseID()); |
|
|
|
String pirateName = NPCManager.getPirateName(contract.getMobbaseID()); |
|
|
|
|
|
|
|
|
|
|
|
if (item.getChargesRemaining() > 0) |
|
|
|
if (item.getChargesRemaining() > 0) |
|
|
|