mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-16 21:38:40 +00:00
Misc updates
Remove safari hidden ability check for gen7 origin pkm load template data on any save load, causes the legality triangle to appear on supported games
This commit is contained in:
parent
c4020660ec
commit
30ec9011c8
3 changed files with 21 additions and 20 deletions
|
@ -1235,6 +1235,8 @@ namespace PKHeX.WinForms
|
|||
"If the path is a removable disk (SD card), please ensure the write protection switch is not set.");
|
||||
}
|
||||
|
||||
TemplateFields();
|
||||
|
||||
// Indicate audibly the save is loaded
|
||||
SystemSounds.Beep.Play();
|
||||
}
|
||||
|
@ -1342,21 +1344,23 @@ namespace PKHeX.WinForms
|
|||
|
||||
// Load Data
|
||||
populateFields(pkm);
|
||||
{
|
||||
CB_Species.SelectedValue = SAV.MaxSpeciesID;
|
||||
CB_Move1.SelectedValue = 1;
|
||||
TB_OT.Text = "PKHeX";
|
||||
TB_TID.Text = 12345.ToString();
|
||||
TB_SID.Text = 54321.ToString();
|
||||
CB_GameOrigin.SelectedIndex = 0;
|
||||
int curlang = Array.IndexOf(GameInfo.lang_val, curlanguage);
|
||||
CB_Language.SelectedIndex = curlang > CB_Language.Items.Count - 1 ? 1 : curlang;
|
||||
CB_Ball.SelectedIndex = Math.Min(0, CB_Ball.Items.Count - 1);
|
||||
CB_Country.SelectedIndex = Math.Min(0, CB_Country.Items.Count - 1);
|
||||
CAL_MetDate.Value = CAL_EggDate.Value = DateTime.Today;
|
||||
|
||||
CB_BoxSelect.SelectedIndex = 0;
|
||||
}
|
||||
TemplateFields();
|
||||
CB_BoxSelect.SelectedIndex = 0;
|
||||
}
|
||||
private void TemplateFields()
|
||||
{
|
||||
CB_Species.SelectedValue = SAV.MaxSpeciesID;
|
||||
CB_Move1.SelectedValue = 1;
|
||||
TB_OT.Text = "PKHeX";
|
||||
TB_TID.Text = 12345.ToString();
|
||||
TB_SID.Text = 54321.ToString();
|
||||
CB_GameOrigin.SelectedIndex = 0;
|
||||
int curlang = Array.IndexOf(GameInfo.lang_val, curlanguage);
|
||||
CB_Language.SelectedIndex = curlang > CB_Language.Items.Count - 1 ? 1 : curlang;
|
||||
CB_Ball.SelectedIndex = Math.Min(0, CB_Ball.Items.Count - 1);
|
||||
CB_Country.SelectedIndex = Math.Min(0, CB_Country.Items.Count - 1);
|
||||
CAL_MetDate.Value = CAL_EggDate.Value = DateTime.Today;
|
||||
CHK_Nicknamed.Checked = false;
|
||||
}
|
||||
private void InitializeLanguage()
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace PKHeX.WinForms
|
|||
catch (ConfigurationErrorsException e)
|
||||
{
|
||||
string path = (e.InnerException as ConfigurationErrorsException)?.Filename;
|
||||
if (path != null)
|
||||
if (path != null && File.Exists(path))
|
||||
File.Delete(path);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1045,9 +1045,6 @@ namespace PKHeX.Core
|
|||
else
|
||||
AddLine(Severity.Invalid, "Safari Ball not possible for species.", CheckIdentifier.Ball);
|
||||
|
||||
if (pkm.AbilityNumber == 4)
|
||||
AddLine(Severity.Invalid, "Safari Ball with Hidden Ability.", CheckIdentifier.Ball);
|
||||
|
||||
return;
|
||||
}
|
||||
if (0x10 < pkm.Ball && pkm.Ball < 0x18) // Apricorn Ball
|
||||
|
@ -1111,7 +1108,7 @@ namespace PKHeX.Core
|
|||
if (pkm.AbilityNumber == 4)
|
||||
AddLine(Severity.Invalid, "Ball not possible for species with hidden ability.", CheckIdentifier.Ball);
|
||||
else
|
||||
AddLine(Severity.Valid, "Obtainable capture for Gen3Ball.", CheckIdentifier.Ball);
|
||||
AddLine(Severity.Valid, "Obtainable capture for Gen3 Ball.", CheckIdentifier.Ball);
|
||||
}
|
||||
else if (Legal.Ban_Gen3Ball.Contains(pkm.Species))
|
||||
AddLine(Severity.Invalid, "Unobtainable capture for Gen3 Ball.", CheckIdentifier.Ball);
|
||||
|
|
Loading…
Add table
Reference in a new issue