mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-14 08:00:33 -05:00
Do not return encounters if maximun level for a generation is 0, is an illegal level encounter
This commit is contained in:
parent
4ccbce5f24
commit
c9bdcdd464
|
|
@ -282,7 +282,8 @@ internal static EncounterStatic getValidStaticEncounter(PKM pkm, bool gen1Encoun
|
|||
IEnumerable<EncounterStatic> poss = getStaticEncounters(pkm);
|
||||
|
||||
int lvl = (pkm.HasOriginalMetLocation) ? pkm.Met_Level : getMaxLevelGeneration(pkm);
|
||||
|
||||
if (lvl <= 0)
|
||||
return null; ;
|
||||
// Back Check against pkm
|
||||
foreach (EncounterStatic e in poss)
|
||||
{
|
||||
|
|
@ -329,7 +330,8 @@ internal static EncounterTrade getValidIngameTrade(PKM pkm, bool gen1Encounter =
|
|||
return null;
|
||||
|
||||
int lvl = (pkm.HasOriginalMetLocation) ? pkm.Met_Level : getMaxLevelGeneration(pkm);
|
||||
|
||||
if (lvl <= 0)
|
||||
return lvl;
|
||||
// Get valid pre-evolutions
|
||||
IEnumerable<DexLevel> p = getValidPreEvolutions(pkm);
|
||||
|
||||
|
|
@ -1086,6 +1088,8 @@ private static IEnumerable<EncounterSlot> getValidEncounterSlots(PKM pkm, Encoun
|
|||
IEnumerable<EncounterSlot> slots = loc.Slots.Where(slot => vs.Any(evo => evo.Species == slot.Species && (ignoreSlotLevel || evo.Level >= slot.LevelMin - df)));
|
||||
|
||||
int lvl = (pkm.HasOriginalMetLocation) ? pkm.Met_Level: getMaxLevelGeneration(pkm);
|
||||
if (lvl <= 0)
|
||||
return slotdata;
|
||||
int gen = pkm.GenNumber;
|
||||
IEnumerable<EncounterSlot> encounterSlots;
|
||||
if(pkm.HasOriginalMetLocation)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user