fix get vault

This commit is contained in:
shoopea 2020-01-26 21:48:49 +08:00
parent 60469f8564
commit 3f99f9a852
2 changed files with 4 additions and 2 deletions

1
def.go
View File

@ -499,6 +499,7 @@ type JobPayloadCraftItem struct {
}
type JobPayloadGetVault struct {
Status int64 `json:"status"`
JobCallbackID64 int64 `json:"job_callback_id"`
ItemTypeList []int64 `json:"item_type"`
Vault []ChatWarsItems `json:"vault"`

5
job.go
View File

@ -904,6 +904,7 @@ func jobGStock(j Job) {
var (
p JobPayloadGStock
p2 JobPayloadGetVault
b []byte
)
var resSize, resCount, alchSize, alchCount, miscSize, miscCount, recSize, recCount, partSize, partCount, otherSize, otherCount, totalSize int64
err := setJobStart(j.ID64)
@ -922,7 +923,7 @@ func jobGStock(j Job) {
p2.ItemTypeList = append(p2.ItemTypeList, cacheObjSubType[`item_part`])
p2.ItemTypeList = append(p2.ItemTypeList, cacheObjSubType[`item_other`])
b2, err := json.Marshal(p2)
b, err = json.Marshal(p2)
logOnError(err, "jobGStock : Marshal(p2)")
jobID64, err := createJob(cacheObjSubType[`job_get_vault`], objJobPriority, j.UserID64, 0, time.Now().UTC(), b)
@ -938,7 +939,7 @@ func jobGStock(j Job) {
return
}
b := getJobPayload(p.VaultJobID64)
b = getJobPayload(p.VaultJobID64)
err = json.Unmarshal(b, &p2)
logOnError(err, "jobGStock : Unmarshal(p2)")