PKHeX/PKHeX.Core/Saves/Substructures/Gen7/Misc7b.cs
Kurt 1b028198ad
Split gen5-7 saves with inheritance (#2319)
refer to pull request comments for summary
2019-06-08 19:56:11 -07:00

24 lines
No EOL
605 B
C#

using System;
namespace PKHeX.Core
{
public sealed class Misc7b : SaveBlock
{
public Misc7b(SaveFile sav) : base(sav)
{
Offset = ((SAV7b)sav).GetBlockOffset(BelugaBlockIndex.Misc);
}
public uint Money
{
get => BitConverter.ToUInt32(Data, Offset + 4);
set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 4);
}
public string Rival
{
get => SAV.GetString(Offset + 0x200, 0x1A);
set => SAV.SetString(value, SAV.OTLength).CopyTo(Data, Offset + 0x200);
}
}
}