load guard in barracks

This commit is contained in:
2023-04-16 20:36:51 -05:00
parent c93f932caa
commit cb5c2c668a
+8
View File
@@ -839,6 +839,14 @@ public class Mob extends AbstractIntelligenceAgent {
if (!isPet && !isSiege)
Mob.mobMapByDBID.put(this.dbID, this);
if (this.building != null && this.building.getBlueprint() != null && this.isPlayerGuard()) {
int maxSlots = 10;
for (int slot = 1; slot < maxSlots + 1; slot++)
if (!this.building.getHirelings().containsValue(slot)) {
this.building.getHirelings().put(this, slot);
break;
}
}
}
/*