Skip to content

Commit 3868781

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Runegraft bonus for Boots / Gloves not working (#8746)
Needs to be handled later to work with nodes on the tree. Not sure if removing the restriction for scaling a mod below 0 will cause issues elsewhere Co-authored-by: LocalIdentity <[email protected]>
1 parent 8e93b63 commit 3868781

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

src/Classes/ModStore.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ function ModStoreClass:ScaleAddMod(mod, scale)
4545
if scale == 1 or unscalable then
4646
self:AddMod(mod)
4747
else
48-
scale = m_max(scale, 0)
4948
local scaledMod = copyTable(mod)
5049
local subMod = scaledMod
5150
if type(scaledMod.value) == "table" then

src/Modules/CalcSetup.lua

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,22 +1042,6 @@ function calcs.initEnv(build, mode, override, specEnv)
10421042
combinedList:MergeMod(mod)
10431043
end
10441044
env.itemModDB:ScaleAddList(combinedList, scale)
1045-
elseif item.type == "Gloves" and items["Gloves"] then
1046-
local bonusMod=(1 + (env.modDB:Sum("INC", nil, "EffectOfBonusesFromGloves") or 100) / 100)
1047-
scale = scale * bonusMod
1048-
local combinedList = new("ModList")
1049-
for _, mod in ipairs(srcList) do
1050-
combinedList:MergeMod(mod)
1051-
end
1052-
env.itemModDB:ScaleAddList(combinedList, scale)
1053-
elseif item.type == "Boots" and items["Boots"] then
1054-
local bonusMod=(1 + (env.modDB:Sum("INC", nil, "EffectOfBonusesFromBoots") or 100) / 100)
1055-
scale = scale * bonusMod
1056-
local combinedList = new("ModList")
1057-
for _, mod in ipairs(srcList) do
1058-
combinedList:MergeMod(mod)
1059-
end
1060-
env.itemModDB:ScaleAddList(combinedList, scale)
10611045
elseif env.modDB.multipliers["CorruptedMagicJewelEffect"] and item.type == "Jewel" and item.rarity == "MAGIC" and item.corrupted and slot.nodeId and item.base.subType ~= "Charm" then
10621046
scale = scale + env.modDB.multipliers["CorruptedMagicJewelEffect"]
10631047
local combinedList = new("ModList")
@@ -1202,6 +1186,29 @@ function calcs.initEnv(build, mode, override, specEnv)
12021186
return calcs.initEnv(build, mode, override, specEnv)
12031187
end
12041188
end
1189+
1190+
if env.player.itemList["Gloves"] then
1191+
local gloveEffectMod = env.modDB:Sum("INC", nil, "EffectOfBonusesFromGloves") / 100
1192+
if gloveEffectMod ~= 0 then
1193+
local modList = env.player.itemList["Gloves"].modList
1194+
for _, mod in ipairs(modList) do
1195+
local modCopy = copyTable(mod)
1196+
modCopy.source = "Many Sources:" .. tostring(gloveEffectMod * 100) .. "% Gloves Bonus Effect"
1197+
modDB:ScaleAddMod(modCopy, gloveEffectMod)
1198+
end
1199+
end
1200+
end
1201+
if env.player.itemList["Boots"] then
1202+
local bootEffectMod = env.modDB:Sum("INC", nil, "EffectOfBonusesFromBoots") / 100
1203+
if bootEffectMod ~= 0 then
1204+
local modList = env.player.itemList["Boots"].modList
1205+
for _, mod in ipairs(modList) do
1206+
local modCopy = copyTable(mod)
1207+
modCopy.source = "Many Sources:" .. tostring(bootEffectMod * 100) .. "% Boots Bonus Effect"
1208+
modDB:ScaleAddMod(modCopy, bootEffectMod)
1209+
end
1210+
end
1211+
end
12051212

12061213
-- Find skills granted by tree nodes
12071214
if not accelerate.nodeAlloc then

0 commit comments

Comments
 (0)