Skip to content

Commit 07dec37

Browse files
authored
fix Ring 3 and Weapon 1 Swap, Weapon 2 Swap (#9310)
1 parent 4304570 commit 07dec37

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Classes/TradeQuery.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ local m_min = math.min
1616
local m_ceil = math.ceil
1717
local s_format = string.format
1818

19-
local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Ring 3", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }
19+
local baseSlots = { "Weapon 1", "Weapon 2", "Weapon 1 Swap", "Weapon 2 Swap", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Ring 3", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }
2020

2121
local TradeQueryClass = newClass("TradeQuery", function(self, itemsTab)
2222
self.itemsTab = itemsTab
@@ -428,7 +428,9 @@ Highest Weight - Displays the order retrieved from trade]]
428428
-- Individual slot rows
429429
local slotTables = {}
430430
for _, slotName in ipairs(baseSlots) do
431-
t_insert(slotTables, { slotName = slotName })
431+
if self.itemsTab.slots[slotName].shown() then
432+
t_insert(slotTables, { slotName = slotName })
433+
end
432434
-- add abyssal sockets to slotTables if exist for this slot
433435
if activeAbyssalSockets[slotName] then
434436
for _, abyssalSocket in pairs(activeAbyssalSockets[slotName]) do

src/Classes/TradeQueryGenerator.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ function TradeQueryGeneratorClass:StartQuery(slot, options)
727727
calcNodesInsteadOfMods = true,
728728
}
729729
end
730-
elseif slot.slotName == "Weapon 2" or slot.slotName == "Weapon 1" then
730+
elseif slot.slotName:find("^Weapon %d") then
731731
if existingItem then
732732
if existingItem.type == "Shield" then
733733
itemCategoryQueryStr = "armour.shield"

0 commit comments

Comments
 (0)