# HG changeset patch # User Asa Ayers # Date 1279496558 25200 # Node ID d21d202f3b3d859b51e873518df4492c6e3b412f # Parent f5d384fe7e4a9eb0c3bc70243fae622d852df087 Added color coding to the minimum price tooltip. If your minimum price is below the current auction price, it wll be green, otherwise it is red. diff -r f5d384fe7e4a -r d21d202f3b3d CHANGELOG.txt --- a/CHANGELOG.txt Sat Jul 17 07:33:23 2010 -0700 +++ b/CHANGELOG.txt Sun Jul 18 16:42:38 2010 -0700 @@ -1,3 +1,7 @@ +2010-07-18 Asa Ayers + +- Added color coding to the minimum price tooltip. If your minimum price is below the current auction price, it wll be green, otherwise it is red. + 2010-07-17 Asa Ayers - Fixed a bug that occurs if you take a flight point and the first thing you kill only has one item. ItemAuditor was incorrectly attaching the cost fo the flight to the cost of that item. diff -r f5d384fe7e4a -r d21d202f3b3d Modules/Tooltip.lua --- a/Modules/Tooltip.lua Sat Jul 17 07:33:23 2010 -0700 +++ b/Modules/Tooltip.lua Sun Jul 18 16:42:38 2010 -0700 @@ -17,9 +17,20 @@ local show = false if investedTotal > 0 then + local suggestColor + local ap = addon:GetAuctionPrice(link) + if ap == nil then + suggestColor = nil + elseif ap > ceil(investedPerItem/keep) then + suggestColor = "|cFF00FF00" -- green + else + suggestColor = "|cFFFF0000" -- red + end + + tip:AddDoubleLine("\124cffffffffIA: Total Invested", addon:FormatMoney(investedTotal)); tip:AddDoubleLine("\124cffffffffIA: Invested per Item (own: " .. count .. ")", addon:FormatMoney(ceil(investedPerItem))); - tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", addon:FormatMoney(ceil(investedPerItem/keep))) + tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", addon:FormatMoney(ceil(investedPerItem/keep), suggestColor)) show = true end