This commit is contained in:
shoopea 2020-01-05 18:00:54 +08:00
parent 0557b9d53c
commit 95d5b0cfc1

8
job.go
View File

@ -1302,19 +1302,25 @@ func jobGWithdraw(j Job) {
b, _ := json.Marshal(p)
log.Printf("jobGWithdraw : %s\n", string(b))
if p.Status < 64 {
if (p.Status & 63) > 0 {
if (p.Status & 1) == 1 {
log.Printf("jobGWithdraw : Requesting res.\n")
p.Status = p.Status &^ 1
} else if (p.Status & 2) == 2 {
log.Printf("jobGWithdraw : Requesting alch.\n")
p.Status = p.Status &^ 2
} else if (p.Status & 4) == 4 {
log.Printf("jobGWithdraw : Requesting misc.\n")
p.Status = p.Status &^ 4
} else if (p.Status & 8) == 8 {
log.Printf("jobGWithdraw : Requesting recipe.\n")
p.Status = p.Status &^ 8
} else if (p.Status & 16) == 16 {
log.Printf("jobGWithdraw : Requesting part.\n")
p.Status = p.Status &^ 16
} else if (p.Status & 32) == 32 {
log.Printf("jobGWithdraw : Requesting other.\n")
p.Status = p.Status &^ 32
}
}