Get criteria from set details

pretty much futureproof I guess
This commit is contained in:
Kurt 2021-06-14 21:11:46 -07:00
parent a1ddbc7930
commit 9c9f0f8a94
2 changed files with 3 additions and 6 deletions

View file

@ -154,11 +154,8 @@ namespace PKHeX.WinForms
return EncounterCriteria.Unrestricted;
}
return new EncounterCriteria
{
Gender = editor.Gender,
Nature = (Nature) editor.Nature,
};
var set = new ShowdownSet(editor);
return EncounterCriteria.GetCriteria(set, editor.PersonalInfo);
}
private void PopulateComboBoxes()

View file

@ -49,7 +49,7 @@ namespace PKHeX.Tests.Simulator
var ez = EncounterMovesetGenerator.GenerateEncounters(pk, pk.Moves, GameVersion.W2).OfType<EncounterStatic>().First();
ez.Should().NotBeNull("Shiny Haxorus stationary encounter exists for B2/W2");
var criteria = new EncounterCriteria();
var criteria = EncounterCriteria.Unrestricted;
var tr = new SimpleTrainerInfo(GameVersion.B2)
{
TID = 57600,