View Single Post
12-14-14, 06:20 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by myrroddin View Post
Is it possible to securely hook UseQuestLogSpecialItem()? I'd imagine that would solve most of the problems.
It's possible to securely hook anything:

Code:
hooksecurefunc("CastSpellByName", function(spell, target)
    print("You are casting", spell, "on the", target or "target", "unit.")
end)
But that doesn't solve any problems, since a secure hook just tells you that the function was called, and what arguments (if any) were passed to it; it doesn't magically let you call functions you're not allowed to call from addon code, and it doesn't let you affect the behavior of the original function.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote