Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DrgrFncts = {}
- local panel = CreateFrame("FRAME")
- panel.name = "Draugor's Mount Up"
- panel:RegisterEvent("ADDON_LOADED")
- InterfaceOptions_AddCategory(panel)
- local testVar = false
- local initialized = false;
- panel:SetScript("OnEvent", function(self, event, arg1)
- if testVar then
- if not initialized then
- initialized = true;
- print("MountJournal_OnLoad:"..tostring(MountJournal_OnLoad~=nil) .. " - addon: " .. arg1)
- local oldMountOptionsMenu_Init = MountJournal.MountOptionsMenu_Init;
- MountJournal.MountOptionsMenu_Init = function (...) -- <-- doesn't seem to do anything (or hook to late?)
- print("Init hook called! old-variation")
- oldMountJournalMenu_Init(...)
- local self, level = ...
- if not MountJournal.menuMountIndex then
- return;
- end
- local needsFanfare = C_MountJournal.NeedsFanfare(MountJournal.menuMountID);
- if needsFanfare then
- return;
- end
- --- local isFavorite, canFavorite = C_MountJournal.GetIsFavorite(MountJournal.menuMountIndex);
- local info = UIDropDownMenu_CreateInfo();
- info.text = "Extra Option"
- info.func = function()
- print("klicked")
- end
- UIDropDownMenu_AddButton(info, level)
- end
- -- MountJournal.MountJournal_OnLoad(MountJournal) <-- Error nil
- end
- end
- if event == "ADDON_LOADED" and arg1 == "Blizzard_Collections" then
- testVar = true;
- if MountJournal then
- -- MountJournal:HookScript("MountOptionsMenu_Init", <-- Error no function "MountOptionsMenu_Init"
- -- function (...)
- -- local self, level = ...
- --
- -- print("Init hook called! - hook script variation")
- -- if not MountJournal.menuMountIndex then
- -- return;
- -- end
- -- local needsFanfare = C_MountJournal.NeedsFanfare(MountJournal.menuMountID);
- -- if needsFanfare then
- -- return;
- -- end
- -- --- local isFavorite, canFavorite = C_MountJournal.GetIsFavorite(MountJournal.menuMountIndex);
- --
- -- local info = UIDropDownMenu_CreateInfo();
- -- info.text = "Extra Option"
- -- info.func = function()
- -- print("klicked")
- -- end
- -- UIDropDownMenu_AddButton(info, level)
- --
- -- end);
- --- MountOptionsMenu_Init
- print("hook init")
- else
- print("MountJournal was Nil")
- end
- end
- end)
- --- hooks ---
- -- local oldMountOptionsMenu_Init = MountOptionsMenu_Init;
- --
- -- function MountOptionsMenu_Init (...) -- <-- doesn't seem to do anything (or hook to late?)
- -- print("Init hook called! old-variation")
- -- oldMountJournalMenu_Init(...)
- -- local self, level = ...
- -- if not MountJournal.menuMountIndex then
- -- return;
- -- end
- -- local needsFanfare = C_MountJournal.NeedsFanfare(MountJournal.menuMountID);
- -- if needsFanfare then
- -- return;
- -- end
- -- --- local isFavorite, canFavorite = C_MountJournal.GetIsFavorite(MountJournal.menuMountIndex);
- -- local info = UIDropDownMenu_CreateInfo();
- -- info.text = "Extra Option"
- -- info.func = function()
- -- print("klicked")
- -- end
- -- UIDropDownMenu_AddButton(info, level)
- --
- -- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement