Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API GetTradePlayerItemLink
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> Returns a single value: chat-ready item link. <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> chatItemLink = GetTradePlayerItemLink(ID); == Parameters == === Arguments === <!-- List each argument, together with its type --> :(ID) :;ID : numeric - index value of the "player's" (your character) trade slots (starts at 1 and proceeds to 6. 7 may be used for the will-not-be-traded-slot.) === Returns === ;''Returns'' <!-- List each return value, together with its type --> :chatItemLink :;chatItemLink : String - a string that can be used to link items in the chat log == Example == <!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> for i = 1, 7 do chatItemLink = GetTradePlayerItemLink(i); end <!-- If it helps, include example results here, though they are not required--> ==Details== <!-- Details not appropriate for the main description can go here --> : Remember, chatItemLink(s) are different than itemLink parameters needed by many APIs. To properly extract an itemLink from a chatItemLink, here is a neat function: --[[ Function: extractItemLinkFromChatItemLink Purpose: gets an item link string from a chat item link string Note: don't ask questions, it works ]] function extractItemLinkFromChatItemLink(message) local _, _, _, _itemLink = string.find(message, "(|H(.+)|h)"); _, _, _itemLink = string.find(_itemLink, "(.-|h)"); return _itemLink; end : Here is a chatItemLink Example: |cffffffff|Hitem:3771:0:0:0|h[Wild Hog Shank]|h|r : Here is an itemLink Example: item:3771:0:0:0 ---- __NOTOC__
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)