I am looking to see if there is a library already written before I embark on writing something myself that will parse a tooltip for Gem information or perhaps a generic tooltip parsing library.
I want to be able at the end of the day to create a routine that given an itemID it will return a list of itemIDs of gems socketed in that item. In order for me to write such a thing being able to parse the tooltip efficiently is required, unless of course someone can tell me a API call to return gems socketed.
Can anyone assist with either a library suggestion, an API call, or posting the suggestion above in the UI & Macros US forums. Would be great if Slouken agreed it was a useful API call and added it for patch 2.4.
You may check my addon WoWEquip for a simple function that does this.
WoWEquip_ScanSockets()
will store in a socket[] table how many of each color socket there is on an item. WoW itself offers a function that returns you the itemlinks of the socketted gems if there are any.
name, itemlink = GetItemGem("name"|"itemlink", index)
-- Takes an item with a gem in it, and an index from 1-3, and returns the name and link for the gem at that index. Note that using the name may be ambiguous if you have more than one of the named item.
Can anyone assist with either a library suggestion, an API call, or posting the suggestion above in the UI & Macros US forums. Would be great if Slouken agreed it was a useful API call and added it for patch 2.4.
I'm pretty sure it has been asked several times before and has been declined. So we have GetItemInfo and a few other functions to get some basic information. For everything else you need either tooltip-parsing or an "imported database" like PeriodicTable, ItemPrice, etc.
I suppose part of the reason they decline such requests is that not all information is available on the client and would therefor need to be fetched from the server. Another reason may be that they don't want to support "data mining" directly - a somewhat moot point after the introduction of the Armory website making a wealth of item information available to everyone.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want to be able at the end of the day to create a routine that given an itemID it will return a list of itemIDs of gems socketed in that item. In order for me to write such a thing being able to parse the tooltip efficiently is required, unless of course someone can tell me a API call to return gems socketed.
Its actually something that could be suggested to Slouken on the US forums http://forums.worldofwarcraft.com/board.html?forumId=11114&sid=1 however I don't have a US account. Something like :
socketCount, socket1Colour, socket1ItemID, socket2Colour, socket2ItemID, socket3Colour, socket3ItemID = getSocketedGemInfo(itemID);
Can anyone assist with either a library suggestion, an API call, or posting the suggestion above in the UI & Macros US forums. Would be great if Slouken agreed it was a useful API call and added it for patch 2.4.
WoWEquip_ScanSockets()
will store in a socket[] table how many of each color socket there is on an item. WoW itself offers a function that returns you the itemlinks of the socketted gems if there are any.
name, itemlink = GetItemGem("name"|"itemlink", index)
-- Takes an item with a gem in it, and an index from 1-3, and returns the name and link for the gem at that index. Note that using the name may be ambiguous if you have more than one of the named item.
I'm pretty sure it has been asked several times before and has been declined. So we have GetItemInfo and a few other functions to get some basic information. For everything else you need either tooltip-parsing or an "imported database" like PeriodicTable, ItemPrice, etc.
I suppose part of the reason they decline such requests is that not all information is available on the client and would therefor need to be fetched from the server. Another reason may be that they don't want to support "data mining" directly - a somewhat moot point after the introduction of the Armory website making a wealth of item information available to everyone.