LibCraftInfo

776 Downloads

LibCraftInfo is a library containing a complete list of crafts existing in the game.

This library contains various information about crafts, namely:

- the item id that results from a craft
- the item id of the recipe that taught the craft (if any)
- the expansion pack to which that craft is related
- the profession to which a given spell/craft belongs

Encoding:

Information is encoded into a single lua number, and is extracted through bitwise operations.
If you wish to correct information about a given spell, edit the file manualFixes.lua, and follow the instructions.

Usage:

local LCI = LibStub("LibCraftInfo-1.0")
local itemID = LCI:GetCraftResultItem(spellID)

API

Get the localized name of the profession to which a given craft belongs

function lib:GetCraftProfession(spellID)

Get the expansion pack of a given craft

function lib:GetCraftXPack(spellID)

Get the itemID of the item created by a given spellID

function lib:GetCraftResultItem(spellID)

Get the itemID of the item/recipe that taught this spellID

function lib:GetCraftSourceItem(spellID)

Get the name of the profession that created the item

function lib:GetItemSource(searchedItemID)

Get the spellID taught by a given itemID (recipe item)

function lib:GetRecipeLearnedSpell(itemID)

Get a list of crafts (=spellID's) for a given profession, for a given expansion

function lib:GetProfessionCraftList(professionSpellID, expansionID)

Sets information about a given spellID

function lib:SetCraftInfo(professionId, spellID, xpack, itemID, recipeID)