From 290704f7664140dc67519829aca14f8b2a58380d Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 8 May 2022 00:35:23 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=82=E7=9C=8B=E4=BA=BA=E6=95=B0=E5=92=8C?= =?utf8?q?=E4=BA=BA=E6=B0=94=E4=B8=80=E8=B5=B7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- CV/Var.go | 1 + Reply/Reply.go | 15 ++++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CV/Var.go b/CV/Var.go index a103c82..ca45d80 100644 --- a/CV/Var.go +++ b/CV/Var.go @@ -22,6 +22,7 @@ type Common struct { UpUid int //主播uid Rev float64 //营收 Renqi int //人气 + Watched int //观看人数 GuardNum int //舰长数 ParentAreaID int //父分区 AreaID int //子分区 diff --git a/Reply/Reply.go b/Reply/Reply.go index e04c95b..a99e95f 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -357,7 +357,7 @@ func (replyF) heartbeat(s int) { } if renqi_old != s { - fmt.Printf("\t人气:%d %s\n", s, tmp) + fmt.Printf("\t人气:%d %s\t观看人数:%d\n", s, tmp, c.C.Watched) } reply_log.Base_add(`人气`).Log_show_control(false).L(`I: `, "当前人气", s) renqi_old = s @@ -371,20 +371,13 @@ func (replyF) win_activity(s string) { msglog.Base_add("房").Log_show_control(false).L(`I: `, "活动", title, "已开启") } -var ( - watched int //观看人数 -) - //Msg-观看人数 func (replyF) watched_change(s string) { var data ws_msg.WATCHED_CHANGE json.Unmarshal([]byte(s), &data) - if float64(data.Data.Num) < float64(watched)*1.1 && data.Data.Num >= watched { - return - } - watched = data.Data.Num - fmt.Printf("\t观看人数:%d\n", watched) - msglog.Base_add("房").Log_show_control(false).L(`I: `, "观看人数", watched) + c.C.Watched = data.Data.Num + // fmt.Printf("\t观看人数:%d\n", watched) + msglog.Base_add("房").Log_show_control(false).L(`I: `, "观看人数", data.Data.Num) } //Msg-特殊礼物,当前仅观察到节奏风暴 -- 2.39.2