How to get item id's of equipped items menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get item id's of equipped items

    As the title suggests,

    I'm looking for a way to retrieve the item id's of the inventory (the equipped items) of friendly and hostile players alike.

    The item id's stored in the descriptors are those of the visible items, now used by transmogrification - useless to what I have in mind.

    API GetInventoryItemID - WoWWiki - Your guide to the World of Warcraft retrieves the item id of the visible item if queried on anything but the active player, otherwise it returns the actual item.
    API NotifyInspect - WoWWiki - Your guide to the World of Warcraft will raise INSPECT_READY but not UNIT_INVENTORY_CHANGED (item id's stay the same)

    Any thoughts?
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

    How to get item id's of equipped items
  2. #2
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Solved.

    First, issue a API NotifyInspect - WoWWiki - Your guide to the World of Warcraft
    Once you've recieved INSPECT_READY you can do the following

    GetItemInfo(GetInventoryItemLink(unit, i)) will return the actual item
    GetItemInfo(GetInventoryItemId(unit, i)) will return the visible item

    Item id's of the last inspected player are at [dword_106B5A0 + 96 * slot + 8 + 8] (some method in Script_GetInventoryItemLink) (build 16357)
    Last edited by Robske; 01-27-2013 at 05:50 PM.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  3. #3
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good to know, I always tought it was available from player fields for every players.

  4. #4
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's far more annoying (to handle in a clean way) than I expected...

    NotifyInspect(target) is throttled by the server and must be done sequentially
    it raises the INSPECT_READY event, at this point the item id's are available

    GetItemInfo(id) may also cause a server request but can be done in parallel
    it raises the GET_ITEM_INFO_RECEIVED event, at this point one of the item's data is available

    example:
    NotifyInspect( guid )
    wait
    INSPECT_READY
    GetItemInfo( id ) times 19
    wait
    GET_ITEM_INFO_RECEIVED times 19 (one for each GetItemInfo call that returned nil)
    next

    The joy of async ~~
    Last edited by Robske; 01-27-2013 at 08:39 PM.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  5. #5
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can only pull the display IDs from the descriptors (basically)

    To get the actual items equipped, you do need to run through the whole inspection process, which is slow, and as you noted, throttled.

  6. #6
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And of course... you can't inspect hostile players...
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

Similar Threads

  1. [Gold] How to get items for Transmogrification
    By Vilesting in forum World of Warcraft Guides
    Replies: 1
    Last Post: 02-02-2012, 07:52 PM
  2. How to get items sold for badges
    By MegaNerd in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 02-06-2008, 10:34 PM
  3. How to get ITEMs with your low alt, by fighting with your high main!!
    By 41p32 in forum World of Warcraft Exploits
    Replies: 15
    Last Post: 12-25-2007, 04:44 AM
  4. How to get item ID's
    By Awesomesauce231 in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 10-06-2007, 05:14 PM
All times are GMT -5. The time now is 09:49 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search