Skip to content

Commit 4bf0e6b

Browse files
committed
fix: Handle talent tree information for Classic and Cataclysm versions
1 parent 5880650 commit 4bf0e6b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Myslot.lua

+14-2
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,21 @@ local function GetTalentTreeString()
220220
if not ClassTalentFrame_LoadUI then
221221
-- maybe classic
222222
if GetTalentTabInfo then
223-
return select(3, GetTalentTabInfo(1)) ..
224-
"/" .. select(3, GetTalentTabInfo(2)) .. "/" .. select(3, GetTalentTabInfo(3))
223+
224+
if tonumber(select(3, GetTalentTabInfo(1)), 10) then
225+
return select(3, GetTalentTabInfo(1)) .. "/" .. select(3, GetTalentTabInfo(2)) .. "/" .. select(3, GetTalentTabInfo(3))
226+
end
227+
228+
-- Cataclysm
229+
230+
for i = 1, 3 do
231+
if select(8, GetTalentTabInfo(i)) then
232+
return select(2, GetTalentTabInfo(i))
233+
end
234+
end
225235
end
236+
237+
return nil
226238
end
227239

228240
ClassTalentFrame_LoadUI()

0 commit comments

Comments
 (0)