PKHeX/PKHeX.Core/Saves/Substructures/Gen6/SangoInfoBlock.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

32 lines
No EOL
1 KiB
C#

using System;
namespace PKHeX.Core
{
public class SangoInfoBlock : SaveBlock
{
public SangoInfoBlock(SaveFile SAV, int offset) : base(SAV) => Offset = offset;
private const uint EON_MAGIC = 0x225D73C2;
public uint EonTicketReceivedMagic // 0x319B8
{
get => BitConverter.ToUInt32(Data, Offset + 0x63B8);
set => SAV.SetData(BitConverter.GetBytes(value), Offset + 0x63B8);
}
public string SecretBaseQRText // 0x319BC -- 17*u16
{
get => SAV.GetString(Offset + 0x63BC, 0x10);
set => SAV.SetData(SAV.SetString(value, 0x10), Offset + 0x63BC);
}
public uint EonTicketSendMagic // 0x319DE
{
get => BitConverter.ToUInt32(Data, Offset + 0x63DE);
set => SAV.SetData(BitConverter.GetBytes(value), Offset + 0x63DE);
}
public void ReceiveEon() => EonTicketReceivedMagic = EON_MAGIC;
public void EnableSendEon() => EonTicketSendMagic = EON_MAGIC;
}
}