GameTooltip:SetHyperlink

From Warcraft Wiki
Jump to navigation Jump to search

Changes the tooltip to display the linked object.

GameTooltip:SetHyperlink("linkString")

Arguments

linkString
string - Either a full in-game link string (including color codes and |H escape sequences), or merely a fragment of the link portion (e.g. "item:16846").

Details

  • Supported link types are: achievement, conduit, currency, instancelock, item, keystone, mawpower, quest, spell, talent, unit
    • Other link types may be supported in the future, so take this list with a grain of salt.
    • The link type "unit" apparently is not working with all GUID unit types. "Creature" is working. "GameObject" is not.
  • Calling this function with the same link which is currently shown, will close the Tooltip.
  • If you attempt to reference an item that is not in your local cache, i.e. you've never seen it before, the client will query the server for information about that item. Since patch 2.2.3, querying item information for an itemID which has not been seen on your server since last restart will no longer result in a disconnect.
  • Calling this function with an enchant id that does not exist, will give the error message "Unknown link type".
Dragonflight Getter C_TooltipInfo.GetHyperlink

Example

Replaces the currently showing tooltip with one containing the information for the Giantstalker Helm.

GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
GameTooltip:SetHyperlink("item:16846:0:0:0:0:0:0:0")
GameTooltip:Show()