OSDN Git Service

portコマンドから連合艦隊の状態を反映するようにした
authormasakih <masakih@users.sourceforge.jp>
Fri, 4 Dec 2015 10:51:26 +0000 (19:51 +0900)
committermasakih <masakih@users.sourceforge.jp>
Fri, 4 Dec 2015 10:51:26 +0000 (19:51 +0900)
KCD/HMCombinedCommand.m
KCD/HMPortCommand.m

index 9b7a45e..637dcfc 100644 (file)
@@ -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];
index 73885f1..4c2abc3 100644 (file)
@@ -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;
 }