From a4df14377ff5037505acea3cde0a2dc97ae9d749 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 28 Sep 2019 23:19:38 +0200 Subject: [PATCH] Fix: retain target level on level updates Signed-off-by: Knut Ahlers --- metrics.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metrics.go b/metrics.go index ad1420b..3ebba46 100644 --- a/metrics.go +++ b/metrics.go @@ -121,9 +121,10 @@ func getPlayerInfo(name string, activities int) (*playerInfo, error) { if playerInfoCache != nil { for i, nSk := range out.SkillValues { - if oSk := playerInfoCache.GetSkill(nSk.ID); oSk.XP == nSk.XP { + oSk := playerInfoCache.GetSkill(nSk.ID) + out.SkillValues[i].TargetLevel = oSk.TargetLevel + if oSk.XP == nSk.XP { out.SkillValues[i].Updated = oSk.Updated - out.SkillValues[i].TargetLevel = oSk.TargetLevel continue }