PK4: Add Seals & Ball Capsule index

0xD4 + 0x18 = 0xEC = 236 bytes -- end of data!
This commit is contained in:
Kurt 2022-05-08 13:16:41 -07:00
parent 681756caf1
commit 69794e7328
2 changed files with 4 additions and 3 deletions

View file

@ -263,6 +263,7 @@ namespace PKHeX.Core
#region Battle Stats
public override int Status_Condition { get => ReadInt32LittleEndian(Data.AsSpan(0x88)); set => WriteInt32LittleEndian(Data.AsSpan(0x88), value); }
public override int Stat_Level { get => Data[0x8C]; set => Data[0x8C] = (byte)value; }
public byte BallCapsuleIndex { get => Data[0x8D]; set => Data[0x8D] = value; }
public override int Stat_HPCurrent { get => ReadUInt16LittleEndian(Data.AsSpan(0x8E)); set => WriteUInt16LittleEndian(Data.AsSpan(0x8E), (ushort)value); }
public override int Stat_HPMax { get => ReadUInt16LittleEndian(Data.AsSpan(0x90)); set => WriteUInt16LittleEndian(Data.AsSpan(0x90), (ushort)value); }
public override int Stat_ATK { get => ReadUInt16LittleEndian(Data.AsSpan(0x92)); set => WriteUInt16LittleEndian(Data.AsSpan(0x92), (ushort)value); }
@ -271,8 +272,8 @@ namespace PKHeX.Core
public override int Stat_SPA { get => ReadUInt16LittleEndian(Data.AsSpan(0x98)); set => WriteUInt16LittleEndian(Data.AsSpan(0x98), (ushort)value); }
public override int Stat_SPD { get => ReadUInt16LittleEndian(Data.AsSpan(0x9A)); set => WriteUInt16LittleEndian(Data.AsSpan(0x9A), (ushort)value); }
public byte[] GetHeldMailData() => Data.Slice(0x9C, 0x38);
public void SetHeldMailData(byte[] value) => value.CopyTo(Data, 0x9C);
public Span<byte> HeldMail => Data.Slice(0x9C, 0x38);
public Span<byte> Seals => Data.Slice(0xD4, 0x18);
#endregion

View file

@ -36,7 +36,7 @@ namespace PKHeX.Core
}
}
public override void CopyTo(PK4 pk4) => pk4.SetHeldMailData(Data);
public override void CopyTo(PK4 pk4) => Data.CopyTo(pk4.HeldMail);
public override ushort AuthorTID { get => ReadUInt16LittleEndian(Data.AsSpan(0)); set => WriteUInt16LittleEndian(Data.AsSpan(0), value); }
public override ushort AuthorSID { get => ReadUInt16LittleEndian(Data.AsSpan(2)); set => WriteUInt16LittleEndian(Data.AsSpan(2), value); }
public override byte AuthorGender { get => Data[4]; set => Data[4] = value; }