From 7f7c3a8330903a2f03096fe4c71910c1f2f25e1c Mon Sep 17 00:00:00 2001 From: masakih Date: Thu, 23 Feb 2017 22:26:46 +0900 Subject: [PATCH] =?utf8?q?HMStart2Command=E3=81=8B=E3=82=89=E7=9B=B4?= =?utf8?q?=E6=8E=A5=E5=91=BC=E3=81=B6=E3=82=88=E3=81=86=E3=81=AB=E3=81=97?= =?utf8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KCD.xcodeproj/project.pbxproj | 40 ----------------------- KCD/HMMaserShipCommand.swift | 51 ------------------------------ KCD/HMMasterFurnitureCommand.swift | 23 -------------- KCD/HMMasterMapAreaCommand.swift | 20 ------------ KCD/HMMasterMapCellCommand.swift | 22 ------------- KCD/HMMasterMapInfoCommand.swift | 20 ------------ KCD/HMMasterMissionCommand.swift | 20 ------------ KCD/HMMasterSTypeCommand.swift | 23 -------------- KCD/HMMasterSlotItemCommand.swift | 20 ------------ KCD/HMMasterSlotItemEquipTypeCommand.swift | 20 ------------ KCD/HMMasterUseItemCommand.swift | 20 ------------ KCD/HMStart2Command.swift | 29 ++++++++--------- 12 files changed, 13 insertions(+), 295 deletions(-) delete mode 100644 KCD/HMMaserShipCommand.swift delete mode 100644 KCD/HMMasterFurnitureCommand.swift delete mode 100644 KCD/HMMasterMapAreaCommand.swift delete mode 100644 KCD/HMMasterMapCellCommand.swift delete mode 100644 KCD/HMMasterMapInfoCommand.swift delete mode 100644 KCD/HMMasterMissionCommand.swift delete mode 100644 KCD/HMMasterSTypeCommand.swift delete mode 100644 KCD/HMMasterSlotItemCommand.swift delete mode 100644 KCD/HMMasterSlotItemEquipTypeCommand.swift delete mode 100644 KCD/HMMasterUseItemCommand.swift diff --git a/KCD.xcodeproj/project.pbxproj b/KCD.xcodeproj/project.pbxproj index f75dc683..63dffad7 100644 --- a/KCD.xcodeproj/project.pbxproj +++ b/KCD.xcodeproj/project.pbxproj @@ -91,16 +91,6 @@ F44BC7191E29D9DC004644E3 /* HMMemberDeckCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7181E29D9DC004644E3 /* HMMemberDeckCommand.swift */; }; F44BC71B1E29DCB4004644E3 /* HMMemberKDockCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC71A1E29DCB4004644E3 /* HMMemberKDockCommand.swift */; }; F44BC71D1E29DF32004644E3 /* HMMemberNDockCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC71C1E29DF32004644E3 /* HMMemberNDockCommand.swift */; }; - F44BC71F1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC71E1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift */; }; - F44BC7211E29E82B004644E3 /* HMMasterMissionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7201E29E82B004644E3 /* HMMasterMissionCommand.swift */; }; - F44BC7231E29E8E6004644E3 /* HMMasterFurnitureCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7221E29E8E6004644E3 /* HMMasterFurnitureCommand.swift */; }; - F44BC7251E29EC26004644E3 /* HMMasterSlotItemCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7241E29EC26004644E3 /* HMMasterSlotItemCommand.swift */; }; - F44BC7271E29ED87004644E3 /* HMMasterUseItemCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7261E29ED87004644E3 /* HMMasterUseItemCommand.swift */; }; - F44BC7291E2A0842004644E3 /* HMMasterMapCellCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7281E2A0842004644E3 /* HMMasterMapCellCommand.swift */; }; - F44BC72B1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC72A1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift */; }; - F44BC72D1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC72C1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift */; }; - F44BC72F1E2A0B75004644E3 /* HMMaserShipCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC72E1E2A0B75004644E3 /* HMMaserShipCommand.swift */; }; - F44BC7311E2A247F004644E3 /* HMMasterSTypeCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7301E2A247F004644E3 /* HMMasterSTypeCommand.swift */; }; F44BC7331E2A25E4004644E3 /* HMStart2Command.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7321E2A25E4004644E3 /* HMStart2Command.swift */; }; F44BC7351E2A295E004644E3 /* HMSetActionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7341E2A295E004644E3 /* HMSetActionCommand.swift */; }; F44BC7371E2A4258004644E3 /* HMSetPlaneCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7361E2A4258004644E3 /* HMSetPlaneCommand.swift */; }; @@ -401,16 +391,6 @@ F44BC7181E29D9DC004644E3 /* HMMemberDeckCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMemberDeckCommand.swift; sourceTree = ""; }; F44BC71A1E29DCB4004644E3 /* HMMemberKDockCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMemberKDockCommand.swift; sourceTree = ""; }; F44BC71C1E29DF32004644E3 /* HMMemberNDockCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMemberNDockCommand.swift; sourceTree = ""; }; - F44BC71E1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterSlotItemEquipTypeCommand.swift; sourceTree = ""; }; - F44BC7201E29E82B004644E3 /* HMMasterMissionCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMissionCommand.swift; sourceTree = ""; }; - F44BC7221E29E8E6004644E3 /* HMMasterFurnitureCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterFurnitureCommand.swift; sourceTree = ""; }; - F44BC7241E29EC26004644E3 /* HMMasterSlotItemCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterSlotItemCommand.swift; sourceTree = ""; }; - F44BC7261E29ED87004644E3 /* HMMasterUseItemCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterUseItemCommand.swift; sourceTree = ""; }; - F44BC7281E2A0842004644E3 /* HMMasterMapCellCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMapCellCommand.swift; sourceTree = ""; }; - F44BC72A1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMapInfoCommand.swift; sourceTree = ""; }; - F44BC72C1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMapAreaCommand.swift; sourceTree = ""; }; - F44BC72E1E2A0B75004644E3 /* HMMaserShipCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMaserShipCommand.swift; sourceTree = ""; }; - F44BC7301E2A247F004644E3 /* HMMasterSTypeCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterSTypeCommand.swift; sourceTree = ""; }; F44BC7321E2A25E4004644E3 /* HMStart2Command.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMStart2Command.swift; sourceTree = ""; }; F44BC7341E2A295E004644E3 /* HMSetActionCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMSetActionCommand.swift; sourceTree = ""; }; F44BC7361E2A4258004644E3 /* HMSetPlaneCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMSetPlaneCommand.swift; sourceTree = ""; }; @@ -693,16 +673,6 @@ isa = PBXGroup; children = ( F44BC7321E2A25E4004644E3 /* HMStart2Command.swift */, - F44BC7301E2A247F004644E3 /* HMMasterSTypeCommand.swift */, - F44BC72E1E2A0B75004644E3 /* HMMaserShipCommand.swift */, - F44BC72C1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift */, - F44BC72A1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift */, - F44BC7281E2A0842004644E3 /* HMMasterMapCellCommand.swift */, - F44BC7261E29ED87004644E3 /* HMMasterUseItemCommand.swift */, - F44BC7241E29EC26004644E3 /* HMMasterSlotItemCommand.swift */, - F44BC7221E29E8E6004644E3 /* HMMasterFurnitureCommand.swift */, - F44BC7201E29E82B004644E3 /* HMMasterMissionCommand.swift */, - F44BC71E1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift */, ); name = MasterUpdateCommand; sourceTree = ""; @@ -1440,7 +1410,6 @@ F4FC3E8C1E43660400E41228 /* HMKCGuardEscaped.swift in Sources */, F490977B1E19C3910085A45D /* HMSuppliesView.swift in Sources */, F4AA59341E1D2512001667AF /* HMSlotItemShortNameTransformer.swift in Sources */, - F44BC7311E2A247F004644E3 /* HMMasterSTypeCommand.swift in Sources */, F44BC6E11E2304E3004644E3 /* HMSlotDepriveUnsetCommand.swift in Sources */, F44BC73B1E2A5C34004644E3 /* HMMapInfoCommand.swift in Sources */, F4AA593E1E1E0BFB001667AF /* HMDamageValueTransformer.swift in Sources */, @@ -1451,7 +1420,6 @@ F44BC6E51E23082B004644E3 /* HMCombinedCommand.swift in Sources */, F4AA59401E1E23EC001667AF /* HMHistoryMarkTransformer.swift in Sources */, F44BC7131E28FDC4004644E3 /* HMMemberShipCommand.swift in Sources */, - F44BC7291E2A0842004644E3 /* HMMasterMapCellCommand.swift in Sources */, F49097831E19F7760085A45D /* HMStrengthenListItemCellView.swift in Sources */, F495462E1B1894DD00E0D8D0 /* Bookmark.xcdatamodeld in Sources */, F44BC7091E279C41004644E3 /* HMKenzoMarkCommand.swift in Sources */, @@ -1470,7 +1438,6 @@ F4D05BC81E0C0DA100688D66 /* HMAirBaseWindowController.swift in Sources */, F4A0D70D1E2FA34400224DCE /* HMCombinedBattleCommand.swift in Sources */, F44BC70D1E27B601004644E3 /* HMMemberShip3Command.swift in Sources */, - F44BC7251E29EC26004644E3 /* HMMasterSlotItemCommand.swift in Sources */, F42A8FE41E41FD6F0099DC1D /* HMDropShipHistory.swift in Sources */, F42A8FDC1E40B9FE0099DC1D /* HMKCSlotItemObject.swift in Sources */, F4D05BE11E0FAB8E00688D66 /* HMShipViewController.swift in Sources */, @@ -1501,7 +1468,6 @@ F45F3BE31E06A60A0009434E /* HMUpgradableShipsWindowController.swift in Sources */, F4E5FF121E17D6850026868C /* HMGameViewController.swift in Sources */, F42A8FE61E420A360099DC1D /* HMKaihatuHistory.swift in Sources */, - F44BC7231E29E8E6004644E3 /* HMMasterFurnitureCommand.swift in Sources */, F4AA592E1E1D1D4D001667AF /* HMSokuTransformer.swift in Sources */, F4AA594A1E1E4863001667AF /* HMMapWindowController.swift in Sources */, F4FC3E961E46AC3000E41228 /* HMTSVSupport.swift in Sources */, @@ -1551,12 +1517,10 @@ F44BC7191E29D9DC004644E3 /* HMMemberDeckCommand.swift in Sources */, F490977F1E19ED400085A45D /* HMStrengthenListItemView.swift in Sources */, F42A8FDE1E40C6DF0099DC1D /* HMKCQuest.swift in Sources */, - F44BC7211E29E82B004644E3 /* HMMasterMissionCommand.swift in Sources */, F4B15CBD1E21BA870078CFFC /* CommandRegister.swift in Sources */, F45FBB921E129BAE000E72B9 /* HMFleetViewController.swift in Sources */, F4AA59501E1E4D18001667AF /* HMShipWindowController.swift in Sources */, F42CFE181E3C12AA000B4F9B /* HMScreenshotInformation.swift in Sources */, - F44BC72B1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift in Sources */, F44BC7371E2A4258004644E3 /* HMSetPlaneCommand.swift in Sources */, F42CFE281E3D9A02000B4F9B /* HMKCMasterMapInfo.swift in Sources */, F4AA594C1E1E497C001667AF /* HMEquipmentWindowController.swift in Sources */, @@ -1580,7 +1544,6 @@ F46F104918ABAC910063E503 /* KCD.xcdatamodeld in Sources */, F44BC7111E27C61A004644E3 /* HMMemberSlotItemCommand.swift in Sources */, F44BC6FD1E250B2A004644E3 /* HMGetShipCommand.swift in Sources */, - F44BC71F1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift in Sources */, F4D05BDF1E0F8B6900688D66 /* HMPowerUpSupportViewController.swift in Sources */, F44BC6F31E23D32B004644E3 /* HMRealPowerUpCommand.swift in Sources */, F4E5FF021E150A850026868C /* HMAncherageRepairTimerViewController.swift in Sources */, @@ -1599,13 +1562,10 @@ F42A8FD01E3DB49A0099DC1D /* HMKCMasterSlotItemObject.swift in Sources */, F49097851E1A15AF0085A45D /* HMSlotItemLevelView.swift in Sources */, F44BC6C31E221865004644E3 /* HMAirCorpsSupplyCommand.swift in Sources */, - F44BC72D1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift in Sources */, F44BC6D51E226308004644E3 /* HMNyukyoSpeedChangeCommand.swift in Sources */, F47C3EA81E5F06E700D97449 /* MasterSlotItemEquipTypeMapper.swift in Sources */, F4AA59361E1D36C5001667AF /* HMQuestProgressTransformer.swift in Sources */, F491A4BE1E4E0C5000D1E067 /* CustomHTTPProtocol.swift in Sources */, - F44BC72F1E2A0B75004644E3 /* HMMaserShipCommand.swift in Sources */, - F44BC7271E29ED87004644E3 /* HMMasterUseItemCommand.swift in Sources */, F4FC3E8E1E4368BB00E41228 /* HMKCManagedObject.swift in Sources */, F4A0D7171E2FB7E000224DCE /* HMCompositCommand.swift in Sources */, F44BC7011E251408004644E3 /* HMDestroyItem2Command.swift in Sources */, diff --git a/KCD/HMMaserShipCommand.swift b/KCD/HMMaserShipCommand.swift deleted file mode 100644 index 73dfd780..00000000 --- a/KCD/HMMaserShipCommand.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// HMMaserShipCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMaserShipCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_ship" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterShip") - MasterShipMapper(apiResponse).commit() - } - - override func handleExtraValue(_ value: Any, forKey key: String, to object: NSManagedObject) -> Bool { - if key != "api_stype" { return false } - - guard let sType = value as? Int - else { - print("HMMaserShipCommand: value is not Int") - return false - } - guard let masterShip = object as? HMKCMasterShipObject - else { - print("HMMaserShipCommand: object is not HMKCMasterShipObject") - return false - } - setStype(sType, to: masterShip) - return true - } - - private lazy var masterSTypes: [HMKCMasterSType] = { - return HMServerDataStore.default.sortedMasterSTypesById() - }() - - private func setStype(_ stypeID: Int, to masterShip: HMKCMasterShipObject) { - if masterShip.stype.id == stypeID { return } - guard let stype = masterSTypes.binarySearch(comparator: { $0.id ==? stypeID }) - else { return print("HMMaserShipCommand: Can not find MasterSType") } - guard let moc = masterShip.managedObjectContext, - let masterSType = moc.object(with: stype.objectID) as? HMKCMasterSType - else { return print("HMMaserShipCommand: Can not convert to current moc object masterSType") } - masterShip.stype = masterSType - } -} diff --git a/KCD/HMMasterFurnitureCommand.swift b/KCD/HMMasterFurnitureCommand.swift deleted file mode 100644 index a8515036..00000000 --- a/KCD/HMMasterFurnitureCommand.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// HMMasterFurnitureCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterFurnitureCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_furniture" - } - override var ignoreKeys: [String] { - return ["api_season"] - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterFurniture") - MasterFurnitureMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterMapAreaCommand.swift b/KCD/HMMasterMapAreaCommand.swift deleted file mode 100644 index a3da5209..00000000 --- a/KCD/HMMasterMapAreaCommand.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HMMasterMapAreaCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterMapAreaCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_maparea" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterMapArea") - MasterMapAreaMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterMapCellCommand.swift b/KCD/HMMasterMapCellCommand.swift deleted file mode 100644 index a285420c..00000000 --- a/KCD/HMMasterMapCellCommand.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// HMMasterMapCellCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterMapCellCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_mapcell" - } - override var ignoreKeys: [String] { - return ["api_req_shiptype", "api_link_no"] - } - - override func execute() { - commitJSON(toEntityNamed: "MasterMapCell") - } -} diff --git a/KCD/HMMasterMapInfoCommand.swift b/KCD/HMMasterMapInfoCommand.swift deleted file mode 100644 index 05483853..00000000 --- a/KCD/HMMasterMapInfoCommand.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HMMasterMapInfoCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterMapInfoCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_mapinfo" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterMapInfo") - MasterMapInfoMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterMissionCommand.swift b/KCD/HMMasterMissionCommand.swift deleted file mode 100644 index 656265cf..00000000 --- a/KCD/HMMasterMissionCommand.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HMMasterMissionCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterMissionCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_mission" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterMission") - MasterMissionMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterSTypeCommand.swift b/KCD/HMMasterSTypeCommand.swift deleted file mode 100644 index 1a05ef60..00000000 --- a/KCD/HMMasterSTypeCommand.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// HMMasterSTypeCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterSTypeCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_stype" - } - override var ignoreKeys: [String] { - return ["api_equip_type"] - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterSType") - MasterSTypeMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterSlotItemCommand.swift b/KCD/HMMasterSlotItemCommand.swift deleted file mode 100644 index 9bc4c3aa..00000000 --- a/KCD/HMMasterSlotItemCommand.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HMMasterSlotItemCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterSlotItemCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_slotitem" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterSlotItem") - MasterSlotItemMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterSlotItemEquipTypeCommand.swift b/KCD/HMMasterSlotItemEquipTypeCommand.swift deleted file mode 100644 index de3bf026..00000000 --- a/KCD/HMMasterSlotItemEquipTypeCommand.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HMMasterSlotItemEquipTypeCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterSlotItemEquipTypeCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_slotitem_equiptype" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterSlotItemEquipType") - MasterSlotItemEquipTypeMapper(apiResponse).commit() - } -} diff --git a/KCD/HMMasterUseItemCommand.swift b/KCD/HMMasterUseItemCommand.swift deleted file mode 100644 index 2b600355..00000000 --- a/KCD/HMMasterUseItemCommand.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HMMasterUseItemCommand.swift -// KCD -// -// Created by Hori,Masaki on 2017/01/14. -// Copyright © 2017年 Hori,Masaki. All rights reserved. -// - -import Cocoa - -class HMMasterUseItemCommand: HMJSONCommand { - override var dataKey: String { - return "api_data.api_mst_useitem" - } - - override func execute() { -// commitJSON(toEntityNamed: "MasterUseItem") - MasterUseItemMapper(apiResponse).commit() - } -} diff --git a/KCD/HMStart2Command.swift b/KCD/HMStart2Command.swift index 2a556718..ef09d11d 100644 --- a/KCD/HMStart2Command.swift +++ b/KCD/HMStart2Command.swift @@ -8,24 +8,21 @@ import Cocoa -class HMStart2Command: HMCompositCommand { - required init(apiResponse: HMAPIResponse) { - super.init(apiResponse: apiResponse, commandList: - [ - HMMasterMapAreaCommand(apiResponse: apiResponse), - HMMasterMapInfoCommand(apiResponse: apiResponse), - HMMasterSTypeCommand(apiResponse: apiResponse), - HMMaserShipCommand(apiResponse: apiResponse), - HMMasterMissionCommand(apiResponse: apiResponse), - HMMasterFurnitureCommand(apiResponse: apiResponse), - HMMasterSlotItemEquipTypeCommand(apiResponse: apiResponse), - HMMasterSlotItemCommand(apiResponse: apiResponse), - HMMasterUseItemCommand(apiResponse: apiResponse), - ] - ) - } +class HMStart2Command: HMJSONCommand { override class func canExecuteAPI(_ api: String) -> Bool { if api == "/kcsapi/api_start2" { return true } return false } + + override func execute() { + MasterMapAreaMapper(apiResponse).commit() + MasterMapInfoMapper(apiResponse).commit() + MasterSTypeMapper(apiResponse).commit() + MasterShipMapper(apiResponse).commit() + MasterMissionMapper(apiResponse).commit() + MasterFurnitureMapper(apiResponse).commit() + MasterSlotItemEquipTypeMapper(apiResponse).commit() + MasterSlotItemMapper(apiResponse).commit() + MasterUseItemMapper(apiResponse).commit() + } } -- 2.11.0