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

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

@ -212,10 +212,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { @@ -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 { @@ -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 { @@ -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;

12
src/engine/objects/Blueprint.java

@ -313,10 +313,10 @@ public class Blueprint { @@ -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 { @@ -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;
}

Loading…
Cancel
Save