Skip to content

Commit 5ac4a90

Browse files
authored
Added ignore mirrored items checkbox to trade query options. (#8184)
* added checkbox for mirrored items * added query generation for mirrored items
1 parent a08b6a0 commit 5ac4a90

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Classes/TradeQueryGenerator.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,14 @@ function TradeQueryGeneratorClass:FinishQuery()
924924
break
925925
end
926926
end
927+
if not options.includeMirrored then
928+
queryTable.query.filters.misc_filters = {
929+
disabled = false,
930+
filters = {
931+
mirrored = false,
932+
}
933+
}
934+
end
927935

928936
if options.maxPrice and options.maxPrice > 0 then
929937
queryTable.query.filters.trade_filters = {
@@ -1027,6 +1035,10 @@ function TradeQueryGeneratorClass:RequestQuery(slot, context, statWeights, callb
10271035
options.special = { itemName = context.slotTbl.slotName }
10281036
end
10291037

1038+
controls.includeMirrored = new("CheckBoxControl", {"TOPRIGHT",lastItemAnchor,"BOTTOMRIGHT"}, 0, 5, 18, "Mirrored items:", function(state) end)
1039+
controls.includeMirrored.state = (self.lastIncludeMirrored == nil or self.lastIncludeMirrored == true)
1040+
updateLastAnchor(controls.includeMirrored)
1041+
10301042
if not isJewelSlot and not isAbyssalJewelSlot and includeScourge then
10311043
controls.includeScourge = new("CheckBoxControl", {"TOPRIGHT",lastItemAnchor,"BOTTOMRIGHT"}, 0, 5, 18, "Scourge Mods:", function(state) end)
10321044
controls.includeScourge.state = (self.lastIncludeScourge == nil or self.lastIncludeScourge == true)
@@ -1138,6 +1150,9 @@ function TradeQueryGeneratorClass:RequestQuery(slot, context, statWeights, callb
11381150
controls.generateQuery = new("ButtonControl", { "BOTTOM", nil, "BOTTOM" }, -45, -10, 80, 20, "Execute", function()
11391151
main:ClosePopup()
11401152

1153+
if controls.includeMirrored then
1154+
self.lastIncludeMirrored, options.includeMirrored = controls.includeMirrored.state, controls.includeMirrored.state
1155+
end
11411156
if controls.includeCorrupted then
11421157
self.lastIncludeCorrupted, options.includeCorrupted = controls.includeCorrupted.state, controls.includeCorrupted.state
11431158
end

0 commit comments

Comments
 (0)