mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-24 02:24:43 -05:00
Remove another method shortcut
EncounterSuggestion needs a facelift anyway
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user