mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Fix Check All behavior
- Gender specific forms now set the correct flags - Regular click on Check All doesn't set shiny flags - Shift click on Check All sets shiny flags too. Closes #2425 thanks @igniscitrinus !
This commit is contained in:
parent
29d52e065f
commit
b172008981
1 changed files with 7 additions and 6 deletions
|
@ -315,15 +315,17 @@ namespace PKHeX.Core
|
|||
SetAllSeen(true, shinyToo);
|
||||
}
|
||||
|
||||
private void SeenAll(int species, int fc, PersonalInfo pi, bool shinyToo, bool value = true)
|
||||
private void SeenAll(int species, int fc, bool shinyToo, bool value = true)
|
||||
{
|
||||
var pt = PersonalTable.SWSH;
|
||||
for (int i = 0; i < fc; i++)
|
||||
{
|
||||
var pi = pt.GetFormeEntry(species, i);
|
||||
if (pi.IsDualGender || !value)
|
||||
{
|
||||
SetSeenRegion(species, i, 0, value);
|
||||
SetSeenRegion(species, i, 1, value);
|
||||
if (!shinyToo && !value)
|
||||
if (!shinyToo && value)
|
||||
continue;
|
||||
SetSeenRegion(species, i, 2, value);
|
||||
SetSeenRegion(species, i, 3, value);
|
||||
|
@ -400,18 +402,17 @@ namespace PKHeX.Core
|
|||
var fc = pi.FormeCount;
|
||||
if (species == (int) Species.Eternatus)
|
||||
fc = 1; // ignore gigantamax
|
||||
SeenAll(species, fc, pi, shinyToo, value);
|
||||
SeenAll(species, fc, shinyToo, value);
|
||||
|
||||
if (species == (int) Species.Alcremie)
|
||||
{
|
||||
// Alcremie forms
|
||||
var alc = PersonalTable.SWSH[(int)Species.Alcremie];
|
||||
SeenAll((int)Species.Alcremie, 7 * 8, alc, shinyToo, value);
|
||||
SeenAll((int)Species.Alcremie, 7 * 8, shinyToo, value);
|
||||
}
|
||||
else if (species == (int) Species.Eternatus)
|
||||
{
|
||||
SetSeenRegion(species, 63, 0, value);
|
||||
if (!shinyToo && !value)
|
||||
if (!shinyToo && value)
|
||||
return;
|
||||
SetSeenRegion(species, 63, 2, value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue