fix tributes

This commit is contained in:
shoopea 2020-02-03 14:38:01 +08:00
parent ffb967d9a7
commit 96f87462ed

4
msg.go
View File

@ -289,10 +289,10 @@ func parseSubTypeMessageTributesStatsAck(m *ChatWarsMessage, r *regexp.Regexp) (
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(r.ReplaceAllString(l[0], "${Quantity}"), 10, 64)
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(r.ReplaceAllString(l[0], "${Exp}"), 10, 64)
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)