WoW API: SetItemRef

Revision as of 03:47, 19 September 2008 by WoWWiki>Adys

WoW API < SetItemRef

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

WoW API < SetItemRef

Handles Links in Chat, originally just ItemLinks but now also handles PlayerLinks.

SetItemRef(link, text, button);

Parameters

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.

Returns

Returns nil

Notes

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