10.1.5 Note: Still working, no changes.
Last Meaningful Update: 4/26/23. Changelog at the bottom of this page.
Description:
Automatically points your Tricks of the Trade/Misdirect/Interlope towards a tank in your group. Optionally, it can set to a priority tank if that tank is available via the "Priority Tank Name" custom option, and defaults to a pet if no tanks are found (Interlope will target the player character instead of the pet, but it's the same thing).
Has verbose printouts when the tank changes so you can be aware of what's going on, and allows a priority tank override via weakaura "custom option"
(If you need a version of this weakaura that auto-targets any spell to a customizable target, check Smart Spell Targeter, which is based on this)
Performance:
Literally zero performance hit.
Installation:
Copy one of the two macros below, depending on your class. I've put two /clicks in the macros because one of them should work with your game configuration and I'm sick of troubleshooting Blizzard's godawful /click system.
Hunter:
showtooltip [known:Interlope] Interlope; #showtooltip [noknown:Interlope] Misdirection
/click SmartMisdirect LeftButton 1
/click SmartMisdirect LeftButton 0
Rogue:
showtooltip Tricks of the Trade
/click SmartMisdirect LeftButton 1
/click SmartMisdirect LeftButton 0
Troubleshooting:
I'll be notified within a few hours if you write a comment on Wago. Include an error log/detailed description (enable live debug mode in the custom options for extra insight) and I'll try to fix anything that breaks. Make sure you are using the latest version of the weakaura if something isn't working.
Make sure your build has misdirect/tricks of the trade talented! It's not included by default for hunters/rogues anymore.
You can manually dump the button's values at any time by writing the following in chat:
/dump SmartMisdirect:GetAttribute("unit")
/dump SmartMisdirect:GetAttribute("spell")
Blizzard's /click macro functionality has been weird since they changed it to the "LeftButton 0/1" system in DF pre-patch. Depending on your game's configuration, /click macros may or may not work properly. This weakaura is not the problem in this case - you need to figure out why /click macros are not working properly for you.
When testing in my game, I get the following results:
Macro set to "LeftButton 0" and ActionButtonUseKeyDown CVar set to "0" works
Macro set to "LeftButton 0" and ActionButtonUseKeyDown CVar set to "1" fails
Macro set to "LeftButton 1" and ActionButtonUseKeyDown CVar set to "0" fails
Macro set to "LeftButton 1" and ActionButtonUseKeyDown CVar set to "1" works
If you want to try different configurations, use the following commands to switch your ActionButtonUseKeyDown CVar:
/run SetCVar("ActionButtonUseKeyDown", 0)
/run SetCVar("ActionButtonUseKeyDown", 1) (default value and recommended by yours-truly)
And try changing your macro back and forth:
/click SmartMisdirect LeftButton 0
/click SmartMisdirect LeftButton 1
Some users have also had success with switching "LeftButton" to "LeftClick".
If the /dump commands report the correct values and none of these configurations work for you, I can't help. /click macro functionality being broken is outside the scope of this weakaura. Post in the comments if you find out what the problem was.
Changelog:
* 5/8/23:
- No code changes, no need to update. Took the off-screen text "SMU" off of this weakaura. 2 people have reported that it's not getting placed off-screen, even though I can't reproduce this. Might be related to addon configuration or display size. The only purpose of the text was to make it easier to differentiate icon-less weakauras when scrolling through your WA list, but if it's causing any sort of problem it's not worth it.
* 4/26/23:
- Fixed small regression that would always cause name change reports on group events
- Fixed Priority Target Realm sometimes getting skipped
* 4/23/23:
- Added MainTank/NOT MainTank criteria in the custom options that's only active while in a raid. Allows for finer control of which raid tanks are getting your tricks without needing other keybinds. If you need to dynamically cast on both tanks during an encounter you'll still need a second keybind
- Listens to warmode switches a little bit more carefully. Weakaura was already handling the important stuff properly but wasn't outputting the spell change to chat on warmode switch. Still doesn't output in the nicest way because the warmode switch event is much slower to fire than the other events we listen to, so it ends up switching everything in the backend about a second before we try to update the cosmetic prints to chat.
- Small codebase refactor. Theoretically higher performance but shouldn't be measurable
* 4/15/23:
- Small code refactor, with a couple features backported from my time making Smart Spell Targeter (a customizable version of this weakaura)
- It looks like ActionButtonUseKey is interfering once once again. I've updated the macro section and recommend just using two /click commands to minimize future headaches
* 2/13/23:
- No code changes, but after some testing it looks like the ActionButtonUseKey CVar is no longer interfering with this weakaura as long as you set the /click macro to LeftButton 0. If you find that it's still interfering, please post a comment.
* 1/16/23:
- Fixed automatic localization specifically for "Tricks of the Trade" spell name. It's hard to remember which parts need to be hardcoded english for the API and which can be localized.
* 1/15/23:
- Fixed an edge case error when using a non-english game client. Frequently, blizzard servers do not return a unit's name properly and will instead return "Unknown" (in english). I was previously checking to make sure the tank's name was not "Unknown", but I updated it to use the localized globalstring version of the word so it works in every language now.
- Pre-emptively defending a little more closely against blizzard servers returning completely nothing instead of "Unknown", because you really cannot trust them.
* 12/20/22:
- Updated description with findings about ActionButtonUseKey CVar interfering as of Dragonflight
- Added Live Debug Mode to the custom options tab
- Added standard WeakAura-based debug logging, available in the information tab
- Fixed Interlope PvP talent, which actually only works through a SecureActionButtonTemplate if you cast Misdirection instead of Interlope, and only on your player unit instead of your pet. This was really fun to figure out, thank you Blizzard!
- Weakaura is more aggressive at finding a misdirect target on UI load
- Weakaura is more aggressive at switching between Misdirect<->Interlope on PvP state changes
- Weakaura reports when Misdirect<->Interlope changes happen
- Refactored all the code 3 times while trying to make this work with DF
- Hatred towards Blizzard added in code comments
- Hatred towards Blizzard added IRL
- Why do we have to dig through decompiled UI files to figure out API changes?
- Why does Blizzard randomly kill old API functions instead of overloading them into the new functions?
- Why don't half the API functions work properly?
- Why are we here?
- Just to suffer?
* 12/18/22:
- Added support for Interlope PvP talent, let me know if it doesn't work
- Added automatic localization for the spell names
* 7/22/22:
- Initial version, forked from a mix of Smart Misdirect and my own personal autotricks addon that I had been using for a very long time: AutoRedirect - sharing addons is much less convenient than weakauras so this was a good excuse to modernize it