diff --git a/Auctionator.lua b/Auctionator.lua
index 085eaab..63fec80 100644
--- a/Auctionator.lua
+++ b/Auctionator.lua
@@ -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
diff --git a/Auctionator.xml b/Auctionator.xml
index f79834e..1607a8b 100644
--- a/Auctionator.xml
+++ b/Auctionator.xml
@@ -3,7 +3,7 @@
-
+
this:RegisterEvent("VARIABLES_LOADED")
diff --git a/Scan.lua b/Scan.lua
index 7eb3837..eb7f4a1 100644
--- a/Scan.lua
+++ b/Scan.lua
@@ -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
\ No newline at end of file
+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)
\ No newline at end of file