View Single Post
11/23/21, 12:05 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
Protected functions are only allowed to be called by addons when out of combat.
This verification of the combat state is done inside "CallSecureProtected". Protected functions must be called via CallSecureProtected and if the player is currently in combat, the function call will be blocked.
Since ZO_PreHookProtected calls CallSecureProtected, it is no longer possible to use the hooked function while in combat.

To fix this, you could hook IsItemUsable instead so that it will block the execution of UseItem here:
https://github.com/esoui/esoui/blob/...slot.lua#L1129

Last edited by Shinni : 11/23/21 at 12:09 PM.
  Reply With Quote