[Bug] fix not changing moveset after add to starter #1932 (#2396)

This commit is contained in:
gjeodnd12165 2024-07-23 00:25:55 +09:00 committed by GitHub
parent b6266c6da1
commit 21940e6426
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -1715,6 +1715,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.scene.gameData.starterData[speciesId].moveset = this.starterMoveset.slice(0) as StarterMoveset;
}
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, undefined, false);
// switch moves of starter if exists
if (this.starterMovesets.length) {
Array.from({ length: this.starterGens.length }, (_, i) => {
const starterSpecies = this.genSpecies[this.starterGens[i]][this.starterCursors[i]];
if (starterSpecies.speciesId === speciesId) {
this.starterMovesets[i] = this.starterMoveset;
}
});
}
}
updateButtonIcon(iconSetting, gamepadType, iconElement, controlLabel): void {