add clear instance back
This commit is contained in:
parent
165c0b82a3
commit
6809e2016b
@ -120,9 +120,9 @@ function Construct(props) {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (duplicateSkill || tutorialDisableEquip) return true;
|
if (duplicateSkill || tutorialDisableEquip) return true;
|
||||||
if (itemEquip !== null) sendVboxApply(construct.id, itemEquip);
|
if (itemEquip !== null) return sendVboxApply(construct.id, itemEquip);
|
||||||
if (vboxSelected[0]) sendVboxAcceptEquip(construct.id);
|
if (vboxSelected[0]) return sendVboxAcceptEquip(construct.id);
|
||||||
if (itemUnequip.length && itemUnequip[0] !== construct.id) sendVboxUnequipApply(construct.id);
|
if (itemUnequip.length && itemUnequip[0] !== construct.id) return sendVboxUnequipApply(construct.id);
|
||||||
setItemEquip(null);
|
setItemEquip(null);
|
||||||
setItemUnequip([]);
|
setItemUnequip([]);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -190,6 +190,7 @@ function registerEvents(store) {
|
|||||||
store.dispatch(actions.setItemEquip(null));
|
store.dispatch(actions.setItemEquip(null));
|
||||||
store.dispatch(actions.setItemUnequip([]));
|
store.dispatch(actions.setItemUnequip([]));
|
||||||
store.dispatch(actions.setVboxHighlight([]));
|
store.dispatch(actions.setVboxHighlight([]));
|
||||||
|
store.dispatch(actions.setVboxSelected([]));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAccountInstances(v) {
|
function setAccountInstances(v) {
|
||||||
|
|||||||
@ -79,34 +79,42 @@ function createSocket(events) {
|
|||||||
|
|
||||||
function sendVboxAccept(instanceId, group, index) {
|
function sendVboxAccept(instanceId, group, index) {
|
||||||
send(['VboxAccept', { instance_id: instanceId, group, index }]);
|
send(['VboxAccept', { instance_id: instanceId, group, index }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxAcceptEquip(instanceId, group, index, constructId) {
|
function sendVboxAcceptEquip(instanceId, group, index, constructId) {
|
||||||
send(['VboxAcceptEquip', { instance_id: instanceId, group, index, construct_id: constructId }]);
|
send(['VboxAcceptEquip', { instance_id: instanceId, group, index, construct_id: constructId }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxApply(instanceId, constructId, index) {
|
function sendVboxApply(instanceId, constructId, index) {
|
||||||
send(['VboxApply', { instance_id: instanceId, construct_id: constructId, index }]);
|
send(['VboxApply', { instance_id: instanceId, construct_id: constructId, index }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxUnequip(instanceId, constructId, target) {
|
function sendVboxUnequip(instanceId, constructId, target) {
|
||||||
send(['VboxUnequip', { instance_id: instanceId, construct_id: constructId, target }]);
|
send(['VboxUnequip', { instance_id: instanceId, construct_id: constructId, target }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxUnequipApply(instanceId, constructId, target, targetConstructId) {
|
function sendVboxUnequipApply(instanceId, constructId, target, targetConstructId) {
|
||||||
send(['VboxUnequipApply', { instance_id: instanceId, construct_id: constructId, target, target_construct_id: targetConstructId }]);
|
send(['VboxUnequipApply', { instance_id: instanceId, construct_id: constructId, target, target_construct_id: targetConstructId }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxDiscard(instanceId) {
|
function sendVboxDiscard(instanceId) {
|
||||||
send(['VboxDiscard', { instance_id: instanceId }]);
|
send(['VboxDiscard', { instance_id: instanceId }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxCombine(instanceId, indices) {
|
function sendVboxCombine(instanceId, indices) {
|
||||||
send(['VboxCombine', { instance_id: instanceId, indices }]);
|
send(['VboxCombine', { instance_id: instanceId, indices }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxReclaim(instanceId, index) {
|
function sendVboxReclaim(instanceId, index) {
|
||||||
send(['VboxReclaim', { instance_id: instanceId, index }]);
|
send(['VboxReclaim', { instance_id: instanceId, index }]);
|
||||||
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendItemInfo() {
|
function sendItemInfo() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user