WoW:API GameTooltip SetHyperlink: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GameTooltip SetHyperlink to API GameTooltip SetHyperlink without leaving a redirect)
 
(11 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== Syntax ==
{{widgetmethod}} __NOTOC__


SetHyperlink( itemID );
Changes the item which is displayed in the tooltip according to the passed argument.


GameTooltip:SetHyperlink("itemString" or "itemLink")




== Parameters ==
== Arguments ==
:("itemString" or "itemLink")
:;"itemString" - [[itemString]] - Representing an in-game item, enchant or spell. For instance:
:: "item:16846:0:0:0:0:0:0:0" is the link id for the "Giantstalker's Helm".
:: "enchant:23804" is the link id for "Enchant Weapon - Mighty Intellect".
:: "spell:16039" is the link id for the [[shaman]] [[talent]] "[[Convection]]".
:: "quest:8336" is the link id for the "A Fistful of Slivers" quest".
:;"itemLink" - [[itemLink]] - A clickable string of an in-game item.


=== Arguments ===
== Returns ==
 
:; nil
:; itemID : string - a string representing an ingame item, i.e. "item:16846:0:0:0" is the link id for the Giantstalker's Helm
 
=== Returns ===
 
: unknown, probably nil
 
: If you attempt to reference an item that is not in your local cache, i.e. you've never seen it before, or you attempt to reference a nonexistent item the game will disconnect you. Guessing at this, untested.
 
== Remarks ==
 
: Calling this function with the same item which is currently shown, will close the Tooltip.


== Example ==
== Example ==
GameTooltip:SetHyperlink("item:16846:0:0:0:0:0:0:0")


GameTooltip:SetHyperlink("item:16846:0:0:0");
<big>'''Result'''</big>
:This will replace the currently showing tooltip with one containing the information for the Giantstalker Helm.


=== Result ===
== Details ==
: Calling this function with the same link which is currently shown, will close the Tooltip.


:this will replace the currently showing tooltip with one containing the information for the Giantstalker Helm
: 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''.


{{template:WoW API}}
: Calling this function with an enchant id that does not exist, will give the error message "Unknown link type".

Latest revision as of 04:45, 15 August 2023

Widget API ← GameTooltip < SetHyperlink

Changes the item which is displayed in the tooltip according to the passed argument.

GameTooltip:SetHyperlink("itemString" or "itemLink")


Arguments[edit]

("itemString" or "itemLink")
"itemString" - itemString - Representing an in-game item, enchant or spell. For instance
"item:16846:0:0:0:0:0:0:0" is the link id for the "Giantstalker's Helm".
"enchant:23804" is the link id for "Enchant Weapon - Mighty Intellect".
"spell:16039" is the link id for the shaman talent "Convection".
"quest:8336" is the link id for the "A Fistful of Slivers" quest".
"itemLink" - itemLink - A clickable string of an in-game item.

Returns[edit]

nil

Example[edit]

GameTooltip:SetHyperlink("item:16846:0:0:0:0:0:0:0")

Result

This will replace the currently showing tooltip with one containing the information for the Giantstalker Helm.

Details[edit]

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".