Fix some crashes
This commit is contained in:
1 parent
7b216ce4c1
commit
4ff3c55613
2 files changed
+9
-5
No files matched your search
@@ -1011,12 +1011,16 @@ export class AttemptCapturePhase extends BattlePhase {
|
||||
this.scene.unshiftPhase(new VictoryPhase(this.scene));
|
||||
this.scene.ui.showText(`${pokemon.name} was caught!`, null, () => {
|
||||
pokemon.hideInfo();
|
||||
const newPokemon = pokemon.addToParty();
|
||||
this.scene.field.remove(pokemon, true);
|
||||
newPokemon.loadAssets().then(() => {
|
||||
const end = () => {
|
||||
this.removePb();
|
||||
this.end();
|
||||
});
|
||||
};
|
||||
const newPokemon = pokemon.addToParty();
|
||||
this.scene.field.remove(pokemon, true);
|
||||
if (newPokemon)
|
||||
newPokemon.loadAssets().then(end);
|
||||
else
|
||||
end();
|
||||
}, 0, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user