View Single Post
05/08/16, 04:58 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,963
I think you can use it as ZO_PreHook variant but ONLY for functions like UseItem() now.

Don't hook a non-protected function with this PreHook or game won't load
If you return true inside your PreHook UseItem won't be executed if I understand it correctly?

Lua Code:
  1. ZO_PreHookProtected('UseItem', MyUseItemFunction)
  2.  
  3. local function MyUseItemFunction(..)
  4.    if doNotUseItem then
  5.       return true
  6.    end
  7. end

Last edited by Baertram : 05/08/16 at 05:17 AM.
  Reply With Quote