This commit is contained in:
shoopea 2020-08-08 12:41:42 +02:00
parent a12e7be611
commit ec489436e9

6
job.go
View File

@ -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)