small improvement
This commit is contained in:
+10
-14
@@ -151,23 +151,19 @@ end
|
||||
|
||||
function Auctionator_ContainerFrameItemButton_OnClick(button)
|
||||
|
||||
if (not AUCTIONATOR_ENABLE_ALT
|
||||
or not AuctionFrame:IsShown()
|
||||
or not IsAltKeyDown())
|
||||
then
|
||||
return Auctionator_Orig_ContainerFrameItemButton_OnClick(button)
|
||||
end
|
||||
local origResult = Auctionator_Orig_ContainerFrameItemButton_OnClick(button)
|
||||
|
||||
ClickAuctionSellItemButton()
|
||||
ClearCursor()
|
||||
if AUCTIONATOR_ENABLE_ALT and AuctionFrame:IsShown() and IsAltKeyDown() and button == "LeftButton" then
|
||||
|
||||
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= AUCTIONATOR_TAB_INDEX then
|
||||
AuctionFrameTab_OnClick(AUCTIONATOR_TAB_INDEX)
|
||||
ClickAuctionSellItemButton()
|
||||
ClearCursor()
|
||||
|
||||
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= AUCTIONATOR_TAB_INDEX then
|
||||
AuctionFrameTab_OnClick(AUCTIONATOR_TAB_INDEX)
|
||||
end
|
||||
end
|
||||
|
||||
PickupContainerItem(this:GetParent():GetID(), this:GetID())
|
||||
ClickAuctionSellItemButton()
|
||||
|
||||
return origResult
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
@@ -176,7 +172,7 @@ function Auctionator_AuctionFrameAuctions_Update()
|
||||
|
||||
Auctionator_Orig_AuctionFrameAuctions_Update()
|
||||
|
||||
if PanelTemplates_GetSelectedTab(AuctionFrame) == AUCTIONATOR_TAB_INDEX and AuctionFrame:IsShown() then
|
||||
if PanelTemplates_GetSelectedTab(AuctionFrame) == AUCTIONATOR_TAB_INDEX and AuctionFrame:IsShown() then
|
||||
Auctionator_HideElems(auctionsTabElements)
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<Script file="Auctionator.lua"/>
|
||||
|
||||
<!-- Frame to handle all core events -->
|
||||
<Frame name="Auctionator_Core">
|
||||
<Frame name="Auctionator_Core">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:RegisterEvent("VARIABLES_LOADED")
|
||||
|
||||
@@ -17,26 +17,6 @@ local submitQuery, processQueryResults
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
local eventFrame = CreateFrame("Frame")
|
||||
eventFrame:SetScript("OnUpdate", function()
|
||||
if state == STATE_PREQUERY and GetTime() - timeOfLastUpdate > 0.5 then
|
||||
|
||||
timeOfLastUpdate = GetTime()
|
||||
|
||||
if CanSendAuctionQuery() then
|
||||
submitQuery()
|
||||
end
|
||||
end
|
||||
end)
|
||||
eventFrame:RegisterEvent("AUCTION_ITEM_LIST_UPDATE")
|
||||
eventFrame:SetScript("OnEvent", function(event)
|
||||
if state == STATE_POSTQUERY then
|
||||
processQueryResults()
|
||||
end
|
||||
end)
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function Auctionator_Scan_Idle()
|
||||
return state == STATE_IDLE
|
||||
end
|
||||
@@ -174,4 +154,24 @@ function processQueryResults()
|
||||
else
|
||||
Auctionator_Scan_Complete()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
local eventFrame = CreateFrame("Frame")
|
||||
eventFrame:SetScript("OnUpdate", function()
|
||||
if state == STATE_PREQUERY and GetTime() - timeOfLastUpdate > 0.5 then
|
||||
|
||||
timeOfLastUpdate = GetTime()
|
||||
|
||||
if CanSendAuctionQuery() then
|
||||
submitQuery()
|
||||
end
|
||||
end
|
||||
end)
|
||||
eventFrame:RegisterEvent("AUCTION_ITEM_LIST_UPDATE")
|
||||
eventFrame:SetScript("OnEvent", function(event)
|
||||
if state == STATE_POSTQUERY then
|
||||
processQueryResults()
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user