Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
(Added Link Checking)
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Wowapi}}
+
{{wowapitype}}<br>
  +
 
== tradeSkillLink API Type (String) ==
 
== tradeSkillLink API Type (String) ==
   
Line 33: Line 34:
   
 
If the recipe list portion of a tradeSkillLink is:
 
If the recipe list portion of a tradeSkillLink is:
  +
ZAAAAAAAgAAAAAAAgAAAAA
U<<<<<<<\<<<<<<<\<<<<<
 
   
 
Then the recipe list bitset is:
 
Then the recipe list bitset is:
Line 40: Line 41:
 
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.
 
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.
+
The bitset is encoded into standard [http://www.hcidata.info/base64.htm Base64], using the characters A-Z, a-z, 0-9, +, and /. 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.
   
  +
TODO: Document bitfield ordering, perhaps by looking at [http://www.wowinterface.com/downloads/info10316-TradeLinks.html Maldivia's TradeLinks addon]
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.
 
  +
  +
== Bitsets to Spell IDs ==
  +
  +
To convert a bitset to a list of known skill spell IDs, look in [http://wiki.nibbits.com/wiki/SkillLineAbility.dbc SkillLineAbility.dbc]. Get the lines for your given SkillLineID (column 2), then sort numerically by minSkillLineRank (column 8) ascending, then by SkillLineAbilityID (column 1) ascending. Your spell IDs are in order in column 3, and a set bit in your bitstring corresponds to knowing the spell ID in that position. Column positions are accurate as of this writing (Patch 3.3.3) but may change in future patches.
  +
  +
== Bit Maps ==
  +
These provide bitmaps for 3.1 with all the in-game professions. (please verify these are based on standard Base64)
  +
  +
*Cooking
  +
2/7///7///9////7//////////g+/B
  +
*First Aid
  +
8bffAA
   
 
== Link Checking ==
 
== Link Checking ==
Line 53: Line 66:
   
 
== Notes ==
 
== Notes ==
 
* It is easy to view a tradeSkillLink in its raw form by opening a tradeskill window and running the command
<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"))
 
/script DEFAULT_CHAT_FRAME:AddMessage(gsub([[API GetTradeSkillListLink|GetTradeSkillListLink]](), "\124", "\124\124"))
  +
</ul>
 
  +
* [http://www.wowinterface.com/downloads/info10316-TradeLinks.html Maldivia's TradeLinks addon] can create custom tradelinks.
  +
* [http://wow.curse.com/downloads/wow-addons/details/gnomishyellowpages.aspx Gnomish Yellow Pages] provides examples with full bitmaps, and stores data based on bitmap.
  +
* [http://www.lastcallguild.com/forums/last-call-forums/general-chat/decode-wow-tradeskilllink-recipe-list-c C# TradeSkillList Recipe List Decode] forum post showing example code in C# to decode recipe list.
  +
* [http://www.wowtradeshare.com/ WowTradeShare] is a website where players can post and search tradelinks collected by the TradeShare addon.

Revision as of 05:01, 16 April 2010


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
  • "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

Tradeskill IDs

The tradeskill ID is the same as the global spell ID for the tradeskill ability. This is the same number returned from API GetSpellLink, and can be passed to API GetSpellInfo. It seems that the ID therefore changes with the rank of the trade skill. For example, an Apprentice Alchemist will link with trade:2259 but a Grand Master will link trade:51304.

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:

ZAAAAAAAgAAAAAAAgAAAAA

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 standard Base64, using the characters A-Z, a-z, 0-9, +, and /. 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.

TODO: Document bitfield ordering, perhaps by looking at Maldivia's TradeLinks addon

Bitsets to Spell IDs

To convert a bitset to a list of known skill spell IDs, look in SkillLineAbility.dbc. Get the lines for your given SkillLineID (column 2), then sort numerically by minSkillLineRank (column 8) ascending, then by SkillLineAbilityID (column 1) ascending. Your spell IDs are in order in column 3, and a set bit in your bitstring corresponds to knowing the spell ID in that position. Column positions are accurate as of this writing (Patch 3.3.3) but may change in future patches.

Bit Maps

These provide bitmaps for 3.1 with all the in-game professions. (please verify these are based on standard Base64)

  • Cooking
2/7///7///9////7//////////g+/B
  • First Aid
8bffAA

Link Checking

  • The server does a GUID check on the tradeSkillLink. As such, these links won't work cross-servers, but they do work cross-faction.
  • The server checks if the character specified by the GUID actually has the tradeskill, rank doesn't matter.
  • The server doesn't check between the tradeskill rank, current/max skill, and the recipe list.
  • If a tradeSkillLink does not pass these checks, it'll fail silently.

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"))