Fix gen1/2 shinify/gender change behavior

Closes #1488
also fixes female->shinify starters not flipping back to male gender
(changingFields was set back to the same value)
This commit is contained in:
Kurt 2017-09-23 16:50:38 -07:00
parent 7974943bcf
commit da8ba46d22

View file

@ -533,7 +533,11 @@ namespace PKHeX.WinForms.Controls
int newGender = PKX.GetGender(Label_Gender.Text) ^ 1; int newGender = PKX.GetGender(Label_Gender.Text) ^ 1;
if (pkm.Format <= 2) if (pkm.Format <= 2)
do { TB_ATKIV.Text = (Util.Rand32() & pkm.MaxIV).ToString(); } while (PKX.GetGender(Label_Gender.Text) != newGender); {
do { TB_ATKIV.Text = (pkm.IV_ATK = (int)(Util.Rand32() & pkm.MaxIV)).ToString(); }
while (PKX.GetGender(Label_Gender.Text = gendersymbols[pkm.Gender]) != newGender);
SetIsShiny(null);
}
else if (pkm.Format <= 4) else if (pkm.Format <= 4)
{ {
if (fieldsLoaded) if (fieldsLoaded)
@ -1600,7 +1604,7 @@ namespace PKHeX.WinForms.Controls
TB_DEFIV.Text = pkm.IV_DEF.ToString(); TB_DEFIV.Text = pkm.IV_DEF.ToString();
TB_SPEIV.Text = pkm.IV_SPE.ToString(); TB_SPEIV.Text = pkm.IV_SPE.ToString();
TB_SPAIV.Text = pkm.IV_SPA.ToString(); TB_SPAIV.Text = pkm.IV_SPA.ToString();
changingFields = true; changingFields = false;
UpdateIVs(null, null); UpdateIVs(null, null);
} }