aux now remembers the auction duration setting. bugfix where possible with active bids the buy window would display them

This commit is contained in:
Manuel Simon Hirsig
2015-09-17 20:51:46 +02:00
parent d0c4ebb288
commit fadaba56f1
5 changed files with 77 additions and 16 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
## Interface: 11200
## Title: Aux
## Notes: A lightweight addon designed to help manage auctions
## SavedVariablesPerCharacter: AUCTIONATOR_ENABLE_ALT, AUCTIONATOR_OPEN_FIRST, AUCTIONATOR_INSTANT_BUYOUT
## SavedVariablesPerCharacter: AUX_ENABLE_ALT, AUX_OPEN_FIRST, AUX_INSTANT_BUYOUT, AUX_AUCTION_DURATION
## SavedVariables: auxSellEntries
core.xml
scan.xml
+11
View File
@@ -3,6 +3,17 @@ local entries
local selectedEntries = {}
local searchQuery
-----------------------------------------
function Aux_AuctionFrameBids_Update()
Aux.orig.AuctionFrameBids_Update()
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index and AuctionFrame:IsShown() then
Aux_HideElems(Aux.tabs.buy.hiddenElements)
end
end
-----------------------------------------
function AuxBuySearchButton_OnClick()
entries = nil
selectedEntries = {}
+14 -8
View File
@@ -1,9 +1,5 @@
AuxVersion = "1.1.1"
AuxAuthors = "shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport);"
AUCTIONATOR_ENABLE_ALT = true
AUCTIONATOR_OPEN_FIRST = false
AUCTIONATOR_INSTANT_BUYOUT = false
AuxAuthors = "shirsig; Zerf; Zirco (AUX); Nimeral (AUX backport)"
Aux = {
loaded = false,
@@ -104,6 +100,12 @@ end
function Aux_SetupHookFunctions()
Aux.orig.AuctionFrameAuctions_OnShow = AuctionFrameAuctions_OnShow
AuctionFrameAuctions_OnShow = Aux_Sell_AuctionFrameAuctions_OnShow
Aux.orig.AuctionsRadioButton_OnClick = AuctionsRadioButton_OnClick
AuctionsRadioButton_OnClick = Aux_Sell_AuctionsRadioButton_OnClick
Aux.orig.BrowseButton_OnClick = BrowseButton_OnClick
BrowseButton_OnClick = Aux_BrowseButton_OnClick
@@ -133,6 +135,9 @@ function Aux_SetupHookFunctions()
Aux.orig.ContainerFrameItemButton_OnClick = ContainerFrameItemButton_OnClick
ContainerFrameItemButton_OnClick = Aux_ContainerFrameItemButton_OnClick
Aux.orig.AuctionFrameBids_Update = AuctionFrameBids_Update
AuctionFrameBids_Update = Aux_AuctionFrameBids_Update
Aux.orig.AuctionFrameAuctions_Update = AuctionFrameAuctions_Update
AuctionFrameAuctions_Update = Aux_AuctionFrameAuctions_Update
@@ -146,7 +151,7 @@ function Aux_OnAuctionHouseShow()
AuxOptionsButtonPanel:Show()
if AUCTIONATOR_OPEN_FIRST then
if AUX_OPEN_FIRST then
AuctionFrameTab_OnClick(Aux.tabs.sell.index)
end
@@ -192,6 +197,7 @@ function Aux_AuctionFrameTab_OnClick(index)
if index == Aux.tabs.sell.index then
AuctionFrameTab_OnClick(3)
Aux_Sell_OnOpen()
PanelTemplates_SetTab(AuctionFrame, Aux.tabs.sell.index)
@@ -361,7 +367,7 @@ end
-----------------------------------------
function Aux_BrowseButton_OnMouseDown()
if arg1 == "RightButton" and AUCTIONATOR_INSTANT_BUYOUT then
if arg1 == "RightButton" and AUX_INSTANT_BUYOUT then
local index = this:GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame)
SetSelectedAuctionItem("list", index)
@@ -397,7 +403,7 @@ function Aux_ContainerFrameItemButton_OnClick(button)
else
Aux.orig.ContainerFrameItemButton_OnClick(button)
if AUCTIONATOR_ENABLE_ALT and AuctionFrame:IsShown() and IsAltKeyDown() and button == "LeftButton" then
if AUX_ENABLE_ALT and AuctionFrame:IsShown() and IsAltKeyDown() and button == "LeftButton" then
ClickAuctionSellItemButton()
ClearCursor()
+12 -6
View File
@@ -1,3 +1,9 @@
AUX_ENABLE_ALT = true
AUX_OPEN_FIRST = false
AUX_INSTANT_BUYOUT = false
AUX_AUCTION_DURATION = 'long'
local BoolToString, BoolToNum, NumToBool
function Aux_ShowDescriptionFrame()
@@ -33,18 +39,18 @@ function Aux_ShowOptionsFrame()
AuxVersionText:SetText("Version: "..AuxVersion)
AuxOption_Enable_Alt:SetChecked(AUCTIONATOR_ENABLE_ALT)
AuxOption_Open_First:SetChecked(AUCTIONATOR_OPEN_FIRST)
AuxOption_Instant_Buyout:SetChecked(AUCTIONATOR_INSTANT_BUYOUT)
AuxOption_Enable_Alt:SetChecked(AUX_ENABLE_ALT)
AuxOption_Open_First:SetChecked(AUX_OPEN_FIRST)
AuxOption_Instant_Buyout:SetChecked(AUX_INSTANT_BUYOUT)
end
-----------------------------------------
function AuxOptionsSave()
AUCTIONATOR_ENABLE_ALT = AuxOption_Enable_Alt:GetChecked()
AUCTIONATOR_OPEN_FIRST = AuxOption_Open_First:GetChecked()
AUCTIONATOR_INSTANT_BUYOUT = AuxOption_Instant_Buyout:GetChecked()
AUX_ENABLE_ALT = AuxOption_Enable_Alt:GetChecked()
AUX_OPEN_FIRST = AuxOption_Open_First:GetChecked()
AUX_INSTANT_BUYOUT = AuxOption_Instant_Buyout:GetChecked()
end
+39 -1
View File
@@ -13,11 +13,49 @@ local processScanResults, undercut, ItemType2AuctionClass, SubType2AuctionSubcla
-----------------------------------------
function Aux_Sell_OnOpen()
end
-----------------------------------------
function Aux_Sell_AuctionFrameAuctions_OnShow()
Aux.orig.AuctionFrameAuctions_OnShow()
Aux_Sell_SetAuctionDuration(AUX_AUCTION_DURATION)
end
-----------------------------------------
function Aux_Sell_SetAuctionDuration(duration)
if duration == 'short' then
Aux_Sell_AuctionsRadioButton_OnClick(1)
elseif duration == 'medium' then
Aux_Sell_AuctionsRadioButton_OnClick(2)
elseif duration == 'long' then
Aux_Sell_AuctionsRadioButton_OnClick(3)
end
end
-----------------------------------------
function Aux_Sell_AuctionsRadioButton_OnClick(index)
if index == 1 then
AUX_AUCTION_DURATION = 'short'
elseif index == 2 then
AUX_AUCTION_DURATION = 'medium'
elseif index == 3 then
AUX_AUCTION_DURATION = 'long'
end
return Aux.orig.AuctionsRadioButton_OnClick(index)
end
-----------------------------------------
function Aux_AuctionFrameAuctions_Update()
Aux.orig.AuctionFrameAuctions_Update()
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index and AuctionFrame:IsShown() then
Aux_HideElems(Aux.tabs.sell.hiddenElements)
end
end
end
-----------------------------------------