Browse Source

trebs slot in proper locations

combat-2
FatBoy-DOTC 1 year ago
parent
commit
61c66b0e96
  1. 7
      src/engine/gameManager/NPCManager.java

7
src/engine/gameManager/NPCManager.java

@ -344,16 +344,15 @@ public enum NPCManager { @@ -344,16 +344,15 @@ public enum NPCManager {
else {
if(abstractCharacter.getObjectType().equals(Enum.GameObjectType.Mob) && ((Mob)abstractCharacter).behaviourType.equals(Enum.MobBehaviourType.SiegeEngine)) {
Mob mob = (Mob)abstractCharacter;
buildingSlot = mob.guardCaptain.siegeMinionMap.size() + 1;
}else {
buildingSlot = mob.guardCaptain.siegeMinionMap.size() + 2;
}else
buildingSlot = BuildingManager.getAvailableSlot(abstractCharacter.building);
}
}
if (buildingSlot == -1)
Logger.error("No available slot for NPC: " + abstractCharacter.getObjectUUID());
// Pets are regular mobiles not hirelings (Siege engines)
if(abstractCharacter.contract != null)
abstractCharacter.building.getHirelings().put(abstractCharacter, buildingSlot);
// Override bind and location for this npc derived

Loading…
Cancel
Save