WoW:API SetItemRef: Difference between revisions

mNo edit summary
m (Move page script moved page API SetItemRef to API SetItemRef without leaving a redirect)
 
(10 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<center>'''SetItemRef''' ''-Documentation by [[user:Deathshadow|Deathshadow]]-''</center>
{{framexmlfunc|FrameXML/ItemRef.lua}}
Called to handle clicks on Blizzard hyperlinks in chat.
SetItemRef(link, text, button);


Displays an item information box from a specified link.
== Arguments ==
;link : String - Link to Use, (eg 'item:3577:0:0:0:0:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
;text : String - The Text of the link, including Text Colour Infomation and itemlinks (eg The previous two examples :
::'|cff1eff00|Hitem:3577:0:0:0:0:0:0:276308480|h[Gold Bar]|h|r'
::'|Hplayer:Kaso|h[Kaso]|h'
;button : String - The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes.


SetItemRef(itemLink);
== Notes ==
* Do not insecurely hook this function to add your own link types; hook {{api|ChatFrame_OnHyperlinkShow}}(frame, link, text, button) instead. Hooking this function insecurely will end up tainting Blizzard's combat log, which will taint UIParent's update routines and result in "action has been blocked" messages.
* This function is affected by Shift and Ctrl keys, and depends on what is being clicked, according to the below table:


== Parameters ==
{| style="margin-left: 3em;"
=== Arguments ===
|- cellpadding=2
:itemLink
||
:;itemLink : String - itemLink is the item id (eg 'item:3577:0:0:276308480' is a [Gold Bar]).
|style="padding-right:2em;" rowspan=9 |
 
|style="padding-right:1em; border-left: 1px solid;" rowspan=9 |
=== Returns ===
|colspan=4 align=center| Ctrl Key
:;''Returns nil''
|style="padding-right:2em;" rowspan=9 |
 
|style="padding-right:1em; border-left: 1px solid;" rowspan=9 |
<br><center><i>Last updated: Patch 1.6.1</i></center>
|colspan=4 align=center| Shift Key
----
|style="padding-right:2em;" rowspan=9 |
__NOTOC__
|style="padding-right:1em; border-left: 1px solid;" rowspan=9 |
{{Template:WoW API}}
|colspan=4 align=center| No modifier
[[Category:API Functions|SetItemRef]]
|style="padding-right:2em;" rowspan=9 |
[[Category:API Item Functions|SetItemRef]]
|-
||
|| Left Button
|style="padding-right:1em;" rowspan=8 |
|style="padding-right:1em; border-left: 1px dotted;" rowspan=8 |
|| Right Button
|| Left Button
|style="padding-right:1em;" rowspan=8 |
|style="padding-right:1em; border-left: 1px dotted;" rowspan=8 |
|| Right Button
|| Left Button
|style="padding-right:1em;" rowspan=8 |
|style="padding-right:1em; border-left: 1px dotted;" rowspan=8 |
|| Right Button
|-
|colspan=20 style="border-top: 1px solid; padding-bottom: 1ex;"|
|-
||Player Link: || -      || -      || /who player  || /who player  || Open Tell    || Dropdown menu
|-
||Item Link:   || Dressup || Dressup || Link in chat || Link in chat || Show tooltip || Show tooltip
|}

Latest revision as of 04:47, 15 August 2023

WoW API < SetItemRef

"I" iconThis function is implemented in Lua here FrameXML/ItemRef.lua.

Called to handle clicks on Blizzard hyperlinks in chat.

SetItemRef(link, text, button);

Arguments

link
String - Link to Use, (eg 'item:3577:0:0:0:0:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
text
String - The Text of the link, including Text Colour Infomation and itemlinks (eg The previous two examples :
'|cff1eff00|Hitem:3577:0:0:0:0:0:0:276308480|h[Gold Bar]|h|r'
'|Hplayer:Kaso|h[Kaso]|h'
button
String - The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes.

Notes

  • Do not insecurely hook this function to add your own link types; hook ChatFrame_OnHyperlinkShow(frame, link, text, button) instead. Hooking this function insecurely will end up tainting Blizzard's combat log, which will taint UIParent's update routines and result in "action has been blocked" messages.
  • This function is affected by Shift and Ctrl keys, and depends on what is being clicked, according to the below table:
Ctrl Key Shift Key No modifier
Left Button Right Button Left Button Right Button Left Button Right Button
Player Link: - - /who player /who player Open Tell Dropdown menu
Item Link: Dressup Dressup Link in chat Link in chat Show tooltip Show tooltip