From e95d559edd7782331e57465a136bdac2f970d464 Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 21 Jul 2019 20:38:01 +1000 Subject: [PATCH] wht --- client/src/components/instance.constructs.jsx | 17 ++++++++--------- client/src/keyboard.jsx | 2 ++ server/src/instance.rs | 8 +++++++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index 5f92db4c..22b62b63 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -81,15 +81,10 @@ function Construct(props) { sendUnequip, } = props; - const fullInfo = itemInfo.items.find(i => i.item === itemEquip); - const isSkill = fullInfo && fullInfo.skill; - const isSpec = fullInfo && fullInfo.spec; - const equipping = itemEquip && (isSkill || isSpec); - function onClick(e) { e.stopPropagation(); e.preventDefault(); - if (equipping) sendVboxApply(construct.id, itemEquip); + if (itemEquip !== null) sendVboxApply(construct.id, itemEquip); setItemEquip(null); return setActiveConstruct(construct); } @@ -128,11 +123,13 @@ function Construct(props) { return true; } - const classes = `${equipping ? 'equipping' : ''}`; + // const action = skill ? '' : 'action'; + const equip = skillList.includes(vbox.bound[itemEquip]) && !skill ? 'equipping' : ''; + const classes = `${equip}`; return (