Skip to content

Commit ff65b69

Browse files
committed
Minor code cleanup
1 parent 892c754 commit ff65b69

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

TalentTreeViewer_TWW/TalentViewer.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ local cache = {
2929
classFiles = {},
3030
classSpecs = {},
3131
nodes = {},
32-
tierLevel = {},
3332
specNames = {},
3433
specIndexToIdMap = {},
3534
specIdToClassIdMap = {},
@@ -326,6 +325,7 @@ end
326325
--- Reset the talent tree, and select the specified spec
327326
--- @param classId number
328327
--- @param specId number
328+
--- @param skipDropdownUpdate boolean?
329329
function TalentViewer:SelectSpec(classId, specId, skipDropdownUpdate)
330330
assert(type(classId) == 'number', 'classId must be a number');
331331
assert(type(specId) == 'number', 'specId must be a number');
@@ -378,7 +378,7 @@ end
378378

379379
function TalentViewer:InitDropdown()
380380
if self.dropDownButton then return; end
381-
--- @type BUTTON
381+
--- @type WowStyle1DropdownTemplate
382382
self.dropDownButton = TalentViewer_DF.Talents.TV_DropdownButton;
383383

384384
self.dropDownButton:SetupMenu(function(owner, rootDescription)
@@ -428,12 +428,13 @@ function TalentViewer:InitDropdown()
428428
end
429429
end
430430

431+
--- @param rootDescription RootMenuDescriptionProxy
431432
function TalentViewer:BuildMenu(rootDescription)
432433
local function isClassSelected(classID)
433-
return classID == (cache.initialSpecIDtoClassID[TalentViewer.selectedSpecId] and cache.initialFakeClassID or TalentViewer.selectedClassId);
434+
return classID == (cache.initialSpecIDtoClassID[self.selectedSpecId] and cache.initialFakeClassID or self.selectedClassId);
434435
end
435436
local function isSpecSelected(specID)
436-
return specID == TalentViewer.selectedSpecId;
437+
return specID == self.selectedSpecId;
437438
end
438439
local function selectSpec(specID)
439440
self:SelectSpec(cache.specIdToClassIdMap[specID], specID, true);

0 commit comments

Comments
 (0)