mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-18 16:33:24 +00:00
6f09f7b89e
#2132 has a 'reset' button which tries to set a legal value has a 'clear' button which sets it to zero, similar to gen2 removing an item
36 lines
768 B
C#
36 lines
768 B
C#
using PKHeX.Core;
|
|
|
|
namespace PKHeX.WinForms.Controls
|
|
{
|
|
public partial class PKMEditor
|
|
{
|
|
private void PopulateFieldsPK1()
|
|
{
|
|
if (!(pkm is PK1 pk1))
|
|
return;
|
|
|
|
LoadMisc1(pk1);
|
|
TID_Trainer.LoadIDValues(pkm);
|
|
CR_PK1.LoadPK1(pk1);
|
|
|
|
// Attempt to detect language
|
|
CB_Language.SelectedValue = PKX.GetVCLanguage(pk1);
|
|
|
|
LoadPartyStats(pk1);
|
|
UpdateStats();
|
|
}
|
|
|
|
private PKM PreparePK1()
|
|
{
|
|
if (!(pkm is PK1 pk1))
|
|
return null;
|
|
|
|
SaveMisc1(pk1);
|
|
|
|
SavePartyStats(pk1);
|
|
pk1.FixMoves();
|
|
pk1.RefreshChecksum();
|
|
return pk1;
|
|
}
|
|
}
|
|
}
|