This commit is contained in:
shoopea 2019-10-10 18:30:40 +08:00
parent 1134f4c090
commit d947c3b2e4

22
msg.go
View File

@ -222,18 +222,20 @@ func parseSubTypeMessageAuctionAnnounce(m *ChatWarsMessage, r *regexp.Regexp) (*
func parseSubTypeMessageWithdrawRcv(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageWithdrawRcv, error) { func parseSubTypeMessageWithdrawRcv(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageWithdrawRcv, error) {
cwm := ChatWarsMessageWithdrawRcv{} cwm := ChatWarsMessageWithdrawRcv{}
items := []ChatWarsItems{} items := []ChatWarsItems{}
re := regexp.MustCompile(`(.*) x (.*)`) /*
for _, l := range re.FindAllStringSubmatch(m.Text, -1) { re := regexp.MustCompile(`(.*) x (.*)`)
i := getObjItemID(``, l[1]) for _, l := range re.FindAllStringSubmatch(m.Text, -1) {
q, _ := strconv.ParseInt(l[2], 10, 64) i := getObjItemID(``, l[1])
if i != 0 { q, _ := strconv.ParseInt(l[2], 10, 64)
item := ChatWarsItems{ if i != 0 {
ItemID64: i, item := ChatWarsItems{
Quantity: q, ItemID64: i,
Quantity: q,
}
items = append(items, item)
} }
items = append(items, item)
} }
} */
cwm.ItemList = items cwm.ItemList = items
return &cwm, nil return &cwm, nil
} }