From c04e12c39aebbbe781f02f60c3f6213b9455b762 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Sat, 18 Jan 2025 11:35:36 -0600 Subject: [PATCH] fix ATD adding stats to attribute nodes --- src/Modules/CalcSetup.lua | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 5056bc76..0162d7c2 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -148,17 +148,21 @@ local function addStats(jewel, node, spec) end local function addStatsFromJewelToNode(jewel, node, spec) - local itemsTab = spec.build.itemsTab - -- - if itemsTab.activeSocketList then - for _, nodeId in pairs(itemsTab.activeSocketList) do - local _, socketedJewel = itemsTab:GetSocketAndJewelForNodeID(nodeId) - if socketedJewel and socketedJewel.title == "Against the Darkness" then - return addStats(jewel, node, spec) + -- attribute nodes do not count as Small Passives + if not node.isAttribute then + local itemsTab = spec.build.itemsTab + -- if Against the Darkness is socketed, add the stat + if itemsTab.activeSocketList then + for _, nodeId in pairs(itemsTab.activeSocketList) do + local _, socketedJewel = itemsTab:GetSocketAndJewelForNodeID(nodeId) + if socketedJewel and socketedJewel.title == "Against the Darkness" then + return addStats(jewel, node, spec) + end end + -- activeSocketList isn't init on Load, need to run once + elseif itemsTab.initSockets then + return addStats(jewel, node, spec) end - elseif itemsTab.initSockets then - return addStats(jewel, node, spec) end end function calcs.buildModListForNode(env, node, incSmallPassiveSkill)