Shuffle some talent code
Jim Whitehead [08-29-19 - 05:30]
diff --git a/BindConfig.lua b/BindConfig.lua
index 066813c..a3e1d4c 100755
--- a/BindConfig.lua
+++ b/BindConfig.lua
@@ -47,16 +47,15 @@ function CliqueConfig:OnHide()
self:UpdateAlert()
end
--- compat:classic
function CliqueConfig:SetupTalents()
- if not GetNumSpecializations then
- self.talents = {L["Default"]}
- else
+ if addon.compatRelease then
self.talents = {}
for i = 1, GetNumSpecializations() do
local id, name = GetSpecializationInfo(i)
self.talents[i] = name
end
+ else
+ self.talents = {L["Default"]}
end
end
diff --git a/OptionsPanel.lua b/OptionsPanel.lua
index 2910b36..13a5eab 100755
--- a/OptionsPanel.lua
+++ b/OptionsPanel.lua
@@ -88,20 +88,19 @@ function panel:CreateOptions()
UIDropDownMenu_SetWidth(self.talentProfiles[i], 200)
BlizzardOptionsPanel_SetupDependentControl(self.specswap, self.talentProfiles[i])
end
+ else
+ for i = 1, 1 do
+ local _, specName = "Default"
+ local name = "CliqueOptionsSpec" .. i
+ local label = make_label(name .. "Label", self, "GameFontNormalSmall")
+ label:SetText(L["Talent profile: %s"]:format("Default"))
+ self.talentProfiles[i] = make_dropdown(name, self)
+ self.talentProfiles[i].profileLabel = label
+ UIDropDownMenu_SetWidth(self.talentProfiles[i], 200)
+ BlizzardOptionsPanel_SetupDependentControl(self.specswap, self.talentProfiles[i])
+ end
end
- for i = 1, 1 do
- local _, specName = "Default"
- local name = "CliqueOptionsSpec" .. i
- local label = make_label(name .. "Label", self, "GameFontNormalSmall")
- label:SetText(L["Talent profile: %s"]:format("Default"))
- self.talentProfiles[i] = make_dropdown(name, self)
- self.talentProfiles[i].profileLabel = label
- UIDropDownMenu_SetWidth(self.talentProfiles[i], 200)
- BlizzardOptionsPanel_SetupDependentControl(self.specswap, self.talentProfiles[i])
- end
-
-
self.profilelabel = make_label("CliqueOptionsProfileMgmtLabel", self, "GameFontNormalSmall")
self.profilelabel:SetText(L["Profile Management:"])
self.profiledd = make_dropdown("CliqueOptionsProfileMgmt", self)