OSDN Git Service

対空噴進弾幕の発動率が100%以上だと一覧の対空でエラーになるのを直す
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Sat, 17 Aug 2019 10:05:57 +0000 (19:05 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sat, 17 Aug 2019 13:29:02 +0000 (22:29 +0900)
KancolleSniffer/View/AntiAirPanel.cs

index 1beb641..45d627a 100644 (file)
@@ -82,7 +82,7 @@ namespace KancolleSniffer.View
         {\r
             var param = " Lv" + ship.Level +\r
                         " 加重" + ship.EffectiveAntiAirForShip.ToString("d") +\r
-                        AntiAirPropellantBarrageChange(ship);\r
+                        AntiAirPropellantBarrageChance(ship);\r
             var name = ship.Name;\r
             var realWidth = Scaler.ScaleWidth(ListForm.PanelWidth - 10);\r
             return new Record\r
@@ -110,13 +110,13 @@ namespace KancolleSniffer.View
                 : ShipLabel.Name.BaseFont;\r
         }\r
 \r
-        private static string AntiAirPropellantBarrageChange(ShipStatus ship)\r
+        private static string AntiAirPropellantBarrageChance(ShipStatus ship)\r
         {\r
             // ReSharper disable once CompareOfFloatsByEqualityOperator\r
             if (ship.AntiAirPropellantBarrageChance == 0)\r
                 return "";\r
             var chance = ship.AntiAirPropellantBarrageChance;\r
-            return " 弾幕" + chance.ToString(chance >= 100 ? "d" : "f1");\r
+            return " 弾幕" + (chance < 100 ? chance.ToString("f1") : ((int)chance).ToString());\r
         }\r
 \r
         private void CreateLabels()\r