Browse Source

Iteration bugfix.

master
MagicBot 2 years ago
parent
commit
beb9d5927e
  1. 3
      src/engine/gameManager/BuildingManager.java

3
src/engine/gameManager/BuildingManager.java

@ -27,7 +27,6 @@ import java.time.LocalDateTime;
import java.time.ZoneId; import java.time.ZoneId;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
public enum BuildingManager { public enum BuildingManager {
@ -41,7 +40,7 @@ public enum BuildingManager {
int numOfSlots = _slotLocations.get(building.meshUUID).size(); int numOfSlots = _slotLocations.get(building.meshUUID).size();
for (int i = 1; i < numOfSlots; i++) { for (int i = 1; i <= numOfSlots; i++) {
if (!building.getHirelings().containsValue(i)) if (!building.getHirelings().containsValue(i))
return i; return i;
} }

Loading…
Cancel
Save