diff --git a/PKHeX.Core/Legality/Areas/EncounterArea8g.cs b/PKHeX.Core/Legality/Areas/EncounterArea8g.cs index a910d8889..04b053e77 100644 --- a/PKHeX.Core/Legality/Areas/EncounterArea8g.cs +++ b/PKHeX.Core/Legality/Areas/EncounterArea8g.cs @@ -126,11 +126,11 @@ private static bool IsDeferredSlot(EncounterSlotGO slot, PKM pk) return slot.Species switch { - (int) Core.Species.Yamask when pk.Species != slot.Species && slot.Form == 1 && pk is IFormArgument f => f.FormArgument == 0, - (int) Core.Species.Milcery when pk.Species != slot.Species && pk is IFormArgument f => f.FormArgument == 0, + (int) Core.Species.Yamask when pk.Species != slot.Species && slot.Form == 1 => pk is IFormArgument {FormArgument: 0}, + (int) Core.Species.Milcery when pk.Species != slot.Species => pk is IFormArgument {FormArgument: 0}, - (int) Core.Species.Runerigus when pk is IFormArgument f && f.FormArgument != 0 => true, - (int) Core.Species.Alcremie when pk is IFormArgument f && f.FormArgument != 0 => true, + (int) Core.Species.Runerigus => pk is IFormArgument {FormArgument: not 0}, + (int) Core.Species.Alcremie => pk is IFormArgument {FormArgument: not 0}, _ => false, }; diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index 0226c9674..ed6289319 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -1892,7 +1892,7 @@ private void LoadShowdownSetDefault(IBattleTemplate Set) private void CB_BattleVersion_SelectedValueChanged(object sender, EventArgs e) { - PB_BattleVersion.Image = GetMarkSprite(PB_BattleVersion, Entity is IBattleVersion b && b.BattleVersion != 0); + PB_BattleVersion.Image = GetMarkSprite(PB_BattleVersion, Entity is IBattleVersion {BattleVersion: not 0}); } private static Image GetMarkSprite(PictureBox p, bool opaque, double trans = 0.175) @@ -1976,7 +1976,7 @@ private void PopulateFilteredDataSources(ITrainerInfo sav, bool force = false) var game = source.Games; var gamesWith0 = new List(1 + game.Count) {GameInfo.Sources.Empty}; - gamesWith0.AddRange(lang); + gamesWith0.AddRange(game); SetIfDifferentCount(gamesWith0, CB_BattleVersion, force); } SetIfDifferentCount(source.Species, CB_Species, force);