Skip to content

Commit

Permalink
fix: Handle talent tree information for Classic and Cataclysm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tg123 committed May 11, 2024
1 parent 5880650 commit 4bf0e6b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Myslot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,21 @@ local function GetTalentTreeString()
if not ClassTalentFrame_LoadUI then
-- maybe classic
if GetTalentTabInfo then
return select(3, GetTalentTabInfo(1)) ..
"/" .. select(3, GetTalentTabInfo(2)) .. "/" .. select(3, GetTalentTabInfo(3))

if tonumber(select(3, GetTalentTabInfo(1)), 10) then
return select(3, GetTalentTabInfo(1)) .. "/" .. select(3, GetTalentTabInfo(2)) .. "/" .. select(3, GetTalentTabInfo(3))
end

-- Cataclysm

for i = 1, 3 do
if select(8, GetTalentTabInfo(i)) then
return select(2, GetTalentTabInfo(i))
end
end
end

return nil
end

ClassTalentFrame_LoadUI()
Expand Down

0 comments on commit 4bf0e6b

Please sign in to comment.