diff --git a/client/src/animations.utils.jsx b/client/src/animations.utils.jsx index 05ca0e8a..8e2818c7 100644 --- a/client/src/animations.utils.jsx +++ b/client/src/animations.utils.jsx @@ -73,21 +73,6 @@ function getObjects(resolution, game, account) { }; } -function getSequence(resolution) { - if (!resolution.event) return []; - switch (resolution.stages) { - case 'AllStages': return ['START_SKILL', 'END_SKILL', 'POST_SKILL']; - case 'StartEnd': return ['START_SKILL', 'END_SKILL']; - case 'StartPost': return ['START_SKILL', 'POST_SKILL']; - case 'StartOnly': return ['START_SKILL']; - case 'EndPost': return ['END_SKILL', 'POST_SKILL']; - case 'EndOnly': return ['END_SKILL']; - case 'PostOnly': return ['POST_SKILL']; - case 'NoStages': return []; - default: return ['START_SKILL', 'END_SKILL', 'POST_SKILL']; - } -} - function getTime(stages) { let time = 0; if (stages.includes('START_SKILL') && stages.includes('END_SKILL')) { @@ -212,7 +197,6 @@ module.exports = { getFocusTargets, getObjects, getTime, - getSequence, getText, isCbAnim, }; diff --git a/client/src/events.jsx b/client/src/events.jsx index 972ea9d0..b09cb57c 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -63,10 +63,10 @@ function registerEvents(store) { if (game.resolved.length !== currentGame.resolved.length) { store.dispatch(actions.setAnimating(true)); store.dispatch(actions.setGameSkillInfo(null)); - // stop fetching the game state til animations are done const newRes = game.resolved.slice(currentGame.resolved.length); return eachSeries(newRes, (r, cb) => { + if (!r.event) return cb; const timeout = animations.getTime(r.stages); const anims = animations.getObjects(r, game, account); const text = animations.getText(r);