mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-30 07:50:32 +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;
|
||||
if (Util.ToInt32(tb.Text) > byte.MaxValue)
|
||||
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)
|
||||
|
|
|
@ -16,13 +16,13 @@ namespace PKHeX.WinForms.Controls
|
|||
if (pkm == null)
|
||||
return;
|
||||
TryResetStats();
|
||||
LoadStoredValues();
|
||||
}
|
||||
|
||||
public void TryResetStats()
|
||||
{
|
||||
if (CHK_Auto.Checked)
|
||||
pkm.ResetCalculatedValues();
|
||||
LoadStoredValues();
|
||||
}
|
||||
|
||||
private void LoadStoredValues()
|
||||
|
|
Loading…
Reference in a new issue