From eed93a4c7805e36f3dbc111dd9a21930ed538ce8 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 9 Feb 2020 16:25:23 +0800 Subject: [PATCH] test --- msg.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msg.go b/msg.go index 6029d59..697edc6 100644 --- a/msg.go +++ b/msg.go @@ -182,6 +182,8 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa `(?P🔋Stamina restored)|` + `(🏅Peacekeeping (?P.*))|` + `(🏅Enraged (?P.*))|` + + `(?P⚡Critical strike)|` + + `(Lost\: (?P.*))|` + `.+)`) for i, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Extra}"), -1) { if len(re.ReplaceAllString(l[0], "${Cry}")) != 0 { @@ -194,6 +196,10 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa // log.Printf("parseSubTypeMessageReport : Extra[%d] : Peacekeeping\n", i) } else if len(re.ReplaceAllString(l[0], "${Enraged}")) != 0 { // log.Printf("parseSubTypeMessageReport : Extra[%d] : Enraged\n", i) + } else if len(re.ReplaceAllString(l[0], "${Crit}")) != 0 { + // log.Printf("parseSubTypeMessageReport : Extra[%d] : Crit\n", i) + } else if len(re.ReplaceAllString(l[0], "${Lost}")) != 0 { + log.Printf("parseSubTypeMessageReport : Extra[%d] : Lost :%s \n", i, re.ReplaceAllString(l[0], "${Lost}")) } else { log.Printf("parseSubTypeMessageReport : Extra[%d] : %s\n", i, l[0]) }