From: qydysky Date: Sat, 7 May 2022 16:43:26 +0000 (+0800) Subject: 观看人数显示新增数量 X-Git-Tag: v0.5.10~41^2~69 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=19747c0e50ec9c51ab8bbd5c56fa6d71450ef59f;p=bili_danmu%2F.git 观看人数显示新增数量 --- diff --git a/Reply/Reply.go b/Reply/Reply.go index a99e95f..1f876cf 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -321,8 +321,9 @@ func (replyF) user_toast_msg(s string) { //HeartBeat-心跳用来传递人气值 var ( - renqi_old int - continuity int + renqi_old int + watched_old int + continuity int ) func (replyF) heartbeat(s int) { @@ -331,7 +332,8 @@ func (replyF) heartbeat(s int) { return } //人气为1,不输出 var ( - tmp string + tmp string + tmp2 string ) if renqi_old != 0 { if s > renqi_old { @@ -355,12 +357,15 @@ func (replyF) heartbeat(s int) { } tmp = `(` + tmp + `)` } - + if watched_old != 0 { + tmp2 += `(+` + strconv.Itoa(c.C.Watched-watched_old) + `)` + } if renqi_old != s { - fmt.Printf("\t人气:%d %s\t观看人数:%d\n", s, tmp, c.C.Watched) + fmt.Printf("\t人气:%d %s\t观看人数:%d %s\n", s, tmp, c.C.Watched, tmp2) } reply_log.Base_add(`人气`).Log_show_control(false).L(`I: `, "当前人气", s) renqi_old = s + watched_old = c.C.Watched } //Msg-房间特殊活动