OSDN Git Service

続:「駆逐艦」の改修工事を実施せよ!のカウンターを実装する
[kancollesniffer/KancolleSniffer.git] / KancolleSniffer / Model / QuestCounter.cs
index d8eaa2a..d07342a 100644 (file)
@@ -459,13 +459,14 @@ namespace KancolleSniffer.Model
                 var count = quest.Count;\r
                 if (!(count.Spec is QuestPowerUp))\r
                     continue;\r
-                if (quest.Id == 714)\r
+                if (quest.Id == 714 || quest.Id == 715)\r
                 {\r
                     var values = HttpUtility.ParseQueryString(request);\r
                     if (_shipInventory[int.Parse(values["api_id"])].Spec.ShipType != 2)\r
                         return;\r
-                    var ships = values["api_id_items"].Split(',').Select(id => _shipInventory[int.Parse(id)]);\r
-                    if (ships.Count(s => s.Spec.ShipType == 2) < 3)\r
+                    var ships = values["api_id_items"].Split(',').Select(id => _shipInventory[int.Parse(id)]).ToArray();\r
+                    var type = quest.Id == 714 ? 2 : quest.Id == 715 ? 3 : -1;\r
+                    if (ships.Count(s => s.Spec.ShipType == type) < 3)\r
                         return;\r
                 }\r
                 Increment(count);\r