This commit is contained in:
shoopea 2019-06-02 18:41:39 +08:00
parent b3857349b6
commit c05d50bf29

3
msg.go
View File

@ -31,8 +31,9 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
} }
func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageStock, error) { func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageStock, error) {
var items []ChatWarsItems
cwm := ChatWarsMessageStock{} cwm := ChatWarsMessageStock{}
items []ChatWarsItems
re := regexp.MustCompile(`\n([0-9a-z]+) (.*) x ([0-9]+)`) re := regexp.MustCompile(`\n([0-9a-z]+) (.*) x ([0-9]+)`)
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stock}"), -1) { for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stock}"), -1) {
i := getObjItemID(l[1]) i := getObjItemID(l[1])