This commit is contained in:
shoopea 2020-01-27 13:23:34 +08:00
parent 9b43ca47bb
commit c91947a50a

14
job.go
View File

@ -1862,23 +1862,23 @@ func jobCraftItem(j Job) {
/* we can finish the job */
out := fmt.Sprintf("Summary for <b>%s</b>\n", item.Name[0])
out := fmt.Sprintf("Summary for <b>%s</b>\n", item.Names[0])
out = fmt.Sprint("%s<code> Mana : %d</code>\n", out, totalMana)
out = fmt.Sprint("%s<pre> Items :</pre>\n", out)
for k, v := range requiredItems {
obj, _ := getObjItem(getObjItemId(k))
obj, _ := getObjItem(getObjItemID(k, ``))
ava, _ := availableItems[k]
out = fmt.Sprintf("%s<code> [%s] %s : %d (%d)</code>\n", out, obj.Code, obj.Name[0], v, ava)
out = fmt.Sprintf("%s<code> [%s] %s : %d (%d)</code>\n", out, obj.Code, obj.Names[0], v, ava)
}
out = fmt.Sprint("%s<pre> Missing :</pre>\n", out)
for k, v := range missingItems {
obj, _ := getObjItem(getObjItemId(k))
out = fmt.Sprintf("%s<code> [%s] %s : %d</code>\n", out, obj.Code, obj.Name[0], v)
obj, _ := getObjItem(getObjItemID(k, ``))
out = fmt.Sprintf("%s<code> [%s] %s : %d</code>\n", out, obj.Code, obj.Names[0], v)
}
out = fmt.Sprint("%s<pre> To craft :</pre>\n", out)
for k, v := range craftItems {
obj, _ := getObjItem(getObjItemId(k))
out = fmt.Sprintf("%s<code> [%s] %s : %d</code>\n", out, obj.Code, obj.Name[0], v)
obj, _ := getObjItem(getObjItemID(k, ``))
out = fmt.Sprintf("%s<code> [%s] %s : %d</code>\n", out, obj.Code, obj.Names[0], v)
}
log.Printf("jobCraftItem[%s] : Output :\n%s\n", item.Code, out)