This commit is contained in:
shoopea 2020-01-26 17:04:50 +08:00
parent 7c94784592
commit c0c7024d1b

View File

@ -354,8 +354,13 @@ func loadObjItem() error {
setObjItemCraft(objItems[i].ObjID64, objItems[i].Craft.Command, objItems[i].Craft.Mana)
emptyObjItemCraftItem(objItems[i].ObjID64)
for k, o := range objItems[i].Craft.Items {
if id, ok := cacheObjItem[objItems[i].Code]; !ok {
log.Printf("loadObjItem : %s : unknown item %s for recipe.\n", objItems[i].Code, o.Code)
} else {
log.Printf("loadObjItem : %s : adding %s (%d) to the recipe.\n", objItems[i].Code, o.Code, o.Quantity)
objItems[i].Craft.Items[k].ItemID64 = getSilentObjItemID(o.Code, ``)
objItems[i].Craft.Items[k].ItemID64 = objItems[id].ObjID64
}
}
for _, o := range objItems[i].Craft.Items {
addObjItemCraftItem(objItems[i].ObjID64, o.ItemID64, o.Quantity)