Fix crash when generated trainer battle levels mismatch with loaded data
This commit is contained in:
parent
9ff2d3cbfe
commit
27c09989b6
|
@ -492,6 +492,7 @@ export class GameData {
|
|||
|
||||
const battleType = sessionData.battleType || 0;
|
||||
const battle = scene.newBattle(sessionData.waveIndex, battleType, sessionData.trainer, battleType === BattleType.TRAINER ? trainerConfigs[sessionData.trainer.trainerType].isDouble : sessionData.enemyParty.length > 1);
|
||||
battle.enemyLevels = sessionData.enemyParty.map(p => p.level);
|
||||
|
||||
scene.newArena(sessionData.arena.biome, true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue