Remove another method shortcut

EncounterSuggestion needs a facelift anyway
This commit is contained in:
Kurt
2020-01-12 17:00:03 -08:00
parent 3b5c7062ac
commit eaeebea923
5 changed files with 6 additions and 8 deletions

View File

@@ -15,6 +15,6 @@ internal sealed class PKMInfo
public bool Legal => Legality.Valid;
internal IReadOnlyList<int> SuggestedRelearn => Legality.GetSuggestedRelearn();
internal EncounterStatic? SuggestedEncounter => Legality.GetSuggestedMetInfo();
internal EncounterStatic? SuggestedEncounter => EncounterSuggestion.GetSuggestedMetInfo(Entity);
}
}

View File

@@ -313,7 +313,7 @@ public static IReadOnlyList<int> GetSuggestedRelearnMoves(this LegalityAnalysis
if (enc is MysteryGift || enc is EncounterEgg)
return m;
var encounter = legal.GetSuggestedMetInfo();
var encounter = EncounterSuggestion.GetSuggestedMetInfo(legal.pkm);
if (encounter is IRelearn r && r.Relearn.Length > 0)
m = r.Relearn;

View File

@@ -470,10 +470,5 @@ public int[] GetSuggestedMoves(bool tm, bool tutor, bool reminder)
var evos = Info.EvoChainsAllGens;
return Legal.GetValidMoves(pkm, evos, Tutor: tutor, Machine: tm, MoveReminder: reminder).Skip(1).ToArray(); // skip move 0
}
/// <summary>
/// Gets an object containing met data properties that might be legal.
/// </summary>
public EncounterStatic? GetSuggestedMetInfo() => EncounterSuggestion.GetSuggestedMetInfo(pkm);
}
}

View File

@@ -7,6 +7,9 @@ namespace PKHeX.Core
/// </summary>
public static class EncounterSuggestion
{
/// <summary>
/// Gets an object containing met data properties that might be legal.
/// </summary>
public static EncounterStatic? GetSuggestedMetInfo(PKM pkm)
{
int loc = GetSuggestedTransferLocation(pkm);

View File

@@ -733,7 +733,7 @@ private bool SetSuggestedRelearnMoves(bool silent = false)
private bool SetSuggestedMetLocation(bool silent = false)
{
var encounter = Legality.GetSuggestedMetInfo();
var encounter = EncounterSuggestion.GetSuggestedMetInfo(Entity);
if (encounter == null || (Entity.Format >= 3 && encounter.Location < 0))
{
if (!silent)