1
0
Fork 0
mirror of https://github.com/Luzifer/runemetrics.git synced 2024-12-22 12:11:20 +00:00

Fix: Only retain target level if not reached

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-09-29 12:45:00 +02:00
parent a4df14377f
commit 20504d2960
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -122,7 +122,11 @@ func getPlayerInfo(name string, activities int) (*playerInfo, error) {
if playerInfoCache != nil { if playerInfoCache != nil {
for i, nSk := range out.SkillValues { for i, nSk := range out.SkillValues {
oSk := playerInfoCache.GetSkill(nSk.ID) oSk := playerInfoCache.GetSkill(nSk.ID)
if oSk.TargetLevel > nSk.Level {
out.SkillValues[i].TargetLevel = oSk.TargetLevel out.SkillValues[i].TargetLevel = oSk.TargetLevel
}
if oSk.XP == nSk.XP { if oSk.XP == nSk.XP {
out.SkillValues[i].Updated = oSk.Updated out.SkillValues[i].Updated = oSk.Updated
continue continue