diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index b69e69bd..9aa57ffc 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -120,9 +120,9 @@ function Construct(props) { e.stopPropagation(); e.preventDefault(); if (duplicateSkill || tutorialDisableEquip) return true; - if (itemEquip !== null) sendVboxApply(construct.id, itemEquip); - if (vboxSelected[0]) sendVboxAcceptEquip(construct.id); - if (itemUnequip.length && itemUnequip[0] !== construct.id) sendVboxUnequipApply(construct.id); + if (itemEquip !== null) return sendVboxApply(construct.id, itemEquip); + if (vboxSelected[0]) return sendVboxAcceptEquip(construct.id); + if (itemUnequip.length && itemUnequip[0] !== construct.id) return sendVboxUnequipApply(construct.id); setItemEquip(null); setItemUnequip([]); return true; diff --git a/client/src/events.jsx b/client/src/events.jsx index 5515ddba..c295e0e5 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -190,6 +190,7 @@ function registerEvents(store) { store.dispatch(actions.setItemEquip(null)); store.dispatch(actions.setItemUnequip([])); store.dispatch(actions.setVboxHighlight([])); + store.dispatch(actions.setVboxSelected([])); } function setAccountInstances(v) { diff --git a/client/src/socket.jsx b/client/src/socket.jsx index af3ece81..b89bc187 100644 --- a/client/src/socket.jsx +++ b/client/src/socket.jsx @@ -79,34 +79,42 @@ function createSocket(events) { function sendVboxAccept(instanceId, group, index) { send(['VboxAccept', { instance_id: instanceId, group, index }]); + events.clearInstance(); } function sendVboxAcceptEquip(instanceId, group, index, constructId) { send(['VboxAcceptEquip', { instance_id: instanceId, group, index, construct_id: constructId }]); + events.clearInstance(); } function sendVboxApply(instanceId, constructId, index) { send(['VboxApply', { instance_id: instanceId, construct_id: constructId, index }]); + events.clearInstance(); } function sendVboxUnequip(instanceId, constructId, target) { send(['VboxUnequip', { instance_id: instanceId, construct_id: constructId, target }]); + events.clearInstance(); } function sendVboxUnequipApply(instanceId, constructId, target, targetConstructId) { send(['VboxUnequipApply', { instance_id: instanceId, construct_id: constructId, target, target_construct_id: targetConstructId }]); + events.clearInstance(); } function sendVboxDiscard(instanceId) { send(['VboxDiscard', { instance_id: instanceId }]); + events.clearInstance(); } function sendVboxCombine(instanceId, indices) { send(['VboxCombine', { instance_id: instanceId, indices }]); + events.clearInstance(); } function sendVboxReclaim(instanceId, index) { send(['VboxReclaim', { instance_id: instanceId, index }]); + events.clearInstance(); } function sendItemInfo() {