view AuctionAddons/AuctionMaster.lua @ 76:958aba5f3297

Moved the group functions to the item data class. Added a new subgroup under the general config group called ?extra? which will provide features such as database character removal and perhaps guild selecting. Added a new custom .Print function to the addon object which takes two parameters: (string)text, (Color)color. The latter can be retrieved from the addon.Colors var (e.g. addon.Colors.Red). The ItemId parameter of the ItemData class constructor is now optional.
author Zerotorescue
date Sat, 25 Dec 2010 22:07:07 +0100
parents 5006cb0e97c6
children
line wrap: on
line source
do
	
	local function GetValue(link)
		local _, _, _, lowerBuyout, _, _, numAuctions, _ = AucMasGetCurrentAuctionInfo(link, false, true);
		--local avgBid, avgBuyout, lowerBid, lowerBuyout, upperBid, upperBuyout, numAuctions, numBuyouts
		
		return (numAuctions > 0 and lowerBuyout) or -1;
	end
	
	local function IsEnabled()
		return (AucMasGetCurrentAuctionInfo);
	end
	
	IMRegisterPricingAddon("AuctionMaster", GetValue, IsEnabled);
	
end