Skip to content

Commit

Permalink
fix: #2185 handle nil spellIDs when collecting unlearned talents
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Jul 27, 2024
1 parent 17aa64f commit 6356cc7
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions Components/Core/Conditions/Categories/Talents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -429,18 +429,17 @@ if C_ClassTalents then
local definitionInfo = C_Traits.GetDefinitionInfo(entryInfo.definitionID)
local spellID = definitionInfo.spellID

if spellID
-- The ranks are stored on the node, but we
-- have to make sure that we're looking at the ranks for the
-- currently selected entry for the talent.
and nodeInfo.activeEntry
and nodeInfo.activeEntry.entryID == entryID
then
map[spellID] = nodeInfo.ranksPurchased or 0
elseif not map[spellID] then
-- Always populate unlearned talents if there's no entry for them
-- so that the suggestion list contains unlearned choice nodes.
map[spellID] = 0
if spellID then
-- The ranks are stored on the node, but we
-- have to make sure that we're looking at the ranks for the
-- currently selected entry for the talent.
if nodeInfo.activeEntry and nodeInfo.activeEntry.entryID == entryID then
map[spellID] = nodeInfo.ranksPurchased or 0
elseif not map[spellID] then
-- Always populate unlearned talents if there's no entry for them
-- so that the suggestion list contains unlearned choice nodes.
map[spellID] = 0
end
end
end
end
Expand Down

0 comments on commit 6356cc7

Please sign in to comment.