mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00:00
Minor tweaks
no functional change
This commit is contained in:
parent
229bb0d05d
commit
0fe42a1db3
3 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue