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 Widowhail multiplying mods individually, oddly interacting with weapon swaps. #6879

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3563,7 +3563,7 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
local selItem = self.items[compareSlot.selItemId]
local storedGlobalCacheDPSView = GlobalCache.useFullDPS
GlobalCache.useFullDPS = GlobalCache.numActiveSkillInFullDPS > 0
local output = calcFunc({ repSlotName = compareSlot.slotName, repItem = item ~= selItem and item }, {})
local output = calcFunc({ repSlotName = compareSlot.slotName, repItem = item ~= selItem and item or nil}, {})
GlobalCache.useFullDPS = storedGlobalCacheDPSView
local header
if item == selItem then
Expand Down
12 changes: 7 additions & 5 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -948,11 +948,13 @@ function calcs.initEnv(build, mode, override, specEnv)
env.itemModDB:ScaleAddList(otherRingList, scale)
end
env.itemModDB:ScaleAddList(srcList, scale)
elseif item.type == "Quiver" and ((not slot.slotName:match("Swap") and build.itemsTab.items[build.itemsTab.slots["Weapon 1"].selItemId] and build.itemsTab.items[build.itemsTab.slots["Weapon 1"].selItemId].name:match("Widowhail"))
or (build.itemsTab.items[build.itemsTab.slots["Weapon 1 Swap"].selItemId] and build.itemsTab.items[build.itemsTab.slots["Weapon 1 Swap"].selItemId].name:match("Widowhail"))) then
local WidowHailBaseMods = not slot.slotName:match("Swap") and build.itemsTab.items[build.itemsTab.slots["Weapon 1"].selItemId].baseModList or build.itemsTab.items[build.itemsTab.slots["Weapon 1 Swap"].selItemId].baseModList
scale = scale * (1 + (WidowHailBaseMods:Sum("INC", nil, "EffectOfBonusesFromQuiver") or 100) / 100)
env.itemModDB:ScaleAddList(srcList, scale)
elseif item.type == "Quiver" and items["Weapon 1"] and items["Weapon 1"].name:match("Widowhail") then
scale = scale * (1 + (items["Weapon 1"].baseModList:Sum("INC", nil, "EffectOfBonusesFromQuiver") or 100) / 100)
local combinedList = new("ModList")
for _, mod in ipairs(srcList) do
combinedList:MergeMod(mod)
end
env.itemModDB:ScaleAddList(combinedList, scale)
else
env.itemModDB:ScaleAddList(srcList, scale)
end
Expand Down
Loading