|
|
|
@ -53,8 +53,14 @@ public enum BuildingManager {
@@ -53,8 +53,14 @@ public enum BuildingManager {
|
|
|
|
|
|
|
|
|
|
int numOfSlots = _slotLocations.get(building.meshUUID).size(); |
|
|
|
|
|
|
|
|
|
if (building.hirelings.isEmpty()) |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < numOfSlots; i++) { |
|
|
|
|
|
|
|
|
|
if (i > building.hirelings.size()) |
|
|
|
|
return i; |
|
|
|
|
|
|
|
|
|
if (building.hirelings.get(i) == null) |
|
|
|
|
return i; |
|
|
|
|
} |
|
|
|
@ -73,8 +79,14 @@ public enum BuildingManager {
@@ -73,8 +79,14 @@ public enum BuildingManager {
|
|
|
|
|
|
|
|
|
|
int numOfSlots = _slotLocations.get(building.meshUUID).size(); |
|
|
|
|
|
|
|
|
|
if (building.hirelings.isEmpty()) |
|
|
|
|
return numOfSlots - 1; |
|
|
|
|
|
|
|
|
|
for (int i = numOfSlots - 1; i >= 0; i--) { |
|
|
|
|
|
|
|
|
|
if (i > building.hirelings.size()) |
|
|
|
|
return i; |
|
|
|
|
|
|
|
|
|
if (building.hirelings.get(i) == null) |
|
|
|
|
return i; |
|
|
|
|
} |
|
|
|
|