Skip to content

Commit e3c0c1f

Browse files
committed
Fix cluster jewel enchant handling
1 parent dfef739 commit e3c0c1f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/Classes/CompareBuySimilar.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ local function buildURL(item, slotName, controls, modEntries, defenceEntries, is
139139
local function getFilter(tradeId)
140140
local filter = { id = tradeId }
141141
if entry.isOption then
142-
filter.value = { min = entry.value, max = entry.value }
142+
-- timeless jewels use a min max range despite matching as an option
143+
filter.value = tradeId:match("timeless") and { min = entry.value, max = entry.value } or
144+
{ option = entry.value }
143145
elseif entry.value then
144146
local minVal = tonumber(controls[prefix .. "Min"].buf)
145147
local maxVal = tonumber(controls[prefix .. "Max"].buf)

src/Classes/TradeHelpers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function M.findTradeIdOption(modLine, modType)
163163
if not tradeStats or not optionTradeStatMap then return end
164164

165165
-- reformat double-line cluster enchants
166-
modLine = modLine:gsub("\nAdded Small Passive Skills grant: ", "\n")
166+
modLine = modLine:gsub(".added small passive skills grant: ", " ")
167167
for pat, entry in pairs(optionTradeStatMap) do
168168
local match = modLine:match(pat)
169169
if entry.type == modType and match then

0 commit comments

Comments
 (0)