Mercurial > wow > prospect-me
comparison ProspectMe_Value.lua @ 4:9c3883972403 v1.2.3-Release
Fixed an occasional nil-value comparison bug with an added failsafe.
| author | Vynn |
|---|---|
| date | Tue, 16 Dec 2014 01:00:16 -0500 |
| parents | 69b46322ff1b |
| children | 5cbaaee1e7db |
comparison
equal
deleted
inserted
replaced
| 3:d72291422362 | 4:9c3883972403 |
|---|---|
| 14 | 14 |
| 15 if v == nil then -- provides a failsafe if Auctioneer, etc is set to Load on Demand | 15 if v == nil then -- provides a failsafe if Auctioneer, etc is set to Load on Demand |
| 16 v = PM_ItemTable[itemID].vendorPrice | 16 v = PM_ItemTable[itemID].vendorPrice |
| 17 end | 17 end |
| 18 | 18 |
| 19 if v == nil then -- provides a final failsafe - if we can't find anything, set it to 0 (TY peterwemm!) | |
| 20 v = 0.0 | |
| 21 end | |
| 22 | |
| 19 return tonumber(v) | 23 return tonumber(v) |
| 20 end | 24 end |
| 21 | 25 |
| 22 function PM_UpdateValues() | 26 function PM_UpdateValues() |
| 23 for k,v in pairs(PM_ItemTable) do | 27 for k,v in pairs(PM_ItemTable) do |
