# HG changeset patch # User Asa Ayers # Date 1281510556 25200 # Node ID fab2c434160201730feca25011f16177c87e08e0 # Parent 54b917340283fa24cb9c5cb2158e046bd97a68f2 Added options when using Auctioneer to use the market price instead of the lowest price on the AH. diff -r 54b917340283 -r fab2c4341602 CHANGELOG.txt --- a/CHANGELOG.txt Tue Aug 10 23:25:48 2010 -0700 +++ b/CHANGELOG.txt Wed Aug 11 00:09:16 2010 -0700 @@ -2,6 +2,7 @@ - Changed the ArkInventory rule to consider items with no competition to be profitable. - Ticket 27 - Added the ability to select your preferred auction adodn if multiple are available. +- Added options when using Auctioneer to use the market price instead of the lowest price on the AH. 2010-08-08 Asa Ayers diff -r 54b917340283 -r fab2c4341602 Core.lua --- a/Core.lua Tue Aug 10 23:25:48 2010 -0700 +++ b/Core.lua Wed Aug 11 00:09:16 2010 -0700 @@ -66,6 +66,7 @@ ItemAuditor_enabled = true, queue_destination = nil, disabled_deciders = {}, + pricing_method = 'low', }, factionrealm = { item_account = {}, diff -r 54b917340283 -r fab2c4341602 Modules/AuctionHouse.lua --- a/Modules/AuctionHouse.lua Tue Aug 10 23:25:48 2010 -0700 +++ b/Modules/AuctionHouse.lua Wed Aug 11 00:09:16 2010 -0700 @@ -36,6 +36,23 @@ return ItemAuditor.db.profile.auction_addon end +local function setAddon(info, value) + ItemAuditor.db.profile.auction_addon = value +end + +local function getPricingMethods() + if ItemAuditor.db.profile.auction_addon == 'other' then + return { + low = 'Lowest Price', + } + else + return { + low = 'Lowest Price', + market = 'Market Price', + } + end +end + ItemAuditor.Options.args.auction_house = { name = "Auction House", type = 'group', @@ -46,9 +63,18 @@ desc = "", values = getAddons, get = getSelected, - set = function(info, value) ItemAuditor.db.profile.auction_addon = value end, + set = setAddon, order = 0, }, + pricingMethod = { + type = "select", + name = "Pricing Method", + desc = "", + values = getPricingMethods, + get = function() return ItemAuditor.db.profile.pricing_method end, + set = function(info, value) ItemAuditor.db.profile.pricing_method = value end, + order = 1, + } }, } @@ -56,11 +82,16 @@ local link = select(2, GetItemInfo(itemLink)) assert(link, 'Invalid item link: '..itemLink) local addon = getSelected() + local prices = ItemAuditor.db.profile.pricing_method or 'low' if GetAuctionBuyout ~= nil and addon == 'other' then return GetAuctionBuyout(link) elseif AucAdvanced and AucAdvanced.Version and addon == 'auctioneer' then - local _, _, _, _, _, lowBuy= AucAdvanced.Modules.Util.SimpleAuction.Private.GetItems(link) - return lowBuy + if prices == 'low' then + local _, _, _, _, _, lowBuy= AucAdvanced.Modules.Util.SimpleAuction.Private.GetItems(link) + return lowBuy + else + return AucAdvanced.API.GetMarketValue(link) + end end return nil end \ No newline at end of file