File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -174,14 +174,16 @@ function br.loader:new(spec,specName)
174174 local nodes = br ._G .C_Traits .GetTreeNodes (treeId )
175175 for _ , nodeId in pairs (nodes ) do
176176 local node = br ._G .C_Traits .GetNodeInfo (configId , nodeId )
177+ local activeid = (node .activeRank > 0 or node .ranksPurchased > 0 ) and node .activeEntry and node .activeEntry .entryID or node .entryIDs [1 ]
177178 for _ , entryID in pairs (node .entryIDs ) do
178179 local entryInfo = br ._G .C_Traits .GetEntryInfo (configId ,entryID )
179180 local definitionInfo = br ._G .C_Traits .GetDefinitionInfo (entryInfo .definitionID )
180181 if definitionInfo .spellID ~= nil then
181- local rank = node .activeRank
182+ local rank = node .activeRank or 0
183+ local isActive = activeid == entryID and rank > 0
182184 talents [definitionInfo .spellID ] = talents [definitionInfo .spellID ] or {}
183- talents [definitionInfo .spellID ].active = rank > 0
184- talents [definitionInfo .spellID ].rank = rank
185+ talents [definitionInfo .spellID ].active = isActive
186+ talents [definitionInfo .spellID ].rank = isActive and rank or 0
185187 end
186188 end
187189 end
You can’t perform that action at this time.
0 commit comments