Skip to content

Commit f7a6cc9

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Abyss Timeless jewel mod display (#1365)
The mods granted by the timeless jewel do not appear in the node tooltip cause it is pulled from the tree file instead of the modified one. Not sure if this will cause bugs elsewhere The change in CalcSetup is needed so that it doesn't run the whole calc setup file every time you allocate a node but it causes the issue where stat don't get added to the base attribute nodes. Not sure how to fix this Co-authored-by: LocalIdentity <[email protected]>
1 parent b15baea commit f7a6cc9

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

src/Classes/PassiveTreeView.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13081308
local function processTimeLostModsAndGetLocalEffect(mNode, build)
13091309
local localIncEffect = 0
13101310
local hasWSCondition = false
1311-
local newSd = copyTable(build.spec.tree.nodes[mNode.id].sd)
1311+
local newSd = copyTable(mNode.sd)
13121312
for _, mod in ipairs(mNode.finalModList) do
13131313
-- if the jewelMod has a WS Condition, only add the incEffect given it matches the activeWeaponSet
13141314
-- otherwise the mod came from a jewel that is allocMode 0, so it always applies
@@ -1348,7 +1348,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13481348
local isInRadius = false
13491349
for id, socket in pairs(build.itemsTab.sockets) do
13501350
if build.itemsTab.activeSocketList and socket.inactive == false or socket.inactive == nil then
1351-
isInRadius = isInRadius or (build.spec.nodes[id] and build.spec.nodes[id].nodesInRadius and build.spec.nodes[id].nodesInRadius[3][node.id] ~= nil)
1351+
isInRadius = isInRadius or (build.spec.nodes[id] and build.spec.nodes[id].nodesInRadius and build.spec.nodes[id].nodesInRadius[4][node.id] ~= nil)
13521352
if isInRadius then break end
13531353
end
13541354
end
@@ -1366,7 +1366,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13661366
if mNode.sd and mNode.sd[1] and not mNode.allMasteryOptions then
13671367
tooltip:AddLine(16, "")
13681368
local localIncEffect = 0
1369-
if not mNode.isAttribute and (mNode.type == "Normal" or mNode.type == "Notable") and isNodeInARadius(node) then
1369+
if not (mNode.isAttribute and not mNode.conqueredBy) and (mNode.type == "Normal" or mNode.type == "Notable") and isNodeInARadius(node) then
13701370
localIncEffect = processTimeLostModsAndGetLocalEffect(mNode, build)
13711371
end
13721372
for i, line in ipairs(mNode.sd) do

src/Modules/CalcSetup.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function calcs.buildModListForNode(env, node, incSmallPassiveSkill)
131131
-- Run first pass radius jewels // jewel functions caught by jewelOtherFuncs
132132
for _, rad in pairs(env.radiusJewelList) do
133133
if rad.type == "Other" and rad.nodes[node.id] and rad.nodes[node.id].type ~= "Mastery" then
134-
if rad.item.baseName:find("Time%-Lost") == nil then
134+
if rad.item.baseName:find("Time%-Lost") == nil and rad.item.baseName:find("Timeless Jewel") == nil then
135135
rad.func(node, modList, rad.data)
136136
elseif not node.isAttribute and (node.type == "Normal" or node.type == "Notable") then
137137
local cache = GlobalCache.cachedData[env.mode].radiusJewelData[rad.nodeId]

src/Modules/ModParser.lua

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6501,6 +6501,18 @@ local jewelOtherFuncs = {
65016501
end
65026502
end
65036503
end,
6504+
["conquered (%w+) Passive Skills also grant (.*)$"] = function(type, mod)
6505+
return function(node, out, data)
6506+
if node and (node.type == firstToUpper(type) or (node.type == "Normal" and not node.isAttribute and firstToUpper(type) == "Small") or (node.type == "Normal" and node.isAttribute and firstToUpper(type) == "Attribute")) then
6507+
local modList, line = parseMod(mod)
6508+
if not line and modList[1] then -- something failed to parse, do not add to list
6509+
modList[1].parsedLine = capitalizeWordsInString(mod)
6510+
modList[1].source = data.modSource
6511+
out:AddMod(modList[1])
6512+
end
6513+
end
6514+
end
6515+
end,
65046516
--------
65056517
["50% increased Effect of non-Keystone Passive Skills in Radius"] = function(node, out, data)
65066518
if node and node.type ~= "Keystone" then
@@ -6699,15 +6711,9 @@ for k, v in pairs(jewelOtherFuncs) do
66996711
-- Need to not modify any nodes already modified by timeless jewels
67006712
-- Some functions return a function instead of simply adding mods, so if
67016713
-- we don't see a node right away, run the outer function first
6702-
if cap1 and type(cap1) == "table" and cap1.conqueredBy then
6703-
return
6704-
end
67056714
local innerFuncOrNil = v(cap1, cap2, cap3, cap4, cap5)
67066715
-- In all (current) cases, there is only one nested layer, so no need for recursion
67076716
return function(node, out, other)
6708-
if node and type(node) == "table" and node.conqueredBy then
6709-
return
6710-
end
67116717
return innerFuncOrNil(node, out, other)
67126718
end
67136719
end, type = "Other" }

0 commit comments

Comments
 (0)