2017-10-03 06:13:40 +00:00
|
|
|
|
using PKHeX.Core;
|
2016-08-28 10:18:22 +00:00
|
|
|
|
|
2017-05-23 04:55:05 +00:00
|
|
|
|
namespace PKHeX.WinForms.Controls
|
2016-08-28 10:18:22 +00:00
|
|
|
|
{
|
2017-05-23 04:55:05 +00:00
|
|
|
|
public partial class PKMEditor
|
2016-08-28 10:18:22 +00:00
|
|
|
|
{
|
2017-06-18 01:37:19 +00:00
|
|
|
|
private void PopulateFieldsPK1()
|
2016-08-28 10:18:22 +00:00
|
|
|
|
{
|
2017-10-03 06:13:40 +00:00
|
|
|
|
if (!(pkm is PK1 pk1))
|
2016-08-28 10:18:22 +00:00
|
|
|
|
return;
|
|
|
|
|
|
2017-10-03 06:13:40 +00:00
|
|
|
|
LoadMisc1(pk1);
|
2018-05-24 23:53:51 +00:00
|
|
|
|
TID_Trainer.LoadIDValues(pkm);
|
2018-09-30 17:16:45 +00:00
|
|
|
|
CR_PK1.LoadPK1(pk1);
|
2016-08-28 10:18:22 +00:00
|
|
|
|
|
2017-10-03 06:13:40 +00:00
|
|
|
|
// Attempt to detect language
|
2018-05-24 23:51:12 +00:00
|
|
|
|
CB_Language.SelectedValue = PKX.GetVCLanguage(pk1);
|
2016-08-29 20:27:17 +00:00
|
|
|
|
|
2017-10-03 06:13:40 +00:00
|
|
|
|
LoadPartyStats(pk1);
|
2017-06-18 01:37:19 +00:00
|
|
|
|
UpdateStats();
|
2016-08-28 10:18:22 +00:00
|
|
|
|
}
|
2017-10-03 06:13:40 +00:00
|
|
|
|
|
2017-06-18 01:37:19 +00:00
|
|
|
|
private PKM PreparePK1()
|
2016-08-28 10:18:22 +00:00
|
|
|
|
{
|
2017-10-03 06:13:40 +00:00
|
|
|
|
if (!(pkm is PK1 pk1))
|
2016-08-28 10:18:22 +00:00
|
|
|
|
return null;
|
|
|
|
|
|
2017-10-03 06:13:40 +00:00
|
|
|
|
SaveMisc1(pk1);
|
2016-08-28 10:18:22 +00:00
|
|
|
|
|
2017-10-03 06:13:40 +00:00
|
|
|
|
SavePartyStats(pk1);
|
2016-08-28 10:18:22 +00:00
|
|
|
|
pk1.FixMoves();
|
|
|
|
|
pk1.RefreshChecksum();
|
|
|
|
|
return pk1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|