diff --git a/msg.go b/msg.go index 68345ca..b0f6960 100644 --- a/msg.go +++ b/msg.go @@ -175,7 +175,6 @@ func parseSubTypeMessageStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWar func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageReportAck, error) { cwm := ChatWarsMessageReportAck{} - // log.Printf("parseSubTypeMessageReport : Extra : %s\n", r.ReplaceAllString(m.Text, "${Extra}")) re := regexp.MustCompile(`(` + `(?PYour battle cries were successful)|` + `(You were outplayed by (?P.*))|` + @@ -187,6 +186,7 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa `(You were healed by (?P.*))|` + `(You were poisoned by (?P.*))|` + `(Got hit by an arrow from (?P.*), (?P.*) skill decreased)|` + + `(Your (?P.*) has been broken)|` + `.+)`) for i, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Extra}"), -1) { if len(re.ReplaceAllString(l[0], "${Cry}")) != 0 { @@ -208,7 +208,9 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa } else if len(re.ReplaceAllString(l[0], "${Poisoner}")) != 0 { // log.Printf("parseSubTypeMessageReport : Extra[%d] : Poisoner : %s\n", i, re.ReplaceAllString(l[0], "${Poisoner}")) } else if len(re.ReplaceAllString(l[0], "${Archer}")) != 0 && len(re.ReplaceAllString(l[0], "${Skill}")) != 0 { - log.Printf("parseSubTypeMessageReport : Extra[%d] : Archer : %s / Skill : %s\n", i, re.ReplaceAllString(l[0], "${Archer}"), re.ReplaceAllString(l[0], "${Skill}")) + // log.Printf("parseSubTypeMessageReport : Extra[%d] : Archer : %s / Skill : %s\n", i, re.ReplaceAllString(l[0], "${Archer}"), re.ReplaceAllString(l[0], "${Skill}")) + } else if len(re.ReplaceAllString(l[0], "${Broken}")) != 0 { + // log.Printf("parseSubTypeMessageReport : Extra[%d] : Broken\n", i) } else { log.Printf("parseSubTypeMessageReport : Extra[%d] : %s\n", i, l[0]) }