Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential solution for Dragonflight Changes to Milling/Prospecting/Unraveling #7

Open
TeiranDragon opened this issue May 31, 2023 · 1 comment

Comments

@TeiranDragon
Copy link

TeiranDragon commented May 31, 2023

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.

@parnic
Copy link
Owner

parnic commented Jun 1, 2023

Thanks for sharing. I'm not sure how viable this is, but I can try to find some time to take a look. If you, or anyone else, wants to post a PR with this implemented into the mod, I'd be happy to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants