[Bug] Add back saved loadout info (#2604)
This commit is contained in:
parent
fd08983181
commit
d2e97979bd
|
@ -2144,9 +2144,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
this.setSpeciesDetails(species, props.shiny, props.formIndex, props.female, props.variant, this.starterAbilityIndexes[starterIndex], this.starterNatures[starterIndex]);
|
||||
} else {
|
||||
const defaultDexAttr = this.scene.gameData.getSpeciesDefaultDexAttr(species, false, true);
|
||||
const defaultAbilityIndex = this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
||||
const defaultNature = this.scene.gameData.getSpeciesDefaultNature(species);
|
||||
const defaultAbilityIndex = starterAttributes?.ability ?? this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
||||
// load default nature from stater save data, if set
|
||||
const defaultNature = starterAttributes?.nature || this.scene.gameData.getSpeciesDefaultNature(species);
|
||||
props = this.scene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr);
|
||||
if (!isNaN(starterAttributes?.variant)) {
|
||||
if (props.shiny = (starterAttributes.variant >= 0)) {
|
||||
props.variant = starterAttributes.variant as Variant;
|
||||
}
|
||||
}
|
||||
props.formIndex = starterAttributes?.form ?? props.formIndex;
|
||||
props.female = starterAttributes?.female ?? props.female;
|
||||
|
||||
this.setSpeciesDetails(species, props.shiny, props.formIndex, props.female, props.variant, defaultAbilityIndex, defaultNature);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue