Fandom

WoWWiki

API GetSocketItemInfo

104,672pages on
this wiki
Add New Page
Talk0 Share
WoW API < GetSocketItemInfo

Returns various information about the inventory item currently being socketed (i.e. socket UI is open for the item).


itemName, iconPathName, itemQuality = GetSocketItemInfo()

Returns Edit

itemName, iconPathName, itemQuality
itemName
String - Localized name of the item currently being socketed, or nil if the socketing UI is not open.
iconPathName
String - Virtual path name (i.e. Interface\Icons\inv_belt_52) for the icon displayed in the character window (PaperDollFrame) for this item, or nil if the socketing UI is not open.
itemQuality
Integer - 0) Socketing UI not currently open, 1) Common [white], 2) Uncommon [green], 3) Rare [blue], 4) Epic [purple], etc. (the colors correlate to the color of the font used by the game when it draws the item's name.


Example Edit

-- from Blizzard_ItemSocketingUI.lua

 local name, icon, quality = GetSocketItemInfo();
 local sname, sicon, squality = tostring(name), tostring(icon), tostring(quality)
 print("name:" .. sname .. "  icon:" .. sicon .. "  quality:" .. squality)

ResultEdit

Simple print statement displaying the values returned. In this example, I used Merlin's Robe (item id:47604):

name:Merlin's Robe icon:Interface\Icons\INV_Chest_Cloth_64 quality:4

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki