Mercurial > wow > prospect-me
view ProspectMe_Value.lua @ 39:b9c2260bf1b4 Prospect Me 2
Updated the tooltips to better reflect mass prospecting/milling cost/return, support tooltips on mouse over of the Mass Prospecting/Milling spells, and general tooltip formatting improvements
author | Vynn <mischivin@gmail.com> |
---|---|
date | Thu, 10 Nov 2016 16:01:43 -0500 |
parents | 5cbaaee1e7db |
children |
line wrap: on
line source
local function Initialize () ProspectMe.GetItemValue = function (itemID) local v = nil if GetAuctionBuyout then -- if an installed addon supports Tekkub's GetAuctionBuyout API: Auctionator, AuctionLite, etc... v = GetAuctionBuyout(itemID) elseif AucAdvanced then -- Auctioneer Support v = AucAdvanced.API.GetMarketValue(PM_ItemTable[itemID].link) end if v == nil then -- provides a failsafe if Auctioneer, etc is set to Load on Demand v = select(11, GetItemInfo(itemID)) end if v == nil then -- provides a final failsafe - if we can't find anything, set it to 0 (TY peterwemm!) v = 0.0 end return tonumber(v) end end local frame = CreateFrame("FRAME", "ProspectMe_Value") frame:RegisterEvent("VARIABLES_LOADED") --frame:SetScript("OnEvent", EventHandler) frame:SetScript("OnEvent", Initialize)