Thread Tools Display Modes
09-01-22, 02:12 AM   #1
caffeineaddiction
A Deviate Faerie Dragon
 
caffeineaddiction's Avatar
AddOn Author - Click to view addons
Join Date: May 2021
Posts: 11
LK Classic Enchanting SecureActionButtonTemplate

Greetings, I am the author of https://wago.io/17ZQgjA3y which is a Weakaura that provides a list of enchants on the side of the trade window based upon what is in the "Do Not Trade" section of the trade window, the mats in your bag, and enchants you currently know.

The idea being that it allows you to quickly enchant someone's gear w/ out having to dig through your professions book.

To do this I have a list of all the possible enchants currently in the game, and then pull info from `GetSpellInfo(id)`. I then was taking the name of the enchant and using it to populate a SecureActionButtonTemplate w/ :SetAttribute("type", "spell") and then :SetAttribute("spell", <spell name>)

This worked great for all of Classic / TBC ... but on the release of LK prepatch its broke. I made a test button and can cast other spells like mark of the wild by name ... but not any of the enchanting spells. I dont get an error, and I have no idea why its not working. TSM was also having some issues with the enchanting book and I figured I would take a look at their code when it got updated.

Well, now I am even more confused ... apparently TSM doesnt use :SetAttribute("type", "spell") at all and instead makes use of :SetMacroText() ... which is fine, but for the life of me I cant figure out how they are populating it for enchanting. I am guessing it has something to do w/ the scanning of the profession window and its all populated at that time ... but I cant find it.

So my questions are as follows:

Is there a way (ingame) to check what the MacroText of a button is after its been populated?
Is there some patch notes detailing what changed in the LK Classic update dealing w/ Enchanting and or CastSpellByName?
Is there a way to bind the secure action button of a bliz UI like the Enchanting book and apply it to another button in a completely unrelated frame?

Any help would be appreciated.
  Reply With Quote
09-02-22, 02:09 AM   #2
caffeineaddiction
A Deviate Faerie Dragon
 
caffeineaddiction's Avatar
AddOn Author - Click to view addons
Join Date: May 2021
Posts: 11
https://wowwiki-archive.fandom.com/w...I_DoTradeSkill

`DoTradeSkill(index, repeat)`
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » LK Classic Enchanting SecureActionButtonTemplate

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off