Fix crash when generated trainer battle levels mismatch with loaded data

This commit is contained in:
Flashfyre 2024-02-17 09:22:51 -05:00
parent 9ff2d3cbfe
commit 27c09989b6
1 changed files with 1 additions and 0 deletions

View File

@ -492,6 +492,7 @@ export class GameData {
const battleType = sessionData.battleType || 0; 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); 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); scene.newArena(sessionData.arena.biome, true);