mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-11 22:29:52 -05:00
Remove erroneous chain trim logic
latter half of the method seems to do everything that is required Closes #2048
This commit is contained in:
parent
9a57469ec3
commit
d45a8afef2
|
|
@ -139,22 +139,6 @@ private static List<EvoCriteria>[] GetChainAll(PKM pkm, IEncounterable Encounter
|
|||
|
||||
private static void TrimVC1Transfer(PKM pkm, IList<List<EvoCriteria>> GensEvoChains)
|
||||
{
|
||||
// Remove Gen2 evolutions from Gen7 and future if a Gen1 did not exist in that format.
|
||||
for (int fgen = 7; fgen < GensEvoChains.Count; fgen++)
|
||||
{
|
||||
var chain = GensEvoChains[fgen];
|
||||
int g1Index = -1;
|
||||
for (int i = 0; i < chain.Count; i++)
|
||||
{
|
||||
if (chain[i].Species > MaxSpeciesID_1)
|
||||
continue;
|
||||
g1Index = i;
|
||||
break;
|
||||
}
|
||||
int count = chain.Count;
|
||||
for (int i = g1Index + 1; i < count; i++)
|
||||
GensEvoChains[fgen].RemoveAt(i);
|
||||
}
|
||||
if (GensEvoChains[7].All(z => z.Species > MaxSpeciesID_1))
|
||||
GensEvoChains[pkm.Format] = NONE; // need a Gen1 present; invalidate the chain.
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user