diff --git a/src/engine/net/client/handlers/RepairBuildingMsgHandler.java b/src/engine/net/client/handlers/RepairBuildingMsgHandler.java index 59c02bac..62373432 100644 --- a/src/engine/net/client/handlers/RepairBuildingMsgHandler.java +++ b/src/engine/net/client/handlers/RepairBuildingMsgHandler.java @@ -47,21 +47,16 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler { if (serverZone.playerCityUUID == 0 && targetBuilding.getBlueprint() != null && targetBuilding.getBlueprint().getBuildingGroup() != BuildingGroup.MINE) return; - City city = City.GetCityFromCache(serverZone.playerCityUUID); - if (city != null) { + if (city != null) if (city.getBane() != null && city.protectionEnforced == false) return; - } - //cannot repair mines during 24/7 activity. - if (targetBuilding.getBlueprint() != null && targetBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.MINE && Mine.getMineFromTower(targetBuilding.getObjectUUID()).isActive == true) { + if (targetBuilding.getBlueprint() != null && targetBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.MINE && Mine.getMineFromTower(targetBuilding.getObjectUUID()).isActive == true) return; - } - int maxHP = (int) targetBuilding.getMaxHitPoints(); int repairCost = BuildingManager.GetRepairCost(targetBuilding); @@ -94,35 +89,22 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler { Building targetBuilding; RepairBuildingMsg msg; - // Member variable assignment msg = (RepairBuildingMsg) baseMsg; - player = SessionManager.getPlayerCharacter(origin); if (player == null) return true; - switch (msg.getType()) { case 0: targetBuilding = BuildingManager.getBuildingFromCache(msg.getBuildingID()); RepairBuilding(targetBuilding, origin, msg); break; - - // targetBuilding.createFurniture(item.getItemBase().getUseID(), 0, msg.getFurnitureLoc(), Vector3f.ZERO, 0, player); - - } - - // dispatch = Dispatch.borrow(player, baseMsg); - // DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); - return true; - } - }