[Bug] fix sort by cost bug in starter select (#3294)

This commit is contained in:
Leo Kim 2024-08-02 11:46:04 +09:00 committed by GitHub
parent 5d3458b38e
commit e042dafcec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1966,6 +1966,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.starterContainer.forEach(container => {
container.setVisible(false);
container.cost = this.scene.gameData.getSpeciesStarterValue(container.species.speciesId);
// First, ensure you have the caught attributes for the species else default to bigint 0
const caughtVariants = this.scene.gameData.dexData[container.species.speciesId]?.caughtAttr || BigInt(0);