Skip to content

Commit fc98129

Browse files
Fix tooltips for passive node mods of type FLAG scaled by Hulking Form (#580)
* fix hulking form increase for nodes that do not inherently have a value to scale * cleaner if --------- Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com>
1 parent 51948f1 commit fc98129

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Classes/PassiveTreeView.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,9 +1156,13 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
11561156
-- Apply Inc Node scaling from Hulking Form only visually
11571157
if (incSmallPassiveSkillEffect + localSmallIncEffect) > 0 and node.type == "Normal" and not node.isAttribute and not node.ascendancyName and node.mods[i].list then
11581158
local scale = 1 + (incSmallPassiveSkillEffect + localSmallIncEffect) / 100
1159+
local modsList = copyTable(node.mods[i].list)
11591160
local scaledList = new("ModList")
1160-
scaledList:ScaleAddList(node.mods[i].list, scale)
1161-
local number = line:match("%d*%.?%d+")
1161+
-- some passive node mods are only Condition/Flag and have no value to scale by default, grab number from line
1162+
if modsList[1] and modsList[1].type == "FLAG" then
1163+
modsList[1].value = tonumber(line:match("%d+"))
1164+
end
1165+
scaledList:ScaleAddList(modsList, scale)
11621166
for j, mod in ipairs(scaledList) do
11631167
local newValue = 0
11641168
if type(mod.value) == "number" then

0 commit comments

Comments
 (0)