Lore archive · Warcraft Wiki, 2023 dump
ItemLink/Archive
Last wiki revision 2021-08-03
itemLinks are returned by several functions, e.g. GetAuctionItemLink, GetContainerItemLink, GetInventoryItemLink, etc.
In essence, they are itemStrings with additional formatting to make in-game text controls display them as clickable hyperlinks.
|cff9d9d9d|Hitem:7073::::::::80:|h[Broken Fang]|h|r
Broken up in its components:
- – Colorizes the link with a medium grey color (hex color code)
- The first two characters after pipe-c may be the alpha level, where is fully opaque.
- The next three sets of two characters represent the red, green, and blue levels, just like HTML.
- – "Hyperlink link data starts here"
- – An informational string for the item.
- – "End of link, text follows"
- – The actual text displayed
- – "End of hyperlink"
- – Restores color to normal
You can extract the itemString from a given itemLink with the following function: Note: The information string will be an itemString for most items, but there are a few exceptions:
- battlepetString - Caged Battle Pets
- keystoneString - Mythic Keystones
- enchantString
- questString
- spellString
To obtain all the data within a hyperlink, you can use the following: Note that this will accept any hyperlink (item/spell/quest/talent/achievement/tradeskill/etc), it will take itemstrings alone, or even just a single number.
Note that linklevel was added in 3.0, and reforging stat was added in 4.0. Links stored from previous revisions may have problems being parsed with current code.
Printing out the contents of an item link is perhaps not so obvious; displaying it anywhere in-game will just show you a clickable link. Reformat it slightly to ruin the escape sequences and you'll see what it really looks like:
"124" is the ascii value of the "|" character. If you are writing this in a regular .lua file, feel free to go ahead and just use "|" and "||". However, if you're typing it in an in-game editor, it's better to use the ascii code escape to avoid problems.
Source
https://warcraft.wiki.gg/wiki/ItemLink/Archive · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.