This commit is contained in:
shoopea 2020-06-22 15:45:03 +02:00
parent a15540055a
commit f385c852e0

5
msg.go
View File

@ -341,16 +341,15 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
stock = append(stock, item)
}
}
re = regexp.MustCompile(`\n(u[0-9]+)([ᵃᵇᶜᵈᵉ]{0,1}) (.*) x ([0-9]+)`)
re = regexp.MustCompile(`\n(u[0-9]+)([ᵃᵇᶜᵈᵉ]{0,1}) (.*)`)
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stock}"), -1) {
i := getObjItemID(``, l[3])
q, _ := strconv.ParseInt(l[4], 10, 64)
if i != 0 {
item := ChatWarsItems{
Code: l[1],
Name: l[3],
ItemID64: i,
Quantity: q,
Quantity: 1,
}
fmt.Printf("parseSubTypeMessageGStockAnyAck : Unique : %v\n", item)
stock = append(stock, item)