b-morgan / Skillet

World of Warcraft addon
GNU General Public License v3.0
15 stars 6 forks source link

Changing professions possible solution #62

Closed Tarkumi closed 1 year ago

Tarkumi commented 2 years ago

You should try to use CastSpell(offset+1,BOOKTYPE_PROFESSION) to change professions with the buttons on the top right. You can get the offset with the GetProfessionInfo function like you do in SkilletData.lua.

b-morgan commented 2 years ago

Is there a problem this is a solution for?

Tarkumi commented 2 years ago

Yes, sorry.

When I try to change professions (I have Engineering and Enchanting as primary), switching to Enchanting and to Cooking with the buttons works, but when I click on Engineering I get the following error:

SkilletError

b-morgan commented 2 years ago

I believe this is a Blizzard bug. It occasionally fails but I have a workaround that works for me. If I open all my professions with an action button at the beginning of a session, then after that the Skillet trade buttons seem to work flawlessly.

b-morgan commented 2 years ago

The zip file below contains versions of Skillet.lua and SkilletData.lua which change the CastSpellByName to your suggested CastSpell(offset+1,BOOKTYPE_PROFESSION). Since the original version doesn't fail for me all the time, I'll need some additional testing from you. Let me know, please.

Skillet.zip

Tarkumi commented 2 years ago

Thank you, it's working perfectly.

b-morgan commented 1 year ago

Skillet-5.00-alpha18 contains this fix.