mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
More version-location shenanigans
Should be behaving correctly for gen!2=>gen2 now
This commit is contained in:
parent
f785231692
commit
d02dd29e83
|
|
@ -1185,15 +1185,10 @@ private void UpdateSpecies(object sender, EventArgs e)
|
|||
private void UpdateOriginGame(object sender, EventArgs e)
|
||||
{
|
||||
GameVersion version = (GameVersion)WinFormsUtil.GetIndex(CB_GameOrigin);
|
||||
CheckMetLocationChange(version);
|
||||
if (FieldsLoaded)
|
||||
Entity.Version = (int)version;
|
||||
|
||||
// Does the list of locations need to be changed to another group?
|
||||
var group = GameUtil.GetMetLocationVersionGroup(version);
|
||||
if (group != origintrack)
|
||||
ReloadMetLocations(version);
|
||||
origintrack = group;
|
||||
|
||||
// Visibility logic for Gen 4 encounter type; only show for Gen 4 Pokemon.
|
||||
if (Entity.Format >= 4)
|
||||
{
|
||||
|
|
@ -1210,6 +1205,15 @@ private void UpdateOriginGame(object sender, EventArgs e)
|
|||
UpdateLegality();
|
||||
}
|
||||
|
||||
private void CheckMetLocationChange(GameVersion version)
|
||||
{
|
||||
// Does the list of locations need to be changed to another group?
|
||||
var group = GameUtil.GetMetLocationVersionGroup(version);
|
||||
if (group != origintrack)
|
||||
ReloadMetLocations(version);
|
||||
origintrack = group;
|
||||
}
|
||||
|
||||
private void ReloadMetLocations(GameVersion version)
|
||||
{
|
||||
var metList = GameInfo.GetLocationList(version, Entity.Format, egg: false);
|
||||
|
|
@ -1955,7 +1959,10 @@ private void PopulateFilteredDataSources(ITrainerInfo sav, bool force = false)
|
|||
var source = GameInfo.FilteredSources;
|
||||
|
||||
if (sav.Generation >= 2)
|
||||
{
|
||||
CheckMetLocationChange((GameVersion) sav.Game);
|
||||
SetIfDifferentCount(source.Items, CB_HeldItem, force);
|
||||
}
|
||||
|
||||
if (sav.Generation >= 3)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user