|
|
|
@ -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.
|
|
|
|
|