View Single Post
06/13/20, 04:28 PM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Originally Posted by QuantumPie View Post
After learning you can use Zgoo with /zgoo events to track them, I found EVENT_SKILL_RESPEC_RESULT triggers when I change abilities, but I don't know which one. I'll just have to re-process all the slots once the event is called.
Not everything can be managed via events! Either there is no event for your purpose or you use it but it was not designed for your purpose, like in this case here:
This event is NOT for normal slot changes, it's about RESPECcing your skills. I wouldn't use this for your purpose as you cannot be sure it will always fire on a skill slot change (in the future e.g.).

But the CallbackManager was designed to be used for such purposes. You register a "callback" function to the fired event (here "OnSlotUpdated") and can run your code then. That's how ZOs does mutliple things in their code as well.

So try Scootworks callback function on the SlotUpdated callback fired by ACTION_BAR_ASSIGNMENT_MANAGER.
It provides you the actioNSlotIndex and everything should be what you are searching for.


And "Hooking" is explained here:
https://wiki.esoui.com/How_to_run_yo...eHook/PostHook)

You need to find a function which is called by ZOs code, that's what Scootworks tried to show you with his first post.
Then you Pre or PostHook to it and run your code afterwards, using the function's own parameters (like the slotindex etc.).
But this should only be used if there is no EVENT and/or CALLBACK_MANAGER entry defined which you could and should use instead,
as your PreHook code (if returning true e.g. or throwing errors) will break ZOs code, and other addons PreHooking the same or later code of the same object!

Last edited by Baertram : 06/13/20 at 04:32 PM.
  Reply With Quote