mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00:00
03182ebd3d
Adds support for Scarlet & Violet. Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com> Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com> Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
27 lines
763 B
C#
27 lines
763 B
C#
using System;
|
|
using static System.Buffers.Binary.BinaryPrimitives;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
public sealed class PlayTime9 : SaveBlock<SAV9SV>
|
|
{
|
|
public PlayTime9(SAV9SV sav, SCBlock block) : base(sav, block.Data) { }
|
|
|
|
public int PlayedHours
|
|
{
|
|
get => ReadInt32LittleEndian(Data.AsSpan(Offset));
|
|
set => WriteInt32LittleEndian(Data.AsSpan(Offset), (ushort)value);
|
|
}
|
|
|
|
public int PlayedMinutes
|
|
{
|
|
get => ReadInt32LittleEndian(Data.AsSpan(Offset + 4));
|
|
set => WriteInt32LittleEndian(Data.AsSpan(Offset + 4), (ushort)value);
|
|
}
|
|
|
|
public int PlayedSeconds
|
|
{
|
|
get => ReadInt32LittleEndian(Data.AsSpan(Offset + 8));
|
|
set => WriteInt32LittleEndian(Data.AsSpan(Offset + 8), (ushort)value);
|
|
}
|
|
}
|