Fix stat editing

ooooooops
stat editor was editing the incorrect object reference, and any changes
weren't saved

https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/?do=findComment&comment=240379
This commit is contained in:
Kurt
2019-02-18 12:05:08 -08:00
parent 21fc798d1a
commit 14a53aa09c

View File

@@ -331,7 +331,7 @@ private void PopulateFields(TrainerPoke pk)
CB_Move3.SelectedIndex = pkm.Move3;
CB_Move4.SelectedIndex = pkm.Move4;
if (pk is TrainerPoke7b b)
if (pkm is TrainerPoke7b b)
{
CHK_CanMega.Checked = b.CanMegaEvolve;
NUD_MegaForm.Value = b.MegaFormChoice;
@@ -344,7 +344,7 @@ private void PopulateFields(TrainerPoke pk)
FLP_HeldItem.Visible = FLP_Ability.Visible = true;
}
Stats.LoadStats(pk);
Stats.LoadStats(pkm);
loadingPKM = false;
}