fix craft all
This commit is contained in:
parent
d5c92d6afd
commit
0733e158c0
59
job.go
59
job.go
|
@ -1990,39 +1990,40 @@ func jobCraftAll(j Job) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we can finish the job */
|
/* we can finish the job */
|
||||||
out := fmt.Sprintf("<code>Summary for %d %s\n", p.Quantity, item.Names[0])
|
/*
|
||||||
out = fmt.Sprintf("%s Mana : %d\n", out, totalMana)
|
out := fmt.Sprintf("<code>Summary for %d %s\n", p.Quantity, item.Names[0])
|
||||||
out = fmt.Sprintf("%s Items :\n", out)
|
out = fmt.Sprintf("%s Mana : %d\n", out, totalMana)
|
||||||
for k, v := range requiredItems {
|
out = fmt.Sprintf("%s Items :\n", out)
|
||||||
obj, _ := getObjItem(getObjItemID(k, ``))
|
for k, v := range requiredItems {
|
||||||
ava, _ := availableItems[k]
|
|
||||||
out = fmt.Sprintf("%s [%s] %s : %d (%d)\n", out, obj.Code, obj.Names[0], v, ava)
|
|
||||||
}
|
|
||||||
out = fmt.Sprintf("%s Missing :\n", out)
|
|
||||||
for k, v := range missingItems {
|
|
||||||
if v > 0 {
|
|
||||||
obj, _ := getObjItem(getObjItemID(k, ``))
|
obj, _ := getObjItem(getObjItemID(k, ``))
|
||||||
out = fmt.Sprintf("%s [%s] %s : %d\n", out, obj.Code, obj.Names[0], v)
|
ava, _ := availableItems[k]
|
||||||
|
out = fmt.Sprintf("%s [%s] %s : %d (%d)\n", out, obj.Code, obj.Names[0], v, ava)
|
||||||
}
|
}
|
||||||
}
|
out = fmt.Sprintf("%s Missing :\n", out)
|
||||||
out = fmt.Sprintf("%s To craft :\n", out)
|
for k, v := range missingItems {
|
||||||
for k, v := range craftItems {
|
if v > 0 {
|
||||||
if v > 0 {
|
obj, _ := getObjItem(getObjItemID(k, ``))
|
||||||
obj, _ := getObjItem(getObjItemID(k, ``))
|
out = fmt.Sprintf("%s [%s] %s : %d\n", out, obj.Code, obj.Names[0], v)
|
||||||
out = fmt.Sprintf("%s [%s] %s : %d\n", out, obj.Code, obj.Names[0], v)
|
}
|
||||||
}
|
}
|
||||||
}
|
out = fmt.Sprintf("%s To craft :\n", out)
|
||||||
out = fmt.Sprintf("%s</code>", out)
|
for k, v := range craftItems {
|
||||||
|
if v > 0 {
|
||||||
c := TGCommand{
|
obj, _ := getObjItem(getObjItemID(k, ``))
|
||||||
Type: commandReplyMsg,
|
out = fmt.Sprintf("%s [%s] %s : %d\n", out, obj.Code, obj.Names[0], v)
|
||||||
Text: out,
|
}
|
||||||
FromMsgID64: p.MsgID64,
|
}
|
||||||
FromChatID64: p.ChatID64,
|
out = fmt.Sprintf("%s</code>", out)
|
||||||
ParseMode: cmdParseModeHTML,
|
|
||||||
}
|
|
||||||
TGCmdQueue <- c
|
|
||||||
|
|
||||||
|
c := TGCommand{
|
||||||
|
Type: commandReplyMsg,
|
||||||
|
Text: out,
|
||||||
|
FromMsgID64: p.MsgID64,
|
||||||
|
FromChatID64: p.ChatID64,
|
||||||
|
ParseMode: cmdParseModeHTML,
|
||||||
|
}
|
||||||
|
TGCmdQueue <- c
|
||||||
|
*/
|
||||||
err = setJobDone(j.ID64)
|
err = setJobDone(j.ID64)
|
||||||
logOnError(err, "jobCraftItem : setJobDone")
|
logOnError(err, "jobCraftItem : setJobDone")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user