update objSubTypeMessageStockAnyAck

This commit is contained in:
shoopea 2019-11-05 10:59:12 +08:00
parent cb69e305b5
commit 2e65edc76b
2 changed files with 2 additions and 2 deletions

2
msg.go
View File

@ -65,7 +65,7 @@ func parseSubTypeMessageStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
cwm := ChatWarsMessageStockAnyAck{}
items := []ChatWarsItems{}
re := regexp.MustCompile(`(📃){0,1}([a-zA-Z ]+) \(([0-9]+)\)( /view_[a-z0-9]+){0,1}\n{0,1}`)
re := regexp.MustCompile(`(📃){0,1}(['a-zA-Z ]+) \(([0-9]+)\)( /view_[a-z0-9]+){0,1}\n{0,1}`)
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Items}"), -1) {
// fmt.Printf("parseSubTypeMessageStockAnyAck : %+q\n", l)
i := getObjItemID(``, l[2])

View File

@ -186,7 +186,7 @@ func resetMsgParsingRules() {
,(5000, ` + strconv.Itoa(objSubTypeMessageEquipStockReq) + `, "Equipment Stock Req", "^🏷Equipment$")
,(5000, ` + strconv.Itoa(objSubTypeMessageCraftStockReq) + `, "Crafting Stock Req", "^⚒Crafting$")
,(5000, ` + strconv.Itoa(objSubTypeMessageStockEmpty) + `, "Stock Empty", "^\\[empty\\]$")
,(5000, ` + strconv.Itoa(objSubTypeMessageStockAnyAck) + `, "Any Stock Ack", "^(?P<Items>(([a-zA-Z 📃]+ \\([0-9]+\\)( /view_[a-z0-9]+){0,1}\\n{0,1})+))$")
,(5000, ` + strconv.Itoa(objSubTypeMessageStockAnyAck) + `, "Any Stock Ack", "^(?P<Items>((['a-zA-Z 📃]+ \\([0-9]+\\)( /view_[a-z0-9]+){0,1}\\n{0,1})+))$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGDepositReq) + `, "GDeposit Req", "^/g_deposit (?P<Item>[a-z0-9]+) (?P<Quantity>[0-9]+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGDepositAck) + `, "GDeposit Ack #2", "^Deposited successfully: (?P<Item>.*) \\((?P<Quantity>[0-9]+)\\)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGDepositAck) + `, "GDeposit Ack #1", "^Deposited (?P<Item>.*) \\((?P<Quantity>[0-9]+)\\) successfully$")