fix catches not updating dex

This commit is contained in:
ImperialSympathizer 2024-09-26 17:34:50 -04:00
parent 0720274bb2
commit c0db6b044c

View File

@ -1579,10 +1579,10 @@ export class GameData {
// If incrementCount === false (not a catch scenario), only update the pokemon's dex data if the Pokemon has already been marked as caught in dex // If incrementCount === false (not a catch scenario), only update the pokemon's dex data if the Pokemon has already been marked as caught in dex
// Prevents form changes, nature changes, etc. from unintentionally updating the dex data of a "rental" pokemon // Prevents form changes, nature changes, etc. from unintentionally updating the dex data of a "rental" pokemon
const speciesRootForm = pokemon.species.getRootSpeciesId(); const speciesRootForm = pokemon.species.getRootSpeciesId();
if (this.scene.gameData.dexData[speciesRootForm].caughtAttr) { if (!incrementCount && !this.scene.gameData.dexData[speciesRootForm].caughtAttr) {
return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage);
} else {
return Promise.resolve(false); return Promise.resolve(false);
} else {
return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage);
} }
} }