mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-24 01:46:12 -05:00
17 lines
1013 B
C#
17 lines
1013 B
C#
namespace PKHeX.Core
|
|
{
|
|
public sealed class PokeList2 : PokeListGB<PK2>
|
|
{
|
|
protected override byte GetSpeciesBoxIdentifier(PK2 pk) => pk.IsEgg ? (byte)0xFD : (byte)pk.Species;
|
|
protected override PK2 GetEntry(byte[] dat, byte[] otname, byte[] nick, bool egg) => new PK2(dat) { otname = otname, nick = nick, IsEgg = egg };
|
|
protected override int GetEntrySize() => GetEntrySize(IsFormatParty);
|
|
|
|
public PokeList2(byte[] d, PokeListType c = PokeListType.Single, bool jp = false) : base(d, c, jp) { }
|
|
public PokeList2(PokeListType c = PokeListType.Single, bool jp = false) : base(c, jp) { }
|
|
public PokeList2(byte[] d) : base(d, PokeListType.Single, d.Length == PKX.SIZE_2JLIST) { }
|
|
public PokeList2(PK2 pk) : base(pk) { }
|
|
|
|
private static int GetEntrySize(bool party) => party ? PKX.SIZE_2PARTY : PKX.SIZE_2STORED;
|
|
public static int GetDataLength(PokeListType c, bool jp) => GetDataSize(c, jp, GetEntrySize(IsCapacityPartyFormat(c)));
|
|
}
|
|
} |