Misc changes

Revert linq chain
Closes #1987

change encountermatch comparison (never null), add comparison for vc
output
remove unused strings (will get removed from translation files in later
update)
This commit is contained in:
Kurt 2018-06-10 00:26:33 -07:00
parent 26f45d44d0
commit 3b84f33776
6 changed files with 4 additions and 4 deletions

View file

@ -184,6 +184,8 @@ namespace PKHeX.Core
private void UpdateVCTransferInfo()
{
EncounterOriginalGB = EncounterMatch;
if (EncounterOriginalGB is EncounterInvalid)
return;
Info.EncounterMatch = EncounterStaticGenerator.GetVCStaticTransferEncounter(pkm);
if (!(Info.EncounterMatch is EncounterStatic s) || !EncounterStaticGenerator.IsVCStaticTransferEncounterValid(pkm, s))
{ AddLine(Severity.Invalid, V80, CheckIdentifier.Encounter); return; }

View file

@ -871,7 +871,7 @@ namespace PKHeX.Core
private static IEnumerable<CheckResult> VerifyVCEncounter(PKM pkm, IEncounterable encounter, ILocation transfer, IList<CheckMoveResult> Moves)
{
// Check existing EncounterMatch
if (encounter == null || transfer == null)
if (encounter is EncounterInvalid || transfer == null)
yield break; // Avoid duplicate invaild message
if (encounter is EncounterStatic v && (GameVersion.GBCartEraOnly.Contains(v.Version) || v.Version == GameVersion.VCEvents))

View file

@ -171,7 +171,7 @@ namespace PKHeX.Core
private static int GetRequiredBaseMoves(int[] RelearnMoves, IReadOnlyList<int> baseMoves, int baseCt, IReadOnlyList<int> inheritMoves)
{
var inherited = RelearnMoves.Where(m => m != 0).Except(baseMoves).Intersect(inheritMoves).ToList();
var inherited = RelearnMoves.Where(m => m != 0 && (!baseMoves.Contains(m) || inheritMoves.Contains(m))).ToList();
int inheritCt = inherited.Count;
// Get required amount of base moves

View file

@ -173,8 +173,6 @@ namespace PKHeX.Core
public static string MsgSaveSwitchDaycareView { get; set; } = "Would you like to switch the view to the other Daycare?";
public static string MsgSaveSwitchDaycareCurrent { get; set; } = "Currently viewing daycare {0}.";
public static string MsgSaveGen6OPower { get; set; } = "No editing support for ORAS :(";
public static string MsgSaveGen6OPowerCheatDesc { get; set; } = "Max O-Powers with a working code?";
public static string MsgSaveGen6Passerby { get; set; } = "Export Passerby Info to Clipboard?";
public static string MsgSaveGen6FriendSafari { get; set; } = "No editing support for Friend Safari :(";
public static string MsgSaveGen6FriendSafariCheatDesc { get; set; } = "Unlock all 3 slots for each friend?";