# HG changeset patch # User Geoff Brock # Date 1471456728 14400 # Node ID e6eec48ecf14f9991c9403e626224782d7dd5406 # Parent c5a66cdf45e2c9e23eeb15b3f916d964f892d2c2 Minor optimization to the Prospect Me tooltip. diff -r c5a66cdf45e2 -r e6eec48ecf14 ProspectMe_Tooltip.lua --- a/ProspectMe_Tooltip.lua Wed Aug 17 13:51:13 2016 -0400 +++ b/ProspectMe_Tooltip.lua Wed Aug 17 13:58:48 2016 -0400 @@ -57,6 +57,7 @@ if tooltipLink then local item = tooltipLink:match("Hitem:(%d+)") if PM_ResultsTable[item] then + local lifetimeReturn = PM_GetReturn(item) --NumofEachQuality, Percent of Each Quality self:AddLine(" ") self:AddLine("Prospect Me",0.5,1,0.5) @@ -68,8 +69,8 @@ self:AddDoubleLine("Cost to Mill: " .. PM_FormatPrice(5 * PM_ItemTable[item].price), " Average Return: " .. PM_FormatPrice(PM_GetReturn(item))) end - if PM_GetReturn(item)-(5 * PM_ItemTable[item].price) > 0 then - self:AddLine("Estimated Profit: " .. PM_FormatPrice(PM_GetReturn(item)-(5 * PM_ItemTable[item].price))) + if lifetimeReturn-(5 * PM_ItemTable[item].price) > 0 then + self:AddLine("Estimated Profit: " .. PM_FormatPrice(lifetimeReturn-(5 * PM_ItemTable[item].price))) self:AddLine(" ") else self:AddLine("No profit to be made",1,0,0)