Merge pull request #4 from MarcelineVQ/purchase-summary

[ add ] purchase summary window
This commit is contained in:
OldManAlpha
2025-10-02 16:27:15 -07:00
committed by GitHub
5 changed files with 247 additions and 0 deletions
+8
View File
@@ -3,6 +3,7 @@ module 'aux'
local T = require 'T'
local post = require 'aux.tabs.post'
local gui = require 'aux.gui'
local purchase_summary = require 'aux.util.purchase_summary'
M.print = T.vararg-function(arg)
DEFAULT_CHAT_FRAME:AddMessage(LIGHTYELLOW_FONT_COLOR_CODE .. '<aux> ' .. join(map(arg, tostring), ' '))
@@ -76,6 +77,7 @@ function handle.LOAD()
merchant_sell = {},
sharing = true,
theme = 'blizzard',
purchase_summary = true,
})
do
local key = format('%s|%s', GetCVar'realmName', UnitName'player')
@@ -163,7 +165,13 @@ do
if money >= amount then
locked = true
local send_signal, signal_received = signal()
local name, texture, count, _, _, _, _, _, buyout_price = GetAuctionItemInfo(type, index)
thread(when, signal_received, function()
-- Track all (buyout) purchases after successful bid
if name and amount > 0 and amount >= buyout_price then
purchase_summary.add_purchase(name, texture, count, amount)
purchase_summary.update_display()
end
do (on_success or pass)() end
locked = false
end)