add clear instance back
This commit is contained in:
parent
165c0b82a3
commit
6809e2016b
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user