mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-25 11:53:11 +00:00
fc754b346b
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) Updates all the files, one less level of indentation. Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Generation 3 <see cref="SaveFile"/> object that reads exported data for Generation 3 PokeStock .gst dumps.
|
|
/// </summary>
|
|
public sealed class Bank3 : BulkStorage
|
|
{
|
|
public Bank3(byte[] data) : base(data, typeof(PK3), 0) => Version = GameVersion.RS;
|
|
|
|
public override PersonalTable Personal => PersonalTable.RS;
|
|
public override IReadOnlyList<ushort> HeldItems => Legal.HeldItems_RS;
|
|
protected override SaveFile CloneInternal() => new Bank3((byte[])Data.Clone());
|
|
public override string PlayTimeString => Checksums.CRC16Invert(Data).ToString("X4");
|
|
protected internal override string ShortSummary => PlayTimeString;
|
|
public override string Extension => ".gst";
|
|
|
|
public override int BoxCount => 64;
|
|
private const int BoxNameSize = 9;
|
|
|
|
private int BoxDataSize => SlotsPerBox * SIZE_STORED;
|
|
public override int GetBoxOffset(int box) => Box + (BoxDataSize * box);
|
|
public override string GetBoxName(int box) => GetString(GetBoxNameOffset(box), BoxNameSize);
|
|
private static int GetBoxNameOffset(int box) => 0x25800 + (9 * box);
|
|
}
|