diff --git a/src/client/js/components/inventory.js b/src/client/js/components/inventory.js index 658aa9e5..13811c3b 100644 --- a/src/client/js/components/inventory.js +++ b/src/client/js/components/inventory.js @@ -37,6 +37,7 @@ define([ rerender = ( (findItem.pos !== nItem.pos) || (findItem.eq !== nItem.eq) || + (findItem.quickSlot !== nItem.quickSlot) || (findItem.quantity !== nItem.quantity) ); } diff --git a/src/client/ui/templates/inventory/inventory.js b/src/client/ui/templates/inventory/inventory.js index 243a266b..b47af3e0 100644 --- a/src/client/ui/templates/inventory/inventory.js +++ b/src/client/ui/templates/inventory/inventory.js @@ -269,7 +269,7 @@ define([ }, quickSlot: { text: 'quickslot', - callback: this.performItemAction(this, item, 'setQuickSlot') + callback: this.performItemAction.bind(this, item, 'setQuickSlot') }, activate: { text: 'activate', @@ -312,9 +312,10 @@ define([ config.push(menuItems.learn); else if (item.type === 'mtx') config.push(menuItems.activate); - else if ((item.type === 'toy') || (item.type === 'consumable')) { + else if (item.type === 'toy' || item.type === 'consumable') { config.push(menuItems.use); - config.push(menuItems.quickSlot); + if (!item.has('quickSlot')) + config.push(menuItems.quickSlot); } else if (item.slot) { config.push(menuItems.equip); if (!item.eq) @@ -586,7 +587,7 @@ define([ if (['equip', 'setQuickSlot'].includes(action)) { cpn = 'equipment'; - if (action === 'quickSlot') { + if (action === 'setQuickSlot') { data = { itemId: item.id, slot: 0