OSDN Git Service

装備の奪い取りに対応
authormasakih <masakih@users.sourceforge.jp>
Wed, 1 Jun 2016 12:36:12 +0000 (21:36 +0900)
committermasakih <masakih@users.sourceforge.jp>
Wed, 1 Jun 2016 12:36:12 +0000 (21:36 +0900)
KCD.xcodeproj/project.pbxproj
KCD/HMMemberShipCommand.m
KCD/HMSlotDepriveCommand.h [new file with mode: 0644]
KCD/HMSlotDepriveCommand.m [new file with mode: 0644]
KCD/HMSlotDepriveUnsetCommand.h [new file with mode: 0644]
KCD/HMSlotDepriveUnsetCommand.m [new file with mode: 0644]

index 153ae4e..3e9926a 100644 (file)
@@ -71,6 +71,8 @@
                F46F104118A9B85E0063E503 /* HMJSONNode.m in Sources */ = {isa = PBXBuildFile; fileRef = F46F104018A9B85E0063E503 /* HMJSONNode.m */; };
                F46F104518AA50730063E503 /* HMBroserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F46F104318AA50730063E503 /* HMBroserWindowController.m */; };
                F46F104918ABAC910063E503 /* KCD.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = F46F104718ABAC910063E503 /* KCD.xcdatamodeld */; };
+               F46F45BF1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = F46F45BE1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.m */; };
+               F46F45C21CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = F46F45C11CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.m */; };
                F46FCB291BD933C600304DE7 /* HMSlotItemShortNameTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = F46FCB281BD933C600304DE7 /* HMSlotItemShortNameTransformer.m */; };
                F47178471B6DE9F400F5E59D /* HMMapAreaTransformaer.m in Sources */ = {isa = PBXBuildFile; fileRef = F47178461B6DE9F400F5E59D /* HMMapAreaTransformaer.m */; };
                F471784A1B6F9B5600F5E59D /* ResourceHistory.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = F47178481B6F9B5600F5E59D /* ResourceHistory.xcdatamodeld */; };
                F46F104218AA50730063E503 /* HMBroserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMBroserWindowController.h; sourceTree = "<group>"; };
                F46F104318AA50730063E503 /* HMBroserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMBroserWindowController.m; sourceTree = "<group>"; };
                F46F104818ABAC910063E503 /* KCD.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = KCD.xcdatamodel; sourceTree = "<group>"; };
+               F46F45BD1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMSlotDepriveCommand.h; sourceTree = "<group>"; };
+               F46F45BE1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMSlotDepriveCommand.m; sourceTree = "<group>"; };
+               F46F45C01CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMSlotDepriveUnsetCommand.h; sourceTree = "<group>"; };
+               F46F45C11CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMSlotDepriveUnsetCommand.m; sourceTree = "<group>"; };
                F46FCB271BD933C600304DE7 /* HMSlotItemShortNameTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMSlotItemShortNameTransformer.h; sourceTree = "<group>"; };
                F46FCB281BD933C600304DE7 /* HMSlotItemShortNameTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMSlotItemShortNameTransformer.m; sourceTree = "<group>"; };
                F47178451B6DE9F400F5E59D /* HMMapAreaTransformaer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMMapAreaTransformaer.h; sourceTree = "<group>"; };
                                F402D5361BE3AFAB008D5881 /* HMSlotResetCommand.m */,
                                F4F479241C074E9900D0BF69 /* HMCombinedCommand.h */,
                                F4F479251C074E9900D0BF69 /* HMCombinedCommand.m */,
+                               F46F45BD1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.h */,
+                               F46F45BE1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.m */,
+                               F46F45C01CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.h */,
+                               F46F45C11CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.m */,
                        );
                        name = Command;
                        sourceTree = "<group>";
                                F4268031194D1B1A00B2C27F /* HMChangeHenseiCommand.m in Sources */,
                                F4BEEFE11B0B6326004702B8 /* HMDummyShipCommand.m in Sources */,
                                F4513EE418B635EA00073552 /* HMDocksViewController.m in Sources */,
+                               F46F45BF1CFF0BEE00EB7F4D /* HMSlotDepriveCommand.m in Sources */,
+                               F46F45C21CFF0CFF00EB7F4D /* HMSlotDepriveUnsetCommand.m in Sources */,
                                F4666C5E1B242124001840DB /* HMQuestProgressTransformer.m in Sources */,
                                F494DC6D18CC054800AE97E4 /* HMNyukyoDockStatus.m in Sources */,
                                F4666C641B25CA3E001840DB /* HMKCQuest+Extensions.m in Sources */,
index 734e9fa..5fd7eb8 100644 (file)
        }
        if([self.api isEqualToString:@"/kcsapi/api_get_member/ship_deck"]) {
                return @"api_data.api_ship_data";
-       }if([self.api isEqualToString:@"/kcsapi/api_req_kaisou/powerup"]) {
+       }
+       if([self.api isEqualToString:@"/kcsapi/api_req_kaisou/powerup"]) {
                return @"api_data.api_ship";
        }
+       if([self.api isEqualToString:@"/kcsapi/api_req_kaisou/slot_deprive"]) {
+               return @"api_data.api_ship_data.api_set_ship";
+       }
        return [super dataKey];
 }
 
@@ -263,6 +267,7 @@ static BOOL isFewShipUpdateAPI(NSString *api)
        if([api isEqualToString:@"/kcsapi/api_req_kousyou/getship"]) return YES;
        if([api isEqualToString:@"/kcsapi/api_get_member/ship_deck"]) return YES;
        if([api isEqualToString:@"/kcsapi/api_req_kaisou/powerup"]) return YES;
+       if([api isEqualToString:@"/kcsapi/api_req_kaisou/slot_deprive"]) return YES;
        
        return NO;
 }
diff --git a/KCD/HMSlotDepriveCommand.h b/KCD/HMSlotDepriveCommand.h
new file mode 100644 (file)
index 0000000..f34292d
--- /dev/null
@@ -0,0 +1,13 @@
+//
+//  HMSlotDepriveCommand.h
+//  KCD
+//
+//  Created by Hori,Masaki on 2016/06/01.
+//  Copyright © 2016年 Hori,Masaki. All rights reserved.
+//
+
+#import "HMCompositCommand.h"
+
+@interface HMSlotDepriveCommand : HMCompositCommand
+
+@end
diff --git a/KCD/HMSlotDepriveCommand.m b/KCD/HMSlotDepriveCommand.m
new file mode 100644 (file)
index 0000000..30555d6
--- /dev/null
@@ -0,0 +1,36 @@
+//
+//  HMSlotDepriveCommand.m
+//  KCD
+//
+//  Created by Hori,Masaki on 2016/06/01.
+//  Copyright © 2016年 Hori,Masaki. All rights reserved.
+//
+
+#import "HMSlotDepriveCommand.h"
+
+#import "HMMemberShipCommand.h"
+#import "HMSlotDepriveUnsetCommand.h"
+
+@implementation HMSlotDepriveCommand
++ (void)load
+{
+       static dispatch_once_t onceToken;
+       dispatch_once(&onceToken, ^{
+               [HMJSONCommand registerClass:self];
+       });
+}
+
++ (BOOL)canExcuteAPI:(NSString *)api
+{
+       return [api isEqualToString:@"/kcsapi/api_req_kaisou/slot_deprive"];
+}
+
+- (id)init
+{
+       self = [super initWithCommands:
+                       [HMMemberShipCommand new],
+                       [HMSlotDepriveUnsetCommand new],
+                       nil];
+       return self;
+}
+@end
diff --git a/KCD/HMSlotDepriveUnsetCommand.h b/KCD/HMSlotDepriveUnsetCommand.h
new file mode 100644 (file)
index 0000000..c70892f
--- /dev/null
@@ -0,0 +1,12 @@
+//
+//  HMSlotDepriveUnsetCommand.h
+//  KCD
+//
+//  Created by Hori,Masaki on 2016/06/01.
+//  Copyright © 2016年 Hori,Masaki. All rights reserved.
+//
+
+#import "HMMemberShipCommand.h"
+
+@interface HMSlotDepriveUnsetCommand : HMMemberShipCommand
+@end
diff --git a/KCD/HMSlotDepriveUnsetCommand.m b/KCD/HMSlotDepriveUnsetCommand.m
new file mode 100644 (file)
index 0000000..ac557ca
--- /dev/null
@@ -0,0 +1,16 @@
+//
+//  HMSlotDepriveUnsetCommand.m
+//  KCD
+//
+//  Created by Hori,Masaki on 2016/06/01.
+//  Copyright © 2016年 Hori,Masaki. All rights reserved.
+//
+
+#import "HMSlotDepriveUnsetCommand.h"
+
+@implementation HMSlotDepriveUnsetCommand
+- (NSString *)dataKey
+{
+       return @"api_data.api_ship_data.api_unset_ship";
+}
+@end