Skip to content

Commit 0a581a2

Browse files
committed
Fix megalomaniac trader
1 parent 84433c9 commit 0a581a2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Classes/TradeQuery.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ function TradeQueryClass:FilterToSafeItems(itemEntries, slotName)
958958
local itemsSafe = {}
959959
for _, entry in ipairs(itemEntries) do
960960
local item = new("Item", entry.item_string)
961-
if item.base and self.itemsTab:IsItemValidForSlot(item, slotName) then
961+
if item.base and ((not slotName) or self.itemsTab:IsItemValidForSlot(item, slotName)) then
962962
t_insert(itemsSafe, entry)
963963
end
964964
end
@@ -1002,7 +1002,7 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
10021002
self:SetNotice(context.controls.pbNotice, "")
10031003
end
10041004

1005-
local itemsSafe = self:FilterToSafeItems(items, activeSlot.slotName)
1005+
local itemsSafe = self:FilterToSafeItems(items, activeSlot and activeSlot.slotName)
10061006

10071007
if self.tradeQueryGenerator.lastAugmentBehaviour == "Copy Current" or self.tradeQueryGenerator.lastAnointBehaviour == "Copy Current" then
10081008
for i, _ in ipairs(itemsSafe) do

src/Classes/TradeQueryGenerator.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ Remove: anoints are completely ignored, and removed from items.]]
11871187
end
11881188

11891189

1190-
if isJewelSlot then
1190+
if isJewelSlot and not context.slotTbl.unique then
11911191
controls.jewelType = new("DropDownControl", {"TOPLEFT",lastItemAnchor,"BOTTOMLEFT"}, {0, 5, 100, 18}, { "Base", "Radius" }, function(index, value) end)
11921192
controls.jewelType.selIndex = self.lastJewelType or 1
11931193
controls.jewelTypeLabel = new("LabelControl", {"RIGHT",controls.jewelType,"LEFT"}, {-5, 0, 0, 16}, "Jewel Type:")

0 commit comments

Comments
 (0)