From d21fe8683fc68cfefcfaee49951fd83b5b7a2289 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sat, 19 Mar 2016 01:46:19 +0100 Subject: [PATCH] history bugfix --- core.lua | 2 +- history.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core.lua b/core.lua index 3fbf1b6..ff5ed74 100644 --- a/core.lua +++ b/core.lua @@ -1,5 +1,5 @@ Aux = { - version = '2.7.4', + version = '2.7.5', blizzard_ui_shown = false, orig = {}, } diff --git a/history.lua b/history.lua index 287abf9..dbef0b3 100644 --- a/history.lua +++ b/history.lua @@ -88,7 +88,7 @@ function public.value(item_key) local weighted_values = {} local total_weight = 0 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 tinsert(weighted_values, {value = data_point.market_value, weight = weight}) end