Skip to content

LibProcessable

CI edited this page Mar 2, 2023 · 20 revisions

LibProcessable:IsMillable(item[, ignoreMortar])

Returns whether the player can mill the given item.

Arguments:

  • item: item ID or link
  • ignoreMortar: whether the Draenic Mortar should be ignored or not (boolean, optional)

Return values:

  • isMillable: Whether or not the player can mill the given item (boolean)
  • millingSpellID: ItemID of the Draenic Mortar if used, otherwise spellID to use to mill the given item (number|nil)
  • useDraenicMortar: Whether or not a Draenic Mortar could be used

Notes:

  • since Dragonflight it's required to use the tradeskill API to mill, e.g: C_TradeSkillUI.CraftSalvage(millingSpellID, numCasts, ItemLocation)

LibProcessable:IsProspectable(item)

Returns whether the player can prospect the given item.

Arguments:

  • item: item ID or link

Return values:

  • isProspectable: Whether or not the player can prospect the given item (boolean)
  • prospectingSpellID: SpellID that needs to be used to prospect the given item (number|nil)

Notes:

  • since Dragonflight it's required to use the tradeskill API to prospect, e.g: C_TradeSkillUI.CraftSalvage(prospectingSpellID, numCasts, ItemLocation)

LibProcessable:IsDisenchantable(item)

Returns whether the player can disenchant the given item.

Arguments:

  • item: item ID or link

Return values:

  • isDisenchantable: Whether or not the player can disenchant the given item (boolean)

Notes:

  • Many items that are not disenchantable will still return as true
    • These items are hard to keep track of since they're not flagged in any known database, and thus hard to keep track of

LibProcessable:IsScrappable(item)

Returns whether the player can scrap the given item.

Arguments:

  • item: item ID or link

Return values:

  • isScrappable: Whether or not the player can scrap the given item (boolean)
  • scrappingSpellID: SpellID that needs to be used to scrap the given item (number|nil)

Notes:

  • it's required to use the tradeskill API to scrap items, e.g: C_TradeSkillUI.CraftSalvage(scrappingSpellID, numCasts, ItemLocation)

LibProcessable:IsOpenable(item)

Returns whether the player can open the given item with a class/racial ability.

Arguments:

  • item: item ID or link

Return values:

  • isOpenable: Whether or not the player can open the given item (boolean)
  • spellID: SpellID of the spell that can be used to open the given item (number)

LibProcessable:IsOpenableProfession(item)

Returns the profession data if the given item can be opened by a profession item that the player posesses.

Arguments:

  • item: item ID or link

Return values:

  • isOpenable: Whether or not the player can open the given item (boolean)
  • requiredRank: The skill level required in the profession (number)
  • professionID: The profession ID (number)
  • expansionID: The associated expansion with the profession (number/nil)
  • professionItem: The itemID for the unlocking item (number)

LibProcessable:HasProfession(professionID)

Returns whether the player has the given profession.

Here's a table with the profession ID for each profession.
Source: https://wowpedia.fandom.com/wiki/TradeSkillLineID

Profession Name Profession ID
Alchemy 171
Blacksmithing 164
Enchanting 333
Engineering 202
Herbalism 182
Inscription 773
Jewelcrafting 755
Leatherworking 165
Mining 186
Skinning 393
Tailoring 197

Arguments:

  • professionID: The profession ID

Return values:

  • hasProfession: Whether or not the player has the profession (boolean)

LibProcessable:GetProfessionCategories(professionID)

Returns data of all category IDs for a given (valid) profession, indexed by the expansionID level index.

Arguments:

  • professionID: The profession ID (number)

Return values:

  • categories: Profession categories (table)

LibProcessable:GetProfessionSkillLines(professionID)

Returns data of all skill lines for a given (valid) profession, indexed by the expansion level index.

Arguments:

  • professionID: The profession ID (number)

Return values:

  • skillLines: Profession skill lines (table)