From f69666a6b0a16211e0cd0e7c18b363d6749e7ac7 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Thu, 16 Jan 2025 01:12:02 +0100 Subject: [PATCH] Pokemon cry in setSpeciesDetails --- src/ui/pokedex-page-ui-handler.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index 5d65493747a..d2211e56168 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -577,9 +577,6 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.setSpecies(this.lastSpecies); this.updateInstructions(); - const crier = (this.lastSpecies.forms && this.lastSpecies.forms.length > 0) ? this.lastSpecies.forms[this.lastFormIndex] : this.lastSpecies; - crier.cry(); - return true; } @@ -2168,6 +2165,12 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.pokemonGenderText.setText(""); } + if (dexEntry.caughtAttr) { + this.lastSpecies.loadAssets(female!, formIndex, shiny, variant as Variant, true).then(() => { + const crier = (this.lastSpecies.forms && this.lastSpecies.forms.length > 0) ? this.lastSpecies.forms[formIndex ?? this.lastFormIndex] : this.lastSpecies; + crier.cry(); + }); + } if (dexEntry.caughtAttr || forSeen) { const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex!); // TODO: is the bang correct?