Fix 1->7 evo chain disjointing

Original encounter details were replaced, thus breaking the chain at the
current species.

Closes #872
This commit is contained in:
Kurt 2017-02-20 21:00:49 -08:00
parent c7874f19b6
commit 36624e14e9
2 changed files with 3 additions and 2 deletions

View file

@ -10,7 +10,7 @@ namespace PKHeX.Core
private DexLevel[][] EvoChainsAllGens;
private readonly List<CheckResult> Parse = new List<CheckResult>();
private object EncounterMatch;
private object EncounterMatch, EncounterOriginal;
private Type EncounterType;
private bool EncounterIsMysteryGift => EncounterType.IsSubclassOf(typeof (MysteryGift));
private string EncounterName => Legal.getEncounterTypeName(pkm, EncounterMatch);
@ -142,7 +142,7 @@ namespace PKHeX.Core
Encounter = verifyEncounter();
Parse.Add(Encounter);
EvoChainsAllGens = Legal.getEvolutionChainsAllGens(pkm, EncounterMatch);
EvoChainsAllGens = Legal.getEvolutionChainsAllGens(pkm, EncounterOriginal ?? EncounterMatch);
}
private void updateEncounterInfo()
{

View file

@ -636,6 +636,7 @@ namespace PKHeX.Core
AddLine(new CheckResult(Severity.Invalid, "Special encounter is not available to Virtual Console games.", CheckIdentifier.Encounter));
}
EncounterOriginal = EncounterMatch; // Store for later recollection
EncounterMatch = new EncounterStatic
{
Species = species,