Skip to content

Instantly share code, notes, and snippets.

@kemayo
Created August 7, 2025 02:13
Show Gist options
  • Save kemayo/ef52574ed215a8c4edd7b3b2af5cec58 to your computer and use it in GitHub Desktop.
Save kemayo/ef52574ed215a8c4edd7b3b2af5cec58 to your computer and use it in GitHub Desktop.
World of Warcraft addon-contents that will show needed trait IDs on tooltips for generic talent trees
-- Trait trees
do
local lastTree, lastConfig
EventRegistry:RegisterCallback("GenericTraitFrame.SetTreeID", function(_, treeid, configid)
lastTree = treeid
lastConfig = configid
end)
EventRegistry:RegisterCallback("TalentDisplay.TooltipCreated", function(_, button, tooltip)
if lastTree then
tooltip:AddDoubleLine("treeID", lastTree)
end
if lastConfig then
tooltip:AddDoubleLine("configID", lastConfig)
end
if button:GetNodeID() then
tooltip:AddDoubleLine("nodeID", button:GetNodeID())
end
if button:GetEntryID() then
tooltip:AddDoubleLine("entryID", button:GetEntryID())
end
if button:GetSpellID() then
tooltip:AddDoubleLine("spellID", button:GetSpellID())
end
tooltip:Show()
end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment