Mercurial > wow > prospect-me
comparison ProspectMe_Value.lua @ 0:69b46322ff1b v1.2.1-Alpha
Updated Prospect me for initial client v6.0.3 support. Warning, there may be bugs!
author | Vynn |
---|---|
date | Mon, 15 Dec 2014 22:51:49 -0500 |
parents | |
children | 9c3883972403 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:69b46322ff1b |
---|---|
1 function PM_GetItemValue(itemID) | |
2 local v = nil | |
3 if GetAuctionBuyout then -- if an installed addon supports Tekkub's GetAuctionBuyout API: Auctionator, AuctionLite, etc... | |
4 v = GetAuctionBuyout(itemID) | |
5 end | |
6 | |
7 if v == nil then | |
8 if AucAdvanced then -- Auctioneer Support | |
9 v = AucAdvanced.API.GetMarketValue(PM_ItemTable[itemID].link) | |
10 else -- if nothing else, use the vendor price! | |
11 v = PM_ItemTable[itemID].vendorPrice | |
12 end | |
13 end | |
14 | |
15 if v == nil then -- provides a failsafe if Auctioneer, etc is set to Load on Demand | |
16 v = PM_ItemTable[itemID].vendorPrice | |
17 end | |
18 | |
19 return tonumber(v) | |
20 end | |
21 | |
22 function PM_UpdateValues() | |
23 for k,v in pairs(PM_ItemTable) do | |
24 PM_ItemTable[k].price = PM_GetItemValue(k) | |
25 end | |
26 end |