mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
The UI was checking wrong if a pokemon is shadow or purified
The internal data of GC games for purification for shadow pokemon does not have values from 0-non shadow to 100-total shadow, it have values sarting from the initial shadow hearth gauge to 0-non shadow.
This commit is contained in:
parent
b53a101f20
commit
699dadcccb
4 changed files with 7 additions and 19 deletions
12
PKHeX.WinForms/MainWindow/Main.Designer.cs
generated
12
PKHeX.WinForms/MainWindow/Main.Designer.cs
generated
|
@ -1597,16 +1597,8 @@
|
|||
//
|
||||
this.NUD_Purification.Location = new System.Drawing.Point(110, 1);
|
||||
this.NUD_Purification.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
|
||||
this.NUD_Purification.Maximum = new decimal(new int[] {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.NUD_Purification.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.NUD_Purification.Maximum = new decimal(int.MaxValue);
|
||||
this.NUD_Purification.Minimum = new decimal(0);
|
||||
this.NUD_Purification.Name = "NUD_Purification";
|
||||
this.NUD_Purification.Size = new System.Drawing.Size(51, 20);
|
||||
this.NUD_Purification.TabIndex = 103;
|
||||
|
|
|
@ -2975,7 +2975,7 @@ namespace PKHeX.WinForms
|
|||
if (!fieldsLoaded)
|
||||
return;
|
||||
fieldsLoaded = false;
|
||||
CHK_Shadow.Checked = NUD_Purification.Value == 0;
|
||||
CHK_Shadow.Checked = NUD_Purification.Value > 0;
|
||||
fieldsLoaded = true;
|
||||
}
|
||||
private void updateShadowCHK(object sender, EventArgs e)
|
||||
|
|
|
@ -102,13 +102,11 @@ namespace PKHeX.WinForms
|
|||
if (ck3.ShadowID > 0)
|
||||
{
|
||||
int puri = ck3.Purification;
|
||||
if (puri > NUD_Purification.Maximum)
|
||||
puri = 0;
|
||||
else if (puri < NUD_Purification.Minimum)
|
||||
if (puri < NUD_Purification.Minimum)
|
||||
puri = (int)NUD_Purification.Minimum;
|
||||
|
||||
NUD_Purification.Value = puri;
|
||||
CHK_Shadow.Checked = puri < 0;
|
||||
CHK_Shadow.Checked = puri > 0;
|
||||
|
||||
NUD_ShadowID.Value = Math.Max(ck3.ShadowID, 0);
|
||||
}
|
||||
|
|
|
@ -102,13 +102,11 @@ namespace PKHeX.WinForms
|
|||
if (xk3.ShadowID > 0)
|
||||
{
|
||||
int puri = xk3.Purification;
|
||||
if (puri > NUD_Purification.Maximum)
|
||||
puri = 0;
|
||||
else if (puri < NUD_Purification.Minimum)
|
||||
if (puri < NUD_Purification.Minimum)
|
||||
puri = (int)NUD_Purification.Minimum;
|
||||
|
||||
NUD_Purification.Value = puri;
|
||||
CHK_Shadow.Checked = puri < 0;
|
||||
CHK_Shadow.Checked = puri > 0;
|
||||
|
||||
NUD_ShadowID.Value = Math.Max(xk3.ShadowID, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue