This commit is contained in:
shoopea 2020-02-09 16:25:23 +08:00
parent 6a779804a0
commit eed93a4c78

6
msg.go
View File

@ -182,6 +182,8 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
`(?P<Stamina>🔋Stamina restored)|` +
`(🏅Peacekeeping (?P<Peacekeeping>.*))|` +
`(🏅Enraged (?P<Enraged>.*))|` +
`(?P<Crit>⚡Critical strike)|` +
`(Lost\: (?P<Lost>.*))|` +
`.+)`)
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])
}