Minor tweaks

no functional change
This commit is contained in:
Kurt 2019-09-14 11:48:07 -07:00
parent 229bb0d05d
commit 0fe42a1db3
3 changed files with 6 additions and 6 deletions

View file

@ -93,7 +93,7 @@ namespace PKHeX.Core
return null;
}
int index = typeIndex -1 >= Props.Length ? 0 : typeIndex - 1; // All vs Specific
int index = typeIndex - 1 >= Props.Length ? 0 : typeIndex - 1; // All vs Specific
var pr = Props[index];
if (!pr.TryGetValue(propertyName, out var info))
return null;

View file

@ -40,13 +40,13 @@ namespace PKHeX.Core
if (HaX)
return source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID);
// Games cannot acquire every Species that exists. Some can only acquire a subset.
// Some games cannot acquire every Species that exists. Some can only acquire a subset.
switch (sav)
{
case SAV7b _: // LGPE: Kanto 151, Meltan/Melmetal
return source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID
&& (s.Value <= (int)Core.Species.Mew || s.Value >= (int)Core.Species.Meltan));
return source.SpeciesDataSource.Where(s => s.Value <= (int)Core.Species.Mew
|| s.Value == (int)Core.Species.Meltan
|| s.Value == (int)Core.Species.Melmetal);
default:
return source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID);
}

View file

@ -32,6 +32,6 @@ namespace PKHeX.Core
public static string[] MoveStrings { internal get; set; } = Util.GetMovesList("en");
public static string[] SpeciesStrings { internal get; set; } = Util.GetSpeciesList("en");
internal static IEnumerable<string> GetMoveNames(IEnumerable<int> moves) => moves.Select(m => m >= MoveStrings.Length ? L_AError : MoveStrings[m]);
internal static IEnumerable<string> GetMoveNames(IEnumerable<int> moves) => moves.Select(m => (uint)m >= MoveStrings.Length ? L_AError : MoveStrings[m]);
}
}