This commit is contained in:
shoopea 2020-08-08 12:21:30 +02:00
parent f153cc5c80
commit 9e9717151d

20
job.go
View File

@ -2752,15 +2752,17 @@ func jobVaultValOth(j Job) {
p.Val = make([]JobPayloadVaultValTab, 0)
for _, v := range p2.Vault {
price, volume := getObjItemValDet(v.ItemID64, v.Quality, 14)
t := JobPayloadVaultValTab{
ItemID64: v.ItemID64,
Quality: v.Quality,
Quantity: v.Quantity,
Volume: volume,
Price: price,
price, volume := getObjItemValDet(v.ItemID64, v.Quality, 31)
if volume > 0 {
t := JobPayloadVaultValTab{
ItemID64: v.ItemID64,
Quality: v.Quality,
Quantity: v.Quantity,
Volume: volume,
Price: price,
}
p.Val = append(p.Val, t)
}
p.Val = append(p.Val, t)
}
sort.Slice(p.Val, func(i, j int) bool { return p.Val[i].Volume < p.Val[j].Volume })
@ -2768,7 +2770,7 @@ func jobVaultValOth(j Job) {
total := float64(0)
for _, v := range p.Val {
item, _ := getObjItem(v.ItemID64)
log.Printf("jobVaultValOth : %s (%s) - %s => %d - %f\n", item.Code, v.Quality, item.Names[0], v.Volume, v.Price)
log.Printf("jobVaultValOth : %s%s - %s => %d - %f\n", item.Code, v.Quality, item.Names[0], v.Volume, v.Price)
out = fmt.Sprintf("%s- %s (%s) : %d / %f\n", out, item.Code, v.Quality, v.Volume, v.Price)
total += float64(v.Quantity) * v.Price
}