I am trying to build a mapping from a gem to an enchant id that is used in an item link. For example, if I have the Shifting Nightseye gem (with an item id of 24055) this produces an enchant id in an ilink of 2739. wowwiki has a list of the valid enchant ids, but not all of them are valid gem enchants. If you put an invalid id in the gem enchant slot in the ilink, the enchant text will show up, but the gem icon won't. This icon appearing seems to be the only way that I can figure out if this is a valid gem effect.
Is there some way that I can programmatically detect if this icon is there, or is there an easier way to do this that I am missing?
Use an addon like GemHelper or Sniff out all the ones you can find on wowhead to get all known gems into your local cache, and make sure that barbaric Legstraps are cached locally, then run this code to make a table holding enchantIDs indexed by the itemID of their corresponding Gem.
itemIDtoEnchantID = {}
local itemLink = "|cff0070dd|Hitem:27773:0:%d:0:0:0:0:0|h[Barbaric Legstraps]|h|r"
for enchantID=1,4000 do
local gem1Link = select(2, GetItemGem(itemLink:format(enchantID), 1) )
if gem1Link then
local itemID = gem1Link:match("item:(%d+):")
itemIDtoEnchantID[tonumber(itemID)] = enchantID
end
end
Hi Siz, I am the author of both GemHelper and WoWEquip and will be trying out your method to get all the EnchantIDs for the various gems to include in WoWEquip. :D
Unfortunately that code isn't very useful for finding new gems. It will only find items which you have already seen.
I have an excel spreadsheet that I've lazily maintained for JewelTips which includes most known gems including bogus ones like [Red Bryanite of Strength stuff] (id = 23234, enchantid = 2686) It also includes permanent enchant items like armor kits and some regular enchants too.
Siz, you may use the enchantID numbers in WoWEquip (found in the localization file). Have every enchant except about 10 or so, as well as every gem except the Unstable series and the new gems in patch 2.2
I've always thought that this might be a good idea for a library; something to simply translate enchantIDs into their corresponding enchant/item, or the reverse.
I updated the excel file with 2.2 gems starting at the row labeled 3206
With the arrival of 2.2 I scanned EnchantId 0 - 4000 and updated ItemValue (http://svn.wowace.com/wowace/trunk/ItemValue/Data_Jewels.lua). Includes ALL jewles (hopefully all not attainable ones commented out) with color, quality, bop and unique information.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is there some way that I can programmatically detect if this icon is there, or is there an easier way to do this that I am missing?
http://www.wowwiki.com/API_GetItemGem
Unfortunately that code isn't very useful for finding new gems. It will only find items which you have already seen.
I have an excel spreadsheet that I've lazily maintained for JewelTips which includes most known gems including bogus ones like [Red Bryanite of Strength stuff] (id = 23234, enchantid = 2686) It also includes permanent enchant items like armor kits and some regular enchants too.
It's attached.
I've always thought that this might be a good idea for a library; something to simply translate enchantIDs into their corresponding enchant/item, or the reverse.
I updated the excel file with 2.2 gems starting at the row labeled 3206