Originally Posted by semlar
OnTooltipSetUnit fires when it's populated with unit information whether it's from SetUnit or SetHyperlink.
I don't know for sure that you need to wait for it, but I would be careful.
|
One problem would be if you're to call a function and need a return from it, you can't halt execution to wait for a script to fire. The game only allows a single thread to run the Lua engine, so the resulting script would never run since the thread is occupied in the function. In essence, you'd run yourself into an infinite loop and freeze the entire game client.
The only way around this is to recode the entire thing into a request-and-callback code style, which would add another layer of complexity to it.