diff --git a/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java b/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java index e2b0af01..0fe3c58d 100644 --- a/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java +++ b/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java @@ -294,7 +294,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler { // Owner is obviously allowed to upgrade his own buildings - if (building.getOwner().equals(player)) { + if (building.getOwner() != null && building.getOwner().equals(player)) { // Players cannot destroy or transfer a TOL. diff --git a/src/engine/net/client/handlers/OrderNPCMsgHandler.java b/src/engine/net/client/handlers/OrderNPCMsgHandler.java index d0a9793a..ec62bd25 100644 --- a/src/engine/net/client/handlers/OrderNPCMsgHandler.java +++ b/src/engine/net/client/handlers/OrderNPCMsgHandler.java @@ -212,10 +212,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { return; } - for (AbstractCharacter guard : building.getHirelings().keySet()) { - if (guard.getObjectType() == GameObjectType.Mob) - ((Mob) guard).setPatrolPointIndex(0); - } } else if (building.getPatrolPoints() != null) ClearPatrolPoints(building.getObjectUUID()); @@ -223,10 +219,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { AddSentryPoints(building.getObjectUUID(), orderNpcMsg.getSentryPoints()); } else if (building.getSentryPoints() != null) ClearSentryPoints(building.getObjectUUID()); - - // Dispatch dispatch = Dispatch.borrow(pc, msg); - // DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); - } private static void processUpgradeNPC(PlayerCharacter player, AbstractCharacter abstractCharacter) { @@ -541,7 +533,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { } else if (orderNPCMsg.getObjectType() == GameObjectType.Mob.ordinal()) { - mob = Mob.getFromCacheDBID(orderNPCMsg.getNpcUUID()); + mob = Mob.getMob(orderNPCMsg.getNpcUUID()); if (mob == null) return true; diff --git a/src/engine/objects/Blueprint.java b/src/engine/objects/Blueprint.java index c8a39142..f12120b6 100644 --- a/src/engine/objects/Blueprint.java +++ b/src/engine/objects/Blueprint.java @@ -313,10 +313,10 @@ public class Blueprint { // Early exit for buildings with single or no slots - if (this.maxSlots <= 1) + if (this.maxSlots <= 1 && this.buildingGroup.equals(BuildingGroup.TOL) == false) return maxSlots; - if (this.maxRank == 1 && currentRank == 1) + if (this.maxRank == 1 && currentRank == 1&& this.buildingGroup.equals(BuildingGroup.TOL) == false) return getMaxSlots(); switch (currentRank) { @@ -328,20 +328,22 @@ public class Blueprint { case 3: case 4: case 5: - case 6: availableSlots = 2; break; + case 6: case 7: availableSlots = 3; break; case 8: - availableSlots = 1; + availableSlots = 3; break; default: availableSlots = 0; break; } - + if(this.buildingGroup.equals(BuildingGroup.TOL)){ + availableSlots += 1; + } return availableSlots; }