Mercurial > wow > prospect-me
comparison ProspectMe_Tooltip.lua @ 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 | e6eec48ecf14 | 
| children | 5cbaaee1e7db | 
   comparison
  equal
  deleted
  inserted
  replaced
| 19:169c4aadffe6 | 20:4a10e5d1618c | 
|---|---|
| 1 PM_HERBSUBCLASS = select(6, GetAuctionItemSubClasses(6)) | 1 --PM_HERBSUBCLASS = select(6, GetAuctionItemSubClasses(6)) | 
| 2 PM_ORESUBCLASS = select(4, GetAuctionItemSubClasses(6)) | 2 --PM_ORESUBCLASS = select(4, GetAuctionItemSubClasses(6)) | 
| 3 | |
| 4 --Hardcoded until I find a better solution now that GetAuctionItemSubClass() has changed | |
| 5 PM_HERBSUBCLASS = "Herb" | |
| 6 PM_ORESUBCLASS = "Metal & Stone" | |
| 3 | 7 | 
| 4 function PM_FormatPrice(value) | 8 function PM_FormatPrice(value) | 
| 5 | 9 | 
| 6 local GSC_GOLD="ffffd100" | 10 local GSC_GOLD="ffffd100" | 
| 7 local GSC_SILVER="ffe6e6e6" | 11 local GSC_SILVER="ffe6e6e6" | 
| 59 if PM_ResultsTable[item] then | 63 if PM_ResultsTable[item] then | 
| 60 local lifetimeReturn = PM_GetReturn(item) | 64 local lifetimeReturn = PM_GetReturn(item) | 
| 61 --NumofEachQuality, Percent of Each Quality | 65 --NumofEachQuality, Percent of Each Quality | 
| 62 self:AddLine(" ") | 66 self:AddLine(" ") | 
| 63 self:AddLine("Prospect Me",0.5,1,0.5) | 67 self:AddLine("Prospect Me",0.5,1,0.5) | 
| 68 -- Subclass Detection is broken in Legion - may need to hard-code this or find another way of getting locatlizes subclass names. | |
| 64 if PM_ItemTable[item].subclass == PM_ORESUBCLASS then | 69 if PM_ItemTable[item].subclass == PM_ORESUBCLASS then | 
| 65 self:AddLine("Times Prospected: " .. PM_ResultsTable[item].timesProspected) | 70 self:AddLine("Times Prospected: " .. PM_ResultsTable[item].timesProspected) | 
| 66 self:AddDoubleLine("Cost to Prospect: " .. PM_FormatPrice(5 * PM_ItemTable[item].price), " Average Return: " .. PM_FormatPrice(PM_GetReturn(item))) | 71 self:AddDoubleLine("Cost to Prospect: " .. PM_FormatPrice(5 * PM_ItemTable[item].price), " Average Return: " .. PM_FormatPrice(PM_GetReturn(item))) | 
| 67 elseif PM_ItemTable[item].subclass == PM_HERBSUBCLASS then | 72 elseif PM_ItemTable[item].subclass == PM_HERBSUBCLASS then | 
| 68 self:AddLine("Times Milled: " .. PM_ResultsTable[item].timesProspected) | 73 self:AddLine("Times Milled: " .. PM_ResultsTable[item].timesProspected) | 
