Skip to content

Commit c08ec60

Browse files
authored
fix mastery mods not supported markers moving when assigning masteries (#9893)
1 parent c1fbbc7 commit c08ec60

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/Classes/PassiveTreeView.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,15 +1547,17 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
15471547
local lineCount = 0
15481548
for n, effect in ipairs(mNode.masteryEffects) do
15491549
local existingMastery = isValueInTable(build.spec.masterySelections, effect.effect)
1550-
if not existingMastery then
1551-
effect = build.spec.tree.masteryEffects[effect.effect]
1552-
for _, line in ipairs(effect.sd) do
1553-
lineCount = lineCount + 1
1550+
local effectData = build.spec.tree.masteryEffects[effect.effect]
1551+
-- Must step through every mod, and filter out already allocated mods later
1552+
-- Otherwise red not supported text applies to the wrong indexes
1553+
for _, line in ipairs(effectData.sd) do
1554+
lineCount = lineCount + 1
1555+
if not existingMastery then
15541556
addModInfoToTooltip(mNode, lineCount, line)
15551557
end
1556-
if n < #mNode.masteryEffects then
1557-
tooltip:AddLine(6, "")
1558-
end
1558+
end
1559+
if not existingMastery and n < #mNode.masteryEffects then
1560+
tooltip:AddLine(6, "")
15591561
end
15601562
end
15611563
tooltip:AddSeparator(14)

0 commit comments

Comments
 (0)