Skip to content

Commit db48e08

Browse files
authored
add tattoo name to mod source in calc breakdowns (#9315)
1 parent 22bc7b1 commit db48e08

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Classes/CalcBreakdownControl.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,14 @@ function CalcBreakdownClass:AddModSection(sectionData, modList)
404404
elseif sourceType == "Tree" then
405405
-- Modifier is from a passive node, add node name, and add node ID (used to show node location)
406406
local nodeId = row.mod.source:match("Tree:(%d+)")
407+
local tattooNodeId = row.mod.source:match("Tree:(%w+)")
407408
if nodeId then
408409
local nodeIdNumber = tonumber(nodeId)
409410
local node = build.spec.nodes[nodeIdNumber] or build.spec.tree.nodes[nodeIdNumber] or build.latestTree.nodes[nodeIdNumber]
410411
row.sourceName = node.dn
411412
row.sourceNameNode = node
413+
elseif tattooNodeId then
414+
row.sourceName = build.spec.tree.tattoo.idMap[tattooNodeId]
412415
end
413416
elseif sourceType == "Skill" then
414417
-- Extract skill name

src/Classes/PassiveTree.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,12 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
703703
node.sprites = { }
704704
end
705705

706+
-- create id to dn map for calcs breakdown sourcing
707+
if not self.tattoo.idMap then
708+
self.tattoo.idMap = { }
709+
end
710+
self.tattoo.idMap[node.id] = node.dn
711+
706712
self:ProcessStats(node)
707713
end
708714

0 commit comments

Comments
 (0)