From a30ced1b6070a8a25a9b5ec5bc8bedbaccf4914d Mon Sep 17 00:00:00 2001 From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Wed, 21 Sep 2022 02:45:42 +0800 Subject: [PATCH] =?utf8?q?=E6=9B=B4=E6=96=B0=E5=BC=B9=E5=B9=95=E6=B6=88?= =?utf8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/Msg.go | 3 +++ Reply/Reply.go | 14 +++++++++++++ Reply/ws_msg/LIKE_INFO_V3_CLICK.go | 33 ++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 Reply/ws_msg/LIKE_INFO_V3_CLICK.go diff --git a/Reply/Msg.go b/Reply/Msg.go index 893921a..819fd95 100644 --- a/Reply/Msg.go +++ b/Reply/Msg.go @@ -104,6 +104,9 @@ var Msg_map = map[string]func(replyF, string){ "VIDEO_CONNECTION_MSG": replyF.video_connection_msg, //视频连线状态改变 "WARNING": replyF.warning, //超管警告 "DANMU_AGGREGATION": nil, //聚合弹幕 + "GUARD_HONOR_THOUSAND": nil, + "LIKE_INFO_V3_CLICK": replyF.like_info_v3_click, //为主播点赞了 + "LIKE_INFO_V3_UPDATE": nil, //为主播点赞了总个数 } // 屏蔽不需要的消息 diff --git a/Reply/Reply.go b/Reply/Reply.go index b41a1f0..59c7050 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -487,6 +487,20 @@ func (replyF) warning(s string) { msglog.Base_add("房").L(`I: `, s) } +// Msg-为主播点赞了 +func (replyF) like_info_v3_click(s string) { + var type_item ws_msg.LIKE_INFO_V3_CLICK + + if e := json.Unmarshal([]byte(s), &type_item); e != nil { + msglog.L(`E: `, e) + } + s := type_item.Data.Uname + type_item.Data.LikeText + + Gui_show(s, "0room") + + msglog.Base_add("房").L(`I: `, s) +} + // Msg-开始了视频连线 func (replyF) video_connection_join_start(s string) { msglog := msglog.Base_add("房").Log_show_control(false) diff --git a/Reply/ws_msg/LIKE_INFO_V3_CLICK.go b/Reply/ws_msg/LIKE_INFO_V3_CLICK.go new file mode 100644 index 0000000..654adc0 --- /dev/null +++ b/Reply/ws_msg/LIKE_INFO_V3_CLICK.go @@ -0,0 +1,33 @@ +package part + +type LIKE_INFO_V3_CLICK struct { + Cmd string `json:"cmd"` + Data struct { + ShowArea int `json:"show_area"` + MsgType int `json:"msg_type"` + LikeIcon string `json:"like_icon"` + UID int `json:"uid"` + LikeText string `json:"like_text"` + Uname string `json:"uname"` + UnameColor string `json:"uname_color"` + Identities []int `json:"identities"` + FansMedal struct { + TargetID int `json:"target_id"` + MedalLevel int `json:"medal_level"` + MedalName string `json:"medal_name"` + MedalColor int `json:"medal_color"` + MedalColorStart int `json:"medal_color_start"` + MedalColorEnd int `json:"medal_color_end"` + MedalColorBorder int `json:"medal_color_border"` + IsLighted int `json:"is_lighted"` + GuardLevel int `json:"guard_level"` + Special string `json:"special"` + IconID int `json:"icon_id"` + AnchorRoomid int `json:"anchor_roomid"` + Score int `json:"score"` + } `json:"fans_medal"` + ContributionInfo struct { + Grade int `json:"grade"` + } `json:"contribution_info"` + } `json:"data"` +} -- 2.39.2