diff --git a/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3.cs b/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3.cs index fecd75501..1be4a3e7b 100644 --- a/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3.cs +++ b/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3.cs @@ -5,6 +5,8 @@ namespace PKHeX.Core; public sealed class SecretBase3(Memory raw) { + public const int SIZE = 160; + private Span Data => raw.Span; private bool Japanese => Language == (int) LanguageID.Japanese; @@ -59,7 +61,7 @@ public ushort SecretBasesReceived public Span GetDecorationCoordinates() => Data.Slice(0x22, 0x10); public void SetDecorationCoordinates(Span value) => value.CopyTo(GetDecorationCoordinates()); - private Span TeamData => Data.Slice(50, 72); + private Span TeamData => Data.Slice(0x34, 108); public SecretBase3Team Team { get => new(TeamData.ToArray()); diff --git a/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3PKM.cs b/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3PKM.cs index 20e241ecb..af69e9d80 100644 --- a/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3PKM.cs +++ b/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3PKM.cs @@ -11,7 +11,12 @@ public sealed class SecretBase3PKM : ISpeciesForm public ushort Move2 { get; set; } public ushort Move3 { get; set; } public ushort Move4 { get; set; } - public ushort Species { get; set; } + public ushort SpeciesInternal { get; set; } + public ushort Species + { + get => SpeciesConverter.GetNational3(SpeciesInternal); + set => SpeciesInternal = SpeciesConverter.GetInternal3(value); + } public ushort HeldItem { get; set; } public byte Level { get; set; } public byte EVAll { get; set; } diff --git a/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3Team.cs b/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3Team.cs index ac31e96d5..94e8f01c0 100644 --- a/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3Team.cs +++ b/PKHeX.Core/Saves/Substructures/Gen3/SecretBase3Team.cs @@ -7,10 +7,10 @@ public sealed class SecretBase3Team { private const int O_PID = 0; private const int O_Moves = 0x18; - private const int O_Species = 0x24; - private const int O_Item = 0x30; - private const int O_Level = 0x3C; - private const int O_EV = 0x42; + private const int O_Species = 0x48; + private const int O_Item = 0x54; + private const int O_Level = 0x60; + private const int O_EV = 0x66; private static int GetOffsetPID(int index) => O_PID + (index * 4); private static int GetOffsetMove(int index, int moveIndex) => O_Moves + (index * 8) + (moveIndex * 2); @@ -22,10 +22,10 @@ public sealed class SecretBase3Team public SecretBase3Team(byte[] data) { + Data = data; Team = new SecretBase3PKM[6]; for (int i = 0; i < Team.Length; i++) Team[i] = GetPKM(i); - Data = data; } public byte[] Write()