PKHeX/PKHeX.Core/Saves/Substructures/Gen8/BS/BerryTreeGrowSave8b.cs
Kurt a681783f1a Extract interface for SaveBlock, allow strict
External users shouldn't be using SaveBlock
2022-04-15 11:45:04 -07:00

26 lines
835 B
C#

using System;
using System.ComponentModel;
using static System.Buffers.Binary.BinaryPrimitives;
namespace PKHeX.Core
{
/// <summary>
/// Details about berry tree plots.
/// </summary>
/// <remarks>size: 0x808</remarks>
[TypeConverter(typeof(ExpandableObjectConverter))]
public sealed class BerryTreeGrowSave8b : SaveBlock<SAV8BS>
{
public BerryTreeGrowSave8b(SAV8BS sav, int offset) : base(sav) => Offset = offset;
public const int KinomiGrowsCount = 128;
public const int KinomiSize = 0x10;
// structure:
// KinomiGrow[] kinomiGrows; // 0x0
// long LastUpdateMinutes; // 0x8
public long LastUpdateMinutes { get => ReadInt64LittleEndian(Data.AsSpan(Offset + 0x800)); set => WriteInt64LittleEndian(Data.AsSpan(Offset + 0x800), value); }
}
}