@@ -125,14 +125,14 @@ local function setRadiusJewelStats(radiusJewel, radiusJewelStats)
125
125
end
126
126
end
127
127
128
- local function addStatsFromJewelToNode (jewel , node , spec )
128
+ local function addStats (jewel , node , spec )
129
129
-- reset node stats to base or override for attributes
130
130
if spec .hashOverrides and spec .hashOverrides [node .id ] then
131
131
node .sd = copyTable (spec .hashOverrides [node .id ].sd , true )
132
132
else
133
133
node .sd = copyTable (spec .tree .nodes [node .id ].sd , true )
134
134
end
135
-
135
+
136
136
local radiusJewelStats = { }
137
137
setRadiusJewelStats (jewel , radiusJewelStats )
138
138
for _ , stat in ipairs (radiusJewelStats ) do
@@ -142,8 +142,23 @@ local function addStatsFromJewelToNode(jewel, node, spec)
142
142
end
143
143
end
144
144
spec .tree :ProcessStats (node )
145
+ return node .modList
145
146
end
146
147
148
+ local function addStatsFromJewelToNode (jewel , node , spec )
149
+ local itemsTab = spec .build .itemsTab
150
+ --
151
+ if itemsTab .activeSocketList then
152
+ for _ , nodeId in pairs (itemsTab .activeSocketList ) do
153
+ local _ , socketedJewel = itemsTab :GetSocketAndJewelForNodeID (nodeId )
154
+ if socketedJewel and socketedJewel .title == " Against the Darkness" then
155
+ return addStats (jewel , node , spec )
156
+ end
157
+ end
158
+ elseif itemsTab .initSockets then
159
+ return addStats (jewel , node , spec )
160
+ end
161
+ end
147
162
function calcs .buildModListForNode (env , node , incSmallPassiveSkill )
148
163
local modList = new (" ModList" )
149
164
if node .type == " Keystone" then
@@ -175,7 +190,8 @@ function calcs.buildModListForNode(env, node, incSmallPassiveSkill)
175
190
if rad .item .title ~= " Against the Darkness" then
176
191
rad .func (node , modList , rad .data )
177
192
else
178
- addStatsFromJewelToNode (rad , node , env .build .spec )
193
+ local nodeList = addStatsFromJewelToNode (rad , node , env .build .spec )
194
+ if nodeList then modList = nodeList end
179
195
end
180
196
end
181
197
end
@@ -198,11 +214,12 @@ function calcs.buildModListForNode(env, node, incSmallPassiveSkill)
198
214
if rad .item .title ~= " Against the Darkness" then
199
215
rad .func (node , modList , rad .data )
200
216
else
201
- addStatsFromJewelToNode (rad , node , env .build .spec )
217
+ local nodeList = addStatsFromJewelToNode (rad , node , env .build .spec )
218
+ if nodeList then modList = nodeList end
202
219
end
203
220
end
204
221
end
205
-
222
+
206
223
if modList :Flag (nil , " PassiveSkillHasOtherEffect" ) then
207
224
for i , mod in ipairs (modList :List (skillCfg , " NodeModifier" )) do
208
225
if i == 1 then wipeTable (modList ) end
0 commit comments