changeset 41:55da4d54a2de Prospect Me 2

Fix for a bug in tooltip text display
author Vynn <mischivin@gmail.com>
date Fri, 11 Nov 2016 12:10:43 -0500
parents 97fe62d4385d
children 35c84e420f4a
files ProspectMe_Tooltip.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ProspectMe_Tooltip.lua	Thu Nov 10 16:09:28 2016 -0500
+++ b/ProspectMe_Tooltip.lua	Fri Nov 11 12:10:43 2016 -0500
@@ -77,6 +77,7 @@
 			if ProspectMe.Results[item] then
 				local price = ProspectMe.GetItemValue(item)
 				local lifetimeReturn = ProspectMe.GetReturn(item)
+				local subclass = select(7,GetItemInfo(item))
 				--NumofEachQuality, Percent of Each Quality
 				self:AddLine(" ")
 				self:AddLine("Prospect Me",0.5,1,0.5)
@@ -91,9 +92,9 @@
 					self:AddDoubleLine("Cost to Mass Prospect: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
 				elseif spellid == 210116 then
 					self:AddDoubleLine("Cost to Mass Mill: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				elseif select(7,GetItemInfo(item)) == ORE then
+				elseif subclass == ORE then
 					self:AddDoubleLine("Cost to Prospect: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				elseif select(7,GetItemInfo(item)) == HERB then
+				elseif subclass == HERB then
 					self:AddDoubleLine("Cost to Mill: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
 				else
 					self:AddDoubleLine("Cost to Process: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))