Hello everyone,
I'm currently trying add an extra option to the right click context menu in the mount collection.
After some digging in wowpedia and the Blizzard_MountCollection.lua i think i need to hook into MountOptionsMenu_Init and add my button via UIDropDownMenu_AddButton, but thats where i'm stumped.
Hooking into the C_MountJournal functions works just fine like so:
Lua Code:
local orgMountUP = C_MountJournal.SummonByID;
C_MountJournal.SummonByID = function(...)
print("hooked on a feeling ...")
orgMountUP(...);
end
but hooking into MountOptionsMenu_Init not ...
Lua Code:
local orgMountOptionsMenu_Init = MountJournal.MountOptionsMenu_Init ; -- <-- Error global "MountJournal" is nil
MountJournal.MountOptionsMenu_Init = function(...)
print("hooked on a feeling ...")
orgMountOptionsMenu_Init(...);
end
local orgCMountOptionsMenu_Init = C_MountJournal.MountOptionsMenu_Init ;
C_MountJournal.MountOptionsMenu_Init = function(...) --- <-- doesn't seem to be called
print("hooked on a feeling ...")
orgCMountOptionsMenu_Init(...);
end
I also tried to hook into the ADDON_LOADED event and from there hook into MountJournal because at this point it shouldn't be nil, but to no avail. for code see here:
https://pastebin.com/pXth1U6a
any tips ? is there an other way i haven't tried ? is this even possible ?
thx for your help
greetings
Draugor