This commit is contained in:
shoopea 2019-10-11 09:47:51 +08:00
parent 71ebce37bb
commit 007c3c0f62

3
msg.go
View File

@ -224,7 +224,7 @@ func parseSubTypeMessageWithdrawRcv(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
items := []ChatWarsItems{}
re := regexp.MustCompile(`(.*) x (.*)`)
for _, l := range re.FindAllStringSubmatch(m.Text, -1) {
log.Printf("parseSubTypeMessageWithdrawRcv : %s x %s\n", l[1], l[2])
log.Printf("parseSubTypeMessageWithdrawRcv : search : %s x %s\n", l[1], l[2])
i := getObjItemID(``, l[1])
q, _ := strconv.ParseInt(l[2], 10, 64)
if i != 0 {
@ -233,6 +233,7 @@ func parseSubTypeMessageWithdrawRcv(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
Quantity: q,
}
items = append(items, item)
log.Printf("parseSubTypeMessageWithdrawRcv : found : %d x %d\n", i, q)
}
}
cwm.ItemList = items