changeset 20:4a10e5d1618c

Hardcoded the subclass detection in Legion - will work 100% in english clients, not so sure about non-english clients, so please report back if it breaks for you!
author Geoff Brock <mischivin@gmail.com>
date Sun, 04 Sep 2016 21:51:07 -0400
parents 169c4aadffe6
children dc011841fcb4
files ProspectMe_Tooltip.lua
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ProspectMe_Tooltip.lua	Sun Sep 04 16:52:04 2016 -0400
+++ b/ProspectMe_Tooltip.lua	Sun Sep 04 21:51:07 2016 -0400
@@ -1,5 +1,9 @@
-PM_HERBSUBCLASS = select(6, GetAuctionItemSubClasses(6))
-PM_ORESUBCLASS = select(4, GetAuctionItemSubClasses(6))
+--PM_HERBSUBCLASS = select(6, GetAuctionItemSubClasses(6))
+--PM_ORESUBCLASS = select(4, GetAuctionItemSubClasses(6))
+
+--Hardcoded until I find a better solution now that GetAuctionItemSubClass() has changed
+PM_HERBSUBCLASS = "Herb"
+PM_ORESUBCLASS = "Metal & Stone"
 
 function PM_FormatPrice(value)
 
@@ -61,6 +65,7 @@
 				--NumofEachQuality, Percent of Each Quality
 				self:AddLine(" ")
 				self:AddLine("Prospect Me",0.5,1,0.5)
+				-- Subclass Detection is broken in Legion - may need to hard-code this or find another way of getting locatlizes subclass names.
 				if PM_ItemTable[item].subclass == PM_ORESUBCLASS then
 					self:AddLine("Times Prospected: " .. PM_ResultsTable[item].timesProspected)
 					self:AddDoubleLine("Cost to Prospect: " .. PM_FormatPrice(5 * PM_ItemTable[item].price), " Average Return: " .. PM_FormatPrice(PM_GetReturn(item)))