mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Update cp/stats on friendship update
This commit is contained in:
parent
105c466ab3
commit
26647996c6
2 changed files with 6 additions and 1 deletions
|
@ -911,6 +911,11 @@ namespace PKHeX.WinForms.Controls
|
||||||
return;
|
return;
|
||||||
if (Util.ToInt32(tb.Text) > byte.MaxValue)
|
if (Util.ToInt32(tb.Text) > byte.MaxValue)
|
||||||
tb.Text = "255";
|
tb.Text = "255";
|
||||||
|
if (sender == TB_Friendship && int.TryParse(TB_Friendship.Text, out var val))
|
||||||
|
{
|
||||||
|
pkm.CurrentFriendship = val;
|
||||||
|
UpdateStats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateForm(object sender, EventArgs e)
|
private void UpdateForm(object sender, EventArgs e)
|
||||||
|
|
|
@ -16,13 +16,13 @@ namespace PKHeX.WinForms.Controls
|
||||||
if (pkm == null)
|
if (pkm == null)
|
||||||
return;
|
return;
|
||||||
TryResetStats();
|
TryResetStats();
|
||||||
LoadStoredValues();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TryResetStats()
|
public void TryResetStats()
|
||||||
{
|
{
|
||||||
if (CHK_Auto.Checked)
|
if (CHK_Auto.Checked)
|
||||||
pkm.ResetCalculatedValues();
|
pkm.ResetCalculatedValues();
|
||||||
|
LoadStoredValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadStoredValues()
|
private void LoadStoredValues()
|
||||||
|
|
Loading…
Reference in a new issue