test g stock

This commit is contained in:
shoopea 2019-12-13 19:52:03 +08:00
parent c8be19a56e
commit 943d3d9a6b

15
job.go
View File

@ -795,26 +795,26 @@ func jobGStock(j Job) {
item, err := getObjItem(v.ItemID64)
logOnError(err, "jobGStock : getObjItem")
if err == nil {
totalSize = totalSize + item.Weight*v.Quantity
totalSize += item.Weight * v.Quantity
switch item.ItemTypeID {
case objSubTypeItemResource:
resSize += item.Weight * v.Quantity
resCount += 1
resCount += v.Quantity
case objSubTypeItemAlch:
alchSize += item.Weight * v.Quantity
alchCount += 1
alchCount += v.Quantity
case objSubTypeItemMisc:
miscSize += item.Weight * v.Quantity
miscCount += 1
miscCount += v.Quantity
case objSubTypeItemRecipe:
recSize += item.Weight * v.Quantity
recCount += 1
recCount += v.Quantity
case objSubTypeItemPart:
partSize += item.Weight * v.Quantity
partCount += 1
partCount += v.Quantity
case objSubTypeItemOther:
otherSize += item.Weight * v.Quantity
otherCount += 1
otherCount += v.Quantity
}
}
}
@ -831,6 +831,7 @@ func jobGStock(j Job) {
Text: txt,
FromMsgID64: p.MsgID64,
FromChatID64: p.ChatID64,
ParseMode: cmdParseModeHTML,
}
TGCmdQueue <- m
}