Update src/system/game-data.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
ImperialSympathizer 2024-09-26 14:10:17 -04:00 committed by GitHub
parent 8818c91f84
commit 88e72fb666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1586,7 +1586,7 @@ 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 (this.scene.gameData.dexData[speciesRootForm].caughtAttr) {
return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage); return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage);
} else { } else {
return new Promise(resolve => resolve(false)); return new Promise(resolve => resolve(false));