test ambush

This commit is contained in:
shoopea 2019-10-20 20:21:18 +08:00
parent 086f2d83c6
commit 305167635e

6
msg.go
View File

@ -428,6 +428,8 @@ func parseSubTypeMessageDuelFight(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
} }
func parseSubTypeMessageQuestResultAmbush(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageQuestResultAmbush, error) { func parseSubTypeMessageQuestResultAmbush(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageQuestResultAmbush, error) {
var level float64
cwm := ChatWarsMessageQuestResultAmbush{} cwm := ChatWarsMessageQuestResultAmbush{}
re := regexp.MustCompile(`([0-9] x ){0,1}([a-zA-Z ]*) lvl\.([0-9]*)`) re := regexp.MustCompile(`([0-9] x ){0,1}([a-zA-Z ]*) lvl\.([0-9]*)`)
@ -435,6 +437,10 @@ func parseSubTypeMessageQuestResultAmbush(m *ChatWarsMessage, r *regexp.Regexp)
log.Printf("parseSubTypeMessageQuestResultAmbush : %s\n", l[1]) log.Printf("parseSubTypeMessageQuestResultAmbush : %s\n", l[1])
log.Printf("parseSubTypeMessageQuestResultAmbush : %s\n", l[2]) log.Printf("parseSubTypeMessageQuestResultAmbush : %s\n", l[2])
log.Printf("parseSubTypeMessageQuestResultAmbush : %s\n", l[3]) log.Printf("parseSubTypeMessageQuestResultAmbush : %s\n", l[3])
lvl, _ := strconv.PartInt(l[3], 10, 64)
log.Printf("parseSubTypeMessageQuestResultAmbush : lvl : %d\n", lvl)
qty, _ := strconv.PartInt(l[1], 10, 64)
log.Printf("parseSubTypeMessageQuestResultAmbush : qty : %d\n", lvl)
} }
cwm.Msg = m cwm.Msg = m
return &cwm, nil return &cwm, nil