Potential solution for Dragonflight Changes to Milling/Prospecting/Unraveling
TeiranDragon opened this issue ยท 1 comments
Hey there. You mentioned in your addon description that if a way to programmatically Mill/Prospect/Unravel was found, you might be able to update to work with the new Dragonflight profession systems.
Well, I have a macro template that can do it, and maybe you can incorporate the method into the addon.
Here's a macro that finds a stack of Mystic Sapphire rank 2s in my bags, and then performs a repeated Crushing attempt on that stack.
/run for bg=0,5 do for s=1,C_Container.GetContainerNumSlots(bg) do local lnk=ItemLocation:CreateFromBagAndSlot(bg,s) if lnk:IsValid() and C_Item.GetItemID(lnk) == 192841 then C_TradeSkillUI.CraftSalvage(395696,500,lnk) return end end end
Same macro, just spaced out some:
/run for bg=0,5 do
for s=1,C_Container.GetContainerNumSlots(bg) do
local lnk=ItemLocation:CreateFromBagAndSlot(bg,s)
if lnk:IsValid() and C_Item.GetItemID(lnk) == 192841 then
C_TradeSkillUI.CraftSalvage(395696,500,lnk)
return
end
end
end
The "C_Item.GetItemID(lnk) == 192841" part is what defines it as Mystic Sapphire rank 2, and the
profession call is C_TradeSkillUI.CraftSalvage(395696,500,lnk), with 395696 being the spell id for crushing, 500 being the number of times to do it, and the lnk being the variable holding the stack found earlier.
I have other macros that do unraveling and prospecting with the same method. not sure how cleanly you can translate the macro acceptable code to an addon, but I figured I'd send it to you and see if it helps.