View Single Post
11-20-20, 08:53 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
If you mark you addons .toc to load when the Collections addon is loaded, you don't have to worry about tracking ADDON_LOADED (assuming that's the only addon you're waiting for and your addon isn't doing anything before the collections load, I didn't look).

Code:
## LoadOnDemand: 1
## LoadWith: Blizzard_Collections
You can use a hook like:
Lua Code:
  1. hooksecurefunc(C_MountJournal, "SummonByID", function(mountID)
  2.      print("hooked on a feeling ...", mountID)
  3. end)

and because MountOptionsMenu_Init is a standalone function (not a method of C_MountJournal):

Lua Code:
  1. hooksecurefunc("MountOptionsMenu_Init", function(self, level)
  2.      print("hooked on a feeling ...", self, level)
  3. end)

This will run your code after the original functions have completed running.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 11-20-20 at 09:09 PM.
  Reply With Quote