Fix summon data not being loaded in on session load
This commit is contained in:
1 parent
93a7af853b
commit
efa8d4f3fc
2 files changed
+19
-3
No files matched your search
@@ -107,8 +107,11 @@ export default class PokemonData {
|
||||
|
||||
toPokemon(scene: BattleScene, battleType?: BattleType, partyMemberIndex: integer = 0, double: boolean = false): Pokemon {
|
||||
const species = getPokemonSpecies(this.species);
|
||||
if (this.player)
|
||||
return scene.addPlayerPokemon(species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.ivs, this.nature, this);
|
||||
return scene.addEnemyPokemon(species, this.level, battleType === BattleType.TRAINER ? !double || !(partyMemberIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER : TrainerSlot.NONE, this.boss, this);
|
||||
const ret: Pokemon = this.player
|
||||
? scene.addPlayerPokemon(species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.ivs, this.nature, this)
|
||||
: scene.addEnemyPokemon(species, this.level, battleType === BattleType.TRAINER ? !double || !(partyMemberIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER : TrainerSlot.NONE, this.boss, this);
|
||||
if (this.summonData)
|
||||
ret.primeSummonData(this.summonData);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user