Skip to content

Commit 348f63c

Browse files
committed
System - Real Talent Info Fix
1 parent a690193 commit 348f63c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

System/Loader/cBuilder.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)