mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
parent
e22be71a26
commit
3767a61171
1 changed files with 6 additions and 5 deletions
|
@ -277,7 +277,7 @@ namespace PKHeX.WinForms.Controls
|
|||
Stats.UpdateIVs(this, EventArgs.Empty);
|
||||
UpdatePKRSInfected(this, EventArgs.Empty);
|
||||
UpdatePKRSCured(this, EventArgs.Empty);
|
||||
UpdateNatureModification(CB_StatNature);
|
||||
UpdateNatureModification(CB_StatNature, 1);
|
||||
|
||||
if (HaX) // Load original values from pk not pkm
|
||||
{
|
||||
|
@ -1245,9 +1245,10 @@ namespace PKHeX.WinForms.Controls
|
|||
TB_ExtraByte.Text = Entity.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString();
|
||||
}
|
||||
|
||||
private void UpdateNatureModification(ComboBox cb)
|
||||
private void UpdateNatureModification(ComboBox cb, int type)
|
||||
{
|
||||
string text = Stats.UpdateNatureModification(Entity.StatNature);
|
||||
// 0 = Nature, 1 = Stat Nature
|
||||
string text = Stats.UpdateNatureModification((type == 0) ? Entity.Nature : Entity.StatNature);
|
||||
NatureTip.SetToolTip(cb, text);
|
||||
}
|
||||
|
||||
|
@ -1602,14 +1603,14 @@ namespace PKHeX.WinForms.Controls
|
|||
if (Entity.Format <= 4)
|
||||
UpdateRandomPID(sender, e);
|
||||
Entity.Nature = WinFormsUtil.GetIndex(CB_Nature);
|
||||
UpdateNatureModification(CB_Nature);
|
||||
UpdateNatureModification(CB_Nature, 0);
|
||||
Stats.UpdateIVs(sender, EventArgs.Empty); // updating Nature will trigger stats to update as well
|
||||
UpdateLegality();
|
||||
}
|
||||
else if (sender == CB_StatNature)
|
||||
{
|
||||
Entity.StatNature = WinFormsUtil.GetIndex(CB_StatNature);
|
||||
UpdateNatureModification(CB_StatNature);
|
||||
UpdateNatureModification(CB_StatNature, 1);
|
||||
Stats.UpdateIVs(sender, EventArgs.Empty); // updating Nature will trigger stats to update as well
|
||||
UpdateLegality();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue