post settings improved

This commit is contained in:
Manuel Simon Hirsig
2016-03-17 19:34:17 +01:00
parent 26dd9ba6ae
commit 1571e92954
6 changed files with 86 additions and 57 deletions
+4 -4
View File
@@ -197,12 +197,12 @@ local methods = {
GetRecordPercent = function(self, record)
if not record then return end
-- cache the market value on the record
record.historical_value = record.historical_value or Aux.history.value(record.item_key) or 0
if record.historical_value > 0 then
local historical_value = Aux.history.value(record.item_key) or 0
if historical_value > 0 then
if record.unit_buyout_price > 0 then
return Aux.round(100 * record.unit_buyout_price / record.historical_value, 1)
return Aux.round(100 * record.unit_buyout_price / historical_value, 1)
end
return nil, Aux.round(100 * record.unit_bid_price / record.historical_value, 1)
return nil, Aux.round(100 * record.unit_bid_price / historical_value, 1)
end
end,