-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.lua
29 lines (24 loc) · 882 Bytes
/
Main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local originalSortAuctionSetSort = SortAuctionSetSort
hooksecurefunc("SortAuctionSetSort", function()
originalSortAuctionSetSort("list", "unitprice")
end)
hooksecurefunc("MoneyFrame_Update", function(frameName, money)
local buyoutMoneyFrameName = "BrowseButton1BuyoutFrameMoney"
if frameName == buyoutMoneyFrameName or _G[buyoutMoneyFrameName] == frameName then
local count = 1
if BrowseButton1ItemCount:IsShown() then
count = tonumber(BrowseButton1ItemCount:GetText())
end
print("unit price", GetMoneyString(math.floor(money / count)))
end
end)
AuctionHouseFixesMixin = {}
function AuctionHouseFixesMixin:OnLoad()
self:RegisterEvent("AUCTION_HOUSE_SHOW")
end
function AuctionHouseFixesMixin:OnEvent()
self:UnregisterEvent("AUCTION_HOUSE_SHOW")
BrowseBuyoutButton:HookScript("OnClick", function()
StaticPopup1Button1:Click()
end)
end