コミットメタ情報

リビジョン5a1f8217a0c1eac48c09bd119d8efabf208dddde (tree)
日時2018-06-18 23:15:58
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

要修復一覧に演習中の艦を表示しない

変更サマリ

差分

--- a/KancolleSniffer.Test/SnifferTest.cs
+++ b/KancolleSniffer.Test/SnifferTest.cs
@@ -146,6 +146,17 @@ namespace KancolleSniffer.Test
146146 }
147147
148148 /// <summary>
149+ /// 演習中の艦を要修復リストに載せない
150+ /// </summary>
151+ [TestMethod]
152+ public void DamagedShipListNotShowShipInPractice()
153+ {
154+ var sniffer = new Sniffer();
155+ SniffLogFile(sniffer, "practice_003");
156+ PAssert.That(() => sniffer.RepairList.Select(s => s.Name).SequenceEqual(new[] {"飛龍改二", "翔鶴改二"}));
157+ }
158+
159+ /// <summary>
149160 /// 連合艦隊が開幕雷撃で被弾する
150161 /// </summary>
151162 [TestMethod]
--- a/KancolleSniffer.Test/logs
+++ b/KancolleSniffer.Test/logs
@@ -1 +1 @@
1-Subproject commit eae3174d768fe515a8c04f8a65954efe5b70aacd
1+Subproject commit 6feb341954d3a0f2bcbd7dd62dad3a50ec81112f
--- a/KancolleSniffer/ShipInfo.cs
+++ b/KancolleSniffer/ShipInfo.cs
@@ -345,7 +345,8 @@ namespace KancolleSniffer
345345
346346 public ShipStatus[] GetRepairList(DockInfo dockInfo)
347347 => (from s in ShipList
348- where s.NowHp < s.MaxHp && !dockInfo.InNDock(s.Id)
348+ where s.NowHp < s.MaxHp && !dockInfo.InNDock(s.Id) &&
349+ (s.Fleet == -1 || _fleets[s.Fleet].State != FleetState.Practice)
349350 select s).OrderByDescending(s => s.RepairTime).ToArray();
350351
351352 public string[] BadlyDamagedShips { get; private set; } = new string[0];
@@ -401,7 +402,7 @@ namespace KancolleSniffer
401402 _fleets[deck].Deck = (from ship in ships select ship.Id).ToArray();
402403 foreach (var ship in ships)
403404 _shipInfo[ship.Id] = ship;
404- foreach (var entry in ships.Zip(slots, (ship, slot) =>new {ship, slot}))
405+ foreach (var entry in ships.Zip(slots, (ship, slot) => new {ship, slot}))
405406 {
406407 entry.ship.Slot = _itemInfo.InjectItems(entry.slot.Take(5));
407408 if (entry.slot.Length >= 6)
旧リポジトリブラウザで表示