From acc253aa4d7f91eee00426b075bcd943ac78c833 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 4 Feb 2024 08:02:42 -0500 Subject: [PATCH] Removed unused method --- src/engine/gameManager/BuildingManager.java | 80 --------------------- 1 file changed, 80 deletions(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 74e95ff7..c00d6b58 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -19,10 +19,7 @@ import engine.job.JobScheduler; import engine.jobs.UpgradeBuildingJob; import engine.math.Bounds; import engine.math.Vector3fImmutable; -import engine.net.client.ClientConnection; import engine.net.client.msg.ErrorPopupMsg; -import engine.net.client.msg.ManageCityAssetsMsg; -import engine.net.client.msg.PlaceAssetMsg; import engine.objects.*; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; @@ -777,83 +774,6 @@ public enum BuildingManager { } - public static void processRedeedNPC(NPC npc, Building building, ClientConnection origin) { - - // Member variable declaration - PlayerCharacter player; - Contract contract; - CharacterItemManager itemMan; - ItemBase itemBase; - Item item; - - npc.lock.writeLock().lock(); - - try { - - - if (building == null) - return; - player = SessionManager.getPlayerCharacter(origin); - itemMan = player.getCharItemManager(); - - contract = npc.getContract(); - - if (!player.getCharItemManager().hasRoomInventory((short) 1)) { - ErrorPopupMsg.sendErrorPopup(player, 21); - return; - } - - - if (!building.hirelings.containsKey(npc)) - return; - - if (!npc.remove()) { - PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity"); - return; - } - - building.hirelings.remove(npc); - - itemBase = ItemBase.getItemBase(contract.getContractID()); - - if (itemBase == null) { - Logger.error("Could not find Contract for npc: " + npc.getObjectUUID()); - return; - } - - boolean itemWorked = false; - - item = new Item(itemBase, player.getObjectUUID(), Enum.OwnerType.PlayerCharacter, (byte) ((byte) npc.getRank() - 1), (byte) ((byte) npc.getRank() - 1), - (short) 1, (short) 1, true, false, Enum.ItemContainerType.INVENTORY, (byte) 0, - new ArrayList<>(), ""); - item.setNumOfItems(1); - item.containerType = Enum.ItemContainerType.INVENTORY; - - try { - item = DbManager.ItemQueries.ADD_ITEM(item); - itemWorked = true; - } catch (Exception e) { - Logger.error(e); - } - if (itemWorked) { - itemMan.addItemToInventory(item); - itemMan.updateInventory(); - } - - ManageCityAssetsMsg mca = new ManageCityAssetsMsg(); - mca.actionType = NPC.SVR_CLOSE_WINDOW; - mca.setTargetType(building.getObjectType().ordinal()); - mca.setTargetID(building.getObjectUUID()); - origin.sendMsg(mca); - - } catch (Exception e) { - Logger.error(e); - } finally { - npc.lock.writeLock().unlock(); - } - - } - public static void rebuildMine(Building mineBuilding) { setRank(mineBuilding, 1); mineBuilding.meshUUID = mineBuilding.getBlueprint().getMeshForRank(mineBuilding.rank);