Fandom

WoWWiki

API GetGlyphSocketInfo

104,633pages on
this wiki
Add New Page
Talk0 Share

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.

WoW API < GetGlyphSocketInfo

Returns information on a glyph socket.

enabled, glyphType, glyphTooltipIndex, glyphSpellID, icon = GetGlyphSocketInfo(socketID[, talentGroup]);

ArgumentsEdit

socketID 
Number - glyph [Glyph SocketID|socket index]] (1 to GetNumGlyphSockets() )
talentGroup 
Optional Number - (dual) specialization index (1 to GetNumTalentGroups(...)).

Returns Edit

enabled
Boolean - 1 if available, nil if locked.
glyphType 
Number - GLYPHTYPE_PRIME (0), GLYPHTYPE_MAJOR (1), or GLYPHTYPE_MINOR (2)
glyphTooltipIndex 
Number - Index to be used with GLYPH_SLOT_TOOLTIP#
glyphSpellID 
Number - spell ID of socketted glyph, nil if no glyph is socketed.
icon 
String - Glyph rune texture path.

Examples Edit

The following code scans all the glyph sockets and prints out the status of each one.

for i = 1, NUM_GLYPH_SLOTS do
 local enabled, glyphType, glyphTooltipIndex, glyphSpellID, icon = GetGlyphSocketInfo(i);
 if ( enabled ) then
  local link = GetGlyphLink(i);-- Retrieves the Glyph's link ("" if no glyph in Socket);
  if ( link ~= "") then
   DEFAULT_CHAT_FRAME:AddMessage("Glyph Socket "..i.." contains "..link);
  else
   DEFAULT_CHAT_FRAME:AddMessage("Glyph Socket "..i.." is unlocked and empty!");
  end
 else
  DEFAULT_CHAT_FRAME:AddMessage("Glyph Socket "..i.." is locked!");
 end
end

Notes Edit

  • GetSpellInfo can be used to translate glyphSpellID to a glyph name.
  • The talentGroup argument was added in Patch 3.1.
  • The glyphTooltipIndex argument was added in Patch 4.0.1.

Also on Fandom

Random Wiki