test
This commit is contained in:
parent
33a957b4ce
commit
0f3b39295d
File diff suppressed because it is too large
Load Diff
1
def.go
1
def.go
@ -135,6 +135,7 @@ type ChatWarsItem struct {
|
||||
Weight int64 `json:"weight"`
|
||||
Exchange string `json:"exchange"`
|
||||
Auction bool `json:"auction"`
|
||||
Craftable bool `json:"craftable"`
|
||||
Craft *ChatWarsItemCraft `json:"craft"`
|
||||
}
|
||||
|
||||
|
16
job.go
16
job.go
@ -1842,7 +1842,9 @@ func jobCraftItem(j Job) {
|
||||
requiredItems[v.Code] = req2 + v.Quantity*(req-ava)
|
||||
}
|
||||
} else {
|
||||
log.Printf("Item not craftable : %s\n", code)
|
||||
if obj.Craftable {
|
||||
log.Printf("Item missing recipe : %s\n", code)
|
||||
}
|
||||
missingItems[code] = req - ava
|
||||
}
|
||||
}
|
||||
@ -1955,7 +1957,7 @@ func jobGetVault(j Job) {
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_res_req`])
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_any_ack`])
|
||||
rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
clientSendCWMsg(j.UserID64, `/g_stock_res`)
|
||||
clientSendCWMsgDelay(j.UserID64, `/g_stock_res`, 4)
|
||||
return
|
||||
} else if (p.Status & reqTab[cacheObjSubType[`item_alch`]]) == reqTab[cacheObjSubType[`item_alch`]] {
|
||||
p.Status = p.Status &^ reqTab[cacheObjSubType[`item_alch`]]
|
||||
@ -1964,7 +1966,7 @@ func jobGetVault(j Job) {
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_alch_req`])
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_any_ack`])
|
||||
rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
clientSendCWMsg(j.UserID64, `/g_stock_alch`)
|
||||
clientSendCWMsgDelay(j.UserID64, `/g_stock_alch`, 4)
|
||||
return
|
||||
} else if (p.Status & reqTab[cacheObjSubType[`item_misc`]]) == reqTab[cacheObjSubType[`item_misc`]] {
|
||||
p.Status = p.Status &^ reqTab[cacheObjSubType[`item_misc`]]
|
||||
@ -1973,7 +1975,7 @@ func jobGetVault(j Job) {
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_misc_req`])
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_any_ack`])
|
||||
rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
clientSendCWMsg(j.UserID64, `/g_stock_misc`)
|
||||
clientSendCWMsgDelay(j.UserID64, `/g_stock_misc`, 4)
|
||||
return
|
||||
} else if (p.Status & reqTab[cacheObjSubType[`item_recipe`]]) == reqTab[cacheObjSubType[`item_recipe`]] {
|
||||
p.Status = p.Status &^ reqTab[cacheObjSubType[`item_recipe`]]
|
||||
@ -1982,7 +1984,7 @@ func jobGetVault(j Job) {
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_rec_req`])
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_any_ack`])
|
||||
rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
clientSendCWMsg(j.UserID64, `/g_stock_rec`)
|
||||
clientSendCWMsgDelay(j.UserID64, `/g_stock_rec`, 4)
|
||||
return
|
||||
} else if (p.Status & reqTab[cacheObjSubType[`item_part`]]) == reqTab[cacheObjSubType[`item_part`]] {
|
||||
p.Status = p.Status &^ reqTab[cacheObjSubType[`item_part`]]
|
||||
@ -1991,7 +1993,7 @@ func jobGetVault(j Job) {
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_part_req`])
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_any_ack`])
|
||||
rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
clientSendCWMsg(j.UserID64, `/g_stock_parts`)
|
||||
clientSendCWMsgDelay(j.UserID64, `/g_stock_parts`, 4)
|
||||
return
|
||||
} else if (p.Status & reqTab[cacheObjSubType[`item_other`]]) == reqTab[cacheObjSubType[`item_other`]] {
|
||||
p.Status = p.Status &^ reqTab[cacheObjSubType[`item_other`]]
|
||||
@ -2000,7 +2002,7 @@ func jobGetVault(j Job) {
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_oth_req`])
|
||||
setJobCallback(j.ID64, j.UserID64, cacheObjSubType[`msg_gstock_any_ack`])
|
||||
rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
clientSendCWMsg(j.UserID64, `/g_stock_other`)
|
||||
clientSendCWMsgDelay(j.UserID64, `/g_stock_other`, 4)
|
||||
return
|
||||
} else {
|
||||
setJobPayloadJSON(j.ID64, p)
|
||||
|
Loading…
Reference in New Issue
Block a user