fix debug

This commit is contained in:
shoopea 2020-02-03 14:39:49 +08:00
parent 96f87462ed
commit d0640f4e25

5
msg.go
View File

@ -286,17 +286,12 @@ func parseSubTypeMessageTributesStatsAck(m *ChatWarsMessage, r *regexp.Regexp) (
d, err := fromChatWarsDate(re.ReplaceAllString(l[0], "${Date}"))
logOnError(err, "parseSubTypeMessageTributesStatsAck : fromChatWarsDate")
tribute.Date = d
log.Printf("parseSubTypeMessageTributesStatsAck : Date : %s => %v\n", re.ReplaceAllString(l[0], "${Date}"), tribute.Date)
tribute.ItemID64 = getSilentObjItemID(``, re.ReplaceAllString(l[0], "${Item}"))
log.Printf("parseSubTypeMessageTributesStatsAck : Item : %s => %d\n", re.ReplaceAllString(l[0], "${Item}"), tribute.ItemID64)
tribute.Quantity, err = strconv.ParseInt(re.ReplaceAllString(l[0], "${Quantity}"), 10, 64)
logOnError(err, "parseSubTypeMessageTributesStatsAck : ParseInt")
log.Printf("parseSubTypeMessageTributesStatsAck : Quantity : %s => %d\n", re.ReplaceAllString(l[0], "${Quantity}"), tribute.Quantity)
tribute.Exp, err = strconv.ParseInt(re.ReplaceAllString(l[0], "${Exp}"), 10, 64)
logOnError(err, "parseSubTypeMessageTributesStatsAck : ParseInt")
log.Printf("parseSubTypeMessageTributesStatsAck : Exp : %s => %d \n", re.ReplaceAllString(l[0], "${Exp}"), tribute.Exp)
cwm.Tributes = append(tributes, tribute)
log.Printf("parseSubTypeMessageTributesStatsAck : #%d / #%d : %d + %d (%v)\n", cwm.Msg.TGUserID64, tribute.ItemID64, tribute.Quantity, tribute.Exp, tribute.Date)
}
cwm.Tributes = tributes