history bugfix

This commit is contained in:
Manuel Simon Hirsig
2016-03-19 01:46:19 +01:00
parent 5dd744547c
commit d21fe8683f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
Aux = { Aux = {
version = '2.7.4', version = '2.7.5',
blizzard_ui_shown = false, blizzard_ui_shown = false,
orig = {}, orig = {},
} }
+1 -1
View File
@@ -88,7 +88,7 @@ function public.value(item_key)
local weighted_values = {} local weighted_values = {}
local total_weight = 0 local total_weight = 0
for _, data_point in item_record.data_points do for _, data_point in item_record.data_points do
local weight = 0.99^Aux.round((data_point.time - item_record.data_points[1].time) / (60*60*24)) local weight = 0.99^Aux.round((item_record.data_points[1].time - data_point.time) / (60*60*24))
total_weight = total_weight + weight total_weight = total_weight + weight
tinsert(weighted_values, {value = data_point.market_value, weight = weight}) tinsert(weighted_values, {value = data_point.market_value, weight = weight})
end end