From 09f4b444837f86af2608e3f9ca6be895933fa8d3 Mon Sep 17 00:00:00 2001 From: masakih Date: Fri, 4 Dec 2015 19:51:26 +0900 Subject: [PATCH] =?utf8?q?port=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=88?= =?utf8?q?=E3=82=99=E3=81=8B=E3=82=89=E9=80=A3=E5=90=88=E8=89=A6=E9=9A=8A?= =?utf8?q?=E3=81=AE=E7=8A=B6=E6=85=8B=E3=82=92=E5=8F=8D=E6=98=A0=E3=81=99?= =?utf8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KCD/HMCombinedCommand.m | 9 ++++++++- KCD/HMPortCommand.m | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/KCD/HMCombinedCommand.m b/KCD/HMCombinedCommand.m index 9b7a45e5..637dcfc0 100644 --- a/KCD/HMCombinedCommand.m +++ b/KCD/HMCombinedCommand.m @@ -27,7 +27,14 @@ NSString *HMCombinedType = @"HMCombinedType"; } - (void)execute { - id type = self.arguments[@"api_combined_type"]; + id type = nil; + if([self.api isEqualToString:@"/kcsapi/api_port/port"]) { + NSDictionary *data = self.json[@"api_data"]; + type = data[@"api_combined_flag"]; + } + if([self.api isEqualToString:@"/kcsapi/api_req_hensei/combined"]) { + type = self.arguments[@"api_combined_type"]; + } if(!type) return; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; diff --git a/KCD/HMPortCommand.m b/KCD/HMPortCommand.m index 73885f15..4c2abc33 100644 --- a/KCD/HMPortCommand.m +++ b/KCD/HMPortCommand.m @@ -18,6 +18,7 @@ #import "HMDummyShipCommand.h" #import "HMPortNotifyCommand.h" #import "HMGuardShelterCommand.h" +#import "HMCombinedCommand.h" @implementation HMPortCommand @@ -45,6 +46,7 @@ [HMDummyShipCommand new], [HMPortNotifyCommand new], [HMGuardShelterCommand new], + [HMCombinedCommand new], nil]; return self; } -- 2.11.0