fix mega venusaur female disabled / meowstic

<= goes to <
Thanks Holla!

https://projectpokemon.org/home/forums/topic/42332-gen-7-stuff/?tab=comments#comment-222689
This commit is contained in:
Kurt 2017-11-14 22:56:45 -08:00
parent 3e60bcd5dc
commit aea1577a11

View file

@ -65,11 +65,17 @@ namespace PKHeX.WinForms
private readonly List<int> baseSpecies;
private int GetBaseSpeciesGender(int index)
{
if (index <= SAV.MaxSpeciesID)
// meowstic special handling
const int meow = 678;
if (index == meow - 1 || index >= SAV.MaxSpeciesID && baseSpecies[index - SAV.MaxSpeciesID] == meow)
return index < SAV.MaxSpeciesID ? 0 : 254; // M : F
if (index < SAV.MaxSpeciesID)
return SAV.Personal[index + 1].Gender;
index -= SAV.MaxSpeciesID;
return SAV.Personal[baseSpecies[index]].Gender;
int spec = baseSpecies[index];
return SAV.Personal[spec].Gender;
}
private void ChangeCBSpecies(object sender, EventArgs e)
@ -377,9 +383,8 @@ namespace PKHeX.WinForms
for (int i = 0; i < SAV.MaxSpeciesID; i++)
{
int spec = i + 1;
var pi = SAV.Personal[spec];
var gt = pi.Gender;
var c = pi.FormeCount;
var gt = GetBaseSpeciesGender(i);
var c = SAV.Personal[spec].FormeCount;
// Set base species flags
LB_Species.SelectedIndex = i;