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:
ZO_PreHookProtected('UseItem', MyUseItemFunction)
local function MyUseItemFunction(..)
if doNotUseItem then
return true
end
end