mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-28 15:00:36 +00:00
Store level regardless of gen
Change focused to visible as Level/EXP are in the same tab.
This commit is contained in:
parent
241b367c0b
commit
50fd543012
1 changed files with 3 additions and 4 deletions
|
@ -1906,18 +1906,17 @@ namespace PKHeX
|
|||
else
|
||||
{
|
||||
// Change the XP
|
||||
int Level = Util.ToInt32((MT_Level.Focused ? MT_Level : TB_Level).Text);
|
||||
int Level = Util.ToInt32((MT_Level.Visible ? MT_Level : TB_Level).Text);
|
||||
if (Level > 100) TB_Level.Text = "100";
|
||||
if (Level > byte.MaxValue) MT_Level.Text = "255";
|
||||
|
||||
TB_EXP.Text = PKX.getEXP(Level, Util.getIndex(CB_Species)).ToString();
|
||||
}
|
||||
changingFields = false;
|
||||
if (fieldsLoaded)
|
||||
if (fieldsLoaded) // store values back
|
||||
{
|
||||
pkm.EXP = Util.ToUInt32(TB_EXP.Text);
|
||||
if (SAV.Generation < 3)
|
||||
pkm.Stat_Level = Util.ToInt32((MT_Level.Focused ? MT_Level : TB_Level).Text);
|
||||
pkm.Stat_Level = Util.ToInt32((MT_Level.Visible ? MT_Level : TB_Level).Text);
|
||||
}
|
||||
updateStats();
|
||||
updateLegality();
|
||||
|
|
Loading…
Reference in a new issue