diff --git a/PKHeX.Core/Saves/Substructures/ShadowInfo.cs b/PKHeX.Core/Saves/Substructures/ShadowInfo.cs index 3aabc278a..49f8add75 100644 --- a/PKHeX.Core/Saves/Substructures/ShadowInfo.cs +++ b/PKHeX.Core/Saves/Substructures/ShadowInfo.cs @@ -20,7 +20,7 @@ public ShadowInfoTableXD(byte[] data) Array.Copy(data, i*eSize, d, 0, eSize); var entry = new ShadowInfoEntryXD(d); - if (entry.Species != 0) + //if (entry.Species != 0) Entries.Add(entry); } } diff --git a/PKHeX.Core/Saves/Substructures/StrategyMemo.cs b/PKHeX.Core/Saves/Substructures/StrategyMemo.cs index ef140a7ed..ceb400c20 100644 --- a/PKHeX.Core/Saves/Substructures/StrategyMemo.cs +++ b/PKHeX.Core/Saves/Substructures/StrategyMemo.cs @@ -10,6 +10,7 @@ public class StrategyMemo private const int SIZE_ENTRY = 12; private readonly List Entries = new List(); private StrategyMemoEntry this[int Species] => Entries.FirstOrDefault(e => e.Species == Species); + private readonly byte[] _unk; public StrategyMemo(byte[] input, int offset, bool xd) { @@ -17,6 +18,7 @@ public StrategyMemo(byte[] input, int offset, bool xd) int count = BigEndian.ToInt16(input, offset); if (count > 500) count = 500; + _unk = input.Skip(offset + 2).Take(2).ToArray(); for (int i = 0; i < count; i++) { byte[] data = new byte[SIZE_ENTRY]; @@ -24,8 +26,8 @@ public StrategyMemo(byte[] input, int offset, bool xd) Entries.Add(new StrategyMemoEntry(XD, data)); } } - public byte[] FinalData => BigEndian.GetBytes(Entries.Count) // count followed by populated entries - .Concat(Entries.Where(entry => entry.Species != 0).SelectMany(entry => entry.Data)).ToArray(); + public byte[] FinalData => BigEndian.GetBytes((short)Entries.Count).Concat(_unk) // count followed by populated entries + .Concat(Entries.SelectMany(entry => entry.Data)).ToArray(); public StrategyMemoEntry GetEntry(int Species) {