Thread: 2.7 Update
View Single Post
02/11/17, 11:49 AM   #102
Agathorn
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
So I don't know if this is a bug or just a bad decision on how to categorize data, but..

I am the author of SmarterAutoLoot which allows you to auto loot with defined filters, so you only get items you want rather than filling your bag with everything. For Homestead I am trying to update my AddOn to allow filtering furniture crafting materials.

At first I assumed that either 1) They would simply fall under the existing ITEMTYPE filters for the appropriate craft skills such as Blacksmith or Woodworker, or 2) There would be a new ITEMTYPE for them.

Truth is neither, they are actually marked as ITEMTYPE_INGREDIENT which is the same ITEMTYPE used for cooking ingredients and spices. I found this very annoying as one of the main reasons I even wrote SmarterAutoLoot in the first place was to let me filter out ingredients!

So I kept digging trying to find a way to differentiate these from cooking ingredients. I stumbled across a function GetItemLinkRecipeCraftingSkillType(link) which sounded like my savior. If I can check that and it returns that the ingredient is actually used for say Woodworking then I can probably safely assume it is for furniture crafting.

But in my tests so far, these all return CRAFTING_TYPE_INVALID!

EDIT: Hmm... I think the bug might be on my side. Even normal ingredients for cooking are showing as CRAFTING_TYPE_INVALID.

I am getting it this way:
Code:
local lootId,name,icon,quantity,quality,value,isQuest, isStolen = GetLootItemInfo(i)
local link = GetLootItemLink(lootId)
local tradeskill = GetItemLinkRecipeCraftingSkillType(link)

Last edited by Agathorn : 02/11/17 at 12:04 PM.
  Reply With Quote