[Bug] fix boss-segment reload persistence: (#2613)
add boss-segments to into pokemon-data & load it in EnemyPokemon constructor
This commit is contained in:
parent
29283d81a0
commit
74a7b1bb79
|
@ -3385,7 +3385,7 @@ export class EnemyPokemon extends Pokemon {
|
|||
|
||||
this.trainerSlot = trainerSlot;
|
||||
if (boss) {
|
||||
this.setBoss();
|
||||
this.setBoss(boss, dataSource?.bossSegments);
|
||||
}
|
||||
|
||||
if (Overrides.OPP_STATUS_OVERRIDE) {
|
||||
|
|
|
@ -50,6 +50,7 @@ export default class PokemonData {
|
|||
public fusionLuck: integer;
|
||||
|
||||
public boss: boolean;
|
||||
public bossSegments?: integer;
|
||||
|
||||
public summonData: PokemonSummonData;
|
||||
|
||||
|
@ -96,6 +97,7 @@ export default class PokemonData {
|
|||
|
||||
if (!forHistory) {
|
||||
this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss);
|
||||
this.bossSegments = source.bossSegments;
|
||||
}
|
||||
|
||||
if (sourcePokemon) {
|
||||
|
|
Loading…
Reference in New Issue