diff --git a/app/react/components/ui.jsx b/app/react/components/ui.jsx index 263003b..e3bcfba 100644 --- a/app/react/components/ui.jsx +++ b/app/react/components/ui.jsx @@ -272,7 +272,12 @@ function Ui({disconnected}) { const item = entity.Inventory.item(i); newHotbarSlots.push( item - ? {icon: item.icon, qty: item.qty} + ? { + icon: item.icon, + label: item.label, + price: item.price, + qty: item.qty, + } : undefined, ); } @@ -580,6 +585,8 @@ function Ui({disconnected}) { type: 'Action', payload: {type: 'acceptTrade', value: {gaining, losing}}, }); + setGaining([]); + setLosing([]); }, [client, gaining, losing]); useEffect(() => { if (!pixiRef.current) { @@ -623,7 +630,7 @@ function Ui({disconnected}) { where, ); } - else { + else if (!isInventoryOpen) { client.send({ type: 'Action', payload: {type: 'use', value: [1, where]},