Throws on Retail PTR 10.1.5
ljosberinn opened this issue ยท 1 comments
1x idTip_CommunityFork/clients/dragonflight.lua:332: Usage: hooksecurefunc([table,] "function", hookfunc)
[string "=[C]"]: in function `hooksecurefunc'
[string "@idTip_CommunityFork/clients/dragonflight.lua"]:332: in main chunk
temp fixing it with:
if ProfessionSpecTabMixin then
hooksecurefunc(ProfessionSpecTabMixin, "OnEnter", function(self)
IDTip:addLine(GameTooltip, self.traitTreeID, IDTip.kinds.profspectreeid)
end)
end
works, but /dump ProfessionSpecTabMixin
yields not nil so it seems to be lazily initialized now.
same errors and testing for L358 via ProfessionsFrame
, L361 via ProfessionsSpecPathMixin
Code should be moved to the correct addon it is trying to refer to. In this case there is a Blizzard_Professions addon you can listen to.
Need to move the entire professions code to another function
IDTip:RegisterAddonLoad("Blizzard_Professions", function()
hooksecurefunc(ProfessionSpecTabMixin, "OnEnter", function(self)
IDTip:addLine(GameTooltip, self.traitTreeID, IDTip.kinds.profspectreeid)
end)
local function hookProfSpecPathEnter(self)
local nid = self:GetNodeID()
local cid = self:GetConfigID()
-- local eid = C_ProfSpecs.GetUnlockEntryForPath(self:GetNodeID());
local info = C_Traits.GetNodeInfo(cid, nid)
if info.activeEntry then
local eid = info.activeEntry.entryID
local entry = C_Traits.GetEntryInfo(cid, eid)
local did = entry.definitionID
IDTip:addLine(GameTooltip, eid, IDTip.kinds.traitentry)
IDTip:addLine(GameTooltip, did, IDTip.kinds.traitdef)
end
local f = self:GetTalentFrame()
local rnid = f:GetRootNodeID()
IDTip:addLine(GameTooltip, rnid, IDTip.kinds.rootprofspecnode)
IDTip:addLine(GameTooltip, nid, IDTip.kinds.profspecnode)
IDTip:addLine(GameTooltip, self:GetConfigID(), IDTip.kinds.traitconfig)
end
ProfessionsFrame.SpecPage.DetailedView.Path:HookScript("OnEnter", hookProfSpecPathEnter)
hooksecurefunc(ProfessionsSpecPathMixin, "OnEnter", hookProfSpecPathEnter)
end)
Will try to make a PR soon