Fix crash related to moves without battle animations

pull/16/head
Flashfyre 2024-03-23 15:29:22 -04:00
parent a333f7886c
commit a3cde2df59
2 changed files with 2 additions and 1 deletions

View File

@ -560,6 +560,8 @@ function loadAnimAssets(scene: BattleScene, anims: AnimConfig[], startLoad?: boo
const backgrounds = new Set<string>();
const sounds = new Set<string>();
for (let a of anims) {
if (!a.frames?.length)
continue;
const animSounds = a.getSoundResourceNames();
for (let ms of animSounds)
sounds.add(ms);

View File

@ -6,7 +6,6 @@ import * as Utils from "../utils";
import { EGG_SEED, Egg, GachaType, getEggTierDefaultHatchWaves, getEggDescriptor, getLegendaryGachaSpeciesForTimestamp } from "../data/egg";
import { VoucherType, getVoucherTypeIcon } from "../system/voucher";
import { getPokemonSpecies } from "../data/pokemon-species";
import { Type } from "../data/type";
import { addWindow } from "./window";
import { Tutorial, handleTutorial } from "../tutorial";
import { EggTier } from "../data/enums/egg-type";