mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Update database filters
Allow if it can exist in SWSH
This commit is contained in:
parent
ebf20d927b
commit
8e9664ba6c
3 changed files with 5 additions and 5 deletions
|
@ -341,7 +341,7 @@ namespace PKHeX.WinForms
|
|||
var db = bakpkm.Concat(savpkm).Where(pk => pk.ChecksumValid && pk.Sanity == 0);
|
||||
|
||||
// when PK7->PK8 conversion is possible (and sprites in new size are available, remove this filter)
|
||||
db = SAV is SAV8SWSH ? db.OfType<PK8>() : db.Where(z => !(z is PK8));
|
||||
db = SAV is SAV8SWSH ? db.Where(z => z is PK8 || ((PersonalInfoSWSH)PersonalTable.SWSH.GetFormeEntry(z.Species, z.AltForm)).IsPresentInGame) : db.Where(z => !(z is PK8));
|
||||
|
||||
// Finalize the Database
|
||||
return new List<PKM>(db);
|
||||
|
|
|
@ -191,9 +191,9 @@ namespace PKHeX.WinForms
|
|||
var comparer = new ReferenceComparer<IEncounterable>();
|
||||
results = results.Distinct(comparer); // only distinct objects
|
||||
|
||||
// when PK7->PK8 conversion is possible (and sprites in new size are available, remove this filter)
|
||||
// when all sprites in new size are available, remove this filter
|
||||
results = SAV is SAV8SWSH
|
||||
? results.Where(z => !(z is IGeneration g) || g.Generation == 8)
|
||||
? results.Where(z => ((PersonalInfoSWSH)PersonalTable.SWSH.GetFormeEntry(z.Species, z.Form)).IsPresentInGame)
|
||||
: results.Where(z => !(z is IGeneration g) || g.Generation <= 7);
|
||||
return results;
|
||||
}
|
||||
|
|
|
@ -194,8 +194,8 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
var db = EncounterEvent.GetAllEvents();
|
||||
|
||||
// when PK7->PK8 conversion is possible (and sprites in new size are available, remove this filter)
|
||||
db = SAV is SAV8SWSH ? db.OfType<WC8>() : db.Where(z => !(z is WC8));
|
||||
// when all sprites in new size are available, remove this filter
|
||||
db = SAV is SAV8SWSH ? db.Where(z => ((PersonalInfoSWSH)PersonalTable.SWSH.GetFormeEntry(z.Species, z.Form)).IsPresentInGame) : db.Where(z => !(z is WC8));
|
||||
|
||||
RawDB = new List<MysteryGift>(db);
|
||||
foreach (var mg in RawDB)
|
||||
|
|
Loading…
Reference in a new issue