major visual upgrade of buy tab, cleaned up xml files a bit, better reporting functionality for the buy tab, handled more corner cases in buy tab
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
local processScanResults
|
local processScanResults, createOrder, updateOrder
|
||||||
local entries
|
local entries
|
||||||
local selectedEntries = {}
|
local selectedEntries = {}
|
||||||
local searchQuery
|
local searchQuery
|
||||||
@@ -22,7 +22,7 @@ end
|
|||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function condensedSelection()
|
function createOrder()
|
||||||
local selection = {}
|
local selection = {}
|
||||||
for entry,_ in pairs(selectedEntries) do
|
for entry,_ in pairs(selectedEntries) do
|
||||||
local key = entry.name.."_"..entry.stackSize.."_"..entry.buyoutPrice
|
local key = entry.name.."_"..entry.stackSize.."_"..entry.buyoutPrice
|
||||||
@@ -39,13 +39,14 @@ end
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function AuctionatorBuyBuySelectedButton_OnClick()
|
function AuctionatorBuyBuySelectedButton_OnClick()
|
||||||
|
|
||||||
AuctionatorBuySearchButton:Disable()
|
AuctionatorBuySearchButton:Disable()
|
||||||
AuctionatorBuyBuySelectedButton:Disable()
|
AuctionatorBuyBuySelectedButton:Disable()
|
||||||
|
|
||||||
local selection = condensedSelection(selectedEntries)
|
local order = createOrder(selectedEntries)
|
||||||
local selectedCount = Auctionator_SetSize(selectedEntries)
|
local orderedCount = Auctionator_SetSize(selectedEntries)
|
||||||
local purchasedCount = 0
|
local purchasedCount = 0
|
||||||
|
|
||||||
entries = nil
|
entries = nil
|
||||||
selectedEntries = {}
|
selectedEntries = {}
|
||||||
|
|
||||||
@@ -55,15 +56,19 @@ function AuctionatorBuyBuySelectedButton_OnClick()
|
|||||||
query = searchQuery,
|
query = searchQuery,
|
||||||
onReadDatum = function(datum)
|
onReadDatum = function(datum)
|
||||||
local key = datum.name.."_"..datum.stackSize.."_"..datum.buyoutPrice
|
local key = datum.name.."_"..datum.stackSize.."_"..datum.buyoutPrice
|
||||||
if selection[key] then
|
if order[key] then
|
||||||
|
|
||||||
PlaceAuctionBid("list", datum.pageIndex, datum.buyoutPrice)
|
if GetMoney() >= datum.buyoutPrice then
|
||||||
purchasedCount = purchasedCount + 1
|
PlaceAuctionBid("list", datum.pageIndex, datum.buyoutPrice)
|
||||||
Auctionator_Log(string.format("[Auctionator] Auction purchased", purchasedCount, selectedCount))
|
purchasedCount = purchasedCount + 1
|
||||||
if selection[key] > 1 then
|
|
||||||
selection[key] = selection[key] - 1
|
|
||||||
else
|
else
|
||||||
selection[key] = nil
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if order[key] > 1 then
|
||||||
|
order[key] = order[key] - 1
|
||||||
|
else
|
||||||
|
order[key] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
@@ -72,14 +77,14 @@ function AuctionatorBuyBuySelectedButton_OnClick()
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
onComplete = function(data)
|
onComplete = function(data)
|
||||||
Auctionator_Log(string.format("[Auctionator] Final report: %i out of %i auctions purchased", purchasedCount, selectedCount))
|
|
||||||
processScanResults(data)
|
processScanResults(data)
|
||||||
Auctionator_Buy_ScrollbarUpdate()
|
Auctionator_Buy_ScrollbarUpdate()
|
||||||
AuctionatorBuySearchButton:Enable()
|
AuctionatorBuySearchButton:Enable()
|
||||||
|
Auctionator_Buy_ShowReport(false, orderedCount, purchasedCount)
|
||||||
end,
|
end,
|
||||||
onAbort = function()
|
onAbort = function()
|
||||||
Auctionator_Log(string.format("[Auctionator] Final report: %i out of %i auctions purchased", purchasedCount, selectedCount))
|
|
||||||
AuctionatorBuySearchButton:Enable()
|
AuctionatorBuySearchButton:Enable()
|
||||||
|
Auctionator_Buy_ShowReport(false, orderedCount, purchasedCount)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -132,14 +137,17 @@ function Auctionator_Buy_ScrollbarUpdate()
|
|||||||
AuctionatorBuyMessage:Hide()
|
AuctionatorBuyMessage:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
if Auctionator_SetSize(selectedEntries) > 0 then
|
local total = 0
|
||||||
|
for entry, _ in selectedEntries do
|
||||||
|
total = total + entry.buyoutPrice
|
||||||
|
end
|
||||||
|
MoneyFrame_Update("AuctionatorBuyTotal", Auctionator_Round(total))
|
||||||
|
|
||||||
|
if Auctionator_SetSize(selectedEntries) > 0 and GetMoney() >= total then
|
||||||
AuctionatorBuyBuySelectedButton:Enable()
|
AuctionatorBuyBuySelectedButton:Enable()
|
||||||
else
|
else
|
||||||
AuctionatorBuyBuySelectedButton:Disable()
|
AuctionatorBuyBuySelectedButton:Disable()
|
||||||
end
|
end
|
||||||
|
|
||||||
local line -- 1 through 15 of our window to scroll
|
|
||||||
local dataOffset -- an index into our data calculated from the scroll offset
|
|
||||||
|
|
||||||
local numrows
|
local numrows
|
||||||
if not entries then
|
if not entries then
|
||||||
@@ -149,10 +157,10 @@ function Auctionator_Buy_ScrollbarUpdate()
|
|||||||
end
|
end
|
||||||
|
|
||||||
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 19, 16);
|
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 19, 16);
|
||||||
|
|
||||||
for line = 1,19 do
|
for line = 1,19 do
|
||||||
|
|
||||||
dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorBuyScrollFrame)
|
local dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorBuyScrollFrame)
|
||||||
local lineEntry = getglobal("AuctionatorBuyEntry"..line)
|
local lineEntry = getglobal("AuctionatorBuyEntry"..line)
|
||||||
|
|
||||||
if numrows <= 19 then
|
if numrows <= 19 then
|
||||||
@@ -188,4 +196,20 @@ function Auctionator_Buy_ScrollbarUpdate()
|
|||||||
lineEntry:Hide()
|
lineEntry:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Auctionator_Buy_ShowReport(completed, orderedCount, purchasedCount)
|
||||||
|
AuctionatorBuyReport:Show()
|
||||||
|
|
||||||
|
AuctionatorBuyReportHTML:SetText("<html><body>"
|
||||||
|
.."<h1>Auctionator Buy Report</h1><br/>"
|
||||||
|
.."<h1>Status:"..(completed and "Completed" or "Aborted").."</h1><br/>"
|
||||||
|
.."<p>"
|
||||||
|
..string.format("%i out of the %i ordered auctions have been purchased", purchasedCount, orderedCount)
|
||||||
|
.."</p>"
|
||||||
|
.."</body></html>")
|
||||||
|
|
||||||
|
AuctionatorBuyReportHTML:SetSpacing(3)
|
||||||
|
|
||||||
|
AuctionatorBuyAuthorText:SetText("Author: "..AuctionatorAuthor)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -72,16 +72,12 @@
|
|||||||
</Scripts>
|
</Scripts>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Frame name="Auctionator_Buy_Template" virtual="true" hidden="true">
|
<Frame name="AuctionatorBuyTemplate" virtual="true" hidden="true">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="550" y="447"/>
|
<AbsDimension x="694" y="447"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT"/>
|
||||||
<Offset>
|
|
||||||
<AbsDimension x="210" y="0"/>
|
|
||||||
</Offset>
|
|
||||||
</Anchor>
|
|
||||||
</Anchors>
|
</Anchors>
|
||||||
|
|
||||||
<Layers>
|
<Layers>
|
||||||
@@ -91,20 +87,29 @@
|
|||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<FontString name="AuctionatorBuyMessage" inherits="GameFontNormal">
|
<FontString name="AuctionatorBuyMessage" inherits="GameFontNormal">
|
||||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="-60" y="-200"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="70" y="-120"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<FontString name="AuctionatorBuySearchBoxLabel" inherits="GameFontNormalSmall" text="Search For">
|
<FontString name="AuctionatorBuySearchBoxLabel" inherits="GameFontHighlightSmall" text="Search For">
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-50" y="-50"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="160" y="-50"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
</Layer>
|
</Layer>
|
||||||
<Layer level="ARTWORK">
|
<Layer level="ARTWORK">
|
||||||
|
<FontString name="AuctionatorBuyTotalLabel" inherits="GameFontHighlightSmall" text="Total">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOM">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="70" y="22"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
|
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
|
||||||
<Size><AbsDimension x="802" y="64"/></Size>
|
<Size><AbsDimension x="802" y="64"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
<Offset>
|
<Offset>
|
||||||
<AbsDimension x="-190" y="-52"/>
|
<AbsDimension x="20" y="-52"/>
|
||||||
</Offset>
|
</Offset>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
@@ -135,7 +140,7 @@
|
|||||||
<Anchors><Anchor point="LEFT" relativeTo="AuctionatorBuySearchBoxLabel" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="LEFT" relativeTo="AuctionatorBuySearchBoxLabel" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnEnterPressed>
|
<OnEnterPressed>
|
||||||
this:ClearFocus();
|
this:ClearFocus()
|
||||||
</OnEnterPressed>
|
</OnEnterPressed>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</EditBox>
|
</EditBox>
|
||||||
@@ -151,8 +156,14 @@
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button name="AuctionatorBuyBuySelectedButton" inherits="UIPanelButtonTemplate" text="Buy Selected Auctions">
|
<Button name="AuctionatorBuyBuySelectedButton" inherits="UIPanelButtonTemplate" text="Buy Selected Auctions">
|
||||||
<Size><AbsDimension x="166" y="22"/> </Size>
|
<Size><AbsDimension x="166" y="22"/></Size>
|
||||||
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="-14" y="-199"/></Offset></Anchor></Anchors>
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="51" y="14"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
AuctionatorBuyBuySelectedButton_OnClick()
|
AuctionatorBuyBuySelectedButton_OnClick()
|
||||||
@@ -160,9 +171,35 @@
|
|||||||
</Scripts>
|
</Scripts>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Frame name="AuctionatorBuyTotal" inherits="SmallMoneyFrameTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuctionatorBuyTotalLabel">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="10" y="0"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
SmallMoneyFrame_OnLoad()
|
||||||
|
MoneyFrame_SetType("STATIC")
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- <Frame name="BidBidPrice" inherits="MoneyInputFrameTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOM">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-15" y="18"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Frame> -->
|
||||||
|
|
||||||
<ScrollFrame name="AuctionatorBuyScrollFrame" inherits="FauxScrollFrameTemplate">
|
<ScrollFrame name="AuctionatorBuyScrollFrame" inherits="FauxScrollFrameTemplate">
|
||||||
<Size><AbsDimension x="785" y="309"/></Size>
|
<Size><AbsDimension x="785" y="309"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-197" y="-98"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="13" y="-98"/></Offset></Anchor></Anchors>
|
||||||
|
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnVerticalScroll>
|
<OnVerticalScroll>
|
||||||
@@ -197,4 +234,50 @@
|
|||||||
<Button name="AuctionatorBuyEntry19" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry18" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
<Button name="AuctionatorBuyEntry19" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry18" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
||||||
</Frames>
|
</Frames>
|
||||||
</Frame>
|
</Frame>
|
||||||
|
|
||||||
|
<Frame name="AuctionatorBuyReport" frameStrata="FULLSCREEN_DIALOG" toplevel="true" parent="UIParent" enableMouse="true" hidden="true">
|
||||||
|
<Size><AbsDimension x="300" y="300" /></Size>
|
||||||
|
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="-90"/></Offset></Anchor></Anchors>
|
||||||
|
|
||||||
|
<Backdrop bgFile="Interface\CharacterFrame\UI-Party-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||||
|
<BackgroundInsets><AbsInset left="11" right="12" top="12" bottom="11"/></BackgroundInsets>
|
||||||
|
<TileSize><AbsValue val="32"/></TileSize>
|
||||||
|
<EdgeSize><AbsValue val="32"/></EdgeSize>
|
||||||
|
</Backdrop>
|
||||||
|
|
||||||
|
<Layers>
|
||||||
|
<Layer level="BACKGROUND">
|
||||||
|
<FontString name="AuctionatorBuyAuthorText" inherits="GameFontDisableSmall" justifyH="LEFT" justifyV="TOP">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMLEFT">
|
||||||
|
<Offset><AbsDimension x="30" y="20"/></Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<SimpleHTML name="AuctionatorBuyReportHTML">
|
||||||
|
<Size><AbsDimension x="420" y="420" /></Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT"><Offset><AbsDimension x="30" y="-30"/></Offset></Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<FontString inherits="GameFontHighlightSmall"/>
|
||||||
|
<FontStringHeader1 inherits="GameFontNormal"/>
|
||||||
|
</SimpleHTML>
|
||||||
|
|
||||||
|
<Button inherits="UIPanelButtonTemplate" text="Close">
|
||||||
|
<Size><AbsDimension x="100" y="22"/> </Size>
|
||||||
|
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-20" y="15"/></Offset></Anchor></Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
AuctionatorBuyReport:Hide()
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
</Frame>
|
||||||
</Ui>
|
</Ui>
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
AuctionatorVersion = "1.2.0-Vanilla"
|
||||||
|
AuctionatorAuthor = "Zirco; Backport by Nimeral; Reworked by Simon Hirsig"
|
||||||
|
|
||||||
AuctionatorLoaded = false
|
AuctionatorLoaded = false
|
||||||
|
|
||||||
local val2gsc
|
local val2gsc
|
||||||
@@ -52,7 +55,7 @@ end
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function Auctionator_OnLoad()
|
function Auctionator_OnLoad()
|
||||||
Auctionator_Log("[Auctionator] Loaded")
|
Auctionator_Log("Auctionator v"..AuctionatorVersion.." loaded")
|
||||||
AuctionatorLoaded = true
|
AuctionatorLoaded = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+23
-24
@@ -1,10 +1,29 @@
|
|||||||
local AuctionatorVersion = "1.1.0-Vanilla"
|
|
||||||
local AuctionatorAuthor = "Zirco; Backport by Nimeral; Reworked by Simon Hirsig"
|
|
||||||
|
|
||||||
local BoolToString, BoolToNum, NumToBool
|
local BoolToString, BoolToNum, NumToBool
|
||||||
|
|
||||||
function Auctionator_ShowDescriptionFrame()
|
function Auctionator_ShowDescriptionFrame()
|
||||||
AuctionatorDescriptionFrame:Show()
|
AuctionatorDescriptionFrame:Show()
|
||||||
|
|
||||||
|
AuctionatorDescriptionHTML:SetText("<html><body>"
|
||||||
|
.."<h1>What is Auctionator?</h1><br/>"
|
||||||
|
.."<p>"
|
||||||
|
.."Figuring out a good buyout price when posting auctions can be tedious and time-consuming. If you're like most people, you first browse the current "
|
||||||
|
.."auctions to get a sense of how much your item is currently selling for. Then you undercut the lowest price by a bit. If you're creating multiple auctions "
|
||||||
|
.."you're bouncing back and forth between the Browse tab and the Auctions tab, doing lots of division in "
|
||||||
|
.."your head, and doing lots of clicking and typing."
|
||||||
|
.."</p><br/><h1>How it works</h1><br/><p>"
|
||||||
|
.."Auctionator makes this whole process easy and streamlined. When you select an item to auction, Auctionator displays a summary of all the current auctions for "
|
||||||
|
.."that item sorted by per-item price. Auctionator also calculates a recommended buyout price based on the cheapest per-item price for your item. If you're "
|
||||||
|
.."selling a stack rather than a single item, Auctionator bases its recommended buyout price on the cheapest stack of the same size."
|
||||||
|
.."</p><br/><p>"
|
||||||
|
.."If you don't like Auctionator's recommendation, you can click on any line in the summary and Auctionator will recalculate the recommended buyout price based "
|
||||||
|
.."on that auction. Of course, you can always override Auctionator's recommendation by just typing in your own buyout price."
|
||||||
|
.."</p><br/><p>"
|
||||||
|
.."With Auctionator, creating an auction is usually just a matter of picking an item to auction and clicking the Create Auction button."
|
||||||
|
.."</p>"
|
||||||
|
.."</body></html>")
|
||||||
|
|
||||||
|
AuctionatorDescriptionHTML:SetSpacing(3)
|
||||||
|
|
||||||
AuctionatorAuthorText:SetText("Author: "..AuctionatorAuthor)
|
AuctionatorAuthorText:SetText("Author: "..AuctionatorAuthor)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -16,29 +35,9 @@ function Auctionator_ShowOptionsFrame()
|
|||||||
AuctionatorOptionsFrame:SetBackdropColor(0,0,0,100)
|
AuctionatorOptionsFrame:SetBackdropColor(0,0,0,100)
|
||||||
|
|
||||||
AuctionatorConfigFrameTitle:SetText("Auctionator Options for "..UnitName("player"))
|
AuctionatorConfigFrameTitle:SetText("Auctionator Options for "..UnitName("player"))
|
||||||
|
|
||||||
local expText = "<html><body>"
|
|
||||||
.."<h1>What is Auctionator?</h1><br/>"
|
|
||||||
.."<p>"
|
|
||||||
.."Figuring out a good buyout price when posting auctions can be tedious and time-consuming. If you're like most people, you first browse the current "
|
|
||||||
.."auctions to get a sense of how much your item is currently selling for. Then you undercut the lowest price by a bit. If you're creating multiple auctions "
|
|
||||||
.."you're bouncing back and forth between the Browse tab and the Auctions tab, doing lots of division in "
|
|
||||||
.."your head, and doing lots of clicking and typing."
|
|
||||||
.."</p><br/><h1>How it works</h1><br/><p>"
|
|
||||||
.."Auctionator makes this whole process easy and streamlined. When you select an item to auction, Auctionator displays a summary of all the current auctions for "
|
|
||||||
.."that item sorted by per-item price. Auctionator also calculates a recommended buyout price based on the cheapest per-item price for your item. If you're "
|
|
||||||
.."selling a stack rather than a single item, Auctionator bases its recommended buyout price on the cheapest stack of the same size."
|
|
||||||
.."</p><br/><p>"
|
|
||||||
.."If you don't like Auctionator's recommendation, you can click on any line in the summary and Auctionator will recalculate the recommended buyout price based "
|
|
||||||
.."on that auction. Of course, you can always override Auctionator's recommendation by just typing in your own buyout price."
|
|
||||||
.."</p><br/><p>"
|
|
||||||
.."With Auctionator, creating an auction is usually just a matter of picking an item to auction and clicking the Create Auction button."
|
|
||||||
.."</p>"
|
|
||||||
.."</body></html>"
|
|
||||||
|
|
||||||
AuctionatorExplanation:SetText("Auctionator is an addon designed to make it easier and faster to setup your auctions at the auction house.")
|
AuctionatorExplanation:SetText("Auctionator is an addon designed to make it easier and faster to setup your auctions at the auction house.")
|
||||||
AuctionatorDescriptionHTML:SetText(expText)
|
|
||||||
AuctionatorDescriptionHTML:SetSpacing(3)
|
|
||||||
|
|
||||||
AuctionatorVersionText:SetText("Version: "..AuctionatorVersion)
|
AuctionatorVersionText:SetText("Version: "..AuctionatorVersion)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<Frame name="AuctionatorOptionsButtonTemplate" virtual="true" hidden="true">
|
<Frame name="AuctionatorOptionsButtonTemplate" virtual="true" hidden="true">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="550" y="447"/>
|
<AbsDimension x="1" y="1"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<Frames>
|
<Frames>
|
||||||
<Button name="AuctionatorOptionsButton" inherits="UIPanelButtonTemplate" text="Auctionator">
|
<Button name="AuctionatorOptionsButton" inherits="UIPanelButtonTemplate" text="Auctionator">
|
||||||
<Size><AbsDimension x="126" y="22"/></Size>
|
<Size><AbsDimension x="126" y="22"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="472" y="-12"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="682" y="-12"/></Offset></Anchor></Anchors>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
Auctionator_ShowOptionsFrame()
|
Auctionator_ShowOptionsFrame()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ end
|
|||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function Auctionator_Scan_Complete()
|
function Auctionator_Scan_Complete()
|
||||||
if state ~= STATE_IDLE then
|
if state ~= STATE_IDLE then
|
||||||
if currentJob.onComplete then
|
if currentJob.onComplete then
|
||||||
currentJob.onComplete(scanData)
|
currentJob.onComplete(scanData)
|
||||||
@@ -39,21 +39,22 @@ end
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function Auctionator_Scan_Abort()
|
function Auctionator_Scan_Abort()
|
||||||
|
if state ~= STATE_IDLE then
|
||||||
if currentJob and currentJob.onAbort then
|
if currentJob and currentJob.onAbort then
|
||||||
currentJob.onAbort()
|
currentJob.onAbort()
|
||||||
|
end
|
||||||
|
|
||||||
|
currentJob = nil
|
||||||
|
currentPage = nil
|
||||||
|
scanData = nil
|
||||||
|
state = STATE_IDLE
|
||||||
end
|
end
|
||||||
|
|
||||||
currentJob = nil
|
|
||||||
currentPage = nil
|
|
||||||
scanData = nil
|
|
||||||
state = STATE_IDLE
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function Auctionator_Scan_Start(job)
|
function Auctionator_Scan_Start(job)
|
||||||
|
|
||||||
Auctionator_SetMessage("Scanning auctions ...")
|
Auctionator_SetMessage("Scanning auctions ...")
|
||||||
|
|
||||||
if state ~= STATE_IDLE then
|
if state ~= STATE_IDLE then
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ end
|
|||||||
|
|
||||||
function Auctionator_AddPanels()
|
function Auctionator_AddPanels()
|
||||||
|
|
||||||
local sellFrame = CreateFrame("Frame", "Auctionator_Sell_Panel", AuctionFrame, "Auctionator_Sell_Template")
|
local sellFrame = CreateFrame("Frame", "AuctionatorSellPanel", AuctionFrame, "AuctionatorSellTemplate")
|
||||||
sellFrame:SetParent("AuctionFrame")
|
sellFrame:SetParent("AuctionFrame")
|
||||||
sellFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT", 210, 0)
|
sellFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
|
||||||
relevel(sellFrame)
|
relevel(sellFrame)
|
||||||
sellFrame:Hide()
|
sellFrame:Hide()
|
||||||
|
|
||||||
local buyFrame = CreateFrame("Frame", "Auctionator_Buy_Panel", AuctionFrame, "Auctionator_Buy_Template")
|
local buyFrame = CreateFrame("Frame", "AuctionatorBuyPanel", AuctionFrame, "AuctionatorBuyTemplate")
|
||||||
buyFrame:SetParent("AuctionFrame")
|
buyFrame:SetParent("AuctionFrame")
|
||||||
buyFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT", 210, 0)
|
buyFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
|
||||||
relevel(buyFrame)
|
relevel(buyFrame)
|
||||||
buyFrame:Hide()
|
buyFrame:Hide()
|
||||||
|
|
||||||
local optionsFrame = CreateFrame("Frame", "AuctionatorOptionsButtonPanel", AuctionFrame, "AuctionatorOptionsButtonTemplate")
|
local optionsFrame = CreateFrame("Frame", "AuctionatorOptionsButtonPanel", AuctionFrame, "AuctionatorOptionsButtonTemplate")
|
||||||
optionsFrame:SetParent("AuctionFrame")
|
optionsFrame:SetParent("AuctionFrame")
|
||||||
optionsFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT", 210, 0)
|
optionsFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
|
||||||
relevel(optionsFrame)
|
relevel(optionsFrame)
|
||||||
optionsFrame:Hide()
|
optionsFrame:Hide()
|
||||||
end
|
end
|
||||||
@@ -137,9 +137,15 @@ function Auctionator_AuctionFrameTab_OnClick(index)
|
|||||||
index = this:GetID()
|
index = this:GetID()
|
||||||
end
|
end
|
||||||
|
|
||||||
Auctionator_Scan_Abort()
|
if not Auctionator_Scan_IsIdle() then
|
||||||
Auctionator_Sell_Panel:Hide()
|
Auctionator_Scan_Abort()
|
||||||
Auctionator_Buy_Panel:Hide()
|
end
|
||||||
|
AuctionatorSellPanel:Hide()
|
||||||
|
AuctionatorBuyPanel:Hide()
|
||||||
|
|
||||||
|
if index == 2 then
|
||||||
|
Auctionator_ShowElems(defaultBidsTabElements)
|
||||||
|
end
|
||||||
|
|
||||||
if index == 3 then
|
if index == 3 then
|
||||||
Auctionator_ShowElems(defaultAuctionTabElements)
|
Auctionator_ShowElems(defaultAuctionTabElements)
|
||||||
@@ -152,7 +158,7 @@ function Auctionator_AuctionFrameTab_OnClick(index)
|
|||||||
|
|
||||||
Auctionator_HideElems(defaultAuctionTabElements)
|
Auctionator_HideElems(defaultAuctionTabElements)
|
||||||
|
|
||||||
Auctionator_Sell_Panel:Show()
|
AuctionatorSellPanel:Show()
|
||||||
AuctionFrame:EnableMouse(false)
|
AuctionFrame:EnableMouse(false)
|
||||||
|
|
||||||
Auctionator_OnNewAuctionUpdate()
|
Auctionator_OnNewAuctionUpdate()
|
||||||
@@ -163,7 +169,7 @@ function Auctionator_AuctionFrameTab_OnClick(index)
|
|||||||
|
|
||||||
Auctionator_HideElems(defaultBidsTabElements)
|
Auctionator_HideElems(defaultBidsTabElements)
|
||||||
|
|
||||||
Auctionator_Buy_Panel:Show()
|
AuctionatorBuyPanel:Show()
|
||||||
AuctionFrame:EnableMouse(false)
|
AuctionFrame:EnableMouse(false)
|
||||||
|
|
||||||
Auctionator_Buy_ScrollbarUpdate()
|
Auctionator_Buy_ScrollbarUpdate()
|
||||||
@@ -498,11 +504,15 @@ end
|
|||||||
|
|
||||||
function Auctionator_OnAuctionHouseClosed()
|
function Auctionator_OnAuctionHouseClosed()
|
||||||
|
|
||||||
|
if not Auctionator_Scan_IsIdle() then
|
||||||
|
Auctionator_Scan_Abort()
|
||||||
|
end
|
||||||
|
|
||||||
AuctionatorOptionsButtonPanel:Hide()
|
AuctionatorOptionsButtonPanel:Hide()
|
||||||
AuctionatorOptionsFrame:Hide()
|
AuctionatorOptionsFrame:Hide()
|
||||||
AuctionatorDescriptionFrame:Hide()
|
AuctionatorDescriptionFrame:Hide()
|
||||||
Auctionator_Sell_Panel:Hide()
|
AuctionatorSellPanel:Hide()
|
||||||
Auctionator_Buy_Panel:Hide()
|
AuctionatorBuyPanel:Hide()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -514,7 +524,9 @@ function Auctionator_OnNewAuctionUpdate()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
Auctionator_Scan_Abort()
|
if not Auctionator_Scan_IsIdle() then
|
||||||
|
Auctionator_Scan_Abort()
|
||||||
|
end
|
||||||
|
|
||||||
currentAuctionItemName, currentAuctionItemTexture, currentAuctionItemStackSize = GetAuctionSellItemInfo()
|
currentAuctionItemName, currentAuctionItemTexture, currentAuctionItemStackSize = GetAuctionSellItemInfo()
|
||||||
|
|
||||||
@@ -555,9 +567,6 @@ end
|
|||||||
|
|
||||||
function Auctionator_ScrollbarUpdate()
|
function Auctionator_ScrollbarUpdate()
|
||||||
|
|
||||||
local line -- 1 through 12 of our window to scroll
|
|
||||||
local dataOffset -- an index into our data calculated from the scroll offset
|
|
||||||
|
|
||||||
local numrows
|
local numrows
|
||||||
if not currentAuctionItemName or not auctionatorEntries[currentAuctionItemName] then
|
if not currentAuctionItemName or not auctionatorEntries[currentAuctionItemName] then
|
||||||
numrows = 0
|
numrows = 0
|
||||||
@@ -569,8 +578,7 @@ function Auctionator_ScrollbarUpdate()
|
|||||||
|
|
||||||
for line = 1,12 do
|
for line = 1,12 do
|
||||||
|
|
||||||
dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorScrollFrame)
|
local dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorScrollFrame)
|
||||||
|
|
||||||
local lineEntry = getglobal("AuctionatorEntry"..line)
|
local lineEntry = getglobal("AuctionatorEntry"..line)
|
||||||
|
|
||||||
if numrows <= 12 then
|
if numrows <= 12 then
|
||||||
@@ -636,7 +644,9 @@ function Auctionator_EntryOnClick()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Auctionator_RefreshButtonOnClick()
|
function Auctionator_RefreshButtonOnClick()
|
||||||
Auctionator_Scan_Abort()
|
if not Auctionator_Scan_IsIdle() then
|
||||||
|
Auctionator_Scan_Abort()
|
||||||
|
end
|
||||||
Auctionator_RefreshEntries()
|
Auctionator_RefreshEntries()
|
||||||
Auctionator_SelectAuctionatorEntry()
|
Auctionator_SelectAuctionatorEntry()
|
||||||
Auctionator_UpdateRecommendation()
|
Auctionator_UpdateRecommendation()
|
||||||
|
|||||||
@@ -89,9 +89,9 @@
|
|||||||
</Scripts>
|
</Scripts>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Frame name="Auctionator_Sell_Template" virtual="true" hidden="true">
|
<Frame name="AuctionatorSellTemplate" virtual="true" hidden="true">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="550" y="447"/>
|
<AbsDimension x="694" y="447"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
@@ -108,11 +108,11 @@
|
|||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<FontString name="AuctionatorMessage" inherits="GameFontNormal">
|
<FontString name="AuctionatorMessage" inherits="GameFontNormal">
|
||||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="28" y="-100"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="170" y="-100"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<FontString name="Auctionator_Recommend_Text" inherits="GameFontNormal" text="Recommended buyout price">
|
<FontString name="Auctionator_Recommend_Text" inherits="GameFontNormal" text="Recommended buyout price">
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="77" y="-98"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="287" y="-98"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<FontString name="Auctionator_Recommend_Basis_Text" inherits="GameFontHighlightSmall" text="based on">
|
<FontString name="Auctionator_Recommend_Basis_Text" inherits="GameFontHighlightSmall" text="based on">
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
<Offset>
|
<Offset>
|
||||||
<AbsDimension x="6" y="-167"/>
|
<AbsDimension x="216" y="-167"/>
|
||||||
</Offset>
|
</Offset>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
@@ -160,10 +160,9 @@
|
|||||||
|
|
||||||
<Frames>
|
<Frames>
|
||||||
<Button>
|
<Button>
|
||||||
<Size><AbsDimension y="118"/></Size>
|
<Size><AbsDimension x="612" y="118"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-70"/></Offset></Anchor>
|
<Anchor point="TOPLEFT"><Offset><AbsDimension x="213" y="-70"/></Offset></Anchor>
|
||||||
<Anchor point="RIGHT"><Offset><AbsDimension x="63"/></Offset></Anchor>
|
|
||||||
</Anchors>
|
</Anchors>
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer level="BACKGROUND"></Layer>
|
<Layer level="BACKGROUND"></Layer>
|
||||||
@@ -213,7 +212,7 @@
|
|||||||
|
|
||||||
<Button name="Auctionator_RecommendItem_Tex">
|
<Button name="Auctionator_RecommendItem_Tex">
|
||||||
<Size><AbsDimension x="37" y="37"/></Size>
|
<Size><AbsDimension x="37" y="37"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="24" y="-87"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="234" y="-87"/></Offset></Anchor></Anchors>
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer level="OVERLAY">
|
<Layer level="OVERLAY">
|
||||||
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
|
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
|
||||||
@@ -263,7 +262,13 @@
|
|||||||
|
|
||||||
<Button name="AuctionatorRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
|
<Button name="AuctionatorRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
|
||||||
<Size><AbsDimension x="126" y="22"/></Size>
|
<Size><AbsDimension x="126" y="22"/></Size>
|
||||||
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="-14" y="-199"/></Offset></Anchor></Anchors>
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="51" y="14"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
Auctionator_RefreshButtonOnClick()
|
Auctionator_RefreshButtonOnClick()
|
||||||
@@ -273,7 +278,7 @@
|
|||||||
|
|
||||||
<ScrollFrame name="AuctionatorScrollFrame" inherits="FauxScrollFrameTemplate">
|
<ScrollFrame name="AuctionatorScrollFrame" inherits="FauxScrollFrameTemplate">
|
||||||
<Size><AbsDimension x="588" y="194"/></Size>
|
<Size><AbsDimension x="588" y="194"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-213"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="210" y="-213"/></Offset></Anchor></Anchors>
|
||||||
|
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnVerticalScroll>
|
<OnVerticalScroll>
|
||||||
|
|||||||
Reference in New Issue
Block a user