mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-20 17:33:25 +00:00
bb55532c4a
Move TID/SID load to after version set (special handling for pk1/pk2 which don't store version, just call manually). Update TID/SID on every gameversion change anyway Rename LoadOTID to LoadOT since it does not deal with ID. Closes #1962
35 lines
735 B
C#
35 lines
735 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);
|
|
|
|
// 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;
|
|
}
|
|
}
|
|
}
|