Browse Source

trebs slot in proper locations

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

9
src/engine/gameManager/NPCManager.java

@ -344,17 +344,16 @@ public enum NPCManager { @@ -344,17 +344,16 @@ 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)
abstractCharacter.building.getHirelings().put(abstractCharacter, buildingSlot);
if(abstractCharacter.contract != null)
abstractCharacter.building.getHirelings().put(abstractCharacter, buildingSlot);
// Override bind and location for this npc derived
// from BuildingManager slot location data.

Loading…
Cancel
Save