Browse Source

zone override

birdbane
FatBoy-DOTC 9 months ago
parent
commit
ff5b41f494
  1. 2
      src/engine/net/client/handlers/ManageCityAssetMsgHandler.java
  2. 10
      src/engine/net/client/handlers/OrderNPCMsgHandler.java
  3. 12
      src/engine/objects/Blueprint.java

2
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 // 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. // Players cannot destroy or transfer a TOL.

10
src/engine/net/client/handlers/OrderNPCMsgHandler.java

@ -212,10 +212,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
return; return;
} }
for (AbstractCharacter guard : building.getHirelings().keySet()) {
if (guard.getObjectType() == GameObjectType.Mob)
((Mob) guard).setPatrolPointIndex(0);
}
} else if (building.getPatrolPoints() != null) } else if (building.getPatrolPoints() != null)
ClearPatrolPoints(building.getObjectUUID()); ClearPatrolPoints(building.getObjectUUID());
@ -223,10 +219,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
AddSentryPoints(building.getObjectUUID(), orderNpcMsg.getSentryPoints()); AddSentryPoints(building.getObjectUUID(), orderNpcMsg.getSentryPoints());
} else if (building.getSentryPoints() != null) } else if (building.getSentryPoints() != null)
ClearSentryPoints(building.getObjectUUID()); ClearSentryPoints(building.getObjectUUID());
// Dispatch dispatch = Dispatch.borrow(pc, msg);
// DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
} }
private static void processUpgradeNPC(PlayerCharacter player, AbstractCharacter abstractCharacter) { private static void processUpgradeNPC(PlayerCharacter player, AbstractCharacter abstractCharacter) {
@ -541,7 +533,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
} else if (orderNPCMsg.getObjectType() == GameObjectType.Mob.ordinal()) { } else if (orderNPCMsg.getObjectType() == GameObjectType.Mob.ordinal()) {
mob = Mob.getFromCacheDBID(orderNPCMsg.getNpcUUID()); mob = Mob.getMob(orderNPCMsg.getNpcUUID());
if (mob == null) if (mob == null)
return true; return true;

12
src/engine/objects/Blueprint.java

@ -313,10 +313,10 @@ public class Blueprint {
// Early exit for buildings with single or no slots // 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; return maxSlots;
if (this.maxRank == 1 && currentRank == 1) if (this.maxRank == 1 && currentRank == 1&& this.buildingGroup.equals(BuildingGroup.TOL) == false)
return getMaxSlots(); return getMaxSlots();
switch (currentRank) { switch (currentRank) {
@ -328,20 +328,22 @@ public class Blueprint {
case 3: case 3:
case 4: case 4:
case 5: case 5:
case 6:
availableSlots = 2; availableSlots = 2;
break; break;
case 6:
case 7: case 7:
availableSlots = 3; availableSlots = 3;
break; break;
case 8: case 8:
availableSlots = 1; availableSlots = 3;
break; break;
default: default:
availableSlots = 0; availableSlots = 0;
break; break;
} }
if(this.buildingGroup.equals(BuildingGroup.TOL)){
availableSlots += 1;
}
return availableSlots; return availableSlots;
} }

Loading…
Cancel
Save