WoW:TradeSkillLink: Difference between revisions
mNo edit summary |
m (→Recipe list) |
||
| Line 1: | Line 1: | ||
{{Wowapi}} | {{Wowapi}} | ||
== | == tradeSkillLink API Type (String) == | ||
tradeSkillLinks are returned by [[API GetTradeSkillListLink|GetTradeSkillListLink]](). | |||
== Anatomy of a tradeSkillLink == | |||
|cffffd000|Htrade:27028:375:375:3111EE:xG{_yK|h[First Aid]|h|r | |cffffd000|Htrade:27028:375:375:3111EE:xG{_yK|h[First Aid]|h|r | ||
| Line 22: | Line 22: | ||
<li>'''"|h"''' - Hyperlink conclusion</li> | <li>'''"|h"''' - Hyperlink conclusion</li> | ||
<li>'''"|r"''' - Returns color to normal</li> | <li>'''"|r"''' - Returns color to normal</li> | ||
</ul> | |||
== Recipe list == | |||
The recipe list portion of the tradeSkillLink is a bitset representing which recipes are available. | |||
'''Example''' | |||
If the recipe list portion of a tradeSkillLink is: | |||
U<<<<<<<\<<<<<<<\<<<<< | |||
Then the recipe list bitset is: | |||
100110000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001[... zeroes] | |||
This set indicates that four (4) specific recipes are available (note that there are 5 bits; there is no information on why there is an extra bit at this time). Also note that the bitset is unique for each tradeskill; a recipe denoted by bit N in one tradeskill is not the same as a recipe denoted by bit N in another tradeskill. | |||
The bitset is encoded into a type of Base64 on a range from character '<' (ASCII 60 or 0x3C) to '{' (ASCII 123 or 0x7B) inclusive. Being Base64, there are 6 bits per digit (similar to how hexadecimal has 4 bits per digit); this allows one to easily determine if a specific bit is set by looking only at a single digit in the string. | |||
It is unknown at this time what the ordering of the bitset is, and therefore difficult to determine which bit corresponds to which recipe without experimentation and data collection. | |||
== Notes == | |||
<ul> | |||
<li>It is easy to view a tradeSkillLink in its raw form by opening a tradeskill window and running the command:</li> | |||
/script DEFAULT_CHAT_FRAME:AddMessage(gsub([[API GetTradeSkillListLink|GetTradeSkillListLink]](), "\124", "\124\124")) | |||
</ul> | </ul> | ||
Revision as of 06:56, 10 November 2008
← WoW API
tradeSkillLink API Type (String)
tradeSkillLinks are returned by GetTradeSkillListLink().
Anatomy of a tradeSkillLink
|cffffd000|Htrade:27028:375:375:3111EE:xG{_yK|h[First Aid]|h|r
- "|cffffd000" - Colorizes the link (see itemLink)
- "|H" - Hyperlink introduction
- "trade:27028" - Tradeskill ID (27028 is First Aid)
- "375" - Current skill level
- "375" - Maximum skill level without further training
- "3111EE" - Character ID
- "xG(_yK" - Recipe list (see below)
- "|h" - Hyperlink data concluded, text follows
- "[First Aid]" - Display text
- "|h" - Hyperlink conclusion
- "|r" - Returns color to normal
Recipe list
The recipe list portion of the tradeSkillLink is a bitset representing which recipes are available.
Example
If the recipe list portion of a tradeSkillLink is:
U<<<<<<<\<<<<<<<\<<<<<
Then the recipe list bitset is:
100110000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001[... zeroes]
This set indicates that four (4) specific recipes are available (note that there are 5 bits; there is no information on why there is an extra bit at this time). Also note that the bitset is unique for each tradeskill; a recipe denoted by bit N in one tradeskill is not the same as a recipe denoted by bit N in another tradeskill.
The bitset is encoded into a type of Base64 on a range from character '<' (ASCII 60 or 0x3C) to '{' (ASCII 123 or 0x7B) inclusive. Being Base64, there are 6 bits per digit (similar to how hexadecimal has 4 bits per digit); this allows one to easily determine if a specific bit is set by looking only at a single digit in the string.
It is unknown at this time what the ordering of the bitset is, and therefore difficult to determine which bit corresponds to which recipe without experimentation and data collection.
Notes
- It is easy to view a tradeSkillLink in its raw form by opening a tradeskill window and running the command: /script DEFAULT_CHAT_FRAME:AddMessage(gsub(GetTradeSkillListLink(), "\124", "\124\124"))