• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Mac用艦これ専用ブラウザ おまけ機能付き


Commit MetaInfo

Revisão9df657baa888229f93ea0ce4e0b994b22c8c20d6 (tree)
Hora2015-01-04 17:23:16
Autormasakih <masakih@user...>
Commitermasakih

Mensagem de Log

MOD Primitiveなメソッドだけを使用するように変更

HMCoreDataManagerクラスをSwiftに書き換えるための下準備

Mudança Sumário

Diff

--- a/KCD/HMApplySuppliesCommand.m
+++ b/KCD/HMApplySuppliesCommand.m
@@ -22,8 +22,9 @@
2222 for(NSDictionary *updataInfo in shipInfos) {
2323 NSError *error = nil;
2424 NSArray *array = [store objectsWithEntityName:@"Ship"
25- error:&error
26- predicateFormat:@"id = %@", @([updataInfo[@"api_id"] integerValue])];
25+ sortDescriptors:nil
26+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([updataInfo[@"api_id"] integerValue])]
27+ error:&error];
2728 if(array.count == 0) {
2829 if(error) {
2930 NSLog(@"Error: at %@ : %@", NSStringFromClass([self class]), error);
--- a/KCD/HMCalculateDamageCommand.m
+++ b/KCD/HMCalculateDamageCommand.m
@@ -40,8 +40,9 @@ typedef NS_ENUM(NSUInteger, HMBattleType) {
4040
4141 NSError *error = nil;
4242 NSArray *array = [self.store objectsWithEntityName:@"Battle"
43- predicate:nil
44- error:&error];
43+ sortDescriptors:nil
44+ predicate:nil
45+ error:&error];
4546 if(error) {
4647 [self log:@"%s error: %@", __PRETTY_FUNCTION__, error];
4748 return;
@@ -59,8 +60,9 @@ typedef NS_ENUM(NSUInteger, HMBattleType) {
5960
6061 NSError *error = nil;
6162 NSArray *array = [self.store objectsWithEntityName:@"Damage"
62- predicate:nil
63- error:&error];
63+ sortDescriptors:nil
64+ predicate:nil
65+ error:&error];
6466 if(error) {
6567 [self log:@"%s error: %@", __PRETTY_FUNCTION__, error];
6668 return;
@@ -107,6 +109,7 @@ typedef NS_ENUM(NSUInteger, HMBattleType) {
107109 // Battleエンティティ取得
108110 error = nil;
109111 NSArray *battles = [self.store objectsWithEntityName:@"Battle"
112+ sortDescriptors:nil
110113 predicate:nil
111114 error:&error];
112115 if(error) {
@@ -301,8 +304,9 @@ typedef NS_ENUM(NSUInteger, HMBattleType) {
301304
302305 error = nil;
303306 NSArray *array = [self.store objectsWithEntityName:@"Battle"
304- predicate:nil
305- error:&error];
307+ sortDescriptors:nil
308+ predicate:nil
309+ error:&error];
306310 if(error) {
307311 [self log:@"%s error: %@", __PRETTY_FUNCTION__, error];
308312 return;
@@ -319,6 +323,7 @@ typedef NS_ENUM(NSUInteger, HMBattleType) {
319323 // 艦隊メンバーを取得
320324 error = nil;
321325 NSArray *decks = [serverStore objectsWithEntityName:@"Deck"
326+ sortDescriptors:nil
322327 predicate:predicate
323328 error:&error];
324329 if(error) {
@@ -343,8 +348,9 @@ typedef NS_ENUM(NSUInteger, HMBattleType) {
343348 for(id shipId in shipIds) {
344349 error = nil;
345350 NSArray *ship = [serverStore objectsWithEntityName:@"Ship"
346- error:&error
347- predicateFormat:@"id = %@", @([shipId integerValue])];
351+ sortDescriptors:nil
352+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([shipId integerValue])]
353+ error:&error];
348354 if(error) {
349355 [self log:@"%s error: %@", __PRETTY_FUNCTION__, error];
350356 }
--- a/KCD/HMChangeHenseiCommand.m
+++ b/KCD/HMChangeHenseiCommand.m
@@ -66,6 +66,7 @@
6666 {
6767 NSError *error = nil;
6868 NSArray *decks = [self.store objectsWithEntityName:@"Deck"
69+ sortDescriptors:nil
6970 predicate:nil
7071 error:&error];
7172 // TODO: error handling
@@ -95,8 +96,9 @@
9596
9697 NSError *error = nil;
9798 NSArray *decks = [self.store objectsWithEntityName:@"Deck"
98- error:&error
99- predicateFormat:@"id = %ld", deckNumber];
99+ sortDescriptors:nil
100+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", deckNumber]
101+ error:&error];
100102 // TODO: error handling
101103 id deck = decks[0];
102104
--- a/KCD/HMCreateShipCommand.m
+++ b/KCD/HMCreateShipCommand.m
@@ -34,8 +34,9 @@
3434 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
3535 HMServerDataStore *serverDataStore = [HMServerDataStore oneTimeEditor];
3636 NSArray *array = [serverDataStore objectsWithEntityName:@"KenzoDock"
37- error:NULL
38- predicateFormat:@"id = %@", @([[self.arguments valueForKey:@"api_kdock_id"] integerValue])];
37+ sortDescriptors:nil
38+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([[self.arguments valueForKey:@"api_kdock_id"] integerValue])]
39+ error:NULL];
3940 if([array count] == 0) {
4041 NSLog(@"KenzoDock data is invalid.");
4142 return;
@@ -45,14 +46,20 @@
4546 NSNumber *item1 = [kdock valueForKey:@"item1"];
4647
4748 // Deck -> FlagShip
48- array = [serverDataStore objectsWithEntityName:@"Deck" error:NULL predicateFormat:@"id = 1"];
49+ array = [serverDataStore objectsWithEntityName:@"Deck"
50+ sortDescriptors:nil
51+ predicate:[NSPredicate predicateWithFormat:@"id = 1"]
52+ error:NULL];
4953 if([array count] == 0) {
5054 NSLog(@"Deck data is invalid.");
5155 return;
5256 }
5357 id deck = array[0];
5458 id flagShipID = [deck valueForKey:@"ship_0"];
55- array = [serverDataStore objectsWithEntityName:@"Ship" error:NULL predicateFormat:@"id = %@", flagShipID];
59+ array = [serverDataStore objectsWithEntityName:@"Ship"
60+ sortDescriptors:nil
61+ predicate:[NSPredicate predicateWithFormat:@"id = %@", flagShipID]
62+ error:NULL];
5663 if([array count] == 0) {
5764 NSLog(@"Ship data is invalid or ship_0 is invalid.");
5865 return;
@@ -62,7 +69,10 @@
6269 NSString *flagShipName = [flagShip valueForKeyPath:@"master_ship.name"];
6370
6471 // Basic -> level
65- array = [serverDataStore objectsWithEntityName:@"Basic" predicate:nil error:NULL];
72+ array = [serverDataStore objectsWithEntityName:@"Basic"
73+ sortDescriptors:nil
74+ predicate:nil
75+ error:NULL];
6676 if([array count] == 0) {
6777 NSLog(@"Basic data is invalid.");
6878 return;
@@ -73,8 +83,9 @@
7383 HMLocalDataStore *lds = [HMLocalDataStore oneTimeEditor];
7484 HMKenzoMark *newObejct = nil;
7585 array = [lds objectsWithEntityName:@"KenzoMark"
76- error:NULL
77- predicateFormat:@"kDockId = %@", @([[self.arguments valueForKey:@"api_kdock_id"] integerValue])];
86+ sortDescriptors:nil
87+ predicate:[NSPredicate predicateWithFormat:@"kDockId = %@", @([[self.arguments valueForKey:@"api_kdock_id"] integerValue])]
88+ error:NULL];
7889 if([array count] == 0) {
7990 newObejct = [NSEntityDescription insertNewObjectForEntityForName:@"KenzoMark"
8091 inManagedObjectContext:[lds managedObjectContext]];
--- a/KCD/HMDestroyItem2Command.m
+++ b/KCD/HMDestroyItem2Command.m
@@ -40,8 +40,9 @@
4040
4141 NSError *error = nil;
4242 NSArray *array = [store objectsWithEntityName:@"SlotItem"
43- error:&error
44- predicateFormat:@"id IN %@", items];
43+ sortDescriptors:nil
44+ predicate:[NSPredicate predicateWithFormat:@"id IN %@", items]
45+ error:&error];
4546 if([array count] == 0) {
4647 NSLog(@"SlotItem is invalid.");
4748 return;
@@ -53,7 +54,10 @@
5354
5455 //
5556 error = nil;
56- array = [store objectsWithEntityName:@"Material" predicate:nil error:&error];
57+ array = [store objectsWithEntityName:@"Material"
58+ sortDescriptors:nil
59+ predicate:nil
60+ error:&error];
5761 if(error) {
5862 [self log:@"Fetch error: %@", error];
5963 return;
--- a/KCD/HMFleetInformation.m
+++ b/KCD/HMFleetInformation.m
@@ -104,8 +104,9 @@
104104 NSArray *array = nil;
105105 if(shipId != -1) {
106106 array = [store objectsWithEntityName:@"Ship"
107- error:&error
108- predicateFormat:@"id = %ld", shipId];
107+ sortDescriptors:nil
108+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", shipId]
109+ error:&error];
109110 }
110111 if(shipId != -1 && array.count == 0) {
111112 NSLog(@"Could not found ship of id %@", shipIdNumber);
@@ -235,8 +236,9 @@
235236 NSArray *array = nil;
236237 if(shipId != -1) {
237238 array = [store objectsWithEntityName:@"Ship"
238- error:&error
239- predicateFormat:@"id = %ld", shipId];
239+ sortDescriptors:nil
240+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", shipId]
241+ error:&error];
240242 } else {
241243 return 0;
242244 }
@@ -277,8 +279,9 @@
277279 if(itemId.integerValue == -1) break;
278280 error = nil;
279281 array = [store objectsWithEntityName:@"SlotItem"
280- error:&error
281- predicateFormat:@"id = %@", itemId];
282+ sortDescriptors:nil
283+ predicate:[NSPredicate predicateWithFormat:@"id = %@", itemId]
284+ error:&error];
282285 if(array.count == 0) continue;
283286 HMKCSlotItemObject *slotItem = array[0];
284287 HMKCMasterSlotItemObject *master = slotItem.master_slotItem;
@@ -336,8 +339,9 @@
336339 NSArray *array = nil;
337340 if(shipId != -1) {
338341 array = [store objectsWithEntityName:@"Ship"
339- error:&error
340- predicateFormat:@"id = %ld", shipId];
342+ sortDescriptors:nil
343+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", shipId]
344+ error:&error];
341345 }
342346 if(array.count == 0) {
343347 NSLog(@"Could not found ship of id %@", shipIdNumber);
--- a/KCD/HMKaisouLockCommand.m
+++ b/KCD/HMKaisouLockCommand.m
@@ -36,8 +36,9 @@
3636 HMServerDataStore *serverDataStore = [HMServerDataStore oneTimeEditor];
3737 NSError *error = nil;
3838 NSArray *result = [serverDataStore objectsWithEntityName:@"SlotItem"
39- error:&error
40- predicateFormat:@"id = %ld", [slotitemId integerValue]];
39+ sortDescriptors:nil
40+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", [slotitemId integerValue]]
41+ error:&error];
4142 if(error) {
4243 [self log:@"Fetch error: %@", error];
4344 return;
--- a/KCD/HMKenzoMarkCommand.m
+++ b/KCD/HMKenzoMarkCommand.m
@@ -18,8 +18,9 @@
1818 {
1919 HMServerDataStore *serverDataStore = [HMServerDataStore oneTimeEditor];
2020 NSArray *array = [serverDataStore objectsWithEntityName:@"KenzoDock"
21- error:NULL
22- predicateFormat:@"id = %@", @([[self.arguments valueForKey:@"api_kdock_id"] integerValue])];
21+ sortDescriptors:nil
22+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([[self.arguments valueForKey:@"api_kdock_id"] integerValue])]
23+ error:NULL];
2324 if([array count] == 0) {
2425 NSLog(@"KenzoDock data is invalid.");
2526 return;
@@ -29,7 +30,10 @@
2930 NSNumber *item1 = [kdock valueForKey:@"item1"];
3031
3132 //
32- array = [serverDataStore objectsWithEntityName:@"MasterShip" error:NULL predicateFormat:@"id = %@", [kdock valueForKey:@"created_ship_id"]];
33+ array = [serverDataStore objectsWithEntityName:@"MasterShip"
34+ sortDescriptors:nil
35+ predicate:[NSPredicate predicateWithFormat:@"id = %@", [kdock valueForKey:@"created_ship_id"]]
36+ error:NULL];
3337 if([array count] == 0) {
3438 NSLog(@"MasterShip data is invalid or ship_id is invalid.");
3539 return;
@@ -41,12 +45,19 @@
4145 NSString *flafShipName = nil;
4246 NSNumber *commanderLv = nil;
4347 HMLocalDataStore *localDataStore = [HMLocalDataStore oneTimeEditor];
48+ NSPredicate *predicate = [NSPredicate predicateWithFormat:
49+ @"fuel = %@ AND bull = %@ AND steel = %@ AND bauxite = %@ AND kaihatusizai = %@ AND kDockId = %@ AND created_ship_id = %@",
50+ item1,
51+ [kdock valueForKey:@"item2"],
52+ [kdock valueForKey:@"item3"],
53+ [kdock valueForKey:@"item4"],
54+ [kdock valueForKey:@"item5"],
55+ @([[self.arguments valueForKey:@"api_kdock_id"] integerValue]),
56+ [kdock valueForKey:@"created_ship_id"]];
4457 array = [localDataStore objectsWithEntityName:@"KenzoMark"
45- error:NULL
46- predicateFormat:@"fuel = %@ AND bull = %@ AND steel = %@ AND bauxite = %@ AND kaihatusizai = %@ AND kDockId = %@ AND created_ship_id = %@",
47- item1, [kdock valueForKey:@"item2"], [kdock valueForKey:@"item3"], [kdock valueForKey:@"item4"], [kdock valueForKey:@"item5"],
48- @([[self.arguments valueForKey:@"api_kdock_id"] integerValue]), [kdock valueForKey:@"created_ship_id"]
49- ];
58+ sortDescriptors:nil
59+ predicate:predicate
60+ error:NULL];
5061 if([array count] != 0) {
5162 flagShipLv = [array[0] valueForKey:@"flagShipLv"];
5263 flafShipName = [array[0] valueForKey:@"flagShipName"];
--- a/KCD/HMMemberBasicCommand.m
+++ b/KCD/HMMemberBasicCommand.m
@@ -36,7 +36,10 @@
3636 NSManagedObjectContext *managedObjectContext = [serverDataStore managedObjectContext];
3737
3838 NSError *error = nil;
39- id result = [serverDataStore objectsWithEntityName:@"Basic" predicate:nil error:&error];
39+ id result = [serverDataStore objectsWithEntityName:@"Basic"
40+ sortDescriptors:nil
41+ predicate:nil
42+ error:&error];
4043 if(error) {
4144 [self log:@"Fetch error: %@", error];
4245 return;
--- a/KCD/HMMemberMaterialCommand.m
+++ b/KCD/HMMemberMaterialCommand.m
@@ -50,7 +50,10 @@
5050 NSManagedObjectContext *managedObjectContext = [serverDataStore managedObjectContext];
5151
5252 NSError *error = nil;
53- id result = [serverDataStore objectsWithEntityName:@"Material" predicate:nil error:&error];
53+ id result = [serverDataStore objectsWithEntityName:@"Material"
54+ sortDescriptors:nil
55+ predicate:nil
56+ error:&error];
5457 if(error) {
5558 [self log:@"Fetch error: %@", error];
5659 return;
--- a/KCD/HMNyukyoSpeedChangeCommand.m
+++ b/KCD/HMNyukyoSpeedChangeCommand.m
@@ -34,8 +34,9 @@
3434
3535 NSError *error = nil;
3636 NSArray *array = [store objectsWithEntityName:@"NyukyoDock"
37- error:&error
38- predicateFormat:@"id = %@", @([ndockId integerValue])];
37+ sortDescriptors:nil
38+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([ndockId integerValue])]
39+ error:&error];
3940 if(array.count == 0) {
4041 if(error) {
4142 NSLog(@"Error: at %@ : %@", NSStringFromClass([self class]), error);
@@ -54,8 +55,9 @@
5455 // 艦隊リスト更新用
5556 error = nil;
5657 array = [store objectsWithEntityName:@"Ship"
57- error:&error
58- predicateFormat:@"id = %@", @([shipId integerValue])];
58+ sortDescriptors:nil
59+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([shipId integerValue])]
60+ error:&error];
5961 if(array.count == 0) {
6062 if(error) {
6163 NSLog(@"Error: at %@ : %@", NSStringFromClass([self class]), error);
--- a/KCD/HMNyukyoStartCommand.m
+++ b/KCD/HMNyukyoStartCommand.m
@@ -39,8 +39,9 @@
3939
4040 NSError *error = nil;
4141 NSArray *array = [store objectsWithEntityName:@"Ship"
42- error:&error
43- predicateFormat:@"id = %@", @([shipId integerValue])];
42+ sortDescriptors:nil
43+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([shipId integerValue])]
44+ error:&error];
4445 if(array.count == 0) {
4546 if(error) {
4647 NSLog(@"Error: at %@ : %@", NSStringFromClass([self class]), error);
--- a/KCD/HMPowerUpCommand.m
+++ b/KCD/HMPowerUpCommand.m
@@ -35,8 +35,9 @@
3535 for(NSString *shipId in usedShipStringArray) {
3636 NSError *error = nil;
3737 NSArray *ships = [store objectsWithEntityName:@"Ship"
38- error:&error
39- predicateFormat:@"id = %@", @([shipId integerValue])];
38+ sortDescriptors:nil
39+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([shipId integerValue])]
40+ error:&error];
4041 if(ships.count == 0) {
4142 continue;
4243 }
--- a/KCD/HMRealDestroyShipCommand.m
+++ b/KCD/HMRealDestroyShipCommand.m
@@ -20,8 +20,9 @@
2020
2121 NSError *error = nil;
2222 NSArray *ships = [store objectsWithEntityName:@"Ship"
23- error:&error
24- predicateFormat:@"id = %@", @([destroyedShipId integerValue])];
23+ sortDescriptors:nil
24+ predicate:[NSPredicate predicateWithFormat:@"id = %@", @([destroyedShipId integerValue])]
25+ error:&error];
2526 if(ships.count == 0) {
2627 return;
2728 }
--- a/KCD/HMRemodelSlotItemCommand.m
+++ b/KCD/HMRemodelSlotItemCommand.m
@@ -31,8 +31,9 @@
3131 HMServerDataStore *serverDataStore = [HMServerDataStore oneTimeEditor];
3232 NSError *error = nil;
3333 NSArray *result = [serverDataStore objectsWithEntityName:@"SlotItem"
34- error:&error
35- predicateFormat:@"id = %ld", [slotitemId integerValue]];
34+ sortDescriptors:nil
35+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", [slotitemId integerValue]]
36+ error:&error];
3637 if(error) {
3738 [self log:@"Fetch error: %@", error];
3839 return;
@@ -60,8 +61,9 @@
6061 {
6162 NSError *error = nil;
6263 NSArray *result = [serverDataStore objectsWithEntityName:@"MasterSlotItem"
63- error:&error
64- predicateFormat:@"id = %ld", [slotItemId integerValue]];
64+ sortDescriptors:nil
65+ predicate:[NSPredicate predicateWithFormat:@"id = %ld", [slotItemId integerValue]]
66+ error:&error];
6567 if(error) {
6668 [self log:@"Fetch error: %@", error];
6769 return;
--- a/KCD/HMResetSortieCommand.m
+++ b/KCD/HMResetSortieCommand.m
@@ -19,6 +19,7 @@
1919
2020 NSError *error = nil;
2121 NSArray *array = [store objectsWithEntityName:@"Battle"
22+ sortDescriptors:nil
2223 predicate:nil
2324 error:NULL];
2425 if(error) {
--- a/KCD/HMShipWindowController.m
+++ b/KCD/HMShipWindowController.m
@@ -36,8 +36,9 @@
3636 NSError *error = nil;
3737
3838 NSArray *decks = [store objectsWithEntityName:@"Deck"
39- error:&error
40- predicateFormat:@"id = %@", self.missionFleetNumber];
39+ sortDescriptors:nil
40+ predicate:[NSPredicate predicateWithFormat:@"id = %@", self.missionFleetNumber]
41+ error:&error];
4142 if(decks.count == 0) return;
4243 id deck = decks[0];
4344
--- a/KCD/HMStoreCreateSlotItemHistoryCommand.m
+++ b/KCD/HMStoreCreateSlotItemHistoryCommand.m
@@ -24,8 +24,9 @@
2424 if(created) {
2525 NSNumber *slotItemID = [data valueForKeyPath:@"api_slot_item.api_slotitem_id"];
2626 NSArray *array = [serverDataStore objectsWithEntityName:@"MasterSlotItem"
27- error:NULL
28- predicateFormat:@"id = %@", slotItemID];
27+ sortDescriptors:nil
28+ predicate:[NSPredicate predicateWithFormat:@"id = %@", slotItemID]
29+ error:NULL];
2930 if([array count] == 0) {
3031 NSLog(@"MasterSlotItem data is invalid or api_slotitem_id is invalid.");
3132 return;
@@ -38,14 +39,20 @@
3839 }
3940
4041 // Deck -> FlagShip
41- NSArray *array = [serverDataStore objectsWithEntityName:@"Deck" error:NULL predicateFormat:@"id = 1"];
42+ NSArray *array = [serverDataStore objectsWithEntityName:@"Deck"
43+ sortDescriptors:nil
44+ predicate:[NSPredicate predicateWithFormat:@"id = 1"]
45+ error:NULL];
4246 if([array count] == 0) {
4347 NSLog(@"Deck data is invalid.");
4448 return;
4549 }
4650 id deck = array[0];
4751 id flagShipID = [deck valueForKey:@"ship_0"];
48- array = [serverDataStore objectsWithEntityName:@"Ship" error:NULL predicateFormat:@"id = %@", flagShipID];
52+ array = [serverDataStore objectsWithEntityName:@"Ship"
53+ sortDescriptors:nil
54+ predicate:[NSPredicate predicateWithFormat:@"id = %@", flagShipID]
55+ error:NULL];
4956 if([array count] == 0) {
5057 NSLog(@"Ship data is invalid or ship_0 is invalid.");
5158 return;
@@ -55,7 +62,10 @@
5562 NSString *flagShipName = [flagShip valueForKeyPath:@"master_ship.name"];
5663
5764 // Basic -> level
58- array = [serverDataStore objectsWithEntityName:@"Basic" predicate:nil error:NULL];
65+ array = [serverDataStore objectsWithEntityName:@"Basic"
66+ sortDescriptors:nil
67+ predicate:nil
68+ error:NULL];
5969 if([array count] == 0) {
6070 NSLog(@"Basic data is invalid.");
6171 return;
--- a/KCD/HMTSVSupport.m
+++ b/KCD/HMTSVSupport.m
@@ -207,8 +207,9 @@
207207 if([attr[6] isEqual:@"(null)"]) continue;
208208
209209 NSArray *array = [lds objectsWithEntityName:entityName
210- error:NULL
211- predicateFormat:@"date = %@", [NSDate dateWithString:attr[0]]];
210+ sortDescriptors:nil
211+ predicate:[NSPredicate predicateWithFormat:@"date = %@", [NSDate dateWithString:attr[0]]]
212+ error:NULL];
212213 if(array.count != 0) continue;
213214
214215 HMKaihatuHistory *obj = [NSEntityDescription insertNewObjectForEntityForName:entityName
@@ -240,8 +241,9 @@
240241 if([attr[6] isEqual:@"(null)"]) continue;
241242
242243 NSArray *array = [lds objectsWithEntityName:entityName
243- error:NULL
244- predicateFormat:@"date = %@", [NSDate dateWithString:attr[0]]];
244+ sortDescriptors:nil
245+ predicate:[NSPredicate predicateWithFormat:@"date = %@", [NSDate dateWithString:attr[0]]]
246+ error:NULL];
245247 if(array.count != 0) continue;
246248
247249 HMKenzoHistory *obj = [NSEntityDescription insertNewObjectForEntityForName:entityName
--- a/KCD/HMUpdateSlotItemCommand.m
+++ b/KCD/HMUpdateSlotItemCommand.m
@@ -25,8 +25,9 @@
2525
2626 NSError *error = nil;
2727 NSArray *array = [store objectsWithEntityName:@"MasterSlotItem"
28- error:&error
29- predicateFormat:@"id = %@", data[@"api_slotitem_id"]];
28+ sortDescriptors:nil
29+ predicate:[NSPredicate predicateWithFormat:@"id = %@", data[@"api_slotitem_id"]]
30+ error:&error];
3031 if([array count] == 0) {
3132 NSLog(@"MasterSlotItem is invalid");
3233 return;