I use WeakAuras currently to take care of stuff that other addons don't have a premade way of doing, because I can create Custom triggers and just slap in any LUA code I can figure out. This is generally faster than trying to hunt down an addon that does what I need.
WeakAuras gives you 2 choices for how it can check your trigger:
- Every time an EVENT(s) fires
- Every frame
I'm worried that using "Every frame" is a Really Bad Idea™ because (warning: programming-ignorant) it just sounds really inefficient and like it will be more prone to causing conflicts/problems.
But there are three things I currently want to check which I can't figure out how to do without using "Every frame":
- IsSpellInRange, for my pet's Shadow Bite/etc.
- CheckInteractDistance, for Shadowflame (don't laugh, it works to ~90% accuracy using Trade range :p)
- GetUnitSpeed, to know if I'm moving and thus suggest a priority of available instant spells
Like, checking my Mana status, or when I switch targets, was really easy — UNIT_POWER & PLAYER_TARGET_CHANGED. But these ones are really weird, I can't find anything that relates to a spell going out of range, or unit distances changing, or a unit starting/stopping movement. But the game has to know when those things happen, so why can't I find events for them?
Last time I asked this, someone suggested using Secure Function hooks to do it, but while that was an interesting diversion it just confused me and I couldn't figure out how to use it to solve the problem.
So is this possible, or do I have to use "Every Frame" if I want to use WeakAuras to check it? Any insight/clarification is, as always, appreciated. :>