コミットメタ情報

リビジョン0f1790b318d1c75de57f275e1f2c10d62100344d (tree)
日時2018-08-02 17:16:06
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

ShipStatusのEscapedフラグをFillUpを介さずに直接立てる

変更サマリ

差分

--- a/KancolleSniffer/Model/ShipInfo.cs
+++ b/KancolleSniffer/Model/ShipInfo.cs
@@ -84,6 +84,7 @@ namespace KancolleSniffer.Model
8484 if (json.api_deck_port()) // port
8585 {
8686 _shipInventry.Clear();
87+ _escapedShips.Clear();
8788 for (var i = 0; i < FleetCount; i++)
8889 _fleets[i].State = FleetState.Port;
8990 InspectDeck(json.api_deck_port);
@@ -180,7 +181,8 @@ namespace KancolleSniffer.Model
180181 AntiSubmarine = (int)entry.api_taisen[0],
181182 AntiAir = (int)entry.api_taiku[0],
182183 Lucky = (int)entry.api_lucky[0],
183- Locked = entry.api_locked() && entry.api_locked == 1
184+ Locked = entry.api_locked() && entry.api_locked == 1,
185+ Escaped = _escapedShips.Contains(id)
184186 };
185187 _shipInventry.Add(ship);
186188 _numEquipsChecker.Check(ship);
@@ -342,7 +344,6 @@ namespace KancolleSniffer.Model
342344 {
343345 if (ship.Empty)
344346 return ship;
345- ship.Escaped = _escapedShips.Contains(ship.Id);
346347 ship.Fleet = FindFleet(ship.Id, out var idx);
347348 ship.DeckIndex = idx;
348349 return ship;
@@ -385,14 +386,11 @@ namespace KancolleSniffer.Model
385386 BadlyDamagedShips = new string[0];
386387 }
387388
388- public void SetEscapedShips(List<int> ships)
389+ public void SetEscapedShips(List<int> ids)
389390 {
390- _escapedShips.AddRange(ships);
391- }
392-
393- public void ClearEscapedShips()
394- {
395- _escapedShips.Clear();
391+ _escapedShips.AddRange(ids);
392+ foreach (var id in ids)
393+ _shipInventry[id].Escaped = true;
396394 }
397395 }
398396 }
\ No newline at end of file
--- a/KancolleSniffer/Sniffer.cs
+++ b/KancolleSniffer/Sniffer.cs
@@ -186,7 +186,6 @@ namespace KancolleSniffer
186186 _baseAirCoprs.InspectPlaneInfo(data.api_plane_info);
187187 _battleInfo.CleanupResult();
188188 _battleInfo.BattleState = BattleState.None;
189- _shipInfo.ClearEscapedShips();
190189 _miscTextInfo.Port();
191190 _cellInfo.Port();
192191 SaveState();
旧リポジトリブラウザで表示