Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the gem for a socketed equipment item.
itemName, itemLink = GetItemGem(item, index)
Arguments[]
- item
- string - The name of the equipment item (the item must be equipped or in your inventory for this to work) or the ItemLink
- index
- number - The index of the desired gem: 1, 2, or 3
Returns[]
- itemName
- string - The name of the gem at the specified index.
- itemLink
- string : ItemLink
Details[]
- Using the name may be ambiguous if you have more than one of the named item.
Example[]
Prints the 2nd gem socketed in this item.
local link = "|cff0070dd|Hitem:87451:::41438:::::53:257:::1:6658:2:9:35:28:1035:::|h[Helm of Elemental Binding]|h|r"
print(GetItemGem(link, 2)) -- "Perfect Brilliant Bloodstone", "|cff1eff00|Hitem:41438::::::::53:257:::::::|h[Perfect Brilliant Bloodstone]|h|r"
Patch changes[]
Patch 2.1.0 (2007-05-22): Added.