View Single Post
07/09/17, 08:28 AM   #3
ivanwfr
Join Date: Apr 2014
Posts: 9
Originally Posted by sirinsidiator View Post

Items are not abilities, so instead you need to use
Code:
SelectSlotItem *protected* (*integer* _bagId_, *integer* _bagSlotId_, *luaindex* _slotIndex_)
Thanks! That was what I was looking for! Not sure why I could not put my finger on it by myself...

The quickslot indices ...
...this is a non-issue as it had nothing to do with the real code, the idea was only about clearing and selecting some items-preset.

The only remaining issue is about this call with the slotId of an Item not currently available from the BAG_BACKPACK.
Code:
CallSecureProtected("SelectSlotItem", BAG_BACKPACK, slotId, slotIndex)
I was expecting it would be possible to get the Black and white texture we have when the item stack count is zero.

Instead, this call ends up with a warning message about how I can't slot an Item I don't currently have in my bag. (as if I were drag-and-dropping an Item coming from nowhere)
- Currently, the addon UI displays the texture saved the last time this Item was slotted.
- But the Quick Slot Bar ring entries remain empty.
- As soon as a missing Item appears to be available again to the ACTION_SLOT_UPDATED handler, the equip call can fill the hole.

Here is my pre-release Change log with a working solution thanks to your qualified advice:
Greymind Quick Slot Bar comments
  Reply With Quote