Skip to content

Commit a960b12

Browse files
authored
Fixes #1318, Fixes #1317: Essences mods were trying to apply to incompatible base types (#1320)
1 parent 8ae323f commit a960b12

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

src/Classes/ItemsTab.lua

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,12 +2516,14 @@ function ItemsTabClass:AddCustomModifierToDisplayItem()
25162516
local modId = essence.mods[self.displayItem.type]
25172517
if modId then
25182518
local mod = self.displayItem.affixes[modId] or data.itemMods.Exclusive[modId]
2519-
t_insert(modList, {
2520-
label = essence.name .. " " .. "^8[" .. table.concat(mod, "/") .. "]" .. " (" .. (mod.type or "Suffix") .. ")",
2521-
mod = mod,
2522-
type = "custom",
2523-
essence = essence,
2524-
})
2519+
if mod then -- passive_hash mods don't get described
2520+
t_insert(modList, {
2521+
label = essence.name .. " " .. "^8[" .. table.concat(mod, "/") .. "]" .. " (" .. (mod.type or "Suffix") .. ")",
2522+
mod = mod,
2523+
type = "custom",
2524+
essence = essence,
2525+
})
2526+
end
25252527
end
25262528
end
25272529
table.sort(modList, function(a, b)
@@ -2537,7 +2539,9 @@ function ItemsTabClass:AddCustomModifierToDisplayItem()
25372539
t_insert(sourceList, { label = "Prefix", sourceId = "PREFIX" })
25382540
t_insert(sourceList, { label = "Suffix", sourceId = "SUFFIX" })
25392541
end
2540-
if self.displayItem.type ~= "Jewel" and self.displayItem.type ~= "Flask" then
2542+
buildMods("ESSENCE") -- This is technically a waste if there aren't any essence mods,
2543+
-- but it makes it so we don't have to maintain a list of applicable essence-able base types
2544+
if #modList > 0 then
25412545
t_insert(sourceList, { label = "Essence", sourceId = "ESSENCE" })
25422546
end
25432547
t_insert(sourceList, { label = "Custom", sourceId = "CUSTOM" })

0 commit comments

Comments
 (0)