// Msg类型数据处理方法map
var Msg_map = map[string]func(replyF, string){
+ `WEALTH_NOTIFY`: replyF.wealth_notify, //荣耀等级提示
`LOG_IN_NOTICE`: replyF.log_in_notice, //登录提示
`HOT_BUY_NUM`: nil,
`VOICE_JOIN_ROOM_COUNT_INFO`: replyF.voice_join_room_count_info, //连麦等待
msglog.Base_add("Unknow").L(`E: `, s)
}
+// 荣耀等级提示
+func (replyF) wealth_notify(s string) {
+ msglog := msglog.Base_add("房")
+ var j ws_msg.WEALTH_NOTIFY
+ if e := json.Unmarshal([]byte(s), &j); e != nil {
+ msglog.L(`E: `, e)
+ return
+ }
+ Gui_show(fmt.Sprintf("当前荣耀等级 %d", j.Data.Info.Level), `0room`)
+ msglog.L(`I: `, fmt.Sprintf("当前荣耀等级 %d", j.Data.Info.Level))
+}
+
// 登录提示
func (replyF) log_in_notice(s string) {
msglog := msglog.Base_add("房")
--- /dev/null
+package part
+
+type WEALTH_NOTIFY struct {
+ Cmd string `json:"cmd"`
+ Data struct {
+ Flag int `json:"flag"`
+ Info struct {
+ EffectKey int `json:"effect_key"`
+ HasItemsChanged int `json:"has_items_changed"`
+ Level int `json:"level"`
+ SendTime int64 `json:"send_time"`
+ Status int `json:"status"`
+ } `json:"info"`
+ } `json:"data"`
+ IsReport bool `json:"is_report"`
+ MsgID string `json:"msg_id"`
+ SendTime int64 `json:"send_time"`
+}