2019-06-09 02:56:11 +00:00
|
|
|
|
using System;
|
2022-01-03 05:35:59 +00:00
|
|
|
|
using static System.Buffers.Binary.BinaryPrimitives;
|
2019-06-09 02:56:11 +00:00
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
2019-10-04 02:09:02 +00:00
|
|
|
|
public sealed class SangoInfoBlock : SaveBlock
|
2019-06-09 02:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
public SangoInfoBlock(SaveFile SAV, int offset) : base(SAV) => Offset = offset;
|
|
|
|
|
|
2019-09-10 07:21:51 +00:00
|
|
|
|
private const uint EON_MAGIC = WC6.EonTicketConst;
|
2019-06-09 02:56:11 +00:00
|
|
|
|
|
|
|
|
|
public uint EonTicketReceivedMagic // 0x319B8
|
|
|
|
|
{
|
2022-01-03 05:35:59 +00:00
|
|
|
|
get => ReadUInt32LittleEndian(Data.AsSpan(Offset + 0x63B8));
|
|
|
|
|
set => WriteUInt32LittleEndian(Data.AsSpan(Offset + 0x63B8), value);
|
2019-06-09 02:56:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string SecretBaseQRText // 0x319BC -- 17*u16
|
|
|
|
|
{
|
2022-01-03 05:35:59 +00:00
|
|
|
|
get => SAV.GetString(Data.AsSpan(Offset + 0x63BC, 36));
|
|
|
|
|
set => SAV.SetString(Data.AsSpan(Offset + 0x63BC, 36), value.AsSpan(), 0x10, StringConverterOption.ClearZero);
|
2019-06-09 02:56:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public uint EonTicketSendMagic // 0x319DE
|
|
|
|
|
{
|
2022-01-03 05:35:59 +00:00
|
|
|
|
get => ReadUInt32LittleEndian(Data.AsSpan(Offset + 0x63DE));
|
|
|
|
|
set => WriteUInt32LittleEndian(Data.AsSpan(Offset + 0x63DE), value);
|
2019-06-09 02:56:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ReceiveEon() => EonTicketReceivedMagic = EON_MAGIC;
|
|
|
|
|
public void EnableSendEon() => EonTicketSendMagic = EON_MAGIC;
|
|
|
|
|
}
|
2022-01-03 05:35:59 +00:00
|
|
|
|
}
|