Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Kalandra's Touch skipping mods #8323

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -983,19 +983,22 @@ function calcs.initEnv(build, mode, override, specEnv)
if item.shaper or item.elder then
env.itemModDB.multipliers.ShaperOrElderItem = (env.itemModDB.multipliers.ShaperOrElderItem or 0) - 1
end
local otherRing = (slotName == "Ring 1" and build.itemsTab.items[build.itemsTab.orderedSlots[59].selItemId]) or (slotName == "Ring 2" and build.itemsTab.items[build.itemsTab.orderedSlots[58].selItemId])
local otherRing = items[(slotName == "Ring 1" and "Ring 2") or (slotName == "Ring 2" and "Ring 1")]
if otherRing and not otherRing.name:match("Kalandra's Touch") then
local otherRingList = otherRing and copyTable(otherRing.modList or otherRing.slotModList[slot.slotNum]) or {}
for index, mod in ipairs(otherRingList) do
modLib.setSource(mod, item.modSource)
for _, mod in ipairs(otherRing.modList or otherRing.slotModList[slot.slotNum] or {}) do
-- Filter out SocketedIn type mods
for _, tag in ipairs(mod) do
if tag.type == "SocketedIn" then
otherRingList[index] = nil
break
goto skip_mod
end
end

local modCopy = copyTable(mod)
modLib.setSource(modCopy, item.modSource)
env.itemModDB:ScaleAddMod(modCopy, scale)

::skip_mod::
end
env.itemModDB:ScaleAddList(otherRingList, scale)
-- Adjust multipliers based on other ring
for mult, property in pairs({["CorruptedItem"] = "corrupted", ["ShaperItem"] = "shaper", ["ElderItem"] = "elder"}) do
if otherRing[property] then
Expand Down
Loading