Skip to content

Commit 312ea3f

Browse files
committed
Mini tree: fix apex talent incorrectly showing as different in most cases
1 parent 15dae39 commit 312ea3f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/miniTreeInTooltip.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ function Module:AddBuildToTooltip(tooltip, exportString)
394394
end
395395
end
396396
end
397-
local diff = calculateDiff and self:GetDiffForNode(nodeID, entryID, rank) or nil;
397+
local diff = calculateDiff and self:GetDiffForNode(nodeID, entryID, rank, nodeSelectionInfo.isChoiceNode) or nil;
398398

399399
local dot = container:MakeDot(column, row, style, spellIcon, isAtlas, diff);
400400
dots[nodeID] = dot;
@@ -428,16 +428,16 @@ function Module:AddBuildToTooltip(tooltip, exportString)
428428
tooltip:Show();
429429
end
430430

431-
function Module:GetDiffForNode(nodeID, targetEntry, targetRank)
431+
function Module:GetDiffForNode(nodeID, targetEntry, targetRank, isChoiceNode)
432432
local selfNodeInfo = C_Traits.GetNodeInfo(C_ClassTalents.GetActiveConfigID(), nodeID);
433433
local selfEntry = selfNodeInfo and selfNodeInfo.activeEntry and selfNodeInfo.activeEntry.entryID;
434-
local selfRank = selfNodeInfo and selfNodeInfo.activeEntry and selfNodeInfo.activeEntry.rank or 0;
434+
local selfRank = selfNodeInfo and (selfNodeInfo.activeRank or selfNodeInfo.activeEntry and selfNodeInfo.activeEntry.rank) or 0;
435435

436436
local diff;
437437
if targetRank == selfRank then
438438
if selfRank == 0 and targetRank == 0 then
439439
diff = nil; -- both empty
440-
elseif targetEntry == selfEntry then
440+
elseif targetEntry == selfEntry or not isChoiceNode then
441441
diff = DIFF_DEFAULT_YELLOW; -- same entry, same rank
442442
else
443443
diff = DIFF_DEFAULT_ORANGE; -- different entry

0 commit comments

Comments
 (0)