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

Loading…
Cancel
Save