diff --git a/PKHeX.Core/Saves/Access/SaveBlockAccessor8LA.cs b/PKHeX.Core/Saves/Access/SaveBlockAccessor8LA.cs index d0692c046..1c6fde717 100644 --- a/PKHeX.Core/Saves/Access/SaveBlockAccessor8LA.cs +++ b/PKHeX.Core/Saves/Access/SaveBlockAccessor8LA.cs @@ -65,7 +65,8 @@ public SaveBlockAccessor8LA(SAV8LA sav) private const uint KFashionUnlockedOverall = 0x45851092; private const uint KFashionUnlockedShoes = 0x636A5ABD; private const uint KFashionUnlockedGlasses = 0x58AB6233; - private const uint KSwarm = 0x1E0F1BA3; // 5 entries, 0x50 each + public const uint KMassOutbreak = 0x1E0F1BA3; + public const uint KMassiveMassOutbreak = 0x7799EB86; private const uint KCaptureRecords = 0x6506EE96; // 1000 entries, 0x1C each private const uint KOtherPlayerLostSatchels = 0x05E7EBEB; private const uint KMyLostSatchels = 0xC5D7112B; diff --git a/PKHeX.Core/Saves/Substructures/Gen8/LA/AdventureStart8a.cs b/PKHeX.Core/Saves/Substructures/Gen8/LA/AdventureStart8a.cs index f57be63d0..80f07b0be 100644 --- a/PKHeX.Core/Saves/Substructures/Gen8/LA/AdventureStart8a.cs +++ b/PKHeX.Core/Saves/Substructures/Gen8/LA/AdventureStart8a.cs @@ -1,6 +1,6 @@ using System; -using System.Buffers.Binary; using System.ComponentModel; +using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; @@ -17,8 +17,8 @@ public sealed class AdventureStart8a : SaveBlock /// public ulong Seconds { - get => BinaryPrimitives.ReadUInt64LittleEndian(Data.AsSpan(Offset)); - set => BinaryPrimitives.WriteUInt64LittleEndian(Data.AsSpan(Offset), value); + get => ReadUInt64LittleEndian(Data.AsSpan(Offset)); + set => WriteUInt64LittleEndian(Data.AsSpan(Offset), value); } private static DateTime Epoch => new(1970, 1, 1); diff --git a/PKHeX.Core/Saves/Substructures/Gen8/LA/MyStatus8a.cs b/PKHeX.Core/Saves/Substructures/Gen8/LA/MyStatus8a.cs index 88ead0176..1db3d48b3 100644 --- a/PKHeX.Core/Saves/Substructures/Gen8/LA/MyStatus8a.cs +++ b/PKHeX.Core/Saves/Substructures/Gen8/LA/MyStatus8a.cs @@ -1,6 +1,6 @@ using System; -using System.Buffers.Binary; using System.ComponentModel; +using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; @@ -14,14 +14,14 @@ public sealed class MyStatus8a : SaveBlock public int TID { - get => BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(0x10)); - set => BinaryPrimitives.WriteUInt16LittleEndian(Data.AsSpan(0x10), (ushort)value); + get => ReadUInt16LittleEndian(Data.AsSpan(0x10)); + set => WriteUInt16LittleEndian(Data.AsSpan(0x10), (ushort)value); } public int SID { - get => BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(0x12)); - set => BinaryPrimitives.WriteUInt16LittleEndian(Data.AsSpan(0x12), (ushort)value); + get => ReadUInt16LittleEndian(Data.AsSpan(0x12)); + set => WriteUInt16LittleEndian(Data.AsSpan(0x12), (ushort)value); } public int Game diff --git a/PKHeX.Core/Saves/Substructures/Inventory/Item/InventoryItem8a.cs b/PKHeX.Core/Saves/Substructures/Inventory/Item/InventoryItem8a.cs index 743cc5235..d3f642de8 100644 --- a/PKHeX.Core/Saves/Substructures/Inventory/Item/InventoryItem8a.cs +++ b/PKHeX.Core/Saves/Substructures/Inventory/Item/InventoryItem8a.cs @@ -1,5 +1,5 @@ using System; -using System.Buffers.Binary; +using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; @@ -17,15 +17,15 @@ public override void Clear() public static InventoryItem8a Read(ReadOnlySpan data) => new() { - Index = BinaryPrimitives.ReadInt16LittleEndian(data), - Count = BinaryPrimitives.ReadInt16LittleEndian(data[2..]), + Index = ReadInt16LittleEndian(data), + Count = ReadInt16LittleEndian(data[2..]), }; public void Write(Span data) { // Index is not saved. - BinaryPrimitives.WriteUInt16LittleEndian(data, (ushort)Index); - BinaryPrimitives.WriteUInt16LittleEndian(data[2..], (ushort)Count); + WriteUInt16LittleEndian(data, (ushort)Index); + WriteUInt16LittleEndian(data[2..], (ushort)Count); } public static void Clear(Span data, int offset) => data.Slice(offset, SIZE).Clear();