Skip to content

Commit fec4aa7

Browse files
committed
add "include in person" setting
1 parent c5dd88c commit fec4aa7

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/Classes/TradeQuery.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ You can click this button to enter your POESESSID.
277277
- You can only generate weighted searches for public leagues. (Generated searches can be modified
278278
on trade site to work on other leagues and realms)]]
279279

280+
-- Buyout selection
281+
self.controls.includeInPerson = new("CheckBoxControl", { "TOPRIGHT", self.controls.poesessidButton, "BOTTOMRIGHT" },
282+
{ 0, row_vertical_padding, row_height }, "Include in person:", function(state) end,
283+
"This includes in person offers in the search results.", false)
284+
280285
-- Fetches Box
281286
self.maxFetchPerSearchDefault = 2
282287
self.controls.fetchCountEdit = new("EditControl", {"TOPRIGHT", nil, "TOPRIGHT"}, {-12, 19, 154, row_height}, "", "Fetch Pages", "%D", 3, function(buf)
@@ -449,7 +454,7 @@ Highest Weight - Displays the order retrieved from trade]]
449454
t_insert(slotTables, { slotName = self.itemsTab.sockets[nodeId].label, nodeId = nodeId })
450455
end
451456

452-
self.controls.sectionAnchor = new("LabelControl", {"LEFT", self.controls.poesessidButton, "LEFT"}, {0, 0, 0, 0}, "")
457+
self.controls.sectionAnchor = new("LabelControl", {"LEFT", self.controls.poesessidButton, "LEFT"}, {0, row_vertical_padding + row_height, 0, 0}, "")
453458
top_pane_alignment_ref = {"TOPLEFT", self.controls.sectionAnchor, "TOPLEFT"}
454459
local scrollBarShown = #slotTables > 21 -- clipping starts beyond this
455460
-- dynamically hide rows that are above or below the scrollBar

src/Classes/TradeQueryGenerator.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ function TradeQueryGeneratorClass:FinishQuery()
10161016
}
10171017
}
10181018
},
1019-
status = { option = "available" },
1019+
status = { option = self.includeInPerson and "available" or "securable" },
10201020
stats = {
10211021
{
10221022
type = "weight",
@@ -1302,6 +1302,10 @@ function TradeQueryGeneratorClass:RequestQuery(slot, context, statWeights, callb
13021302
controls.generateQuery = new("ButtonControl", { "BOTTOM", nil, "BOTTOM" }, {-45, -10, 80, 20}, "Execute", function()
13031303
main:ClosePopup()
13041304

1305+
if context.controls.includeInPerson then
1306+
self.includeInPerson = context.controls.includeInPerson.state
1307+
end
1308+
13051309
if controls.includeMirrored then
13061310
self.lastIncludeMirrored, options.includeMirrored = controls.includeMirrored.state, controls.includeMirrored.state
13071311
end

0 commit comments

Comments
 (0)