fix g_deposit_all

This commit is contained in:
shoopea 2019-08-23 18:46:51 +08:00
parent 8feff19999
commit e205399d63

40
job.go
View File

@ -716,25 +716,27 @@ func jobGDeposit(j Job) {
var res, misc, alch, craft, equip bool = false, false, false, false, false var res, misc, alch, craft, equip bool = false, false, false, false, false
log.Printf("jobGDeposit : Checking items (%d).\n", len(p.ResObjID64)) log.Printf("jobGDeposit : Checking items (%d).\n", len(p.ResObjID64))
if len(p.ResObjID64) > 0 { if len(p.ResObjID64) > 0 {
obj, err := getObjItem(p.ResObjID64[0]) for i := range p.ResObjID64 {
logOnError(err, "jobGDeposit : getObjItem") obj, err := getObjItem(p.ResObjID64[i])
if err == nil { logOnError(err, "jobGDeposit : getObjItem")
switch obj.ItemTypeID { if err == nil {
case objSubTypeItemResource: switch obj.ItemTypeID {
res = true case objSubTypeItemResource:
case objSubTypeItemAlch: res = true
alch = true case objSubTypeItemAlch:
case objSubTypeItemMisc: alch = true
misc = true case objSubTypeItemMisc:
case objSubTypeItemRecipe: misc = true
craft = true case objSubTypeItemRecipe:
case objSubTypeItemPart: craft = true
craft = true case objSubTypeItemPart:
case objSubTypeItemOther: craft = true
equip = true case objSubTypeItemOther:
case objSubTypeItemUnique: equip = true
equip = true case objSubTypeItemUnique:
default: equip = true
default:
}
} }
} }
} }