mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-25 00:39:27 +02:00
fix catches not updating dex
This commit is contained in:
parent
0720274bb2
commit
c0db6b044c
@ -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
|
||||
// Prevents form changes, nature changes, etc. from unintentionally updating the dex data of a "rental" pokemon
|
||||
const speciesRootForm = pokemon.species.getRootSpeciesId();
|
||||
if (this.scene.gameData.dexData[speciesRootForm].caughtAttr) {
|
||||
return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage);
|
||||
} else {
|
||||
if (!incrementCount && !this.scene.gameData.dexData[speciesRootForm].caughtAttr) {
|
||||
return Promise.resolve(false);
|
||||
} else {
|
||||
return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user