This commit is contained in:
shoopea 2020-01-27 12:15:42 +08:00
parent d6e255a110
commit f321bfc3e6

2
job.go
View File

@ -1834,7 +1834,7 @@ func jobCraftItem(j Job) {
logOnError(err, "jobCraftItem : getObjItem") logOnError(err, "jobCraftItem : getObjItem")
if obj.Craft != nil { if obj.Craft != nil {
craftItems[code] = req - ava craftItems[code] = req - ava
totalMana = (req - ava) * obj.Craft.Mana totalMana = totalMana + (req-ava)*obj.Craft.Mana
for _, v := range obj.Craft.Items { for _, v := range obj.Craft.Items {
req2, _ := requiredItems[v.Code] req2, _ := requiredItems[v.Code]
requiredItems[v.Code] = req2 + v.Quantity*(req-ava) requiredItems[v.Code] = req2 + v.Quantity*(req-ava)