Fixed AH buying
This commit is contained in:
parent
408c8799e8
commit
bb9266219d
1 changed files with 1 additions and 6 deletions
|
@ -168,12 +168,8 @@ end
|
||||||
|
|
||||||
-- mass buyout
|
-- mass buyout
|
||||||
local bought = {}
|
local bought = {}
|
||||||
local finished = false
|
|
||||||
local last = nil
|
|
||||||
function mod:AuctionHouseBuyout()
|
function mod:AuctionHouseBuyout()
|
||||||
local selected = GetSelectedAuctionItem("list")
|
local selected = GetSelectedAuctionItem("list")
|
||||||
if last == selected and finished then return end
|
|
||||||
last, finished = selected, false
|
|
||||||
if selected>0 then
|
if selected>0 then
|
||||||
local name,_,count,_,_,_,_,_,price = GetAuctionItemInfo("list", selected)
|
local name,_,count,_,_,_,_,_,price = GetAuctionItemInfo("list", selected)
|
||||||
for j=50,1,-1 do
|
for j=50,1,-1 do
|
||||||
|
@ -191,13 +187,12 @@ function mod:AuctionHouseBuyout()
|
||||||
|
|
||||||
-- no purchase made, buy selected
|
-- no purchase made, buy selected
|
||||||
PlaceAuctionBid("list", selected, price)
|
PlaceAuctionBid("list", selected, price)
|
||||||
|
SetSelectedAuctionItem("list", 0);
|
||||||
self:Print("All auctions bought.")
|
self:Print("All auctions bought.")
|
||||||
finished = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mod:QueryAuctionItems()
|
function mod:QueryAuctionItems()
|
||||||
finished = false
|
|
||||||
wipe(bought)
|
wipe(bought)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue