In DuffedUI v7 I work with the WatchFrameDropDown_Initialize function to generate a wowhead link for quests or achievements. With Warlords of Draenor that is now no longer function. So far I have found nothing that would replace this function. Could possibly someone help me identify the correct function?
Lua Code:
function ObjectiveTracker:WOWHead()
-- Quest / achievement link URLs
local lST = "Wowhead"
local lQ = "http://www.wowhead.com/quest=%d"
local lA = "http://www.wowhead.com/achievement=%d"
_G.StaticPopupDialogs["WATCHFRAME_URL"] = {
text = lST .. " link",
button1 = OKAY,
timeout = 0,
whileDead = true,
hasEditBox = true,
editBoxWidth = 350,
OnShow = function(self, ...) self.editBox:SetFocus() end,
EditBoxOnEnterPressed = function(self) self:GetParent():Hide() end,
EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
}
local tblDropDown = {}
hooksecurefunc("WatchFrameDropDown_Initialize", function(self)
if self.type == "QUEST" then
tblDropDown = {
text = lST .. " link",
notCheckable = true,
arg1 = self.index,
func = function(_, watchId)
local logId = GetQuestIndexForWatch(watchId)
local _, _, _, _, _, _, _, _, questId = GetQuestLogTitle(logId)
local inputBox = StaticPopup_Show("WATCHFRAME_URL")
inputBox.editBox:SetText(lQ:format(questId))
inputBox.editBox:HighlightText()
end
}
UIDropDownMenu_AddButton(tblDropDown, UIDROPDOWN_MENU_LEVEL)
elseif self.type == "ACHIEVEMENT" then
tblDropDown = {
text = lST .. " link",
notCheckable = true,
arg1 = self.index,
func = function(_, id)
local inputBox = StaticPopup_Show("WATCHFRAME_URL")
inputBox.editBox:SetText(lA:format(id))
inputBox.editBox:HighlightText()
end
}
UIDropDownMenu_AddButton(tblDropDown, UIDROPDOWN_MENU_LEVEL)
end
end)
UIDropDownMenu_Initialize(WatchFrameDropDown, WatchFrameDropDown_Initialize, "MENU")
end
Lua error
Lua Code:
Message: ...ce\AddOns\DuffedUI\modules\misc\objectivetracker.lua:68: hooksecurefunc(): WatchFrameDropDown_Initialize is not a function
Time: 07/23/14 12:40:15
Count: 1
Stack: [C]: in function `hooksecurefunc'
...ce\AddOns\DuffedUI\modules\misc\objectivetracker.lua:68: in function `WOWHead'
Interface\AddOns\DuffedUI\modules\misc\core.lua:19: in function <Interface\AddOns\DuffedUI\modules\misc\core.lua:5>
Locals:
Thanks for all help