diff --git a/job.go b/job.go index fcdb754..8ba0027 100644 --- a/job.go +++ b/job.go @@ -2754,17 +2754,21 @@ func jobVaultValOth(j Job) { for _, v := range p2.Vault { price, volume := getObjItemValDet(v.ItemID64, v.Quality, 90) if volume > 0 { + item, _ := getObjItem(v.ItemID64) t := JobPayloadVaultValTab{ ItemID64: v.ItemID64, Quality: v.Quality, Quantity: v.Quantity, Volume: volume, Price: price, + Weight: item.Weight, } p.Val = append(p.Val, t) } } - sort.Slice(p.Val, func(i, j int) bool { return p.Val[i].Volume < p.Val[j].Volume }) + sort.Slice(p.Val, func(i, j int) bool { + return p.Val[i].Price/float64(p.Val[i].Weight) < p.Val[j].Price/float64(p.Val[j].Weight) + }) out := fmt.Sprintf("Value (other) :\n") total := float64(0)