diff --git a/website/client/libs/spellQueue.js b/website/client/libs/spellQueue.js deleted file mode 100644 index 3fa82c0f97..0000000000 --- a/website/client/libs/spellQueue.js +++ /dev/null @@ -1,40 +0,0 @@ -let store = {}; - -let currentCount = 1; -let currentSpell = { - key: '', -}; -let timer = null; - -// @TODO: We are using this lib in actions, so we have to inject store -function setStore (storeInc) { - store = storeInc; -} - -function castSpell () { - clearTimeout(timer); - - currentSpell.quantity = currentCount; - store.dispatch('user:castSpell', currentSpell); - - currentCount = 0; -} - -function queue (spell, storeInc) { - setStore(storeInc); - - currentCount += 1; - - if (currentSpell.key && spell.key !== currentSpell.key) { - castSpell(); - } - - currentSpell = spell; - - clearTimeout(timer); - timer = setTimeout(() => { - castSpell(); - }, 1500); -} - -export default { queue }; diff --git a/website/client/store/actions/user.js b/website/client/store/actions/user.js index 7c44d90e7e..4edea0983a 100644 --- a/website/client/store/actions/user.js +++ b/website/client/store/actions/user.js @@ -1,5 +1,4 @@ import { loadAsyncResource } from 'client/libs/asyncResource'; -import spellQueue from 'client/libs/spellQueue'; import setProps from 'lodash/set'; import axios from 'axios'; @@ -118,11 +117,6 @@ export async function movePinnedItem (store, params) { } export function castSpell (store, params) { - if (params.pinType !== 'card' && !params.quantity) { - spellQueue.queue({key: params.key, targetId: params.targetId}, store); - return; - } - let spellUrl = `/api/v3/user/class/cast/${params.key}`; const data = {};