update g deposit all

This commit is contained in:
shoopea 2019-08-30 15:23:56 +08:00
parent 0587660c76
commit a049f90619

10
job.go
View File

@ -805,7 +805,7 @@ func jobGDeposit(j Job) {
} }
if alch { if alch {
clientSendCWMsgDelay(p.ChatID64, `Alchemy`, delay) clientSendCWMsgDelay(p.ChatID64, `Alchemy`, delay)
p.Status = 1 p.Status = 1 // FIXME UPDATE WITH PROPER TYPE
b, _ = json.Marshal(&p) b, _ = json.Marshal(&p)
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, 1*time.Minute) err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, 1*time.Minute)
logOnError(err, "jobGDeposit : createJobCallback") logOnError(err, "jobGDeposit : createJobCallback")
@ -813,7 +813,7 @@ func jobGDeposit(j Job) {
} }
if misc { if misc {
clientSendCWMsgDelay(p.ChatID64, `🗃Misc`, delay) clientSendCWMsgDelay(p.ChatID64, `🗃Misc`, delay)
p.Status = 1 p.Status = 1 // FIXME UPDATE WITH PROPER TYPE
b, _ = json.Marshal(&p) b, _ = json.Marshal(&p)
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, 1*time.Minute) err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, 1*time.Minute)
logOnError(err, "jobGDeposit : createJobCallback") logOnError(err, "jobGDeposit : createJobCallback")
@ -821,7 +821,7 @@ func jobGDeposit(j Job) {
} }
if craft { if craft {
clientSendCWMsgDelay(p.ChatID64, `⚒Crafting`, delay) clientSendCWMsgDelay(p.ChatID64, `⚒Crafting`, delay)
p.Status = 1 p.Status = objSubTypeMessageStockAnyAck
b, _ = json.Marshal(&p) b, _ = json.Marshal(&p)
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageStockAnyAck, b, 1*time.Minute) err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGDeposit : createJobCallback") logOnError(err, "jobGDeposit : createJobCallback")
@ -829,7 +829,7 @@ func jobGDeposit(j Job) {
} }
if equip { if equip {
clientSendCWMsgDelay(p.ChatID64, `🏷Equipment`, delay) clientSendCWMsgDelay(p.ChatID64, `🏷Equipment`, delay)
p.Status = 1 p.Status = 1 // FIXME UPDATE WITH PROPER TYPE
b, _ = json.Marshal(&p) b, _ = json.Marshal(&p)
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, 1*time.Minute) err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, 1*time.Minute)
logOnError(err, "jobGDeposit : createJobCallback") logOnError(err, "jobGDeposit : createJobCallback")
@ -872,7 +872,7 @@ func jobGDeposit(j Job) {
for stockIdx := range cwm.Stock { for stockIdx := range cwm.Stock {
for resIdx := range p.ResObjID64 { for resIdx := range p.ResObjID64 {
if cwm.Stock[stockIdx].ItemID64 == p.ResObjID64[resIdx] { if cwm.Stock[stockIdx].ItemID64 == p.ResObjID64[resIdx] {
//log.Printf("jobGDeposit : objSubTypeMessageStockAck : Matching ItemID %d (%d).\n", p.ResObjID64[resIdx], cwm.Stock[stockIdx].Quantity) log.Printf("jobGDeposit : objSubTypeMessageStockAnyAck : Matching ItemID %d (%d).\n", p.ResObjID64[resIdx], cwm.Stock[stockIdx].Quantity)
item, _ := getObjItem(p.ResObjID64[resIdx]) item, _ := getObjItem(p.ResObjID64[resIdx])
clientSendCWMsg(p.ChatID64, fmt.Sprintf("/g_deposit %s %d", item.Code, cwm.Stock[stockIdx].Quantity)) clientSendCWMsg(p.ChatID64, fmt.Sprintf("/g_deposit %s %d", item.Code, cwm.Stock[stockIdx].Quantity))
p2 := JobPayloadGDepositForward{ p2 := JobPayloadGDepositForward{