Pokemon cry in setSpeciesDetails

This commit is contained in:
Wlowscha 2025-01-16 01:12:02 +01:00
parent 3e6b804b5e
commit f69666a6b0
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -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?