Thread Tools Display Modes
02/22/21, 11:10 AM   #1
mamol27
Join Date: Feb 2021
Posts: 4
Get equipped item id

Hi!
Is there a way to get itemId from equipped like https://wiki.esoui.com/GetItemId
Thank you.
  Reply With Quote
02/22/21, 12:17 PM   #2
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 312
have a look at this function: ZO_Inventory_EnumerateEquipSlots or/and ZO_Character_EnumerateOrderedEquipSlots

Last edited by Scootworks : 02/22/21 at 12:44 PM.
  Reply With Quote
02/22/21, 12:37 PM   #3
mamol27
Join Date: Feb 2021
Posts: 4
Sorry, I'm new here. Where can I read specs about this function?
  Reply With Quote
02/22/21, 03:56 PM   #4
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Iterating over the BAG_WORN and doing something like GetItemLinkItemId(GetItemLink(BAG_WORN, <index>)) would also probably be fine.
  Reply With Quote
02/23/21, 02:52 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Originally Posted by mamol27 View Post
Sorry, I'm new here. Where can I read specs about this function?
Search for it in the esoui source code and check how ZOs uses i does the trick most of the time:
https://github.com/esoui/esoui/searc...eredEquipSlots

The eso inventories are using a bagId for the inventory bagTyp like BAG_BAGPACK, BAG_BANK, BAG_WORN (these are constants just providing a name to a number. BAG_WORN = 0 e.g.).
The function ZO_Character_EnumerateOrderedEquipSlots should do the same like Ryhono said. Iterates over the equipmentslots
(where equipmentslot's slotId is one of the following ones:
https://github.com/esoui/esoui/blob/...ntory.lua#L791
)
.
The itemLink functions use the bagId and the equipSlotId then to create the itemLink for the equipped item.

GetItemLinkItemId provides the itemId from the itemLink created than.

In normal inventory this would be GetItemLink(BAG_BAGPACK, slotIndexOfTheInventoryItem).

Last edited by Baertram : 02/23/21 at 02:56 AM.
  Reply With Quote
02/23/21, 05:53 AM   #6
mamol27
Join Date: Feb 2021
Posts: 4
Originally Posted by Rhyono View Post
Iterating over the BAG_WORN and doing something like GetItemLinkItemId(GetItemLink(BAG_WORN, <index>)) would also probably be fine.
Thanks! It works as I needed.

Last edited by mamol27 : 02/23/21 at 06:14 AM.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » Get equipped item id

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off