2024-02-23 19:20:24 +00:00
|
|
|
using System;
|
2021-07-27 06:57:05 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
2024-03-04 05:13:16 +00:00
|
|
|
public sealed class BattleAgency7(SAV7USUM sav, Memory<byte> raw) : SaveBlock<SAV7USUM>(sav, raw)
|
2021-07-27 06:57:05 +00:00
|
|
|
{
|
2024-03-04 05:13:16 +00:00
|
|
|
public static int GetSlotOffset(int slot) => slot switch
|
2022-06-18 18:04:24 +00:00
|
|
|
{
|
|
|
|
0 => 0,
|
|
|
|
1 => PokeCrypto.SIZE_6STORED,
|
2024-03-04 05:13:16 +00:00
|
|
|
// 0x30 bytes in between
|
2022-06-18 18:04:24 +00:00
|
|
|
2 => 0x220,
|
|
|
|
_ => throw new ArgumentOutOfRangeException(nameof(slot)),
|
|
|
|
};
|
2024-03-04 05:13:16 +00:00
|
|
|
|
|
|
|
public Memory<byte> this[int i] => Raw.Slice(GetSlotOffset(i), PokeCrypto.SIZE_6STORED);
|
2021-07-27 06:57:05 +00:00
|
|
|
}
|