OSDN Git Service

バージョン9.2の準備
[kancollesniffer/KancolleSniffer.git] / KancolleSniffer / ExMapInfo.cs
index d135940..602df37 100644 (file)
@@ -1,19 +1,16 @@
 // Copyright (C) 2015 Kazuhiro Fujieda <fujieda@users.osdn.me>\r
 //\r
-// This program is part of KancolleSniffer.\r
+// Licensed under the Apache License, Version 2.0 (the "License");\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
 //\r
-// KancolleSniffer is free software: you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation, either version 3 of the License, or\r
-// (at your option) any later version.\r
+//    http://www.apache.org/licenses/LICENSE-2.0\r
 //\r
-// This program is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-// GNU General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU General Public License\r
-// along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
 \r
 using System;\r
 using System.Collections.Generic;\r
@@ -38,7 +35,8 @@ namespace KancolleSniffer
                 {25, new ClearStatus {Map = 25, Cleared = false, Rate = 100}},\r
                 {35, new ClearStatus {Map = 35, Cleared = false, Rate = 150}},\r
                 {45, new ClearStatus {Map = 45, Cleared = false, Rate = 180}},\r
-                {55, new ClearStatus {Map = 55, Cleared = false, Rate = 200}}\r
+                {55, new ClearStatus {Map = 55, Cleared = false, Rate = 200}},\r
+                {65, new ClearStatus {Map = 65, Cleared = false, Rate = 250}}\r
             };\r
 \r
         private DateTime _lastReset;\r
@@ -49,7 +47,7 @@ namespace KancolleSniffer
 \r
         public void InspectMapInfo(dynamic json)\r
         {\r
-            foreach (var entry in json)\r
+            foreach (var entry in json.api_map_info() ? json.api_map_info : json)\r
             {\r
                 var map = (int)entry.api_id;\r
                 if (map % 10 <= 4)\r
@@ -122,7 +120,7 @@ namespace KancolleSniffer
             NeedSave = false;\r
             status.ExMapState = new ExMapState\r
             {\r
-                ClearStatusList = _clearStatus.Values.ToArray(),\r
+                ClearStatusList = _clearStatus.Values.ToList(),\r
                 LastReset = _lastReset\r
             };\r
         }\r
@@ -138,7 +136,7 @@ namespace KancolleSniffer
 \r
         public class ExMapState\r
         {\r
-            public ClearStatus[] ClearStatusList { get; set; }\r
+            public List<ClearStatus> ClearStatusList { get; set; }\r
             public DateTime LastReset { get; set; }\r
         }\r
     }\r