Mercurial > wow > itemauditor
changeset 34:d21d202f3b3d
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.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Sun, 18 Jul 2010 16:42:38 -0700 |
parents | f5d384fe7e4a |
children | aaa716c93fb2 |
files | CHANGELOG.txt Modules/Tooltip.lua |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <Asa.Ayers@Gmail.com> + +- 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 <Asa.Ayers@Gmail.com> - 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.
--- 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