test
This commit is contained in:
parent
c05d50bf29
commit
82365181aa
5
msg.go
5
msg.go
@ -31,9 +31,8 @@ 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])
|
||||||
@ -46,7 +45,7 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
|
|||||||
ItemID64: i,
|
ItemID64: i,
|
||||||
Quantity: q,
|
Quantity: q,
|
||||||
}
|
}
|
||||||
items.Append(item)
|
items = append(items, item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cwm.ItemList = items
|
cwm.ItemList = items
|
||||||
|
Loading…
Reference in New Issue
Block a user