12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

552 Part IV ■ <strong>Reference</strong>itemdata —Encoded data field interpreted by the client to show the character’s list<strong>of</strong> known trade skill recipes.Examples: |cffa335ee|Hitem:45457:3828:3395:3395:0:0:0:0:80|h[Staff<strong>of</strong> Endless Winter]|h|r, |cff1eff00|Hitem:36360:0:0:0:0:0:-37:1633878093:80|h[Frostpaw Legguards]|h|rRepresents an item. Clicking an item link in the default UI shows a tooltipwith in<strong>for</strong>mation about the item. Control-clicking an equippable item opens theDressUpFrame to preview how the item would look on the player character ifequipped. The linkdata <strong>for</strong> an item link follows the <strong>for</strong>mat itemID:enchant:gem1:gem2:gem3:gem4:suffixID:uniqueID:level:itemID—The item’s itemID.enchant (optional)—Unique identifier <strong>of</strong> the enchantment applied to the item;not used elsewhere in the API.gem1, gem2, gem3, gem4 (optional)—Unique identifiers <strong>of</strong> the enchantmentsprovided by gems socketed in the item (not the itemIDs <strong>of</strong> the gems themselves);not used elsewhere in the API.suffixID (optional)—Identifies the specific variation represented <strong>for</strong>r<strong>and</strong>om-property items (e.g. ‘‘... <strong>of</strong> the Monkey’’, ‘‘... <strong>of</strong> Frost Protection’’, etc.).A positive number indicates a variation with specific stat values (e.g. 1200 = ‘‘<strong>of</strong>the Bear’’, 8 stamina 8 strength; 1220 = ‘‘<strong>of</strong> the Bear’’, 14 stamina 15 strength);a negative number indicates a type <strong>of</strong> variation, with actual stat values to bedetermined by decoding the uniqueID.uniqueID (optional)—A number used internally by the <strong>WoW</strong> client/serverarchitecture to track a specific occurrence <strong>of</strong> an item: used <strong>for</strong> crafted items whichdisplay ‘‘’’ in their tooltips <strong>and</strong> <strong>for</strong> r<strong>and</strong>om-property items. Foritems with a negative suffixID,usingbit.b<strong>and</strong>(uniqueID, 0xFFFF) revealsthe factor used to calculate the item’s stats.level—Level <strong>of</strong> the character linking the item; used <strong>for</strong> ‘‘Heirloom’’ items whosestats change based on the level <strong>of</strong> the character equipping them.inventoryIDAn inventoryID identifies an inventory slot used (mostly) <strong>for</strong> the equipping <strong>of</strong> items.Inventory ID numbers exist not only <strong>for</strong> the armor <strong>and</strong> weapon slots seen in the defaultUI’s character window, but also <strong>for</strong> bag slots, bank bag slots, the contents <strong>of</strong> the bank’smain storage area, <strong>and</strong> the contents <strong>of</strong> the keyring. Inventory slots are not definedas constants in the default UI; to obtain the inventoryID <strong>for</strong> a slot, use one <strong>of</strong> thefollowing functions:GetInventorySlotInfoBankButtonIDToInvSlotIDContainerIDToInventoryIDKeyRingButtonIDToInvSlotID

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!