WoW:API SetItemRef: Difference between revisions

m
Move page script moved page API SetItemRef to WoW:API SetItemRef without leaving a redirect
m (catfix, Replaced: {{framexml → <br>{{framexml)
m (Move page script moved page API SetItemRef to WoW:API SetItemRef without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<br>{{framexml}}
{{framexmlfunc|FrameXML/ItemRef.lua}}
 
Called to handle clicks on Blizzard hyperlinks in chat.
Handles Links in Chat, originally just [[ItemLink]]s but now also handles PlayerLinks.
  SetItemRef(link, text, button);
  SetItemRef(link, text, button);


== Parameters ==
== Arguments ==
=== Arguments ===
;link : String - Link to Use, (eg 'item:3577:0:0:0:0:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
:;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 :  
:;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'
:::'|cff1eff00|Hitem:3577:0:0:0:0:0:0:276308480|h[Gold Bar]|h|r'
::'|Hplayer:Kaso|h[Kaso]|h'
:::'|Hplayer:Kaso|h[Kaso]|h'
;button : String - The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes.
 
:;button : String - The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes.
 
=== Returns ===
:;''Returns nil''


== Notes ==
== Notes ==
:This function is affected by Shift and Ctrl keys, and depends on what is being clicked, according to the below table:
* 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:


{| style="margin-left: 3em;"
{| style="margin-left: 3em;"
Line 53: Line 48:
||Item Link:  || Dressup || Dressup || Link in chat || Link in chat || Show tooltip || Show tooltip
||Item Link:  || Dressup || Dressup || Link in chat || Link in chat || Show tooltip || Show tooltip
|}
|}
<br><center>''Last updated: Patch 1.10.1''</center>
__NOTOC__
Anonymous user