Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(Clarified the differences between what you two are saying. You're both right.)
m (catfix, Replaced: {{widgetmethod}}<br> → {{widgetmethod}})
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{widgetmethod}}
+
{{widgetmethod}} __NOTOC__
   
  +
Changes the item which is displayed in the tooltip according to the passed argument.
== Syntax ==
 
   
SetHyperlink(frame, link);
+
GameTooltip:SetHyperlink("itemString" or "itemLink")
   
-or-
 
 
frame:SetHyperlink(link);
 
   
 
== 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.
   
 
== Returns ==
 
:; nil
   
== Parameters ==
+
== Example ==
 
GameTooltip:SetHyperlink("item:16846:0:0:0:0:0:0:0")
   
  +
<big>'''Result'''</big>
=== Arguments ===
 
 
:This will replace the currently showing tooltip with one containing the information for the Giantstalker Helm.
 
:; frame : frame object, of which the hyperlink should be set
 
:; link : [[itemString]] - a string representing an ingame item or enchant. 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".
 
:: or [[itemLink]] - a clickable string of an ingame item.
 
 
=== Returns ===
 
 
: nil
 
 
== Remarks ==
 
 
: Calling this function with a non-table variable as first argument, will do nothing.
 
   
 
== Details ==
 
: Calling this function with the same link which is currently shown, will close the Tooltip.
 
: 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. If that particular item has not been seen since last server restart, the server will disconnect the client.
+
: 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".
 
: Calling this function with an enchant id that does not exist, will give the error message "Unknown link type".
 
== Example ==
 
 
GameTooltip.SetHyperlink(ItemRefTooltip, "item:16846:0:0:0:0:0:0:0");
 
 
-or-
 
 
ItemRefTooltip: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.
 

Revision as of 23:55, 14 July 2008

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

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


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 "Spell fire lavaspawn [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

nil

Example

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

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