AtlasLootClassic

AtlasLootClassic

37M Downloads

Is it possible to query atlas loot from another addon to get recipe ItemID from created ItemID?

aredon opened this issue ยท 4 comments

commented

Digging through your available functions it appears that it's possible to go recipe->creation spell->created item but I need it to go the other way. I was hoping for something in _G.AtlasLoot.Profession but haven't had any luck so far.

If such a function exists could you point me to where to find it? If not - would you be so kind as to provide it?

commented

Hey, sure i add AtlasLoot.Data.Profession.GetCraftSpellForCreatedItem(itemID) hope that helps :)
Think i will release it tomorrow than as I need to change from Travis to GitHubActions also :D

commented

Would it be too much to ask to do GetRecipeFromCreatedItem?

commented

Nope no problem there is already a function (Recipe.GetRecipeForSpell(spellID)) for that but I added it also

AtlasLoot.Data.Profession.GetRecipeForCreatedItem(itemID)

function Profession.GetRecipeForCreatedItem(itemID)
    return Recipe.GetRecipeForSpell(Profession.GetCraftSpellForCreatedItem(itemID))
end
commented

Nice that's wonderful thank you!