diff --git a/PKHeX.Core/PKM/Shared/PokeList2.cs b/PKHeX.Core/PKM/Shared/PokeList2.cs index 2acd1072b..bb805c52b 100644 --- a/PKHeX.Core/PKM/Shared/PokeList2.cs +++ b/PKHeX.Core/PKM/Shared/PokeList2.cs @@ -3,11 +3,11 @@ namespace PKHeX.Core public sealed class PokeList2 : PokeListGB { 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) { IsEgg = egg, otname = otname, nick = nick }; + 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(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) { } diff --git a/PKHeX.Core/PKM/Shared/PokeListGB.cs b/PKHeX.Core/PKM/Shared/PokeListGB.cs index 39b23cb18..370e4f172 100644 --- a/PKHeX.Core/PKM/Shared/PokeListGB.cs +++ b/PKHeX.Core/PKM/Shared/PokeListGB.cs @@ -51,7 +51,7 @@ private byte[] GetEmptyList(PokeListType c, bool jp = false) private int GetOffsetPKMOT(int base_ofs, int i) => GetOffsetPKMData(base_ofs, Capacity) + (StringLength * i); private int GetOffsetPKMNickname(int base_ofs, int i) => GetOffsetPKMOT(base_ofs, Capacity) + (StringLength * i); - private static int GetStringLength(bool jp) => jp ? PK1.STRLEN_J : PK1.STRLEN_U; + private static int GetStringLength(bool jp) => jp ? _K12.STRLEN_J : _K12.STRLEN_U; protected bool IsFormatParty => IsCapacityPartyFormat((PokeListType)Capacity); protected static bool IsCapacityPartyFormat(PokeListType Capacity) => Capacity == PokeListType.Single || Capacity == PokeListType.Party;