From 4a52b349ff2dec1ea5af4c5e23269d900436aee4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 2 Jan 2021 19:11:34 -0800 Subject: [PATCH] Minor clean --- PKHeX.Core/Legality/Verifiers/Ball/BallUseLegality.cs | 4 ++-- PKHeX.Core/PKM/Shared/PokeList2.cs | 2 +- PKHeX.Core/PKM/Util/SpeciesConverter.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/Verifiers/Ball/BallUseLegality.cs b/PKHeX.Core/Legality/Verifiers/Ball/BallUseLegality.cs index 9401a00bf..6b2ea4ff5 100644 --- a/PKHeX.Core/Legality/Verifiers/Ball/BallUseLegality.cs +++ b/PKHeX.Core/Legality/Verifiers/Ball/BallUseLegality.cs @@ -18,7 +18,7 @@ internal static class BallUseLegality 8 => GameVersion.GO == game ? WildPokeballs8g : WildPokeballs8, _ => Array.Empty() }; - + private static readonly int[] WildPokeBalls1 = { 4 }; private static readonly int[] WildPokeBalls2 = WildPokeBalls1; @@ -35,7 +35,7 @@ internal static class BallUseLegality private static readonly HashSet WildPokeBalls4_HGSS = new(WildPokeBalls4_DPPt) { - (int)Fast, (int)Level, (int)Lure, (int)Heavy, (int)Love, (int)Friend, (int)Moon, + (int)Fast, (int)Level, (int)Lure, (int)Heavy, (int)Love, (int)Friend, (int)Moon, }; private static readonly HashSet WildPokeBalls5 = WildPokeBalls4_DPPt; diff --git a/PKHeX.Core/PKM/Shared/PokeList2.cs b/PKHeX.Core/PKM/Shared/PokeList2.cs index 3c7edc3e8..9c2165386 100644 --- a/PKHeX.Core/PKM/Shared/PokeList2.cs +++ b/PKHeX.Core/PKM/Shared/PokeList2.cs @@ -2,7 +2,7 @@ namespace PKHeX.Core { public sealed class PokeList2 : PokeListGB { - protected override byte GetSpeciesBoxIdentifier(PK2 pk) => pk.IsEgg ? (byte)0xFD : (byte)pk.Species; + protected override byte GetSpeciesBoxIdentifier(PK2 pk) => pk.IsEgg ? 0xFD : (byte)pk.Species; protected override PK2 GetEntry(byte[] dat, byte[] otname, byte[] nick, bool egg) => new(dat, Japanese) { OT_Trash = otname, Nickname_Trash = nick, IsEgg = egg }; protected override int GetEntrySize() => GetEntrySize(IsFormatParty); diff --git a/PKHeX.Core/PKM/Util/SpeciesConverter.cs b/PKHeX.Core/PKM/Util/SpeciesConverter.cs index 76d8d7082..0ae2ba881 100644 --- a/PKHeX.Core/PKM/Util/SpeciesConverter.cs +++ b/PKHeX.Core/PKM/Util/SpeciesConverter.cs @@ -18,7 +18,7 @@ internal static class SpeciesConverter /// /// National Dex ID. /// Generation 1 species ID. - public static byte SetG1Species(int species) => species >= table1_Internal.Length ? (byte)0 : table1_Internal[species]; + public static byte SetG1Species(int species) => (uint)species >= table1_Internal.Length ? 0 : table1_Internal[species]; /// /// Converts a National Dex ID to Generation 3 species ID.