Skip to content

Commit 4d3d11e

Browse files
committed
update dualspec lua
1 parent d4a36bd commit 4d3d11e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

ElvUI/Core/Modules/DataTexts/DualSpec.lua

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
local E, L, V, P, G = unpack(ElvUI)
22
local DT = E:GetModule('DataTexts')
33

4-
if not (E.Wrath or E.ClassicSOD) then return end
5-
64
local _G = _G
75
local format, strjoin = format, strjoin
86
local HideUIPanel = HideUIPanel
@@ -29,7 +27,7 @@ local function BuildTalentString(talentGroup)
2927

3028
for i = 1, MAX_TALENT_TABS do
3129
local _, _, pointsSpent = GetTalentTabInfo(i, false, false, talentGroup)
32-
if (str == '') then
30+
if str == '' then
3331
str = pointsSpent
3432
else
3533
str = strjoin('/', str, pointsSpent)
@@ -59,10 +57,12 @@ end
5957
local function OnEnter()
6058
DT.tooltip:ClearLines()
6159

62-
DT.tooltip:AddDoubleLine(format('%s: %s', ColorText(PRIMARY, activeGroup == 1 and '0CD809' or 'FFFFFF'), primaryStr))
60+
local primary = format('%s: %s', ColorText(PRIMARY, activeGroup == 1 and '0CD809' or 'FFFFFF'), primaryStr)
61+
DT.tooltip:AddDoubleLine(primary)
6362

6463
if hasDualSpec then
65-
DT.tooltip:AddDoubleLine(format('%s: %s', ColorText(SECONDARY, activeGroup == 2 and '0CD809' or 'FFFFFF'), secondaryStr))
64+
local secondary = format('%s: %s', ColorText(SECONDARY, activeGroup == 2 and '0CD809' or 'FFFFFF'), secondaryStr)
65+
DT.tooltip:AddDoubleLine(secondary)
6666
end
6767

6868
DT.tooltip:AddLine(' ')
@@ -87,10 +87,8 @@ local function OnClick(_, button)
8787
else
8888
HideUIPanel(_G.PlayerTalentFrame)
8989
end
90-
else
91-
if hasDualSpec then
92-
SetActiveTalentGroup(activeGroup == 1 and 2 or 1)
93-
end
90+
elseif hasDualSpec then
91+
SetActiveTalentGroup(activeGroup == 1 and 2 or 1)
9492
end
9593
end
9694
end

0 commit comments

Comments
 (0)