1. After Inspecting a player with InspectPlayer() is there an API that will return the itemString not itemLink or itemID? I want the itemString as it has all the enchant AND gem information in it.

  2. GetInventoryItemLink returns itemLink, not itemString. itemLink doesn't necessarily contain gem information for an inspected character, itemString should.

    I understand I can parse out the itemString from itemLink, but if itemLink is incorrect the the parsed itemString will be incorrect.

    When doing an Inspect() on someone how do I return the link to the item that they are wearing with gem and enchant information intact?

  3. That function should include the gem and enchant information. Are you saying it does not?

  4. correct. it shows complete info for me, but not for the unit I am inspecting. When my loop is done and all raid members have been inspected. I show missing zero gems, but everyone else shows missing ALL gems. so my socket counting is correct but the gem check for other players comes back 0-zero; hence they are missing all gems.

    I know you dont like code pasted here, what is the URL to the paste webpage? i will post my function

  5. You can certainly paste code here.. just use the "code" button in the toolbar to format it properly. Otherwise it borks things up pretty bad. You can always paste things at http://pastey.net and then link it here.

    What does the inspect window show when you walk up to someone and inspect them. If the information is available there, then it is available to you, it's just a matter of figuring out how to get it. Item strings are not often returned directly, we just get them from links. They should contain all gem information, as well.

  6. pastey link - Inspect Function

    pastey link - Gem check Function

    I have seen on the forums that when you request Get.... on someone else that there is a delay for the request because it has to contact the game server to return the values for the inspected player. Inspection of self are instant because all the data is stored locally. But, for others it queries the server for the item information specific for that target.

    Sooo, i put a function in that just cycles for the # that is passed to it. Have not tested this yet, and Im hoping there is a lua delay/pause/wait function as pausing for a loot will act different on different machines per CPU power. Plus Im not sure where to put the delay, after the Inspect(), after the GetInventoryItemInfo()...???

    What is strange for this function; without the delay mind you. The enchant check comes back fine, and is correct. Its just the gems that are not working.

  7. Pausing the way you're doing is a very very very bad thing. The user interface is single-threaded, meaning that only one thing can be happening at any given point in time. When you pause your script like that, you end up pausing the entire client for that period of time. This will not help you get your message.

    As described in the book, WoW is an event-driven programming system. If there is a delay until some information is ready, there is an event that you can use to respond to it. Also you did not answer my original question:

    When you right-click and inspect someone in the game, does it display the player's gems and enchants properly? If so, there is a way for you to do it.

    Let's start there.

  8. To answer your question, Yes, in an inspection window when i mouse over the inspected targets gear i see all information including gems.

  9. Then I would open DevTools /dtevents and initiate an inspect and see what events fire. Or you can always look at the implementation of the inspect window to see how they do it.

  10. wow, not sure i know how to do either of those, but ill see what i get.

  11. You can look at the code for the inspect window on http://wowcompares.com and you can download DevTools from http://wowinterface.com

  12. thanks for the info. Here is what Im seeing after playing around.

    wowcompares is nice and Ill use it in the future for how tos, but for this it didn't show anything of real value for inspect()

    Now with the Inspect() window I am seeing something strange or just something blizzard did to save time/bandwidth or whatever. When I open an inspect frame on someone it is populated with all of their gear. NOW, if I mouse over it real quick, the tooltip pops up, but for an instant the gem sockets are empty. A moment later they populate. So Blizzard doesn't seem to update the gear for the inspect target until you mouse over them. Yes, they show the correct texture but as for gems at least, they don't update that until a mouse over.

    Im not sure how to use devtools to debug a mouse over either, new tool for me.

  13. thanks for the info. Here is what Im seeing after playing around.

    wowcompares is nice and Ill use it in the future for how tos, but for this it didn't show anything of real value for inspect()

    Now with the Inspect() window I am seeing something strange or just something blizzard did to save time/bandwidth or whatever. When I open an inspect frame on someone it is populated with all of their gear. NOW, if I mouse over it real quick, the tooltip pops up, but for an instant the gem sockets are empty. A moment later they populate. So Blizzard doesn't seem to update the gear for the inspect target until you mouse over them. Yes, they show the correct texture but as for gems at least, they don't update that until a mouse over.

    Im not sure how to use devtools to debug a mouse over either, new tool for me.

    This means that the tooltip is loading from the server, nothing you can do about that delay. You could load a tooltip with the information and then request it.

    What you are trying to do is a really non-trivial exercise and there is no simple way to accomplish it.

  14. That is what I am currently doing, loading the item into a tooltip and then scanning the lefttext for key word, yellow, blue, red, meta.

    My first scan i scan the blank itemID not the players, this tells me how many sockets the inspected unit has.

    The API GetInventoryItemLink() returns a string "|cff9d9d9d|Hitem:7073:0:0:0:0:0:0:0|h[Broken Fang]|h|r " inside that string is "supposed" to be the gem information for the given item; 7073=itemID, enchantID, gem1,gem2,gem3, etc... so GetItemInfo() should be returning that gem information, but does not seem to. I figured since the API exists and is describe to be doing exactly what Im trying to use it for I thought it was just something that I was not doing incorrectly to return that information.

  15. I've tested this out some more, and you're completely right. When you NotifyInspect() there is no notification that you can get the right inventory link information. I will look into how other addons do this and get back to you.

  16. This addon seems to work.. not sure how:

    http://github.com/tekkub/bimbo/blob/023300d932db5d2f6696141cbef834f664a604bd/Bimbo.lua

  17. I'll take a deeper look at that addon when i get home but Im not sure if it is really accurate. The author is using GetSpellInfo((GetSpellInfo(7411))) to check if the person is an enchanter but GetSpellInfo will only work on self, it has no unit or target argument. But Ill look more into the code and see if i can find anything useful.

    There is another addon "InspectTheirGadgets" which scans for enchants and gems but it is inaccurate as well.

  18. I pulled the code out of the addon you mentioned and adopted it to mine and gave that a try. I got the same results, it doesn't find the gemming information on the inspected unit.

    So, im back to square one trying to figure this one out. Matbe its a bug, as it seems the API is not working correctly. Or that is simmply isn't waiting for the command to complete before letting the rest of the code proceed.

  19. Well, there is no "command" to complete. As I told you, the data for the unit's enchants and gems only load after they've been queried and there is no reliable way to guess this using the API. So I don't really have an answer for you, unfortunately. Perhaps you can post a feature request on the main UI forums.

  20. Just thought I'd chime back in with some more information on inspecting units for anyone else trying to do this type function.

    InspectUnit(unit) & NotifyInspect(unit) ONLY update one aspect of the inspection sheet and that is the gear. However, the gear it updates with is blank gear ID's so you will not get enchanting or gem information for a given player. You will also NOT be able to get talent information either. Not only does it not query for this information no events fire for the inspection the data is simply never requested.

    Now, that information WILL return and events WILL fire if the person you are inspecting is the target or mouse focus. That is the only way to get information on players other than yourself. Since targeting is a protected function it simply looks like party/raid inspections addons are not possible at this time.

  21. Thanks, so if you try to inspect a unit that isn't your target or focus, then the talents won't even load? Sounds weird.. but I suppose may make sense depending on their system.

  22. Correct. There are 3 tabs on the Inspection frame, gear, pvp stats and talents. If the player you are inspecting is not the target or focus then only the gear tab is populated and only with blank itemIDs. I've verified this several times with devtools and no events fire for an inspection on a non target player.

    Very frustrating that blizzard never mentioned this in their release notes unless; and i have my fingers crossed, it is a bug and will be fixed at some point.

    There is also another issue with inspections where an addon is cycling through a party or raid or two inspection function fire at the same time or close to. The events that return from blizzard do not return a unitID/GUID they simply say the event eg INSPECTTALENTSREADY. So you can't tell if the event you are getting back is for the player you inspected or something that another addon did or for the player your addon requested 2 players ago. There is a long thread on the blizzard forums on the subject with people begging blizzard to include GUID with the event that is returned.

  23. Correct. There are 3 tabs on the Inspection frame, gear, pvp stats and talents. If the player you are inspecting is not the target or focus then only the gear tab is populated and only with blank itemIDs. I've verified this several times with devtools and no events fire for an inspection on a non target player.

    Very frustrating that blizzard never mentioned this in their release notes unless; and i have my fingers crossed, it is a bug and will be fixed at some point.

    Don't.. if it's not reported it will never get fixed. Also, they don't release most information in their "release notes". That's why we document the functions here.

    There is also another issue with inspections where an addon is cycling through a party or raid or two inspection function fire at the same time or close to. The events that return from blizzard do not return a unitID/GUID they simply say the event eg INSPECTTALENTSREADY. So you can't tell if the event you are getting back is for the player you inspected or something that another addon did or for the player your addon requested 2 players ago. There is a long thread on the blizzard forums on the subject with people begging blizzard to include GUID with the event that is returned.

    Or you could hook the events that request inspection information, thus knowing how many events to expect. However you're right, if two addons are cyclicly requesting information it could get very messy. That seems rather unlikely, however.

  24. Well, 2 addons firing at the same time isn't that off base especially if you are in Dalaran where INSPECTTALENTSREADY is triggered almost non stop, but anyway, it won't work till blizzard fixes it.

    That being said, i know targeting no longer works what about focus, can you still focus someone? Gametooltip targeting still seems to work so Im going to try and see if that will allow inspection but i think its going to be mouse focus i need, but we'll see.

  25. You can't programatically "focus" on a unit, it's a protected action. You'd need to hit a button or click X times in order to do it.