View Single Post
04-02-21, 03:43 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by rulezyx View Post
I didnt even know that DoNothing exists.
It doesn't exist, the first thing the code does is create the function on line 2.
Blizzard has a similar function called nop(). You could use that instead if you prefer.


Originally Posted by rulezyx View Post
What I dont understand is the correlation between the TargetFrame and the FocusFrame related to these functions.

Why is the FocusFrame affected by the function and those changes when its not called at all?
They both "inherit" their properties from the same template. The only difference is when they're created, they're given different units to watch. Everything else is fundamentally the same. The first 3 functions are called from the template's event handler and the last one is called from its OnUpdate handler.



Originally Posted by rulezyx View Post
It would make sense for me when I have to target something in order to get it on Focus but it is possible to do that with mouseover/scripts/macros and keybinds (arenas/bg) without targeting anything.
Mainly macros, though mouseover is a type of macro and keybinds can be set to run macros. The only "no" in the list is scripts because of the limitations of calling these functions directly from Lua code.

Behind these are the /target and /focus commands. Both commands work the exact same way on their respective units and are very powerful when combined with macro conditionals.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote