View Single Post
02-14-15, 11:10 PM   #18
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Phanx View Post
Code:
self:SetAttribute('macrotext1', '/click PlayerTalentFrameTalentsLearnButton\n/use [nomounted] !Trap Launcher')
^ This tells the button what to do when it recieves a click from button1. (I have no idea why Trap Launcher is mentioned here though!)
I play a hunter and every time I switch talents it turns off trap launcher, it was driving me insane so I just macroed it into the addon.

Thanks for explaining my code because I don't have the attention span to write all that.

The reason I use two different macrotexts on the button is because one is run when you click the button down (to select the new talent) and the other is run when you release the button which clicks the "learn talents" button.

If LearnTalents is not protected then that isn't necessary and you can simply call that directly when the previous talent is unlearned.

Last edited by semlar : 02-14-15 at 11:26 PM.
  Reply With Quote