@@ -29,7 +29,6 @@ local cache = {
2929 classFiles = {},
3030 classSpecs = {},
3131 nodes = {},
32- tierLevel = {},
3332 specNames = {},
3433 specIndexToIdMap = {},
3534 specIdToClassIdMap = {},
326325--- Reset the talent tree, and select the specified spec
327326--- @param classId number
328327--- @param specId number
328+ --- @param skipDropdownUpdate boolean ?
329329function 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' );
378378
379379function 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
429429end
430430
431+ --- @param rootDescription RootMenuDescriptionProxy
431432function 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